Skip to main content
9 min read

I Spent Three Days Debugging a Buck Converter Because I Didn't Read Page 14

A TPS54302-based 3.3V supply that worked perfectly on the bench but randomly reset the MCU during motor start-up. Three days of wrong turns before discovering an undersized inductor saturating on transient peaks.

debuggingpowerbuck-converter
I Spent Three Days Debugging a Buck Converter Because I Didn't Read Page 14 cover image

Three days. Seventy-two hours of staring at waveforms, swapping caps, questioning my life choices — and the answer was on page 14 of the datasheet the entire time.

I'm writing this partly as a post-mortem, partly as therapy, and partly because I know someone out there is currently doing the same thing. If you're building a buck converter and your load keeps brown-out resetting under transient conditions, stop swapping bypass caps and read this first.

The design

I was putting together a sensor board for an industrial monitoring application. An STM32L4 MCU, a couple of SPI sensors, and a small DC motor for a valve actuator. The whole thing runs off a 12V rail, and I needed a clean 3.3V supply for the digital side.

I picked the TPS54302 — TI's 3A, 4.5-28V input synchronous buck converter in a tiny SOT-23-6 package. I've used it before, it's cheap, it's everywhere, and the datasheet has a nice typical application circuit. What could go wrong.

Here's the simplified schematic: Simplified TPS54302 buck converter schematic with input decoupling, power stage, output filter, and feedback divider.

Feedback divider set for 3.3V output: 100k top, 22.1k bottom (Vref of 0.596V, so 0.596 × (1 + 100/22.1) ≈ 3.29V). Standard stuff. I followed the datasheet's recommended layout — short SW trace, kelvin-connected feedback, ground plane under the IC. Textbook.

The symptom

On the bench with a resistive load, this thing was beautiful. Clean 3.3V output, maybe 20mV ripple, efficiency around 89%. I was feeling pretty good about myself.

Then I plugged in the actual system. MCU boots fine, sensors initialize, everything's happy. Until the motor kicks on.

The valve actuator draws about 1.8A steady-state from the 12V rail through its own driver, but the motor start-up inrush is brutal — around 5A for about 2ms before the current limiter in the H-bridge clamps it. The motor is on a separate 12V supply path with its own bulk caps, but the two paths share a common input connector and about 15mm of trace before they split.

Every time the motor fired, there was maybe a 40% chance the MCU would reset. Not every time — just often enough to make you doubt reality. Sometimes it would run ten actuations fine, then reset three times in a row.

The STM32L4 has a brown-out reset (BOR) threshold at 2.77V (Level 3). So something was dragging the 3.3V rail below 2.77V during motor transients.

Wrong turn #1: Input decoupling

Obviously, the input voltage is dipping, right? The motor inrush is yanking the 12V rail down through the shared impedance. I grabbed the scope and probed VIN at the TPS54302.

Sure enough — a dip to about 10.8V during motor start. That's a 10% sag, not great, but the TPS54302 operates down to 4.5V input. A buck converter should regulate through a brief input dip like that without breaking a sweat.

But hey, more capacitance never hurt anyone. I added a 220uF electrolytic right at the input of the buck. The dip went from 10.8V to about 11.3V. The MCU still reset. Cross that off the list.

Wrong turn #2: Output capacitance

Maybe the output caps can't hold up the rail long enough during a load transient. I added two more 22uF MLCCs to the output — now four total, roughly 88uF nominal (probably 50-60uF actual at 3.3V DC bias, because X5R ceramics are liars).

No change. The MCU still reset intermittently during motor start-up. I even tried a 100uF tantalum on the output. Nothing.

Wrong turn #3: PCB layout

I started second-guessing my layout. Maybe the ground plane has a split I didn't notice. Maybe the feedback trace is picking up noise from the motor driver. I spent an entire evening with the layout files open, tracing every connection, checking every via.

The layout was fine. It was always fine.

Wrong turn #4: Firmware

At this point I started wondering if it was even a power problem. Maybe the motor's EMI was coupling into the SPI bus and crashing the firmware. I added a watchdog reset counter to SRAM and checked it on boot. Nope — the reset flag register showed BOR every time. It was definitely a power rail dropout.

Wrong turn #5: The scope says everything is fine

Here's the thing that really had me going in circles. When I probed the 3.3V output with my scope during a motor actuation, it looked... fine? A little dip, maybe 200mV, recovery in under 100 microseconds. Nowhere near the BOR threshold.

But the scope probe was a standard 10x passive with maybe 15pF of tip capacitance and I was probing at the output cap, not at the MCU's VDD pin. More on this in a moment.

The aha moment

Day three. I'm sitting there staring at the schematic for the hundredth time, and on a whim I decide to actually probe the inductor current. I don't have a current probe, but I do have a 10 milliohm sense resistor in the junk drawer. I tack it in series with the inductor and scope the voltage across it.

What I saw made my stomach drop.

Under steady-state 500mA load (MCU + sensors), the inductor current was a nice triangle wave. About 640mA peak-to-peak ripple centered on 500mA — peak around 1.14A. Totally normal for a 4.7uH inductor at 400 kHz.

But during the input voltage dip from the motor start, the buck converter did exactly what it was supposed to do: it increased the duty cycle to compensate for the lower input voltage. The peak inductor current jumped accordingly. And during the brief moment where the MCU's bypass caps were also feeding the motor driver through the shared ground impedance — the peak inductor current spiked to about 2.1A.

My inductor was a generic 4.7uH, 1210 package, from the "$0.02 each" bin. Rated for 1.5A DC and 2A saturation current.

At 2.1A, the inductor was saturating. When a ferrite inductor saturates, its inductance drops off a cliff — it can go from 4.7uH to less than 1uH within a few hundred milliamps above the saturation knee. When the inductance collapses, the current ramps up even faster, which causes even more saturation, which is a positive feedback loop that ends with the buck converter's overcurrent protection tripping.

The TPS54302's OCP threshold is around 4A. When OCP trips, the high-side FET turns off and the inductor current freewheels through the low-side FET until the next cycle. If this happens repeatedly — and with a saturated inductor it does — the output voltage collapses. Not a graceful droop. A full rail collapse that recovers in a few hundred microseconds once the transient passes.

That's exactly the 2.77V BOR threshold crossing the scope wasn't catching, because the dropout was so brief and my probe location wasn't right.

When I moved the scope probe directly to the MCU's VDD pin (pin 1, right on the pad), there it was: a 1.5V spike downward lasting about 80 microseconds, perfectly correlated with motor start. The extra trace inductance and via resistance between the output caps and the MCU pin were making the dropout worse at the MCU than at the output cap.

The math I should have done on day zero

The TPS54302 datasheet — page 14, section 8.2.2.1.3, "Inductor Selection" — gives you everything you need. Let me reproduce the key calculation.

Peak inductor current in a buck converter:

Ipeak=Iload+ΔIL2I_{\text{peak}} = I_{\text{load}} + \frac{\Delta I_L}{2} ΔIL=VOUT(1D)fswL,D=VOUTVIN\Delta I_L = \frac{V_{\text{OUT}}(1-D)}{f_{\text{sw}}L}, \qquad D = \frac{V_{\text{OUT}}}{V_{\text{IN}}}

with fsw=400kHzf_{\text{sw}} = 400\,\text{kHz} for the TPS54302.

Under normal conditions with 12V input, 3.3V output, 500mA load:

D=3.312=0.275ΔIL=3.3(10.275)400×103×4.7×106=3.3×0.7251.88=1.27 AIpeak=0.5+1.272=1.14 A\begin{aligned} D &= \frac{3.3}{12} = 0.275 \\ \Delta I_L &= \frac{3.3(1 - 0.275)}{400 \times 10^3 \times 4.7 \times 10^{-6}} \\ &= \frac{3.3 \times 0.725}{1.88} = 1.27\ \text{A} \\ I_{\text{peak}} &= 0.5 + \frac{1.27}{2} = 1.14\ \text{A} \end{aligned}

That's fine — well under the saturation rating. But during the input dip to 10.8V with the transient load bump:

D=3.310.8=0.306ΔIL=3.3(10.306)400×103×4.7×106=3.3×0.6941.88=1.22 AIpeak=1.5+1.222=2.11 A\begin{aligned} D &= \frac{3.3}{10.8} = 0.306 \\ \Delta I_L &= \frac{3.3(1 - 0.306)}{400 \times 10^3 \times 4.7 \times 10^{-6}} \\ &= \frac{3.3 \times 0.694}{1.88} = 1.22\ \text{A} \\ I_{\text{peak}} &= 1.5 + \frac{1.22}{2} = 2.11\ \text{A} \end{aligned}

That's 2.11A — already past the 2A saturation knee. And that's the steady-state calculation — the actual transient peak during the control loop's response to a step load can overshoot significantly beyond this. The datasheet recommends choosing an inductor with a saturation current rating at least 25% above the maximum expected peak current. For the TPS54302's full 3A capability:

Isat,required=Imax,peak×1.25I_{\text{sat,required}} = I_{\text{max,peak}} \times 1.25 Imax,peak=3.0+3.3(10.275)400×103×4.7×106×2=3.0+0.636=3.636 AIsat,required=3.636×1.25=4.55 A\begin{aligned} I_{\text{max,peak}} &= 3.0 + \frac{3.3(1 - 0.275)}{400 \times 10^3 \times 4.7 \times 10^{-6} \times 2} \\ &= 3.0 + 0.636 = 3.636\ \text{A} \\ I_{\text{sat,required}} &= 3.636 \times 1.25 = 4.55\ \text{A} \end{aligned}

My 2A-rated inductor never stood a chance. The datasheet even says it in plain English — something like "select an inductor with a saturation current rating greater than the maximum peak inductor current." Page 14. Right there.

The fix

I swapped the inductor to a Wurth 744043004R7 (WE-TPC series). Same 4.7uH value, but in a proper shielded package with well-characterized specs:

  • DC resistance: 85 milliohms
  • Saturation current (30% drop): 2.2A
  • RMS current rating: 1.8A

Wait — 2.2A saturation? That's barely above my transient peak. For a proper fix I actually went one step further and grabbed a Bourns SRR1260-4R7M — a 12.5x6.0mm shielded inductor rated for:

  • DC resistance: 28 milliohms
  • Saturation current (30% drop): 5.5A
  • RMS current rating: 7A

It's physically larger (1260 vs 1210 package), costs about $0.45 instead of $0.02, and the footprint needed a bodge wire for the prototype. But the result was immediate: zero MCU resets across 500 motor actuations. The 3.3V rail dip during motor start measured 180mV at the MCU pin — well above the BOR threshold.

For the production board revision, I also:

  1. Separated the input power paths with a ferrite bead (BLM21PG221SN1D) between the motor driver supply and the buck converter input, reducing the conducted transient coupling
  2. Added a bulk electrolytic (330uF/16V) on the motor driver's local 12V rail to absorb inrush current locally
  3. Shortened the trace from the buck output caps to the MCU VDD pin and added an extra 4.7uF MLCC directly on the MCU's pin

Lessons from the abyss

1. Saturation current is not the same as DC current rating. The DC current rating tells you when the inductor overheats in steady state. The saturation current tells you when the core loses its magnetic properties and the inductance collapses. For a buck converter, the saturation rating is the one that kills you during transients.

2. Cheap inductors don't specify saturation current. My $0.02 mystery inductor had a datasheet (if you can call it that) with just the inductance, DCR, and a "rated current" of 1.5A. No saturation spec. No core material. No inductance-vs-current curve. If you don't know the saturation current, you don't know enough to use it in a switching converter.

3. Probe at the load, not at the source. If I had probed the MCU's VDD pin on day one instead of the output caps, I would have seen the dropout immediately and saved myself two days.

4. Budget for worst-case transients, not steady state. My design "worked" because the steady-state peak current was safely under the saturation limit. The transient peak — the one that actually matters — was not.

5. Read the inductor selection section of the datasheet. Every decent buck converter datasheet has one. The TPS54302's is on page 14. It tells you exactly how to calculate peak current and what saturation margin you need. I had the datasheet open the entire time. I just never scrolled past the typical application circuit on page 1.

The irony is thick enough to solder with. Three days of debugging, and the fix was a $0.45 inductor that the datasheet told me to use from the beginning. Sometimes the hardest bugs aren't bugs at all — they're the spec you assumed was "good enough" and never checked.

Spec your inductors, folks. Or at least read page 14.

I Spent Three Days Debugging a Buck Converter Because I Didn't Read Page 14 | SheetsData