In industrial environments, 24V DC is the standard. However, the microcontrollers we use for hobbyist and “Open Automation” projects—like the Arduino (5V) or ESP32 (3.3V)—will be instantly destroyed if they receive a 24V signal.
To bridge this gap, we use a Voltage Divider. This simple circuit uses two resistors to “scale down” a high voltage to a safe, measurable level.
How It Works: The Pressure Drop
Think of voltage like water pressure. If 24V is “high pressure,” a voltage divider acts as a series of narrow pipes that bleed off some of that pressure before it reaches your sensitive electronics.
The circuit consists of two resistors in series:
- R1 (The Upper Resistor): Connected to the high-voltage signal (e.g., a 24V sensor).
- R2 (The Lower Resistor): Connected between the output signal and Ground.
The output voltage (Vout) is taken from the junction between R1 and R2.
The Standard Industrial Formula
To find your output voltage, use this linear relationship:
Vout = Vin x [ R2 / (R1 + R2) ]
Example: Converting 24V to ~4.3V (Safe for 5V MCU)
If you use a 10k ohm resistor for R1 and a 2.2k ohm resistor for R2:
- Vout = 24 x [ 2200 / (10000 + 2200) ]
- Vout = 4.32V (Perfectly safe for an Arduino pin).
⚠️ Critical Industrial Safety: Impedance & Heat
When designing a divider for a 24/7 industrial asset, you must consider two things:
- Current Leakage: If your resistor values are too low (e.g., 100 ohms), they will draw too much current, get hot, and potentially drain your power supply.
- Signal Integrity: If your values are too high (e.g., 1M ohm), the signal becomes “weak” and can be distorted by electrical noise from nearby motors or relays.
LogicHobbyist Recommendation: For 24V signals, aim for a total resistance (R1 + R2) between 10k and 50k ohms. This provides a stable signal with negligible heat.
🛠️ Use Our Real-Time Calculator
Don’t risk your hardware with manual math errors. We’ve built a professional calculator that includes a Red Alert Warning if your chosen resistors result in a voltage that would damage a standard microcontroller.
👉 [Use the Voltage Divider Calculator here]
💡 Pro-Tip: The Logic Level Shifter Alternative
If you are switching signals at very high speeds (like high-speed encoders), a voltage divider might “round off” the square waves due to resistor-capacitor effects. In those specific cases, look into Optocouplers or Logic Level Shifter ICs for a cleaner, isolated bridge.