I have a joystick that puts out analog voltage somewhere between 1.5V and 3.5V.
I want to transform this range of voltage to control a motor controller that takes analog voltage between 0V and 5V.
How do I level shift and amplify properly?
analoglevel-shiftingoperational-amplifiervoltage
I have a joystick that puts out analog voltage somewhere between 1.5V and 3.5V.
I want to transform this range of voltage to control a motor controller that takes analog voltage between 0V and 5V.
How do I level shift and amplify properly?
Best Answer
You want a simple gain of 5/2 = 2.5 centered around 2.5 V. This is easy assuming you have 5 V power available, like from the motor controller:
This needs to be a rail to rail output opamp that can run from 5 V power, like the MCP6041 and many others. R1 and R2 form a voltage divider to make the 2.5 V around which the input signal will be amplified. C2 attenuates noise from the 5V supply even more than the DC to make a quiet and smooth DC level. The opamp is in a classic positive gain configuration, with R4 and R3 setting the gain. The impedance of the 2.5 V source produced by R1 and R2 effectively add to R3 for the purposes of gain, but that is a small contribution of 1.2 kΩ on 100 kΩ. The gain will be slightly less than 2.5.