|
Circuit #3 : Relative Analog Input
This circuit can be used to measure an analog input that is above some reference voltage rather than above 0V. For example, a sensor whose output is always between 2V and 3V is a good candidate for this circuit. While you can measure these voltages with the microcontroller’s A/D converter, you’re not really using the available range.
The equation that describes this circuit’s operation is:
where is the sensor input voltage and is the output going to the microcontroller. It is also assumed that and . You can choose the resistance values to amplify the limited voltage range of the sensor input to the full 0V to 5V range of the A/D converter.
In the circuit above, the ratio (known as the gain) is 15, but you can change this gain simply by changing the values of R1 and R2. There are limits, however. You must ensure that the input and reference voltages stay within this range:
|