I’m a rookie this year and playing with my teams accelerometer since we didnt use this year on the robot.

The IFI Site says that it returns 290 milivolts per g when supplied with 5volts (what I think the RC has).

How do the RC values 0-1023 reflect the g changes?
Also, when it says 2g, is that the same as 19.6 m/s^2?

THANK YOU!

First of all, it’s great that you are playing with the accelerometer, that’s the best way to learn!

The RC measures between 0 and 5 volts at the Analog Inputs, returning values between 0 and 1023 (10 bits). So, a voltage of 2.5 volts would return 512. There is some tolerance there, plus or minus a few percent.

Also, the RC does have a +5v output, at the digital input pins.

Yes, 2g is the same as twice the acceleration due to gravity at sea level, or about 19.6 m/sec^2.

Please review the specifications and data sheet carefully, and remember the range is +/- 2g, so the bias voltage (a constant voltage when the device is measuring 0 g) is about 1/2 the supply voltage, or perhaps 2.5 volts. That means, you’ll measure 2.5 volts (512 on the RC) when both axes are perpendicular to the earth’s gravity vector.

Luckily, you have a calibrated gravity field - point the sensor down to measure 1 g, up to measure -1 g, on both axes. Calibrate your RC that way, for + and - 1g in both the X and Y axes.

Good luck

Don

Thanks for such a great reply, it really helps.

I was just hoping you could expand one thing:

Why is this? I understand why “no” acceleration would register at 2.5v which in turn would be somewhere near 512 depending on the bias. So then if that’s 2500 mV = 512, then wouldn’t 2g at 3080 mV = 631?

What if I was working with a different sensor that returned 350 mV / unit (random number don’t know if it exists), would I still be dealing with the full range of 0-1023 or would I have to figure something out like I just did above?

Thanks

I’ll bump this because I am also interested in a descriptive answer to the above question.

I hate to bump threads but I just got an accelerometer and had similar questions. :rolleyes:

The answer to your questions are in the data sheet on the web page that Don pointed you to. The typical supply voltage to this part is 3V however it can be operated at any voltage from 2.4 to 5.25 volts. At a 3 volt supply, the sensitivity is around 174 mv/g, however when the supply is bumped up to 5 volts, the sensitivity increases to 290 mv/g as indicated in the IFI document. Manufacturing variances cause each part to be slightly different from each other. However, the specifications indicate that at a 3 volt supply, the center (0 g) value will be between 1.2 volts and 1.8 volts - basically ± 20% of the center voltage. Assuming this holds true at a 5 volt supply, the 0 g value would be between 2.0 volts and 3.0 volts which gives you quite a big potential range for analog values for 0g. Typically, the parts will be very near 2.5 volts, but the specifications indicate that it is possible for them to vary significantly, but will never be outside the specified maximum and minimum values. Also the specification indicates that there could be up to a ±15% variation in sensitivity from part to part. So one part may be as low as 247 mv/g to as high as 333 mv/g. A perfect part would give you 3080 mv or an analog value of 631, but all parts are not perfect. Thus the suggestion by Don to calibrate the accelerometer by using gravity.

Mike