How a voltage divider works
Two resistors in series tap a fraction of the input voltage:
Vout = Vin × R2 / (R1 + R2)
Pick R2, then solve for R1. Or pick a current budget — total current = Vin / (R1+R2) — and solve both.
When to use it
- ADC sensing — read a 12V battery on a 3.3V Arduino ADC. Use high resistance (10kΩ + range) so current is tiny.
- Logic level shifting (input only) — drop a 5V signal to 3.3V for ESP32 input. Bidirectional needs a level shifter IC.
- Bias points — set a transistor base voltage. Use lower resistance so source impedance is low.
Gotchas
- Load current — if downstream pulls current, Vout drops. Use a buffer (op-amp follower) for low-impedance output.
- Power waste — high current = continuous power loss. For battery projects, use 10kΩ+ values.
- Not for high-power switching — use a DC-DC buck converter for any real load (LEDs, motors, modules).