Vous êtes sur la page 1sur 5

Community: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino - National Instruments

Community

Welcome, Guest

Search Community

Login Register

Home > Community > LabVIEW Interface for Arduino > Discussions

Up to Discussions inLabVIEW Interface for Arduino

34625Views
82 Replies
Latest reply:
Oct 29, 2014 12:32 PM by
hesam1987
Go to original post

1
2
3
4
...
6

Previous
Next

Actions

View print preview

Login or Create Profile

15.
Aug 4, 2012 6:51 AM
(in response to IPIN)
Re: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino

Calculating status...

Can anybody send me a working VI for ADXL345? I tried IPIN's VI but it didn't work.
Thanks.

More Like This

salender

Retrieving data ...


Report Abuse

Like
(0
)

Incoming Links

Comment on 'LIFA
ADXL345'

16.
Aug 4, 2012 6:42 PM
(in response to salender)
Re: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino

Those links do not work. Attach the VIs.

Calculating status...

Bookmarked By (2)

Nathan_B.
Report Abuse

17.
Aug 5, 2012 4:00 AM
(in response to Nathan_B.)
Re: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino

Adxl VI 1:

Calculating status...

salender

Adxl VI 2:

Attachments:
adxl345 2.vi (15.9 K)

https://decibel.ni.com/content/thread/12287?start=15&tstart=0[19/05/2015 11:20:54]

Like
(0
)

Everyone
View:
Everyone

Search
Tags

Community: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino - National Instruments

adxl345 1.vi (300.8 K)

Report Abuse

Like
(0
)

18.
Aug 5, 2012 11:21 AM
(in response to salender)
Re: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino

Calculating status...

Nathan_B.

The default baud rate for the Uno is 115200. If you want to use different value you have to
manually change it in the LIFA firmware. Otherwise, I don't see any issues. However, the
sensor may need to be set up correctly (setting certain registers and whatnot). If you have or
can find a working Arduino sketch, it will likely set some registers prior to reading any values.

After fixing the baud rate, try reading specific registers individually and see if that works because
rusty (who posted earlier) said that it works.

Report Abuse

Like
(0
)

19.
Aug 6, 2012 1:45 AM
(in response to Nathan_B.)
Re: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino

Calculating status...

salender

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.

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?

The one I have looks like this:


https://www.sparkfun.com/products/9836

Thanks.

Report Abuse

Like
(0
)

20.
Aug 6, 2012 6:27 PM
(in response to salender)
Re: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino

Calculating status...

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.

Nathan_B.

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.

Report Abuse

Like
(0
)

https://decibel.ni.com/content/thread/12287?start=15&tstart=0[19/05/2015 11:20:54]

Community: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino - National Instruments


21.
Aug 19, 2012 11:45 AM
(in response to Nathan_B.)
Re: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino

Calculating status...

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

salender
Report Abuse

Like
(0
)

22.
Aug 19, 2012 11:38 PM
(in response to salender)
Re: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino

Calculating status...

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

Nathan_B.
Report Abuse

Like
(0
)

23.
Aug 25, 2012 1:58 PM
(in response to Nathan_B.)
Re: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino

Calculating status...

This is how I hooked up adxl345 to my arduino.


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

salender

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

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.

Attachments:
I2Cdev.zip (13.5 K)
ADXL345.zip (15.8 K)

Report Abuse

Like
(0
)

24.
Aug 25, 2012 1:46 PM
(in response to Nathan_B.)
Re: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino

Hello Nathan, Can you give me any advice?

https://decibel.ni.com/content/thread/12287?start=15&tstart=0[19/05/2015 11:20:54]

Community: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino - National Instruments


Calculating status...

salender
Report Abuse

Like
(0
)

25.
Aug 26, 2012 7:09 PM
(in response to salender)
Re: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino

Calculating status...

Nathan_B.

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!

Report Abuse

Like
(0
)

Report Abuse

Like
(0
)

Report Abuse

Like
(0

26.
Sep 11, 2012 12:23 PM
(in response to IPIN)
Re: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino

Greetings, does anyone have an VI that works?

Calculating status...

otaconlink

27.
Oct 31, 2012 8:02 AM
(in response to otaconlink)
Re: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino

Have somebody solved the problem?

Calculating status...

JGF2
)

28.
Dec 23, 2012 1:09 PM
(in response to IPIN)
Re: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino

Calculating status...

Gert-Jan_A

Hi,

I've got a working VI with the ADXL345:

note:

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

https://decibel.ni.com/content/thread/12287?start=15&tstart=0[19/05/2015 11:20:54]

Community: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino - National Instruments

if there are any questions, feel free to ask !

Greets, Gert-Jan

Report Abuse

Like
(2
)

Report Abuse

Like
(0
)

29.
Jan 1, 2013 2:03 PM
(in response to Gert-Jan_A)
Re: ADXL 345 Sparkfun-- I2c--LabVIEW--Arduino

Calculating status...

salender

Gert-Jan thank you for the VI,


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

1
2
3
4
...
6

Previous
Next

Go to original post

Community
Home

Top of page

Community powered by Jive SBS 4.5.6.3 community


software

(800) 531-5066 | Privacy |


Terms of Use |
Other Legal Info |
2014 National Instruments Corporation. All rights reserved.

https://decibel.ni.com/content/thread/12287?start=15&tstart=0[19/05/2015 11:20:54]