What is a Voltage Divider?
A voltage divider uses two resistors in series to produce an output voltage that's a fraction of the input voltage.
The Circuit
Vin ─── [R1] ─── Vout ─── [R2] ─── GND
The Formula
Vout = Vin × R2 / (R1 + R2)
How It Works
The input voltage is divided proportionally based on the ratio of the two resistors. If R1 = R2, the output is exactly half the input.
Example: Reading a Photoresistor
5V ─── [Photoresistor] ─── A0 ─── [10kΩ] ─── GND
As light changes, the photoresistor's resistance changes, which changes the voltage at A0. The Arduino reads this changing voltage with analogRead().
Common Uses
- Reading variable-resistance sensors (photoresistors, thermistors, force sensors)
- Level shifting (e.g., 5V signal to 3.3V)
- Creating reference voltages
- Battery voltage monitoring
Design Tips
- Use 10kΩ for the fixed resistor when reading most sensors
- The output impedance (parallel combination of R1 and R2) should be low compared to the input impedance of what you're connecting to
- For level shifting, calculate the exact values needed
- Don't use very large resistors (noise) or very small (wastes power)