Hacker News new | ask | show | jobs
by WarmWash 54 days ago
The capacitor doesn't have a concept of "fast enough", it's a passive component. The signal is what determines what it does when it encounters the capacitor. Non-linearities and capacitor species aside, a good ole x7r 100nF would clean this up.

In general you can just liberally dump 100nF caps all over your pcb power traces and quash most problems like this before even knowing they exist. I joke that you make a circuit then take out your 100nF salt shaker to make it just right.

2 comments

The capacitor has a self inductance. That's why you use low self inductance capacitors with very short leads or traces in this role. 100 nF ceramics are fine, but you may actually need a 100 nF and a 10 nF side-by-side because of that inductance depending on how dirty your power line is. Fast clocked circuitry can be pretty nasty.
> 100 nF ceramics are fine, but you may actually need a 100 nF and a 10 nF side-by-side because of that inductance depending on how dirty your power line is.

Capacitance value is essentially irrelevant to inductance. The thing that dictates inductance of a decoupling capacitor is essentially only the package size. The way to fix that is to use smaller (physical) sized components. The only reason it may be related is that some larger values of capacitance physically can't fit into tiny package sizes. For 100nF, you have essentially no restrictions though. 0201(i) are easy to find in that value.

That's fair, I was thinking of hole-through components and I should probably stop doing that in 2026... But: if we're being pedantic: it isn't the physical size as much as it is the loop area that the current travels through, and that doesn't depend so much on the size of the package as on how the package is constructed. Low ESR caps such as IDC or LGA type caps will do better than other types even if the physical size is identical. Lead length also still matters, whether physical leads or length of the traces connecting the cap to the device and these should be kept as short as possible.
Look up parasitic inductance.

Through hole parts cap out at maybe low MHz. Many electrolytic caps frankly cannot effectively decouple signals above 100s of kHz even. Above that value, capacitors become inductors due to lead lengths, parasitic resistance, and other details.

To make capacitors work faster, we make them smaller and smaller. Surface Mount Caps are the only way to reach 20MHz++ decoupling speeds, and you need crazier tricks if you need additional decoupling beyond that frequency.

Yes, but we are splitting hairs at that point. The transient spike is a high impedance voltage that is tripping the high impedance internal protection circuitry of the magnetometer. So whether we have 20mOhms of capacitive decoupling or 500mOhms of inductive decoupling, both are better than the infinite impedance of nothing there.

We're not building a precision filter, were cutting the paws off of a paper tiger. No need to let perfect be the enemy of good.

This is a circuit with a switching regulator that is, presumably, stabilized with something on the order of a 10uH inductor + 22uF capacitor.

So from my perspective, increasing the capacitance from 22uF on that output line to 22.1uF with a 100nF cap will likely do jack diddly shit.

It is far more likely that, ex, the author of this post screwed up the regulator design. Ex: did the author mistakenly think that more capacitance is better-er and stick a 100uF cap there, blowing out the phase margin of the feedback of the switching regulator?

Was the inductor properly sized? Not just inductance but also saturation current and internal resistance?