EmbeddedRelated.com

Universal Input 24V AC-DC Power Supply

A universal input AC-DC power supply system providing a regulated 24V DC output for prototyping.

Intermediate Project — Handling mains AC voltage (120V/240V) requires strict safety protocols, proper grounding, and insulation to prevent electric shock or fire.
Assumptions:
  • The user needs a complete AC-to-DC solution, not just a DC-DC converter.
  • The power requirement is moderate (approx 30-60W) for general prototyping.
  • A microcontroller is required to monitor the output voltage and status as per standard requirements.

Bill of Materials

Microcontroller
Top Pick ESP32-DEVKITC-32E Espressif Systems From our database
The ESP32-DEVKITC-32E is the best choice because it allows you to easily add wireless telemetry to your power supply prototype, enabling you to monitor the 24V rail from a smartphone or PC.
Mouser $10.00 (1,043 in stock)
NUCLEO-F401RE STMicroelectronics From our database
Industry-standard ARM Cortex-M4 with excellent ADC resolution for precise power rail monitoring and professional toolchain support.
ARDUINO-UNO-R3 Arduino
The gold standard for beginner prototyping with massive library support for basic power monitoring and simple displays.
Power Supply
Top Pick LRS-50-24 MEAN WELL
The LRS-50-24 is the recommended choice due to its high availability, low cost, and proven reliability in prototype environments requiring a 24V rail from universal AC mains.
Mouser $11.40 (2,748 in stock)
VGS-50W-24 CUI Inc.
Chassis-mount industrial supply with universal input (85-264VAC), 24V/2.1A output, and screw terminals ideal for safe prototyping.
LS50-24 TDK-Lambda
Highly reliable industrial grade supply that handles 85-264VAC automatically with excellent efficiency and MTBF.

Compatibility Notes

  • The 24V output from the power supply must be stepped down to 5V or 3.3V to power the Microcontroller block; use a buck regulator for this.
  • Ensure the AC input wiring follows local color-coding standards (Black/White/Green for NA, Brown/Blue/Yellow-Green for EU).

You'll Also Need

  • AC Power Cord (NEMA 5-15P or CEE 7/7)
  • Enclosure/Project Box for safety
  • Voltage divider resistors (for sensing 24V with 3.3V/5V logic)
  • Fuse and Fuse Holder for AC input protection
  • DC Step-down module (e.g. 24V to 5V) for MCU power
Estimated BOM Cost: $25-30 (based on live distributor pricing)

Design Considerations

High Voltage Safety
Since this involves 120V/230V AC, the power supply must be mounted in a non-conductive or properly grounded earthed metal enclosure. Ensure creepage and clearance distances of at least 8mm are maintained between AC traces and low-voltage DC signals.
Thermal Management
At 50W output, even an 85% efficient supply generates ~7.5W of heat. Ensure the enclosure has adequate ventilation or a small 24V fan if the supply is under continuous heavy load to prevent thermal shutdown.
Voltage Monitoring Accuracy
To monitor the 24V rail with an MCU, use a precision voltage divider (0.1% tolerance resistors) and a 3.3V Zener diode for over-voltage protection on the ADC pin. Calibrate the firmware to account for resistor tolerances and MCU internal reference drift.
Inrush Current
Switching power supplies like the LRS-50-24 have high inrush currents (up to 45A @ 230VAC). Ensure any upstream circuit breakers or power strips are rated for these transient spikes to avoid nuisance tripping.

Want to customize this project or build something different?

Try the Project Advisor