Skip to content
Electronics 11 min read

5V to 3.3V With a Voltage Divider (and When Not To)

Observation recorded
Voltage divider loading effect: a 10 kilohm load on a 10 kilohm and 20 kilohm divider pulls the output from 3.33 V down to 2.00 V, shown on the output voltage against load curve

Your 5 V Arduino sends serial data at 5 V. Your ESP32 runs at 3.3 V, and Espressif does not rate its pins for 5 V. The fix that costs one rupee is two resistors: 10 kΩ in series and 20 kΩ to ground turn 5 V into 3.33 V. That trick is right for this job and wrong for several jobs that look almost the same, and the difference comes down to one question: how much current does the thing on the output draw?

This post works through the values, the standard resistor pairs, the speed limit and the cases where a divider fails. Every number can be checked in the voltage divider calculator, which shows the output sagging as you add a load.

Quick answerPut a resistor from the 5 V signal to the 3.3 V input and another, twice as large, from that input to ground. 10 kΩ and 20 kΩ give 3.33 V and draw 167 µA. This is fine for one-way signals into a high-impedance input such as a GPIO or ADC pin. It cannot power anything, cannot raise 3.3 V to 5 V, and is too slow for fast SPI.
Voltage divider stepping 5 V down to 3.33 V with a 10 kilohm resistor over a 20 kilohm resistor, a multimeter reading 3.333 V, an ESP32 reading the node, and 167 microamps flowing through the divider
Figure 1. 10 kΩ over 20 kΩ turns 5 V into 3.333 V with 167 µA flowing through the pair. Open this setup in the simulator.

How does a voltage divider step 5V down to 3.3V?

Two resistors in series carry the same current, so each one takes a share of the voltage in proportion to its resistance. The output is the share across the bottom resistor:

Vout=Vin×R2R1+R2V_{\text{out}} = V_{\text{in}} \times \frac{R_2}{R_1 + R_2}

For 3.3 V out of 5 V the ratio is 3.3 ÷ 5 = 0.66, so R2 should be about twice R1. That ratio is all the formula cares about. The size of the resistors decides two other things: how much current the divider wastes, and how much it is disturbed by whatever you connect to it.

Worked example: 10 kΩ over 20 kΩ.
Vout=5×20÷(10+20)=3.333 VV_{\text{out}} = 5 \times 20 \div (10 + 20) = 3.333\ \text{V}.
Current through both resistors: 5 V÷30 kΩ=167 μA5\ \text{V} \div 30\ \text{k}\Omega = 167\ \mu\text{A}.
Power turned into heat: 5×0.000167=0.83 mW5 \times 0.000167 = 0.83\ \text{mW}, nothing a resistor will notice.

Which resistor values should you use?

Any pair with R2 close to 2 × R1 gives roughly 3.3 V. Here are pairs you can buy from the E12 and E24 series, all on a 5 V input:

R1 (top)R2 (bottom)VoutCurrent wastedSource resistance
1 kΩ2 kΩ3.333 V1,667 µA667 Ω
1.8 kΩ3.3 kΩ3.235 V980 µA1.17 kΩ
2.2 kΩ3.9 kΩ3.197 V820 µA1.41 kΩ
4.7 kΩ9.1 kΩ3.297 V362 µA3.10 kΩ
5.1 kΩ10 kΩ3.311 V331 µA3.38 kΩ
10 kΩ20 kΩ3.333 V167 µA6.67 kΩ
22 kΩ43 kΩ3.308 V77 µA14.6 kΩ

The last column is the one most tutorials skip. Seen from its output, a divider behaves like a 3.33 V source with a resistor in series equal to R1 and R2 in parallel, Rth=R1R2÷(R1+R2)R_{\text{th}} = R_1 R_2 \div (R_1 + R_2). That resistance decides how the output reacts to a load and how fast it can change.

For a plain GPIO input, 10 kΩ and 20 kΩ is a sensible default. If you only have E12 values, 1.8 kΩ and 3.3 kΩ gives 3.24 V, which every 3.3 V chip reads as a clear HIGH. Avoid going much above 50 kΩ in total for logic signals, for the speed reason below.

What happens when you connect a load?

Whatever is connected to the output sits in parallel with R2. A logic input draws well under a microamp, so it changes nothing. Anything that draws real current lowers the bottom resistance and drags the output down.

Voltage divider loading effect: a 10 kilohm load on a 10 kilohm and 20 kilohm divider pulls the output from 3.33 V down to 2.00 V, a 40 percent sag, shown on the output voltage against load resistance curve
Figure 2. A 10 kΩ load pulls the 3.33 V output down to 2.00 V. The curve shows the output for every load from 100 Ω to 10 MΩ. Open this setup in the simulator and move the load slider.
Worked example: a 10 kΩ load.
Bottom of the divider: 20 k∥10 k=6.67 kΩ20\ \text{k} \parallel 10\ \text{k} = 6.67\ \text{k}\Omega.
Vout=5×6.67÷(10+6.67)=2.00 VV_{\text{out}} = 5 \times 6.67 \div (10 + 6.67) = 2.00\ \text{V}, a 40% drop.
Same answer the quick way: 3.33×10÷(10+6.67)=2.00 V3.33 \times 10 \div (10 + 6.67) = 2.00\ \text{V}, the Thevenin source driving the load through 6.67 kΩ.

The rule that falls out of this: to keep the error under 1%, the load must be at least 99 times the source resistance. For 10 kΩ and 20 kΩ that means 660 kΩ or more. A microcontroller input easily qualifies. A sensor module, an LED or a radio does not.

Can you power a 3.3V module from a voltage divider?

No, and this is the most common misuse. A 3.3 V module that draws 10 mA looks like a 330 Ω load.

Worked example: a 10 mA module on 10 kΩ and 20 kΩ. Bottom resistance 20 k∥330≈324 Ω20\ \text{k} \parallel 330 \approx 324\ \Omega, so Vout=5×324÷(10,000+324)≈0.16 VV_{\text{out}} = 5 \times 324 \div (10{,}000 + 324) \approx 0.16\ \text{V}. The module never starts.

Shrinking the resistors until they can supply 10 mA means hundreds of milliamps flowing through the divider all the time, and the output still moves every time the module's current changes, which for a Wi-Fi radio is constantly. Power needs a regulator. A 3.3 V LDO costs a few rupees and holds its output steady from no load to its rated current. The longer argument, with the numbers for different loads, is in can you use a voltage divider as a power supply.

Is a voltage divider fast enough for UART, SPI and I2C?

Every input pin has some capacitance, from the pin itself and the wiring. The divider's source resistance charges that capacitance, which makes a low-pass filter. Assume about 10 pF in total.

Worked example: edge time. Time constant τ=6.67 kΩ×10 pF≈67 ns\tau = 6.67\ \text{k}\Omega \times 10\ \text{pF} \approx 67\ \text{ns}. A 10% to 90% edge takes about 2.2τ≈147 ns2.2\tau \approx 147\ \text{ns}. At 115200 baud one bit lasts 8.68 µs, so the edge uses under 2% of the bit. At 8 MHz SPI one bit lasts 125 ns, shorter than the edge.

So a 10 kΩ and 20 kΩ divider is fine for UART, button signals, interrupt lines and slow chip selects. For SPI at a few megahertz, either scale the resistors down (1 kΩ and 2 kΩ cut the edge to about 15 ns, at 1.7 mA of standing current) or use a buffer. I2C is a different problem: its lines are bidirectional and open-drain, and a divider only works in one direction, so use the MOSFET shifter described in the 3.3 V to 5 V level shifter post.

Reading a battery or sensor through a divider

The other big use of dividers is bringing a voltage that is too high into an ADC pin. A 12.6 V battery through 20 kΩ over 10 kΩ gives 4.2 V at an Arduino's A0, which analogRead reports as 860 of 1023.

Arduino Uno reading a 12.6 V battery through a 20 kilohm and 10 kilohm voltage divider: 4.20 V at the A0 pin, analogRead returns 860 of 1023, the divider draws 420 microamps
Figure 3. A 12.6 V battery divided by three for an Uno: 4.20 V at A0, a reading of 860. Open this setup in the simulator.

Two limits matter here. The ATmega328P ADC is designed for sources of about 10 kΩ or less, because each reading briefly charges a small sampling capacitor. And the ESP32 ADC is most accurate between 150 mV and 2450 mV at its 11 dB setting, so for an ESP32 divide further: 100 kΩ over 22 kΩ turns 12.6 V into 2.27 V. With resistors that large, add a 100 nF capacitor from the pin to ground so the ADC samples a steady voltage. The ADC resolution and accuracy post explains how much of the reading you can trust.

ESP32 battery monitor: a 100 kilohm and 22 kilohm voltage divider turns 12.6 V into 2.27 V, inside the 150 to 2450 mV range of the ESP32 ADC at 11 dB, drawing 103 microamps
Figure 4. The same battery read by an ESP32 through 100 kΩ over 22 kΩ: 2.27 V, inside the ADC's accurate window. Open this setup in the simulator.

How accurate is a resistor divider?

Resistor tolerance moves the ratio. With two 5% resistors the worst case for 10 kΩ over 20 kΩ is R1 at 9.5 kΩ and R2 at 21 kΩ, which gives 3.44 V, or R1 at 10.5 kΩ and R2 at 19 kΩ, which gives 3.22 V. For a logic signal nobody cares. For a battery gauge that is the difference between "half full" and "nearly empty", so use 1% resistors and calibrate once against a multimeter.

When should you not use a voltage divider?

  • To power anything. Use a regulator.
  • To go from 3.3 V up to 5 V. A divider only divides. Many 5 V inputs already read 3.3 V as HIGH; otherwise use a 74HCT buffer or a level shifter.
  • On bidirectional lines. I2C and one-wire buses need a proper bidirectional shifter.
  • For fast signals. Above a few megahertz the edges smear. Use a buffer.
  • Where standby current matters and accuracy does too. Large resistors save current but upset the ADC. Use a capacitor at the pin, or switch the divider off with a MOSFET between readings.
Voltage divider with 1 kilohm and 2 kilohm resistors giving 3.33 V from 5 V but wasting 1.67 mA and 8.33 mW, ten times more than 10 kilohm and 20 kilohm
Figure 5. Same ratio, ten times smaller resistors: the same 3.33 V for 1.67 mA instead of 167 µA. Open this setup in the simulator.

To get a feel for the trade-off, open the loaded divider in the simulator, then slide R1 and R2 down together. The output under load climbs back toward 3.33 V while the current wasted climbs with it. Somewhere in between is the right pair for your circuit.

Sources

Frequently asked questions

What resistors convert 5V to 3.3V?

Use a bottom resistor twice the top one. 10 kilohms on top and 20 kilohms to ground give 3.33 V and draw 167 microamps. The closest standard E24 pair to exactly 3.3 V is 4.7 kilohms over 9.1 kilohms, which gives 3.297 V. 1 kilohm and 2 kilohms also work but waste ten times more current.

Can I power a 3.3V module from 5V with a voltage divider?

No. The output of a divider falls as soon as current is drawn from it. A module drawing 10 mA from a 10 kilohm and 20 kilohm divider would pull the output down to about 0.16 V. Use a 3.3 V regulator such as an LDO for power, and keep dividers for signals.

Is a voltage divider fast enough for UART or SPI?

For UART at common baud rates, yes. With 10 kilohms and 20 kilohms and about 10 pF of input capacitance, the edge takes roughly 150 ns, under 2 percent of a 115200 baud bit. For SPI at several megahertz, or I2C, use a level shifter chip or smaller resistors.

Can a voltage divider convert 3.3V up to 5V?

No. A divider can only reduce a voltage. To send a 3.3 V signal into a 5 V input, check whether the 5 V input already accepts 3.3 V as HIGH, use a 74HCT buffer, or use a level shifter.

Why does my divider give a lower voltage than calculated?

Usually because something is loading the output, or the resistors are off by their tolerance. A load in parallel with the bottom resistor lowers the output, and two 5 percent resistors can move a 3.33 V output anywhere from about 3.22 V to 3.44 V. Measure the resistors, use 1 percent parts, and keep the load more than 100 times the divider’s source resistance.

Try it yourself
Related observations
Electronics 555 Timer Astable Circuit Explained with Waveforms Electronics 555 Timer Frequency Formula: Where 1.44 Comes From Electronics ADC Resolution vs Accuracy: ENOB, INL and the Reference
Transmit