PowerTroubleshooting

Choosing a Power Supply for Your Project (Without Guessing)

Power is the single most under-diagnosed cause of strange behaviour in hobby electronics. A project that reboots, freezes, or gives nonsense readings is very often being starved, not badly programmed. Here's how to size a supply properly instead of hoping.

Why underpowering is so confusing

An overloaded supply doesn't fail cleanly. Instead, voltage sags — and low voltage produces symptoms that look like almost anything except a power problem:

Because none of that looks like a power fault, people rewrite code for hours. Learning to suspect the supply early is worth a great deal of time.

The three numbers you need

1. Voltage — must match

This one isn't a judgement call. Your board needs what it needs: 5V for a Raspberry Pi or an Arduino Uno's USB input, 3.3V for many bare modules. Too low and it won't run properly; too high and you damage things.

Watch for the difference between a board's input voltage and its logic voltage — they're often different, and confusing them is a classic error. Reading a datasheet covers where to find both.

2. Current — the supply must offer at least what you draw

This is the number people get wrong. A supply's current rating (in amps or milliamps) is a maximum it can provide, not something it forces into your circuit. Your project draws what it draws.

So a 3A supply powering a 1A project is completely fine — it simply idles at a third of capacity. Bigger is safe. Too small is not.

3. Connector and polarity

Boring, and it will ruin your evening if you get it wrong. Check the plug type, and for barrel jacks check the polarity marking — centre-positive is common but not universal. Reversed polarity destroys things instantly.

Working out what your project draws

Add up the worst case, not the typical case:

ItemRough current draw
Raspberry Pi 5Official supply is 5.1V / 5A (27W)
Raspberry Pi 4Official supply is 5V / 3A
Arduino Uno (board alone)Tens of milliamps
Typical small sensorA few milliamps
Standard LED (with resistor)Around 20mA each
Small hobby servoHundreds of milliamps, with much larger spikes when it moves
Addressable LED stripUp to roughly 60mA per LED at full white — adds up frighteningly fast
Peak current is what actually kills you. A servo that averages 200mA might briefly demand well over an amp the instant it starts moving. Size for the peak, not the average, or your project will fail at exactly the moment it does something interesting.

Then add headroom

Once you have a total, add a comfortable margin — a third to a half more than you calculated is a sensible habit. Reasons: your estimates are approximate, cheap supplies rarely deliver their full rated current cleanly, and a supply run permanently at 100% gets hot and ages quickly. A supply loafing at 60% will simply last longer and behave better.

The mistake almost everyone makes once

Powering motors or servos from the board's own 5V pin.

The Raspberry Pi and Arduino 5V pins are there to power small, well-behaved things — sensors, a display. They are not a motor supply. A motor's startup surge pulls the shared rail down, and the board browns out. You'll see it reboot for no apparent reason exactly when the motor moves.

The correct arrangement: give the motor its own supply, and connect the two grounds together. That shared ground gives both circuits a common reference so your control signal means something. Power separate, ground common — worth committing to memory.

Cables matter more than people expect

A supply rated for 3A that's connected through a thin, long USB cable may deliver considerably less than 3A at the far end, because the cable's own resistance drops voltage along its length. This is a genuinely common cause of Raspberry Pi undervoltage warnings when the charger itself is perfectly adequate.

Use short, decent-quality cables for anything drawing real current. If you're chasing an undervoltage problem, swap the cable before you replace the supply — it's free and it's often the answer.

Checking it's actually fine

Measuring under load is the trick. Idle measurements hide the fault you're looking for.

Batteries, briefly

Batteries add two complications. Their voltage falls as they discharge, so a project that works on fresh cells may misbehave as they age — usually solved with a regulator. And they have their own maximum current delivery, which for small cells can be lower than a motor demands.

For anything portable and non-trivial, a rechargeable pack with a proper regulator circuit is far less trouble than a handful of AAs and optimism.

Gear that helps

An official Raspberry Pi power supply removes the most common variable in one purchase. A multimeter lets you measure under load, which is how you actually prove it. For bench work, an adjustable supply with current limiting is the upgrade that turns a wiring mistake into a shrug — see the bench buying guide.