7 ms·
The basics of decoupling capacitors
- exmadscientist 4y agoSome comments on a great article from an EE who has many axes to grind about stupid old decoupling myths (which this article gets mostly right!): > A related trick is to put ferrite beads on MCU output lines You must be extremely, extremely careful with this. In general, ferrite beads are hard to apply correctly and great care is required if you want them to work out. Do it wrong and you'll probably be making things worse, instead of helping. See for example: https://incompliancemag.com/article/ferrites-to-kill-ringing-or-not/ https://incompliancemag.com/article/ferrites-to-kill-ringing... https://incompliancemag.com/article/all-ferrite-beads-are-not-created-equal-understanding-the-importance-of-ferrite-bead-material-behavior/ https://incompliancemag.com/article/all-ferrite-beads-are-no... >The datasheets ... The manufacturer is Honestly, the datasheets are usually just wrong. The writer is an intern and the material is cargo-cult copy-pasted. If it works it's by accident, or because it wasn't critical in the first place. Read the datasheet, understand what it's trying to do, then go ahead and achieve that end in the most sensible manner. > It is true that at very high frequencies — hundreds of megahertz — the capacitor’s residual inductance becomes a limiting factor. At that point, combining multiple different capacitors can offer somewhat better wideband noise suppression. Nope. It's still wrong and dumb to do this with MLCCs unless you have simulated the hell out of the whole thing. You should practically never parallel different values of MLCC. Instead follow EMC wizard Henry Ott's advice: pick the smallest package you're willing to deal with, then the largest capacitor you're willing to pay for in that package, and just use that everywhere. This is called "big V" decoupling by Ott and decoupling master Bruce Archambeault and it is not the best way to do things, but every better way is much, much, much harder to do. "Big V" will work for everything that doesn't involve underfilled BGAs, and even most of those. > tantalum polymer I actually kind of hate these guys, I don't find much use for them outside DC-DC converter output capacitors. They have too little ESR to damp things that need it, too much ESL for high frequency use, and are just too expensive for general use. They're not bad or anything, they just don't really have a sweet spot. MLCCs plus a few cheap high-ESR aluminum electrolytics (often found these days as the high-temp long-life parts) is a really effective combination. Maybe a few solid tantalums for intermediate bypass if appropriate. > Y5V Thank the heavens that these are basically extinct. Good riddance. Okay, enough comments, you might then ask, how the hell do I decouple things in production designs? First, put one bulk capacitor, minimum, on every rail. Aluminum electrolytic if the rail leaves the board ever, maybe tantalum if it doesn't (or maybe not, solid tantalums have... reputations). My go-to series is Rubycon YXM or YXJ for through-hole electrolytics, Nichicon UCB/UCW or Chemi-Con MLE/MLF for surface-mount, and AVX TAJ for tantalums. These can physically be located anywhere. Then sprinkle down one 1uF 0402 per part for the small parts, or one per power pin for the big digital chips. Place these at the power pins, no exceptions. Things like MCU analog rails usually don't need ferrites but might get pi filter type structures. It depends on how important they are, really. If it's a big or dense board, toss in another tantalum or two physically near the chips or chip clusters to help keep the electrolytics honest. You can decouple 500MHz processors and pass radiated EMC at Class B with this approach. It's not hard to do, it's cheap (but not cheapest, this isn't going to get you to Shenzhen-special COGS), and it works great.
- jeffbee 4y ago> This is called "big V" decoupling by Ott and decoupling master Bruce Archambeault I assume this refers to the shape of the impedance plot? I mean sure you are going to try to get the deepest, widest "V" you can but it's a game where you must optimize the cost, usually. My favorite newish technology for this is the "reverse" footprint surface-mount capacitors, where "reverse" means the leads are on the long side of the package where they should have been in the first place, instead of the normal style where the leads are small and far apart. E.g. a backwards 0612 package has ~10x less impedance at 1GHz than a 1206. But the price is 2-3x.
- exmadscientist 4y agoYep, that's the origin of the name. Cost is not usually the constraint being optimized, it's design time. This approach is simple to implement, relatively cost-effective, and works. That's useful! The wide parts are great. But they're also overkill. You can clean your kitchen sink with a pressure washer, but why would you? You don't need to. And so you don't need 0306s for normal designs.
- dragontamer 4y ago>> tantalum polymer > I actually kind of hate these guys, I don't find much use for them outside DC-DC converter output capacitors Bulk capacitance in extreme battery constrained scenarios? MLCC has difficulty going above 1uF at reasonable costs... especially when you consider voltage derating. Aluminum is relatively leaky, IIRC like 20uA, or 20x more leakage than MLCC or Tanalums. Think like bulk capacitance for a CR2032-cell (which has issues serving more than 10mA). Serving an ESP32's 100mA+ current draw for a second or two (and then ESP32 sleeps) kinda thing. ---------- But not really a "decoupling cap" in this case. Just a bulk cap where Aluminum is disqualified.
- exmadscientist 4y agoI mean, yeah, they have uses. I just struggle to find them. Something else usually wins out. Height-constrained layouts are usually a decent bet, tantalum shines if aluminum can't fit! They do leak pretty badly though. I think it's better than other electrolytics, but it's still not great. Of course, they do tend to do better than spec... until they don't. It's been a while since I've done micropower stuff though, so what do I know.
- magicalhippo 4y agoAnother issue to keep in mind is how different capacitors are affected by DC bias. Some lose a lot of effective capacitance close to the rated voltage. Here's a shortish video I found useful on this: https://www.youtube.com/watch?v=k7aPb585Y6k&t=189s https://www.youtube.com/watch?v=k7aPb585Y6k&t=189s
- Workaccount2 4y agoMy approach to decoupling my circuits is to take out my 100nF salt shaker and to sprinkle liberally over the board.
- tylerag 4y agoWhen an 0805 is 2 cents in bulk, I can't be bothered to do it any other way.
- GeorgeTirebiter 4y ago0805 ! Get thee some 0201s and a good microscope.... ;-) If you are working at DC / audio, sure, 0805 probably fine, tho. Truth be told, I generally use leaded parts because they're easier to work with. If you understand what is going on (a leaded Cap is actually a cap in series with some noticeable inductance), and if the self-resonant freq is 'high enough' --- it's fine.
- jjoonathan 4y agoYeah, and this is a case where a well cultivated sense of "good enough" is actually quite important because optimizing decoupling capacitors for high capacity, small size, and low price is a recipe for picking an exotic ceramic with a wacky tempco and then having a device fail intermittently when hot or cold: https://www.allaboutcircuits.com/technical-articles/x7r-x5r-c0g...-a-concise-guide-to-ceramic-capacitor-types/ https://www.allaboutcircuits.com/technical-articles/x7r-x5r-...
- bsder 4y agoI find that 0402s are plenty fine, thanks, and I can still see them with the naked eye to grab them with tweezers. In my experience, 0402s are the breakpoint on the curve. 0603s are large enough that there are a couple of cases where they're kinda marginal due to size (inductance) and the size gain isn't quite enough for things like QFN packages. 0402s almost never have the issue. 0201s aren't enough better that they are worth the extra grief to deal with unless I'm on a really constrained board, and I'm only letting an assembler do the board (nothing by hand from me).
- jmwilson 4y agoI wrote an article last month about testing the received wisdom about decoupling capacitors: https://jmw.name/projects/exploring-pdns/ https://jmw.name/projects/exploring-pdns/ A lot of design guidelines and advice boil down to cargo-cult rules like "sprinkle 100 nF caps everywhere," and many people don't have don't have the tools to measure PDNs and decide if that rule is actually good enough. I made a custom PCB to emulate different configurations of capacitors of various types and layouts. With a spectrum analyzer and tracking generator, it's possible to measure and visualize several points that are important: what does "physically close" mean, the effect of DC bias on capacitors, and how does parallelizing capacitors together affect the circuit. The author of this is using an oscilloscope to look at time domain behavior, but generally I think of these things in the frequency domain.
- magicalhippo 4y agoNice article! For the decade test, did you try just four 10uF? I've seen others perform similar tests where four equal values were from at least as good to much better.
- jmwilson 4y agoI have data collected for 3x MLCC 10 uF + 1x 100 nF but need to make the charts and update the article. Short answer is it's basically just as good and has fewer resonance peaks. I'd also like to do the test with some tantalum 10 uFs to throw in some ESR and see if that tames the impedance spikes even more.
- chongli 4y agoYour article says "VNAs are very expensive." Does this mean something like the NanoVNA [1] is inadequate for this measurement? [1] https://nanovna.com https://nanovna.com
- jmwilson 4y agoI do mention the NanoVNA as a measurement option that has better accuracy since it can do phase measurement. It's an amazing tool, though its lower limit for frequency is 50 kHz and I'm not sure how its dynamic range holds up there. Ideally you want the option to go very low for this measurement. Like most VNAs sold today, the NanoVNA is really designed for looking at RF and microwave circuits. I only know two commercial VNAs in-production that are made specifically for this kind of work: the Keysight E5061B (5 Hz - 3 GHz, $50000+ when optioned out appropriately) and the Omicron Bode 100 (1 Hz - 50 MHz, I think $5k-10k).
- ansible 4y ago> A related trick is to put ferrite beads on MCU output lines; this takes the edge off fast-rising square wave signals, and can reduce needless inrush currents when operating slower buses such as I²C or SPI. As /u/exmadscientist mentions, you probably shouldn't do this unless you know what you are doing. I also want to mention here that the fancier MCUs and SoCs will have configuration registers for drive strength, slew rate control and more for each output pin. If you're having a problem with ringing or whatever, you should definitely look to these settings, and see if you can fix this way. You might not need to make a PCB design change, which is always nice.
- bsder 4y agoIf you genuinely need ferrite beads to solve your problems, the real solution is use Ethernet. Ethernet has already taken care of all the signal integrity issues as long as you follow the design guidelines from the application notes. You don't do this kind of thing with ferrite beads unless you need genuine high frequency isolation--generally because you are using a high precision ADC/DAC. A small resistor is more than good enough to round this off on an I/O pad. I always put a small (47 Ohm, 33 Ohm, or 22 Ohm) resistor in series with any digital "clock" line nowadays (SPI-SCLK, I2C--SCL, etc.). Modern chip processes can launch edges with GHz components onto clocks that are operating at KHz. I have had to debug quite a few "double clocking" faults and invariably just putting a small series resistor does a nice job of completely avoiding the problem.
- dfox 4y agoIf you are driving something that really should not be a transmission line for your application from fast enough driver that makes it look like a transmission line then source termination (or just placing random resistor there as who the hell knows what the characteristic impedance of the thing really is) is the main thing that everybody should get from Handbook of Black Magic. Ferrite beads are for when you are driving external cables that should conform to some kind of interface standard and you have slew-limited driver.
- wtfmcgrill 4y ago
- phkahler 4y agoDoesn't inductance go up with narrower traces? So keep the ones between the pin and the decoupling capacitor wider if there is room.
- compumike 4y agoYou may also be interested in the book “High Speed Digital Design: A Handbook of Black Magic” which, despite “digital” in the title, is really about the analog details of getting signals cleanly from A to B. http://www.sigcon.com/books/bookHSDD.html http://www.sigcon.com/books/bookHSDD.html
- dekhn 4y agoSome things I've learned in electronics: switches are noisy. They bounce. People will advice all sorts of things, like decoupling caps. I've applied these (artisanally) and they never make a difference (for switches) but schmitt triggers do. It was only after I looked at a switch with an oscope that it made sense, the noise is almost never due to coupling, and almost always bounce that causes the problem (assuming you're already pulling up/down the switch).
- dfox 4y agoPutting caps or even somewhat more complex networks in parralel to switches or around switches is a solution when you cannot change the rest of the system. Correct solution for this issue is debouncing logic (be it in HW or SW). But if for your application an SPDT switch costs same as SPST switch, driving an RS flipflop from that works better (less latency) and component-wise is cheaper than deboucing in HW (same amount of logic, less passives).
- codebje 4y agoYou've seen the scope output for bounces: the signal will often go completely from one extreme to the other, as well as a little bit of noise just after a change. A switch might bounce a hundred times, rail to rail, taking 5ms or more to settle. A typical switch probably only bounces 1-10 times over 1-2ms, but unless you plan to test every switch and throw out the worst ones you should plan for the worst. A capacitor resists change in voltage. Where a switch's change on the oscilloscope usually looks like a steep cliff, adding a capacitor will introduce a curve as the voltage drops. The size of the curve depends on both the capacitance _and_ the resistance between ground and the capacitor: simply adding a capacitor won't give you much of a curve because there'll be very little resistance. You also need to add a resistor to make an RC network. To handle the worst of switches you want an RC value somewhere around 10ms. What you choose for R and C depends on any other constraints you might have, like power consumption or capacitor size. Because the RC network slows the transition time a lot you need a Schmitt trigger to convert the slowly curving voltage change into a nice sharp input signal change without allowing noise to ruin everything. There are other ways to deal with bounces in hardware, too: you can convert the switch's on/off signal into a pulse using a monostable circuit (eg, a 555), you can use a dedicated debounce IC, you can use a flip flop with a SPDT switch, you could blow $50 on a Hall effect switch and use an ADC. Or you can deal with it in software, which is popular because it's typically easier to find space in a ROM than it is to find space for discrete components on a PCB.
- systems_glitch 4y agoMost of what they're describing is bypass which is the shunting of high frequency noise to ground via capacitors. The capacitors appear as a lower impedance path for the HF noise to ground, rather than return thru the power supply, whatever that may be.
- rzzzt 4y agoYou can have perfectly smooth supply voltage by using eg. alkaline batteries and still see noise on the power rails each time a digital IC switches a lot of outputs at once. The same caps can also act as reservoirs that work against these bounces.
- systems_glitch 4y agoSorry, it was probably unclear that I meant the source of HF noise is the circuit, not the power supply. You are correct, you need them even with battery supplies.
- orangecrust 4y agoThis is a neat tool for designing PDNs http://app.pdntool.com/ http://app.pdntool.com/
- Eduard 4y agoHow come ICs don't integrate decoupling capacitors themselves?
- dfox 4y agoThere is a no sane way to manufacture large enough decoupling capacitors in the semiconductor processess involved. Some ICs (including most of socketed CPUs) include some decoupling MLCCs in the module package, but still the bulk has to be outside.