Maker Pro
Maker Pro

amplifying accelerometer output

sparky_joe

Jun 2, 2012
4
Joined
Jun 2, 2012
Messages
4
I want to amplify the output from my accelerometer
so that small changes in output voltage from the
1.6V "static" state would be amplified. So, for example,
if the voltage increases to 1.8 (delta=+.2V)
because of a small acceleration, I would amplify that
voltage change by a gain of say, 5, so that this same
acceleration would result in an output voltage of
2.6 (.2 X 5 = 1.0, 1.6 + 1.0 = 2.6). This output
would be fed into my Arduino Analog input so that I
can detect very small accelerations. Does anyone know
how to make an op-amp circuit that will accomplish this?
 

eptheta

Dec 20, 2009
188
Joined
Dec 20, 2009
Messages
188
Hey !
Why don't you just ignore the adding part (to add 1V to 1.6V). Isn't amplifying the difference enough since you already know that the reference is 1.6V ?

But if you wanted both parts, I guess you could use two op amps amplifiers, one as a differential amp and one as a non-inverting summer to get the result you want.
Provided you have a 1.6V reference, you can string the two op amps like this:
Untitled.png


The resistor values aren't important, just the ratios, so change them to higher ones as required. Look up the two op amp functions I mentioned before too.

Also, you better wait for confirmation from someone with more experience. This stuff is mostly new to me.
 
Last edited:

sparky_joe

Jun 2, 2012
4
Joined
Jun 2, 2012
Messages
4
Looks like this circuit may work! It's worth a shot anyway. I'm assuming these op-amps need dual supply so that the output of the first could go negative if the in is less than 1.6. Hey, I don't know how familiar you are with accelerometers, but mine is a basic analog out, 3.3V supply unit. If the axis in question is experiencing no acceleration, the output is approx half or about 1.6 (I just picked that value for sake of argument). So, if there's a slight positive acceleration, the output voltage will rise in a linear fashion directly proportional to the acceleration. Likewise, with deceleration the voltage will fall. This voltage is fed into the ADC input on the Arduino where it's converted to a number between 0 and 1023, so in this case, zero acceleration results in a value of approx 511. The problem is that when it experiences a small acceleration, the number will jump up to about 515, but I want it to jump up much higher, to say, 600. Since the robot is never going to experience all that much acceleration, I'm not worried about it overloading the ADC or going outside limits. I simply want the arduino to be much more sensitive to small accelerations.
 

eptheta

Dec 20, 2009
188
Joined
Dec 20, 2009
Messages
188
I've worked with an accelerometer before (although I used it as a gyroscope/tilt/position sensor). It was just an experimental thing, and the module had only an 8 bit resolution.
The output was in a similar fashion though. When the sensor is at (0,0,0) horizontal to the ground, the ADC output was (0,255,0) for x,y,z. and then I tilted it along one axis, the values would change accordingly. But my module gradually raised the output even for large movements along the axis. It also had some sort of control input that set a range for movement. For me it was just 'large displacement' or 'small displacement' set by a jumper (of course 'small/large' was defined well in the datasheet), but check the datasheet for any controlling input. Also, it had an I2C interface, so I had the data fed directly to my arduino, no meddling allowed.

What I'd do is first figure out the maximum swing that your 'small acceleration' is going to generate. (Let's say its ±12mV from your 511 to 514 ADC example)
Amplify this as much as you'd like and set the upper reference of your ADC to a similar value to increase resolution. So, lets say you 200x this difference using a diff op-amp, that gets you a range of ±2.4V.
Add a 2.5V DC bias and feed it into a 5V reference ADC on your μC. That should give you a good resolution for small inputs.

That, or find an ADC with more bits. If you use a 16bit ADC, then the same 12mV will get you an difference of 240 instead of your 4 (515-511=4). But that would mean buying more chips and doing more interfacing work.
 

sparky_joe

Jun 2, 2012
4
Joined
Jun 2, 2012
Messages
4
What you're talking about is exactly what I'm trying to do, I just need to know how to implement the amplifier to achieve that goal. Are the op-amps in your circuit dual supply? I'm thinking the first one would have to be in order to give negative voltage out if the "IN" is less than 1.6v. So what should the rail voltage be?
 

eptheta

Dec 20, 2009
188
Joined
Dec 20, 2009
Messages
188
Hi, sorry I couldn't reply earlier. How is the project going ? You may have already gone past this stage, but for the sake of completeness, I'll reply to the last question.

Yeah, if the voltage swings around 1.6V then the first op amp would need to be a dual supply in that design (and you could ignore the second op amp and increase the gain on the first one)

Alternately, like I said before, figure out the absolute maximum swing that the accelerometer can generate. Now, hypothetically, if that's about 200mV (i.e your range of inputs is 1.4-1.8V), then you could just set your non inverting input at <1.4V. Amplify the difference, feed it to the ADC of your uC and back calculate the actual voltage.
You'd get away with a single supply, but you'd reduce the effective resolution.
Again, it's fundamental to know how large your swing is (find it out asap), and how fine a resolution you demand (i.e do you want it to be accurate to the mV ? to 10mV ? )
 
Top