At its most basic, an AC-DC power supply is used to convert high-voltage alternating current (120V/230V AC mains) into low-voltage direct current (typically 5V, 12V, 24V, or 48V DC) to run embedded systems, charge battery banks, and drive DC motors. Whether you are powering a remote ESP32 weather station, driving a 24V BLDC motor for a DIY CNC router, or bulk-charging a 12V LiFePO4 battery bank, the AC-DC stage is the critical bridge between the grid and your low-voltage electronics.

However, knowing what an AC-DC power supply is used for is only the first step. The real engineering challenge lies in selecting the correct topology and designing the protection circuitry so your system runs cool, quiet, and reliably. Pushing 120W through a poorly chosen regulator topology will result in melted enclosures and brownout resets. This guide bridges the gap between basic application and bench-level power supply design, focusing on topology selection, headroom math, and thermal derating for 12V and 24V systems.

Linear vs. Switching Topologies: Efficiency, Heat, and Noise

When deciding between linear and switching architectures for your load, you are fundamentally trading efficiency and heat for noise performance. A linear power supply uses a heavy copper-and-iron step-down transformer followed by a rectifier and a linear regulator (LDO). It is incredibly simple and produces virtually no high-frequency switching noise, but it dissipates excess voltage as pure heat. Switching power supplies (like Flyback or Forward topologies) use high-frequency MOSFET switching and ferrite-core transformers to transfer energy in discrete packets, achieving vastly higher efficiency but introducing electromagnetic interference (EMI) and output ripple.

Below is a data-dense comparison of common AC-DC topologies evaluated at a 50W continuous output load.

Topology Typical Efficiency Heat Dissipation (at 50W out) Output Ripple/Noise Cost/Complexity Best Use Case
Linear (Transformer + LDO) 40% - 60% 30W - 40W < 5mV p-p Low (Few parts) Precision ADCs, audio DACs, lab instruments
Flyback (Switching) 75% - 85% 8W - 12W 50mV - 100mV p-p Medium ESP32 hubs, LED drivers, <100W battery chargers
Forward (Switching) 85% - 90% 4W - 6W 30mV - 50mV p-p High (Requires output inductor) 12V/24V motor drives, 100W-300W systems
LLC Resonant (Switching) 92% - 96% 1W - 2W 20mV - 40mV p-p Very High (Complex tuning) Server racks, high-power 48V telecom, EV chargers

Linear vs. Switching for Specific Loads

If you are designing a low-noise analog front-end for a Raspberry Pi audio DAC, the linear topology wins despite the thermal penalty; the <5mV ripple ensures a clean signal-to-noise ratio. Conversely, if you are charging a 12V 100Ah LiFePO4 battery at 5A (60W), a linear supply would dissipate roughly 40W of heat, requiring a massive heatsink and active cooling. For battery charging and embedded logic, a switching Flyback topology is mandatory to keep the enclosure cool and the efficiency above 80%.

Ripple and Noise Expectations: Switching supplies inherently generate high-frequency ripple (often 50-100mV peak-to-peak at the switching frequency, typically 65kHz to 130kHz). While this is fine for charging a battery or spinning a motor, it can cause erratic readings in 12-bit ADCs. The standard fix is to use a switching AC-DC stage for the heavy lifting, followed by a low-dropout linear regulator (LDO) or a high-PSRR LC pi-filter for the sensitive 3.3V logic rails.

Designing a 24V/5A AC-DC Stage: Input Protection and Headroom Math

Let us design a practical front-end for a 120W system (24V at 5A) that also needs to step down to 5V at 3A to power a Raspberry Pi 4 and a cluster of sensors. We will use a universal input off-the-shelf Flyback module and design the protection and secondary regulation.

Input Range and Protection Requirements

A robust AC-DC supply must handle a universal input range of 85 to 264 VAC to survive global grid fluctuations and brownouts. The input stage requires three critical protection components:

  • Inrush Limiting: When the mains is applied, the bulk DC bus capacitors look like a dead short. We use an NTC thermistor (e.g., Ametherm SL32 2R005) which presents 2 ohms of resistance cold, limiting the inrush spike, then heats up and drops to near 0.1 ohms during steady-state operation.
  • Surge Protection: A Metal Oxide Varistor (MOV) like the Littelfuse TMOV14RP275E (275V RMS rating) is placed across Line and Neutral. It clamps transient voltage spikes (like lightning-induced surges) before they puncture the primary MOSFET.
  • Overcurrent Protection: A 3.15A slow-blow fuse (Littelfuse 392 series) is placed in series with the Line. The slow-blow characteristic is critical; a fast-blow fuse will nuisance-trip every time the NTC thermistor is cold and the supply is switched on.
WARNING: Never bypass the input fuse or MOV to "save money" on a DIY AC-DC build. A failed primary switching MOSFET without an upstream fuse will result in a direct short across the mains, causing catastrophic failure, fire, and potential tripping of your home's main branch breaker. Always verify dead with a tested multimeter before probing the primary bulk capacitors, which can hold lethal charges for hours after unplugging.

Regulator Picks: Dropout and Headroom Math

Assume our 24V AC-DC module sags to 21V under full 5A load. We need to step this down to 5V at 3A for the Raspberry Pi. Should we use a linear LDO or a switching buck converter?

The Linear Route (Headroom Math): Consider a heavy-duty linear regulator like the TI LM1084 (5A version). According to the Texas Instruments LDO specifications, the maximum dropout voltage is 1.3V at 5A. Therefore, the minimum input headroom required is 5V + 1.3V = 6.3V. Since our sagging rail is 21V, we have plenty of headroom (14.7V margin). However, the power dissipated as heat is calculated as: Pd = (Vin - Vout) × I = (21V - 5V) × 3A = 48W. Dissipating 48W requires an extruded aluminum heatsink the size of a brick and a dedicated cooling fan. This is entirely impractical.

The Switching Route: Instead, we select a switching step-down module like the RECOM R-78E5.0-3.0. This module operates at 93% efficiency. The heat dissipated is merely 15W × 0.07 = 1.05W. It requires no heatsink, fits on a standard 2.54mm pitch header, and easily handles the 21V input (max rating 28V). Always choose a switching buck for voltage drops greater than 3V at currents above 500mA.

Thermal Derating and Real-World Component Selection

One of the most common mistakes hobbyists make when asking what an AC-DC power supply is used for is assuming a 150W supply can deliver 150W indefinitely in a sealed plastic enclosure. Power supplies are rated at a specific ambient temperature, usually 25°C or 40°C. As ambient temperature rises, the Mean Well LRS-150-24 (a benchmark 150W, 24V, 6.5A open-frame supply) must be derated to prevent internal component failure.

Looking at the manufacturer's derating curve:

  • At 40°C ambient, the supply delivers 100% of its rated load (150W).
  • At 50°C ambient, the maximum continuous load drops to roughly 80% (120W).
  • At 60°C ambient, the limit falls to 60% (90W).

If you mount this supply inside a sealed 3D-printed PETG enclosure sitting in a sunlit attic, the internal ambient temperature will easily exceed 55°C. If your 24V motor draw is 6A (144W), the supply will trigger its internal thermal overload protection and shut down, or worse, silently cook its own electrolytic capacitors.

The Arrhenius Equation and Capacitor Lifespan

The lifespan of an AC-DC power supply is almost entirely dictated by its primary and secondary electrolytic capacitors (e.g., Rubycon ZLH or Nichicon HE series, typically rated for 105°C). The Arrhenius equation dictates that for every 10°C rise in the capacitor's core temperature, its operational lifespan is cut in half. A capacitor rated for 10,000 hours at 105°C will last 80,000 hours at 75°C, but if poor enclosure ventilation allows the core to hit 115°C, it will dry out and fail in just 5,000 hours. Always design your enclosure with convective airflow paths directly over the AC-DC module's heatsink and bulk capacitors.

Application Matching: Batteries, ESP32 Hubs, and LED Arrays

Understanding the topology and thermal limits allows you to correctly match the AC-DC supply to your specific 12V/24V/48V application.

Charging LiFePO4 Batteries: Lithium Iron Phosphate batteries require a strict Constant Current / Constant Voltage (CC/CV) charge profile. A standard 14.6V AC-DC power supply can be used only if it features an adjustable current limit (CC mode) to prevent pulling 50A from the supply when the battery is deeply discharged. If the supply lacks current limiting, you must place a dedicated MPPT or PWM solar charge controller between the AC-DC supply and the battery BMS to manage the charge curve safely.

ESP32 and Microcontroller Hubs: Microcontrollers are highly sensitive to voltage sags. When an ESP32 transmits over WiFi, it can draw current spikes of 300mA lasting a few milliseconds. If your AC-DC supply has poor transient response or high output impedance, the 3.3V rail will brownout, resetting the chip. Always place a 470μF low-ESR polymer capacitor and a 100nF ceramic capacitor directly across the VCC and GND pins of the microcontroller to supply these transient spikes locally, bypassing the slower response time of the AC-DC feedback loop.

High-Power LED Arrays: LEDs are current-driven devices, not voltage-driven. Do not use a standard constant-voltage (CV) AC-DC power supply to drive raw LED COBs without a series resistor or active current driver. A slight increase in the AC-DC output voltage (or a rise in LED temperature causing forward voltage to drop) will result in thermal runaway, drawing massive current until the LED phosphor burns out. Use a dedicated Constant Current (CC) LED driver topology instead.

Ultimately, what an AC-DC power supply is used for extends far beyond simply "plugging it in." By respecting topology trade-offs, calculating exact regulator headroom, and designing for thermal derating, you ensure your 12V and 24V projects operate safely and reliably for years on the bench or in the field.