Objective: recognize the voltage divider circuit in different applications.
Several exercises have already used an arrangement of series resistances called a voltage divider. This is a fundamental construction which appears again and again. This exercise presents the general form of this circuit and relates it to the specific examples. It may be helpful to review the general electrical theory summary in Basic Circuits.
The circuit at left shows two resistances connected in series between voltages \(V_{high}\) and \(V_{low}\). We will assume that no current flows out \(V_{out}\), i.e., it is connected only to infinite resistance.
Each resistor follows Ohm’s Law: \(V = i * R\). This idea can be understood in several ways:
These are not different facts, just restatements of the same underlying equilibrium of electricity flowing through a resistor.
The two resistors in series form a single current pathway: since we assume no current flows out \(V_{out}\), the current \(i\) through R1 must be the same as through R2, it has nowhere else to go.
Since the current is the same for both resistors, the voltages across the resistors are:
Voltages in series add. The applied voltage difference is \(V_{high}-V_{low}\), so:
Considering the circuit as a whole, we can apply Ohm’s Law to see that the voltage difference is related to the total loop resistance \(R\):
Which proves that series resistances add together:
The voltage at the the output can be determined just from the voltage drop across R2:
We most commonly connect \(V_{low}\) directly to ground as shown in the second diagram. So the general form simplifies:
Note that \(V_{out}\) is always lower than \(V_{in}\); the divider always scales the input voltage down.
Also note that since a continuous current flows through the resistors, the divider dissipates power at a constant rate:
Power is the product of the voltage and current. In a resistor, this electrical energy is transduced into heat.
An open switch has infinite resistance; a closed switch has zero resistance. The recommended practice for connecting a switch to a digital input is to use a resistor as the upper leg of a voltage divider. Then when the switch is open:
- \(V_{out} = V_{in} * R_{sw}/(R_{sw}+R_5)\)
- \(R_{sw} = ∞\)
- \(V_{out} = V_{in} * ∞/(∞+R_5)\)
- \(V_{out} = V_{in}\)
When the switch is closed:
- \(R_{sw} = 0\)
- \(V_{out} = V_{in} * 0/(0+R_5)\)
- \(V_{out} = 0\)
A common error is to just connect a switch directly between +5V and an input without a bias resistor. When the switch is closed, the input goes high, but when the switch is open, the input is not connected to anything: it is said to be floating and has an indeterminate value. The Arduino can still read the pin but the result is unpredictable, often leading to erratic behavior of the system.
This photocell circuit is drawn in the ‘non-inverting’ configuration in which a brightness increase causes a voltage increase.
In darkness:
As the light increases:
An LED does not act as a linear resistor and so the linear equation above for \(V_{out}\) does not hold. However, the following remains true:
- the current through the resistor and LED must be the same: \(i_7 = i_{LED}\)
- the total voltage difference is the sum of the LED and resistor voltages: \(V_{in} = V_7 + V_{LED}\)
In practice, \(V_{out}\) will be the same as \(V_{in}\) for voltages lower than the LED threshold, and then \(V_{out}\) will not rise much above the threshold voltage. In effect, the LED acts as a primitive voltage regulator by increasing current flow steeply as the voltage increases; this current increase raises the voltage drop across the ballast resistor so the LED voltage drop stays relatively constant.
A common problem in setting up a divider circuit is choosing useful resistance values. There are a couple of general heuristics to consider:
It may be useful to consider the following plot which shows the normalized response of a voltage divider. The response can be normalized to a dimensionless form as follows:
The vertical axis of the plot shows \(V_{out}/V_{in}\), i.e. the ratio of output to input voltage (a number with no units, i.e. dimensionless). The horizontal axis shows \(R_3/R_4\), the dimensionless ratio of resistances.
Many variable resistors are the three-terminal form called a potentiometer in which a continuous strip of resistive media is contacted by a wiper. This forms a voltage divider in which the resistances of the upper and lower legs are continuously variable, but the total loop resistance is constant.
Voltage dividers are an essential part of op-amp circuits in which resistor networks are used to set the offset, gain, and filter characteristics.