Power Supply Design: From Industrial 24V to 3.3V for the Microcontroller
Why Power Is the Most Important Part of the Board
The power supply circuit is the beating heart of every electronic board. If the power is unstable, nothing else will work correctly. In industrial environments, the primary power source is typically 24V DC from a DIN-rail mounted industrial power supply.
The challenge is converting that voltage to the levels electronic components need: 3.3V for modern microcontrollers, 5V for legacy logic and sensors, and sometimes 12V for cooling fans or relays.
Common power problems in factories:
- Voltage sags when large motors start.
- Momentary power interruptions.
- Electrical noise on supply lines from transformers and contactors.
- High temperatures inside control cabinets.
A well-designed power circuit protects your board from all of these problems.
Linear Regulators (LDO): Simplicity With Heat
A linear regulator is the simplest way to convert a higher voltage to a lower one. It works by dissipating the voltage difference as heat.
Common examples:
- LM7805: From any voltage above 7V to a stable 5V
- AMS1117-3.3: From 5V to 3.3V at up to 1A
- MCP1700: Low quiescent current LDO, excellent for standby circuits
When to use a linear regulator:
- The voltage difference is small (less than 5V between input and output)
- The required current is low (less than 500mA)
- You need a very clean output with no ripple
When to avoid it:
- Large voltage difference: converting 24V to 3.3V linearly dissipates 20.7V as heat
- High current: power dissipated = (Vin - Vout) x Iout
- Example: 24V to 5V at 500mA = 9.5W of heat. This requires a large heatsink and is impractical.
Calculating heat dissipation: P = (Vin - Vout) x Iout. If it exceeds 1W, seriously consider using a DC-DC converter instead.
DC-DC Converters: High Efficiency
DC-DC switching regulators convert voltage with high efficiency reaching 90-95%. Instead of dissipating the difference as heat, they use rapid switching with an inductor and capacitors to store and transfer energy.
Types of DC-DC converters:
- Buck (step-down): Lowers voltage. The most common type. Example: 24V to 5V.
- Boost (step-up): Raises voltage. Example: 3.3V to 12V.
- Buck-Boost: Can raise or lower voltage. Useful when input voltage fluctuates.
Components of a typical Buck converter:
- Switching IC (such as LM2596 or MP1584)
- Inductor: Temporarily stores energy
- Schottky diode: Maintains current flow during switching
- Input and output capacitors: Filter ripple
Design considerations:
- Traces between the IC, inductor, and capacitor must be short and wide.
- Keep the DC-DC converter away from sensitive analog traces.
- Add an LC filter on the output if feeding analog circuits.
- Follow the datasheet layout recommendations precisely.
Power Filtering in Industrial Environments
Industrial environments are full of electrical noise. The 24V supply lines in a factory are not as clean as a laboratory power supply.
Sources of noise on power lines:
- Starting and stopping large motors
- Nearby Variable Frequency Drives (VFDs)
- Electrical breakers and contactors
- Shared power cables with other equipment
Multi-stage filtering strategy:
- At the input: A large electrolytic capacitor (470uF - 1000uF) to absorb momentary voltage dips.
- TVS protection: A Transient Voltage Suppressor diode to absorb high-energy spikes.
- LC filter: An inductor and capacitor to filter high-frequency noise.
- Ferrite beads: A ferrite bead before each sensitive section's supply.
- Ceramic capacitors: 100nF near every IC.
Important tip: Do not rely on a single stage of filtering. Multi-layered defense is the correct approach in industrial environments.
Board Protection: Reverse Voltage and Overcurrent
In factory environments, wiring mistakes happen. A technician reverses polarity or connects the wrong voltage. Your board must survive these errors without burning out.
Reverse polarity protection:
- Series diode: The simplest method. Place a Schottky diode on the input line. Downside: 0.3-0.5V voltage drop and heat dissipation.
- Reverse MOSFET: A P-Channel MOSFET provides protection with near-zero voltage drop. The best solution for industrial applications.
Overvoltage protection:
- TVS diode: Clamps excess voltage at a defined threshold. Essential on the 24V input line.
- Zener diode with fuse: Simple and effective protection. The Zener conducts at overvoltage and the fuse breaks.
Overcurrent protection:
- Fuse: Basic protection. Choose a value 50% above normal operating current.
- PTC Resettable Fuse: A fuse that resets itself after the overcurrent condition is removed. Ideal for applications that are hard to reach.
- Protection IC: Such as INA226 for monitoring current and voltage with software-controlled cutoff.
Practical Example: 24V Industrial to 3.3V and 5V Power Supply
Let us design a complete power supply circuit for an industrial control board:
Stage One: Protection and Filtering
- Two-pin terminal block for 24V input
- 2A PTC resettable fuse
- 30V TVS diode for spike absorption
- Reverse MOSFET for polarity protection
- 470uF/50V electrolytic capacitor for filtering
Stage Two: 24V to 5V Conversion
- Buck DC-DC converter using LM2596-5.0
- 33uH/3A inductor
- SS34 Schottky diode
- 220uF/16V output capacitor plus 100nF ceramic capacitor
- Expected efficiency: approximately 85%
Stage Three: 5V to 3.3V Conversion
- AMS1117-3.3 linear regulator
- 10uF input and 22uF output capacitors (tantalum or ceramic)
- Additional 100nF ceramic capacitor
- Voltage difference is small (1.7V) and current is low, so a linear regulator is appropriate
Status Indicators:
- Green LED on the 5V rail (with 1k ohm resistor)
- Green LED on the 3.3V rail (with 680 ohm resistor)
- Test points on every voltage level
Summary
A good power supply circuit is the foundation of every reliable industrial board. Combining protection, filtering, and efficient conversion ensures the board operates stably under the harshest conditions. In the next lesson, we will learn how to turn the final design into a real board through the manufacturing process.