LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino

salender wrote:

I believe, I adjusted my default baud rate for 9600 in some point. When I look for ADXL345 sensor here and there I see different ones. Datasheet looks the same though.

The baud rate does not have anything to do with the sensor.  It is specific to the sketch (LIFA firmware in this case) that is running on the Arduino.

But one thing is really confusing. I tied VCC to CS and couple of times I tried to tie SDO to VCC and CS. Basically I tied all of them to 3.3V source.

I have seen somewhere that I2C pins were connected to VCC via some 10K resistors. I have not tried that. Can it be the problem?

According to the datasheet, you do need pull-up resistors.  Also, you will need to have a logic level shifting device because the sensor use 3.3V logic where as the Arduino uses 5V logic.

0 Kudos
Message 21 of 87
(3,234 Views)

Nathan I got it worked with arduino software but still no chance on LIFA. What could be the problem? Please help.

0 Kudos
Message 22 of 87
(3,234 Views)

You'll have to explain how you did it then.  Show the code and explain what wires you hooked where.

0 Kudos
Message 23 of 87
(3,234 Views)

This is how I hooked up adxl345 to my arduino.

http://bildr.org/2011/03/adxl345-arduino/

adxl345-arduino-400x250.png

And this is the snapshot of arduino software and serial monitor. Sketch and library files added.

serial monitor.jpg

I fixed baud rate as you told me. I2C protocol works fine with VCNL 4000 on Labview. And Adxl345 works fine with arduino software.

VIs I use are the same ones I sent before. And I tried every register with both device addresses. It didn't work.

Thank you for your help.

Download All
0 Kudos
Message 24 of 87
(3,234 Views)

Hello Nathan, Can you give me any advice?

0 Kudos
Message 25 of 87
(3,234 Views)

salender wrote:

Hello Nathan, Can you give me any advice?

Unfortunately, I'm unable to do much debugging with literally no hardware to test.

However, what I would suggest is to go through the working Arduino sketch and see what exactly is being set up prior to actually reading values.  Then, you would need to do exactly the same initialization via LabVIEW.  I can't remember if I've looked through it before and I'm not going to take the time to do it now since I have nothing to test with (which would make it nearly futile for me to look into).

Good luck!

0 Kudos
Message 26 of 87
(3,234 Views)

Greetings, does anyone have an VI that works?

0 Kudos
Message 27 of 87
(3,234 Views)

Have somebody solved the problem?

0 Kudos
Message 28 of 87
(3,234 Views)

Hi,

I've got a working VI with the ADXL345:

ADXL345 labview.PNG

note:

you have to use this schematic to wire the accelerometer with your arduino:

adxl345_arduino_schematics.jpg

if there are any questions, feel free to ask !

Greets, Gert-Jan

Message 29 of 87
(3,234 Views)

Gert-Jan thank you for the VI,

I will try it and come back if I can get it work.

Best wishes.

0 Kudos
Message 30 of 87
(3,234 Views)