Bench note

LDO headroom when your wall wart drifts

Why headroom matters more than the datasheet implies

A low-dropout regulator will deliver stable 3.3 V or 5 V as long as its input sits comfortably above the output plus dropout voltage. The problem is that "comfortably" changes when your 9 V wall adapter sags to 8.2 V under real load, or when ripple from a cheap switching supply knocks another half-volt off the peaks.

I've seen too many weekend projects glitch intermittently because the LDO was spec'd with nominal input in mind. The vendor says 1.2 V dropout at 500 mA, you feed it a "9 V" adapter, and everything works until you add one more sensor or run the fans. Then the micro resets, or the ADC starts returning garbage, and you're left wondering if it's firmware.

It's not firmware. It's headroom.

Measure your adapter under load

Don't trust the label. Plug in your wall wart, load it with a dummy resistor or the actual circuit, and watch what happens on a scope or even a decent multimeter set to min/max capture. Cheap adapters can droop 10–15% under rated current, and if they're unregulated linear bricks, the sag is worse.

If you're using a switching adapter, check for ripple too. A poorly filtered output might swing ±500 mV around the nominal value, and your LDO only cares about the valleys. Add that ripple to the droop, then add the LDO's dropout at your expected current, and suddenly your "9 V in, 5 V out" design needs 7 V minimum at the input cap to stay stable.

Spec for worst-case, not typical

I usually budget 2 V of margin beyond the dropout voltage when I'm working with wall adapters I didn't pick myself. That sounds conservative, but it's cheaper than debugging phantom resets or explaining to someone why their board works fine on your bench and fails on theirs.

For a 5 V rail from an LDO with 1.2 V dropout at full load, I want at least 8.2 V at the input after sag and ripple. If the adapter is labeled 9 V and I measure 8.5 V under load with ±300 mV ripple, the valleys hit 8.2 V and I'm right at the edge. That's when I either add bulk capacitance to smooth the ripple, pick a beefier adapter, or switch to a buck converter if efficiency matters.

Bulk caps buy you time, not miracles

Adding a large electrolytic at the LDO input can absorb some of the ripple and short-term sag, but it won't fix a chronically underpowered adapter. I typically put 100–220 µF there, enough to smooth out a few milliseconds of droop when the load spikes. It's the same logic as bulk capacitor math that fits your drawer—you're buying hold-up time, not replacing the source.

If your adapter is truly marginal, the cap will delay the inevitable, but the voltage will still sag once the reservoir drains. You'll see it as a slow brownout instead of instant failure, which is only better if you're logging the rail and catching it in test.

Check the dropout curve at temperature

Most LDO datasheets show dropout voltage versus load current, but they bury the temperature dependence in a footnote or a separate graph. Dropout usually rises as the regulator heats up, sometimes by 10–20%. If your board runs warm or sits in an enclosure without airflow, factor that in.

I learned this the hard way on a motor controller that worked fine on the bench and failed after ten minutes in a 3D-printed case. The LDO was dissipating just enough power to push its junction temp up, the dropout crept from 1.1 V to 1.3 V, and the input margin evaporated. Adding a thermal relief pad and a bigger input cap solved it, but only after I'd already reprinted the enclosure twice.

When to give up on linear

If you're fighting for headroom and the math doesn't close, it's time to consider a switching regulator. LDOs are quiet and simple, but they waste (Vin - Vout) × Iload as heat, and that limits how much input voltage you can tolerate. A buck converter is noisier and needs more passives, but it won't care if your input swings from 7 V to 12 V, and it won't cook itself trying to drop 4 V at 500 mA.

I still reach for LDOs when I need clean analog rails or the load is under 100 mA, but for anything that pulls serious current or runs off a sketchy adapter, switching wins. Just pick your PWM frequency so you don't hear it in your audio circuit, and put the inductor where it won't couple into your sensor traces.

Test the rails before you trust the firmware

Before you blame your code for a flaky sensor or a micro that reboots randomly, scope the power rail. If it's dipping below the minimum operating voltage—even for a few microseconds—you've found your problem. Add margin at the input, verify the LDO isn't hitting dropout under load, and confirm the rail stays flat when you toggle outputs or spin up motors.

Power is the joint. Get it wrong and everything downstream is a guess.

← Full log