When working with analog signals, many microcontrollers like the ESP32 and Raspberry Pi operate at 3.3V logic, while sensors or devices may output 5V analog signals. Directly connecting a 5V analog signal to a 3.3V ADC (Analog-to-Digital Converter) can damage the microcontroller’s input pins.
A voltage divider using 10kΩ and 20kΩ resistors is an effective, low-cost solution to step down the signal safely. In this article, we’ll explore how it works and how to implement it.
Why Use a Voltage Divider?
A voltage divider scales down the input voltage using two resistors. The formula for calculating the output voltage is:
Vout=Vin×R2R1+R2V_{out} = V_{in} \times \frac{R_2}{R_1 + R_2}
For a 10kΩ (R1) and 20kΩ (R2) resistor setup: Vout=5V×20kΩ10kΩ+20kΩV_{out} = 5V \times \frac{20kΩ}{10kΩ + 20kΩ} Vout=5V×23V_{out} = 5V \times \frac{2}{3} Vout=3.33VV_{out} = 3.33V
This brings the 5V analog signal down to a safe 3.3V range for microcontrollers.
Connections for Voltage Divider
- Connect the analog 5V signal to one end of the 10kΩ resistor (R1).
- Connect the other end of R1 to one end of the 20kΩ resistor (R2).
- Connect the junction between R1 and R2 to the ADC input pin of the microcontroller.
- Connect the other end of R2 to GND.
Advantages of Using a Voltage Divider
✔️ Simple and inexpensive (only two resistors required).
✔️ Works well for low-speed analog signals (e.g., temperature sensors, potentiometers).
✔️ No additional components needed—no active circuitry or logic level shifter.
Limitations of Voltage Divider for Analog Signals
❌ Not suitable for fast-changing signals (high-frequency analog signals like audio or PWM).
❌ Impedance matters—high-value resistors can affect ADC accuracy.
❌ Fixed ratio—not adjustable for dynamic voltage scaling.
Best Use Cases
- Interfacing 5V analog sensors with 3.3V microcontrollers.
- Scaling down voltages for battery monitoring circuits.
- Reading potentiometer or resistive sensor values on a 3.3V ADC.
Conclusion
For simple and low-speed analog signals, a 10kΩ and 20kΩ voltage divider is a great solution to step down 5V signals to 3.3V without a logic level shifter. However, for high-speed or precision applications, an operational amplifier (op-amp) or dedicated level shifter circuit may be a better choice.
Need help with your circuit? Drop a comment below!

Leave a Reply