ESP32 DevKit V1 (30-pin)
Espressif / generic · ESP32
- MHz
- 240
- GPIO
- 25
- Flash
- 4 MB
- RAM
- 520 KB
Calculator
Work out the output voltage of a two-resistor divider — with optional load.
A voltage divider uses two resistors in series to turn a higher voltage into a lower one. It is the standard way to scale a battery voltage down so an ADC pin can measure it, or to level-shift a 5 V signal for a 3.3 V board such as the ESP32 or Raspberry Pi Pico.
The output only holds when whatever you connect to it draws very little current. Add a load resistance below to see how a real load drags the voltage down. For battery monitoring, use large resistors (100 kΩ range) to keep standing current tiny.
Vout = Vin × R2 / (R1 + R2)R2' = R2 ∥ RL = (R2 × RL) / (R2 + RL), Vout = Vin × R2' / (R1 + R2')I = Vin / (R1 + R2')Worked example. Vin = 5 V, R1 = 10 kΩ, R2 = 20 kΩ gives Vout = 5 × 20 / 30 = 3.33 V — a classic 5 V → 3.3 V level shift for slow signals.
No. A divider only produces a stable voltage when almost no current is drawn. For power, use a regulator (LDO or buck converter).
Choose the ratio first, then scale the values. 10 kΩ + 10 kΩ and 100 kΩ + 100 kΩ both halve the voltage; the larger pair wastes ten times less current but is more sensitive to loading and noise.
A 4.2 V full cell needs to be under 3.3 V at the pin, so use a 1:2 divider (for example 100 kΩ over 100 kΩ gives 2.1 V at 4.2 V). Add a 100 nF capacitor at the pin and calibrate in software — ESP32 ADCs are not linear.
No — use a proper bidirectional level shifter for I2C and fast signals. A resistor divider is only suitable for slow, one-direction signals like a button or TX line.
Free download
Logic levels, pins to avoid, I2C / SPI / UART basics and a quick-pick table of the best boards — on one printable PDF. Enter your email and it's yours.
Only used to send the sheet and the odd databit.me update. See the privacy policy.