Go Down

### Topic: analog accelerometer voltage to g conversion? (Read 2062 times)previous topic - next topic

#### sti robot

##### Apr 06, 2007, 03:41 pmLast Edit: Apr 06, 2007, 03:42 pm by sti_robot Reason: 1
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?

#### jims

#1
##### Apr 06, 2007, 05:40 pm
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?

#### sti robot

#2
##### Apr 06, 2007, 06:08 pm
^ 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.

Go Up

Please enter a valid email to subscribe

To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy