How to Choose the Right Power Supply for Your Embedded Project

· TRX Electronics
Printed circuit board with power supply components including transformer, electrolytic capacitors and voltage regulators

A practical guide to selecting, sizing, and implementing power supplies for embedded electronics — covering linear vs switching, ripple, efficiency, and common mistakes.

The Power Supply Nobody Talks About (Until Their Board Smokes)

Spending R2 000 on an ESP32 dev kit, a dozen sensors, and a custom PCB only to have the whole thing die because you grabbed the cheapest 5V wall wart from Takealot is a rite of passage. Most embedded engineers learn this the hard way. The power supply is the one component you can't iterate on after the prototype - it is either right from the start or it takes something with it.

What You Actually Need Before Buying

A power supply is not just a voltage number. If you walk away with one thing from this guide, let it be this: every embedded project has five non-negotiable specifications, and skipping any one of them is asking for trouble.

Output Voltage and Regulation

Your microcontroller datasheet will tell you the operating range. An STM32 running at 3.3V might tolerate 3.0V to 3.6V, but that leaves very little margin if your regulator sags under load. Linear regulators drop the excess as heat - that is fine if you are burning 200mW. Switching regulators are more efficient but introduce switching noise that can wreck ADC readings if you do not plan for it.

Current Draw - Peak vs Average

Average current is what your battery cares about. Peak current is what your power supply needs to survive. A LoRa module pulling 120mA during transmit but sitting at 10uA in sleep mode has a 10 000:1 ratio between peak and average. Your power supply must handle the peak. Your battery budget cares about the average. Both matter, and they matter for different reasons.

Ripple and Noise

Switching power supplies generate ripple - small AC fluctuations riding on top of the DC output. Most cheap modules specify less than 100mV ripple which sounds fine until you are trying to read a thermocouple with a 1uV resolution. If your project involves precision analog measurements, you need either a linear regulator or a switching supply followed by an LC filter stage.

Efficiency and Heat

Efficiency is the ratio of output power to input power. A linear regulator dropping 12V to 3.3V is only about 27 percent efficient - the other 73 percent becomes heat in the regulator. For a project running off mains power, that might be acceptable. For battery-powered devices, it means your project runs on a fraction of the battery capacity and the regulator gets hot enough to burn your fingers.

Protection Features

Good power supplies include overcurrent protection (OCP), overvoltage protection (OVP), short-circuit protection, and thermal shutdown. Cheap ones might have none of these. When something goes wrong - and it will - protection is the difference between a power supply that shuts down gracefully and one that takes your prototype board with it.

Linear vs Switching - Which for Your Project?

Linear Regulators

Linear regulators work by burning excess voltage as heat. The LM7805 has been around since 1975 and still ships in millions of designs. They are simple, cheap, quiet, and predictable. If your input voltage is within 2-3V of your output, a linear regulator is the easy answer.

Where linear regulators make sense:
- Low-power sensor nodes drawing under 50mA
- Audio circuits where switching noise is unacceptable
- Prototyping on a breadboard where simplicity matters
- Projects where the input voltage is close to the output

Where they do not:
- Battery-powered projects running off 12V or higher sources
- Anything drawing more than a few hundred milliamps
- Projects where heat dissipation is a concern in a sealed enclosure

Switching Regulators

Switching regulators chop the input voltage at high frequency (typically 100kHz to several MHz) and use inductors and capacitors to smooth it to the target voltage. They achieve 80-95 percent efficiency because they do not burn excess voltage - they store and release energy in magnetic fields instead.

The trade-off is complexity and noise. A switching regulator generates electromagnetic interference (EMI) and output ripple that can interfere with sensitive analog circuits. You need careful PCB layout, proper decoupling, and sometimes an additional linear regulator stage downstream (the classic switcher-plus-LDO combination).

Common switching regulator topologies:
- **Buck** - steps down voltage (12V to 5V, most common)
- **Boost** - steps up voltage (3.7V Li-ion to 5V USB)
- **Buck-boost** - handles both, useful for battery projects where voltage changes during discharge

Power Supply Modules Worth Considering

Mean Well makes some of the most reliable DIN-rail and PCB-mount supplies at prices that make sense for South African engineers. Their IRM series (PCB mount, 3-60W) and RS series (DIN-rail, 50-480W) cover most embedded projects. You can find Mean Well products through TRX Electronics based in Pretoria.

For prototyping, Traco Power and Recom offer compact DC-DC modules with isolation - useful when you need to separate noisy digital sections from sensitive analog front-ends. These run about R80-R250 per unit depending on wattage and isolation spec.

If you are building something that needs to survive in an industrial environment, look at Mean Well NDR and HDR series. They are DIN-rail mounted, include all the protection features, and come with 3-year warranties.

Common Mistakes That Cost More Than a Better PSU

Sizing for average current instead of peak. This is the number one mistake seen in prototype failures. Your radio module datasheet says 10mA average, but the transmit peak is 120mA. Size for 120mA with headroom.

Ignoring inrush current. Motors, large capacitors, and relay coils all draw a surge when first powered. A 5A power supply might happily handle a 5A steady load but trip its protection on a 15A inrush spike.

Running linear regulators too hot. If the regulator case is too hot to hold, it is dissipating too much power. Thermal paste helps slightly, but the real fix is switching to a more efficient topology.

No decoupling capacitors near the load. Every digital IC needs local decoupling. A 100nF ceramic capacitor placed as close as possible to the VCC pin is non-negotiable for any circuit running above a few kilohertz.

Mixing analog and digital ground without a plan. If your project has both an ADC and a microcontroller, you need ground plane strategy. The classic approach is a star ground - analog ground and digital ground meet at one point only, near the power supply return.

Where to Get Help

TRX Electronics stocks Mean Well, Traco Power, and Recom power supplies alongside the connectors and semiconductors to build around them. We are based in Moreleta Park, Pretoria, but ship nationwide. If you are in Johannesburg, Durban, or Cape Town, delivery is usually next-day for stocked items.

Give us a call on +27 (0)12 997-0504 if you want to talk through your specific project. We have been helping engineers and hobbyists source components since before most Arduino clones existed.

Keep reading

Three more articles you might find useful.