If you have an op-amp in a non-inverting configuration, you have two resistors: one (call it R1) from the op-amp output to the inverting input, and another resistor (call it R2) from the inverting input to GND (usually). The gain will be 1+ (R1/R2). If you tie the end of R2 that normally would go to GND to a voltage instead, the output will be shifted. The gain from that point will be (R1/R2).
For example: If you have an input that goes from 5 to 6 volts, and you need to change it to one that goes from 0 to 5 volts, you need a gain of 5 (1 volt change going in, to 5 volts change at the output). You could choose R1= 4K and R2= 1K. The gain would be 1+ (4K/1K) = 5.
Now you need to shift it "down" to the 0 - 5 V range. The gain to the inverting input will be 4 (4K/1K), so you need to apply 5V/4 = 1.25V ABOVE 5V = 6.25V to the end of R2.
Remember that if you use a voltage divider to provide this 6.25V, the thevenin resistance of the divider will be added to R2's value. The best way around this is to connect R2 to the output of a unity-gain op-amp, and drive THAT op amp with a divider from a voltage reference. And one final thing - if you don't have a negative voltage source for the (-) power pin of the op-amp, you will need a rail-to-rail output type in order for the output to get to near zero volts.
Bookmarks