Pages: [1]   Go Down
Author Topic: analog accelerometer voltage to g conversion?  (Read 1096 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 121
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a +/-1.2g digital and analog accelerometer and am currently running it as analog.  Here's all the pertinent info:
-It is running off the 5Volt power and putting both analog Voltages out to two analog pins on the arduino.
-At rest it outputs in the 500's (which is close to 2.5V or 0g)
-The specific accelerometer/breakout board can be found here: http://www.sparkfun.com/commerce/product_info.php?products_id=843

My question is how do I tell what output is equivalent to 1g or .5g or whatever?  
How do I convert the voltage input (0-1024) to a gravity number, what scale does it sit on?
More important (esp. for others) how do I figure this out in general with an analog accelerometer?
« Last Edit: April 06, 2007, 08:42:02 am by sti_robot » Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 203
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The numerical value you read on the analog pin is a linear function of the voltage on the pin, and should be 0 at 0 volts, more or less.

I believe your device's voltage is a linear function of Gs. 0g is 2.5V (at 5V supplies), and it will vary some number of millivolts/G. The ADXL202E is 312mV/G, but I don't have a datasheet for your part handy. Look it up. You are looking for the "Sensitivity" section for values expressed in mV/G.

Near the end of the datasheet it has a handy note on calibration. Turn your part so gravity gives you a +1G, measure. Turn your part so gravity gives you a -1G, measure. Calculate constants for your part. Isn't it handy that you are supplied with a 1G sample planet to make the math easy?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 121
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

^ Good ideas, thanks.

I was wondering about that +/-1 g test.  Unfortunately I'm at work and can't do any of this until I get home.
Logged

Pages: [1]   Go Up
Jump to: