# Accelerometer in Tilt app. Convert +/- 15 degrees to 0 -> 5 volt ?

Discussion in 'General Electronics Chat' started by flamsk, Aug 13, 2009.

1. ### flamsk Thread Starter New Member

Aug 13, 2009
1
0
Hi im using an ST LIS2L02 accelerometer in a tilt application. The supply voltage is 5 volt, and it is used in 2g setup. It outputs the following:

-90 degrees 1,50 volt
0 degrees 2,50 volt
90 degrees 3,50 volt

im my application the output goes to an AVR mcu, where it is convertet via builtin ADC. Since im only interested with the scope +/- 15 degrees

-15 degrees 2,33 volt
0 degrees 2,50 volt
15 degrees 2,66 volt

i would loose alot of precision during convertion. how can i scale the output from the accelerometer so i get the following output result ?

-15 degrees 0,00 volt
0 degrees 2,50 volt
15 degrees 5,00 volt

2. ### russ_hensel Distinguished Member

Jan 11, 2009
820
47
Op amp buffers are the common solution. Google should help you out. Be careful not to drive the ADC beyond the supply range of the converter ( if it is similar to the PIC see the spec sheet ) You might also be able to change the reference voltages of the converter ( spec sheet again ) to achieve a similar effect. Most ADCs need a fairly low impecance input, the op amp should provide that the accelerometer may not ( again see the spec sheets )

3. ### mik3 Senior Member

Feb 4, 2008
4,846
63
Use an instrumentation amplifier with its negative input and its reference pin biased at 2.5V. Connect its positive input to the output of the accelerometer. Adjust the gain to 15.625.

Apr 27, 2009
97
1
This can be solved with one Op Amp. (See attached)

If you want to see how I arrived at this circuit read the following article:

http://masteringelectronicsdesign.com/solving-the-differential-amplifier-part-3/

So I started with a differential amplifier, as in this article. The result is R2=infinity and R1=anything. R4 is actually 14.152k, so you need to choose a standard value of 14k 1%. Because of that, the output will be a little bit below 5V and a bit more than 0V.

Be sure to choose a dual supply Op Amp, if you want its output to come close to zero.

If you need to have an Op Amp with one supply, choose rail-to-rail or reduce R4.

• ###### 2.33-2.66_to_0-5V_amplifier.PNG
File size:
5.4 KB
Views:
30
Last edited: Nov 1, 2010