×

**SparkFun will be closed for Memorial Day (5/30). Orders placed after 2pm MT on Friday (5/27) will process and ship out on Tuesday (5/31).**

A voltage divider is a simple circuit consisting of two resistors that has the useful property of changing a higher voltage (Vin) into a lower one (Vout). It does this by dividing the input voltage by a ratio determined by the values of two resistors (R1 and R2):

This circuit is best for low-current applications like sensor and data lines. If you draw too much current through Vout it will affect the output voltage. Therefore this shouldn’t be used for high-current applications like power supplies (voltage regulators are a much better option).

To pick resistors, use the following equation:

You can also find a number of voltage divider calculators using Google.

Because the output voltage depends solely on the ratio of R1 to R2, you could use a number of different R values to get the same output (for example, if R1 = R2, the output will always be half of the input, whether R is 1 Ohm or 1M Ohms). For most of our purposes, the total resistance (R1 + R2) should be between 1k Ohms and 10k Ohms. Less than that and the circuit will waste a lot of power flowing through R1 and R2 to ground. More than that and Vout may not be able to source enough current to drive an analog input.

This circuit is very useful for turning the output from a resistive sensor (such as a thermistor or force-sensitive resistor) into a voltage you can measure using an analog to digital converter. R2 will be your sensor and a good rule of thumb is to choose R1 to be halfway between the lowest and highest resistance values of the sensor.

For example, our Mini Photocell has a light resistance of 1k Ohm, and a dark resistance of 10k Ohm. A 5.6k resistor is just about halfway between the high and low values. If we connect the sensor as R2 and the 5.6k as R1, we get the following Vout:

light level | R2 (sensor) | R1 (fixed) | ratio (R2 / (R1 + R2)) | Vout (if Vin is 5V) |
---|---|---|---|---|

light | 1k | 5.6k | 16% | 0.83 V |

dark | 10k | 5.6k | 67% | 3.33 V |

...so the voltage output will vary from 0.83V in bright light, to 3.33V in the dark. You can't get a complete voltage swing from 0 to 5V without more complex circuitry, but hey, this isn't bad for only one resistor.

A special case of this circuit is a potentiometer, which is a rotary control that allows you to smoothly vary the ratio between R1 and R2, and thus the output voltage, allowing you to create an easy to use analog control.

Inside a potentiometer is one big resistor with a moving connection (called a "wiper") that can move from one end of the resistor to the other. Electrically, it looks like two resistors, just like in our first schematic above. When you turn the knob, one resistor will get larger while the other will get smaller. To use a potentiometer as a voltage divider, connect your power and ground lines to the outside pins (these are the ends of the big resistor), and use the center pin (the wiper) as your Vout. When you turn the knob, the ratio between the two resistors will change, smoothly varying the output voltage between Vin and GND.

Much more information on Voltage Dividers is available at Wikipedia.

If you make a voltage divider circuit with R1 = 10K and R2 = 10K, and your Vin is 12V, what will be your Vout?

A. 12V

B. 10V

C. 6V

D. 5V

The correct answer is C: 6V. Whenever you have the same R1 and R2, no matter what those values are, the equation (R2 / (R1 + R2)) will always come out to 1/2. Therefore, Vout will always be one-half of Vin.

Your system runs on a 12V battery. You'd like to monitor the battery voltage, but the range of your analog inputs is only 0 to 5V. What would be the best resistor choice for this task? (Since you're probably in a hurry, we've calculated the ratio R_{2}/(R_{1}+R_{2}) for you.)