A voltage divider for ADC input is a two-resistor circuit that scales higher sensor voltages (0-10V, 0-24V) down to match an ADC's input range (typically 0-3.3V or 0-5V). The resistor ratio reduces the signal proportionally, enabling safe measurement without exceeding the ADC's maximum voltage and damaging your microcontroller.
What You'll Need
Before you start, gather these values:
Maximum input voltage (V) from your sensor or signal source
ADC reference voltage (V) — typically 3.3V or 5V
ADC input impedance (Ω) from microcontroller datasheet
Before diving into examples, build your instincts for ADC voltage dividers:
Lower total resistance → faster settling, better accuracy, but more power consumption
Higher total resistance → lower power, but vulnerable to noise and ADC loading errors
R2 close to ADC impedance → significant loading error; you'll read lower than expected
The rule of thumb: Keep the divider's Thevenin resistance (R1 || R2) at least 10× lower than the ADC's maximum recommended source impedance. Most microcontrollers recommend source impedance below 10 kΩ for accurate readings.
ADC Sample-and-Hold Effect: Many ADCs briefly connect an internal capacitor (5-20pF typical) to the input during sampling. If your source impedance is too high, this capacitor cannot charge fully before the conversion starts, causing measurement errors. This is why low-impedance voltage dividers matter — it's not just about DC accuracy, but ensuring the sample capacitor settles in time.
Practical impact: A 100kΩ divider feeding a 10pF sample capacitor has τ = 1µs. If your ADC samples faster than 5τ (5µs), you'll get errors.
Example: 24V Industrial Sensor to 3.3V ADC
Scenario: Connect a 0-24V industrial pressure sensor to an ESP32 for monitoring.
Given:
Sensor output: 0-24V (proportional to pressure)
ESP32 ADC: 3.3V reference, 13kΩ input impedance
Required accuracy: ±2%
1
Set Target Output
Target output: 3.0V at 24V input (0.125 ratio, 91% of Vref for safety margin)
Maximum ADC input never exceeds Vref (with margin)
Divider current is reasonable (typically 0.1mA - 10mA)
R1 + R2 is at least 10× less than ADC input impedance
Resistor power ratings have adequate margin
Selected standard values are available
Red flags:
Vout exceeds ADC Vref: reduce R2 or increase R1
Divider current above 10mA: increase R1 + R2 to reduce power consumption
Loading error above 5%: use lower resistance values or add a buffer amplifier
R2 larger than ADC input impedance: your ADC will load the divider excessively; redesign with much lower values
Calculated R2 is negative: your target Vout exceeds Vin; check your requirements
Real-World Accuracy
In production circuits, several factors affect your voltage divider's actual accuracy:
Resistor tolerance: A ±5% tolerance on both resistors means worst-case ratio error of ±10%. For a 3.3V target, actual output could range from 2.97V to 3.63V — potentially exceeding your ADC's limit. Use 1% resistors for any measurement requiring better than ±5% accuracy.
Temperature drift: Standard resistors drift ~100ppm/°C. In a 50°C temperature swing, that's 0.5% change. For outdoor or industrial environments, use matched-pair resistors or resistor networks where both resistors drift together.
Long-term stability: Resistor values shift slightly over years of operation. For calibrated instruments, plan for periodic recalibration or use precision wirewound or thin-film resistors.
Common Mistakes
Ignoring ADC Input Impedance
Why it happens: Many designs calculate the ideal ratio without considering loading. ESP32 and STM32 have relatively low input impedance (10-50kΩ) that significantly affects high-resistance dividers.
How to avoid: Always calculate R2_effective with ADC impedance in parallel and verify the actual output voltage.
Using the Full ADC Range
Why it happens: Designing for Vout = Vref leaves no margin for component tolerances or voltage spikes.
How to avoid: Always design for 90-95% of Vref maximum. For a 3.3V ADC, target 3.0V output at maximum input.
Choosing Resistors That Are Too High
Why it happens: While high resistance saves power, it makes the divider vulnerable to noise pickup and loading effects.
How to avoid: Stay below 100kΩ total for most ADC applications. Use the 10× rule relative to ADC input impedance.
Forgetting Temperature Coefficients
Why it happens: Standard resistors drift with temperature, but designs often assume fixed values.
How to avoid: For outdoor or industrial applications, use resistors with matched temperature coefficients or recalibrate in software.
Not Protecting the ADC Input
Why it happens: Voltage spikes or transients on the sensor line can exceed the ADC's maximum input.
How to avoid: Add a 100Ω series resistor and small capacitor (100nF) between the divider and ADC to filter noise and limit current during voltage spikes.
Using Mismatched Tolerances
Why it happens: If R1 is ±5% and R2 is ±1%, the ratio uncertainty is dominated by R1.
How to avoid: Use the same tolerance for both resistors, or use the tighter tolerance on the more critical resistor.
FAQ
Why can't I just use any resistor values with the correct ratio?
The ratio alone determines Vout/Vin, but the absolute values affect current consumption, noise immunity, loading error, and bandwidth. Very high values (over 100kΩ) pick up noise and are affected by ADC loading. Very low values (under 1kΩ) waste power and may overload the signal source.
How do I handle negative voltages or voltages below ground?
Standard voltage dividers only work for positive voltages. For bipolar signals, you need either: (1) a level-shifting circuit with op-amp, (2) a resistor divider with offset using a reference voltage, or (3) a differential ADC input if your microcontroller supports it.
What if my sensor output is lower than the ADC range?
You don't need a voltage divider — you need an amplifier. Consider an op-amp non-inverting amplifier circuit to scale up the voltage. Alternatively, use a lower ADC reference voltage if your microcontroller supports it.
Can I use a potentiometer instead of fixed resistors?
Yes, a potentiometer works as an adjustable voltage divider, but it adds calibration complexity and drift. For production designs, calculate the fixed values and use precision resistors. Potentiometers are useful for prototyping or applications requiring manual adjustment.
How does capacitance affect ADC voltage dividers?
Capacitance at the ADC input (from cables, PCB traces, or filtering capacitors) forms an RC filter with the divider resistance, limiting bandwidth. Time constant τ = (R1 || R2) × C. For fast-changing signals, use lower resistance values or buffer with an op-amp.
Should I add filtering to the voltage divider output?
Yes, a small capacitor (10nF - 100nF) from the divider output to ground filters high-frequency noise. This is especially important for ADC inputs. However, it also limits bandwidth — the cutoff frequency is f = 1 / (2π × R_parallel × C).
How do I design for battery voltage monitoring?
Battery monitoring is a classic voltage divider application. Use high resistance (100kΩ - 1MΩ total) to minimize battery drain. Enable the divider only when measuring by switching the ground connection with a MOSFET, reducing standby current to near zero.
What's the difference between 1% and 5% resistor tolerance for ADC applications?
1% resistors provide ±1% ratio accuracy; 5% resistors provide ±5% ratio accuracy (worst case ±10% if both resistors are off in opposite directions). For measurements requiring better than ±5% accuracy, use 1% or better resistors. For simple threshold detection, 5% is often adequate.
Ready to Calculate?
Verify current and power in your divider — it's free