Pages: [1]   Go Down
Author Topic: Accelerometer - analog vs digital & recommendation ?  (Read 5232 times)
0 Members and 1 Guest are viewing this topic.
London, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone!
I just started playing with the Arduino, got it last pay day and it's quite fun! I'm looking at accelerometers for my own project, and I'd like to find out the difference between using accelerometers that have analog vs digital outputs. The only place where I found _some_ info was in this data sheet: http://www.freescale.com/files/sensors/doc/app_note/AN3468.pdf

From my basic understanding for accelerometers with analog outputs
- Can be read in by arduino's analog pins using analogRead()
- From http://www.arduino.cc/en/Reference/AnalogRead - it seems that with an analog accelerometer, I can sample it several thousand times a second.
- ADC of the arduino is 10bit; if I want a finer resolution, I may need to look into an external ADC?

Digital outputs:
- Using i2C or other protocols, so there is a library to use
- There is a limit  on how fast you can sample the data
- Some I've seen have 13 bit adc resolution

A little on my project, it's very simple. I want to attach LEDs to my arm, if I'm say, squatting down, the number of LEDs lit up will depend on how fast I move. Conversely, if I'm jumping up, another set of LEDs will indicate upward movement, with the number of them indicating how fast the upward movement is.

Question 1: In such a case, what kind of accelerometer would make more sense?

Question 2: Recommendations! I'm looking for a 3-axis accelerometer, my budget is £30-50. It's not solely for this project it's going to be recycled for other purposes, so I don't mind purchasing something more expensive, say with gyro on board.

Thank you! I hope the info provided is sufficient.

Cheers!
Logged

Italy
Offline Offline
Full Member
***
Karma: 3
Posts: 142
jayduino rox
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
ADC of the arduino is 10bit; if I want a finer resolution, I may need to look into an external ADC?
external ADC, or much more easy a digital accelerometer (some got 14 bit).

Quote
it seems that with an analog accelerometer, I can sample it several thousand times a second.
Yes, you can sample in standard mode about 9Khz. With some tricks until 70Khz. accelerometer will handel max 1-2Khz. But for your project it seems total overkill. I think  a < 100Hz should be sufficient (and you get non fluctuating readings).

For myself I used a BMA180, and I am very happy with it (14bit, from 10 to 2400Hz, low noise, set range of +-1G to +-16G). I wrote a GPL library for it:  http://www.schwietering.com/jayduino/ that would help you to setup quickly the sensor. Sparkfun has a nice breakout board http://www.sparkfun.com/products/9723. You will need a 3.3V level converter like this one: http://www.sparkfun.com/products/8745. Total costs 30$ US.
Logged

Juergen

London, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there! Thanks for the info! That's a very nice recommendation you got there, I may get it smiley I also came across this page http://www.sparkfun.com/tutorials/167 after looking at your links, gave me a good idea what's the differences between the various accelerometers. Thanks!
Logged

Italy
Offline Offline
Full Member
***
Karma: 3
Posts: 142
jayduino rox
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I also came across this page http://www.sparkfun.com/tutorials/167 after looking at your links, gave me a good idea what's the differences between the various accelerometers. Thanks!
Oh, thank you, that is a cool collection I wasn't aware of!  smiley-mr-green
Logged

Juergen

Northern California (by San Francisco)
Offline Offline
Sr. Member
****
Karma: 3
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've decided to do a few projects with accelerometers and gyros too. I just ordered this accelerometer http://shop.moderndevice.com/products/mma7260qt-3-axis-accelerometer and this gyro http://shop.moderndevice.com/products/idg-500-dual-axis-gyro.

Since they have not arrived yet, I can't give you any recommendation now. But I did do quite a bit of shopping around.

Good luck on your project. Sounds fun and interesting.
Logged

London, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I also came across this page http://www.sparkfun.com/tutorials/167 after looking at your links, gave me a good idea what's the differences between the various accelerometers. Thanks!
Oh, thank you, that is a cool collection I wasn't aware of!  smiley-mr-green

You're welcome smiley

Daanii: Those two look quite interesting. I'd love to explore gyros one day soon smiley
Logged

Torino, Italy
Offline Offline
Sr. Member
****
Karma: 2
Posts: 309
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That's a very common path I'm seeing lot of people here are following.. accelerometer.. then gyro.. then magnetometer..

You might wanna have a look at my FreeIMU project as well as my orientation sensing library.

Logged

Georgina Ontario
Offline Offline
Sr. Member
****
Karma: 5
Posts: 437
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's a very common path I'm seeing lot of people here are following.. accelerometer.. then gyro.. then magnetometer..

You might wanna have a look at my FreeIMU project as well as my orientation sensing library.



Fabio:

That looks good. No immediate need but I got a copy because I expect to look at it soon...

I am trying the BMA180 Accelerometers. Maybe they have less noise. I will try to comment ASAP.
Logged

Just another Hacker

Torino, Italy
Offline Offline
Sr. Member
****
Karma: 2
Posts: 309
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I am trying the BMA180 Accelerometers. Maybe they have less noise. I will try to comment ASAP.

I ear this often .. but I still didn't see a good test with "scientific" proof of that.

Enjoy my code.
Logged

London, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Fabio, your project looks very interesting! I'll be sure to look at the libraries in more detail when I get my accelerometer smiley

Cheers!
Logged

Georgina Ontario
Offline Offline
Sr. Member
****
Karma: 5
Posts: 437
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Fabio:

I have run tests on the BMA 180. I have not tested the ADXL245. Maybe I should.  smiley

I will try to post the results as I stated in another thread. If I can I will combine all the graphs and tables into a PDF.

The results are interesting...
Logged

Just another Hacker

Torino, Italy
Offline Offline
Sr. Member
****
Karma: 2
Posts: 309
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That would be great. Please write down the configuration of the sensor you are using.

Also you may wanna try check out this: http://www.analog.com/static/imported-files/application_notes/AN-1063.pdf
(Oversampling technique to improve the ADXL345 output resolution)
Logged

Georgina Ontario
Offline Offline
Sr. Member
****
Karma: 5
Posts: 437
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Fabio:

I will see if I can post a table ...

The following table was developed with the following settings.

The G-Force range was set to 1G
The Band Pass was set to 150 Hz.
The Mode was set to Mode Zero (0) through One (1) as indicated.

I also took off 2.31V from a voltage divider with a .01 uf cap across the 2.31Volts.

I was using an ISR and sampling at about 145-150 SPS

Accelerometer Noise--  The BOSCH BMA180            
            
Mode 0      Axis   Axis   Axis
   Measurement   X   Y   Z
   Low Value   -147   -511   8029
   High Value   167   -192   8168
   Sample Count   14938   14938   14938
   Average   -2   -327   -8160
   Std Dev.   38.52   32.87   6.77
            
Mode 1      Axis   Axis   Axis
   Measurement   X   Y   Z
   Low Value   3064   -968   8150
   High Value   3364   -677   8165
   Sample Count   16174   16174   16174
   Average   3230   -818   8165
   Std Dev.   29.34   30.08   1.16
            
Mode 2      Axis   Axis   Axis
   Measurement   X   Y   Z
   Low Value   3091   -977   8155
   High Value   3300   -771   8165
   Sample Count   12390   12390   12390
   Average   3196   -870   8162
   Std Dev.   22.52   22.84   0.6478
            
Mode 3      Axis   Axis   Axis
   Measurement   X   Y   Z
   Low Value   -53   -408   8125
   High Value   93   -214   8164
   Sample Count   11083   11083   11083
   Average   19   -312   8159
   Std Dev.   19.27   21.39   1.71
            
Maybe you can throw that into your own spreadsheet and have a look...

Hmm does not look hopeful.

In the next day or two I should do some trials on Low Frequency noise. I need to move everything off a breadboard onto a mounting system.

I have a PDF I could send you -- maybe you could duplicate the trials at the most sensitive settings...

Hope that helps.
« Last Edit: February 23, 2011, 05:16:01 pm by WillR » Logged

Just another Hacker

Torino, Italy
Offline Offline
Sr. Member
****
Karma: 2
Posts: 309
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

please share the PDF and the testing code you are using.. you can put them on http://www.speedyshare.com/
Logged

Pages: [1]   Go Up
Jump to: