MyRoboPath
electronics14 min readUpdated 2026-03-12Beginner

Voltage Dividers Explained & Built: Formula, Sensor Interfacing & Loading

Master the fundamental circuit of analog electronics: derive the voltage divider formula, build sensor interfaces for photoresistors and thermistors, and solve the output impedance loading effect.

MyRoboPath Engineering Lab
Peer-Reviewed Open-Source Hardware & Firmware Guide

Key Engineering Takeaways

  • A voltage divider produces an output voltage proportional to the ratio of two resistors: V_out = V_in · R_2 / (R_1 + R_2).
  • Use voltage dividers to safely step down 5V logic signals to 3.3V for ESP32/Raspberry Pi GPIO pins.
  • Variable sensors (LDRs, thermistors) require a fixed pull-up or pull-down resistor to convert changing resistance into readable voltage.
  • NEVER use a resistive voltage divider as a DC power supply to power motors or chips: connecting a load draws current and causes V_out to collapse.
  • Add an Op-Amp Voltage Follower (Buffer) to isolate high-impedance divider outputs before feeding into low-impedance ADC circuits.
Prerequisites
  • Ohm's Law and Series Circuits
Required Hardware / Tools
  • Breadboard
  • 5V / 12V Power Source
  • Resistors (1kΩ, 2kΩ, 10kΩ)
  • LDR Photoresistor
  • Multimeter

What is a Voltage Divider? Mathematical Derivation

A **Voltage Divider** is a simple circuit of two series resistors that converts a larger input voltage (V_in) into a smaller, precise output voltage (V_out). ### Mathematical Derivation: 1. Current flowing through series resistors R_1 and R_2 is: **Formula:** I = V_in{R_1 + R_2} 2. Output voltage across R_2 (referenced to ground) is Ohm's Law (V = I · R_2): **Formula:** V_out = (V_in{R_1 + R_2}) × R_2 **Formula:** V_out = V_in × (R_2 / R_1 + R_2)
Voltage divider circuit formula diagram
Figure 2.1: Basic two-resistor voltage divider circuit schematic and transfer function.Visual Guide

Stepping Down High Voltages for Microcontrollers (5V to 3.3V)

Modern microcontrollers (ESP32, RP2040, STM32) operate on **3.3V logic** and will be destroyed if connected directly to 5V Arduino signals or 12V battery rails. ### Example: 5.0V to 3.3V Logic Level Shifter: - Desired: V_in = 5.0V, V_out = 3.30V - Choose standard R_2 = 2.0 kΩ (2000 Ω) and R_1 = 1.0 kΩ (1000 Ω): **Formula:** V_out = 5.0 V × (2000 / 1000 + 2000) = 5.0 × (2 / 3) = 3.33 V This provides a safe digital logic signal for 3.3V GPIO input pins!
Voltage divider level shifter schematic
Figure 2.2: Stepping down 5V UART signals to 3.3V using a 1kΩ / 2kΩ resistive divider.Visual Guide

Interfacing Analog Sensors (LDRs, Thermistors, Potentiometers)

Microcontroller ADC (Analog-to-Digital Converter) pins measure **Voltage (0V - 3.3V)**, not resistance. To read a resistive sensor (like a Light Dependent Resistor or NTC Thermistor), you MUST pair it with a fixed reference resistor in a voltage divider: - When light shines on an LDR, its resistance drops from 50 kΩ to 500 Ω. - With R_fixed = 10 kΩ connected to +5V and LDR connected to GND: - **In Darkness (50 kΩ)**: V_out = 5V × (50k / 10k + 50k) = 4.17V - **In Bright Light (500 Ω)**: V_out = 5V × (0.5k / 10k + 0.5k) = 0.24V
LDR voltage divider sensor circuit
Figure 2.3: Analog sensor voltage divider circuit feeding into microcontroller ADC pin.Visual Guide

The Loading Effect Trap (Why Dividers are NOT Power Supplies)

A frequent beginner misconception is trying to use a voltage divider to step 12V down to 5V to power a robot motor or microcontroller. ### Why This Fails Catastrophically: When you connect a load (resistance R_load) to the output, R_load acts in **parallel with R_2**. The equivalent lower resistance becomes R_2 parallel R_load, which causes the output voltage to immediately collapse from 5V down to fractions of a volt! > [!WARNING] > **Voltage Dividers are for Signals Only**: Resistive voltage dividers have high output impedance and cannot supply current. Always use dedicated voltage regulators (buck converters, linear regulators) to power hardware loads!
Divider RuleNever power motors, relays, or microcontrollers with a resistor divider. Use dividers exclusively for low-current signal and sensing applications.

Fixing Loading Effects with Op-Amp Voltage Follower Buffers

If you must connect a voltage divider to a low-impedance circuit without altering its output voltage, place an **Operational Amplifier (Op-Amp)** configured as a **Voltage Follower (Unity Gain Buffer)** between the divider and load: - High input impedance (>10^12 Ω) draws zero current from the divider. - Low output impedance (<0.1 Ω) drives the downstream load with stable, rock-solid voltage.
Op amp buffer voltage follower schematic
Figure 2.4: Op-Amp unity gain buffer eliminating the loading effect on a voltage divider output.Visual Guide

Frequently Asked Questions

How do I choose resistor values for a voltage divider?

For microcontrollers, choose total divider resistance (R1 + R2) between 10kΩ and 100kΩ. If resistors are too low (<1kΩ), they waste battery power through continuous heat dissipation. If too high (>1MΩ), input bias currents on ADC pins will cause measurement errors.

Tags:#Voltage Divider#Analog Sensors#ADC#Ohm's Law#Impedance Loading#Arduino Sensors