Hardware Reference
In-Depth Information
UsingResistiveVoltageDividers
A resistive voltage divider uses two resistors to output a voltage that is some
fraction of the input voltage. The output voltage is a function directly related to
the value of the two resistors. So, if one of the resistors is a variable resistor, you
can monitor the change in voltage from the voltage divider that results from the
varying resistance. The size of the other resistor can be used to set the sensitivity
of the circuit, or you can use a potentiometer to make the sensitivity adjustable.
First, consider a fixed voltage divider and the equations associated with it, as
shown in Figure 3-9. A0 in the Figure 3-9 refers to analog pin 0 on the Arduino.
Figure 3-9: Simple voltage divider circuit
The equation for a voltage divider is as follows:
Vout = Vin(R2/(R1 + R2))
In this case, the voltage input is 5V, and the voltage output is what you'll be
feeding into one of the analog pins of the Arduino. In the case where R1 and
R2 are matched (both 10kΩ for example), the 5V is divided by 2 to make 2.5V at
the analog input. Confirm this by plugging values into the equation:
Vout = 5V(10k/(10k + 10k)) = 5V n .5 = 2.5V
Search WWH ::




Custom Search