perjantai 18. maaliskuuta 2016

Placing bypass capacitors


Bypass caps seem often to be kind of black magic to beginners. But really they aren't, that designation is reserved for RF stuff, they just serve a purpose so common and essential that often they get ignored with a "just because". And beginners get confused.

Bypass capacitor is smallish capacitor that should be placed right next to chips' power supply pins (be they memory, microcontroller or any other IC.)  Exact value depends on situation, but in my use 100nF is quite common these days. For beginners they are often explained with little more than "just put them there" so it's easy to get confused about them.

A quick search gives you lots of examples on how to (and how not to) place them, but reasons for this are not often provided. As it happens Dave Jones did a video just a few days ago explaining the reason, without delving too deeply to details. If you don't know about why yet, I'd recommend that you watch that video, it should help a lot.


For a simple chip bypass caps are easy to place - there may be just one supply and one ground pin, so that one bypass capacitor is easy to place. And supply trace must go through the capacitor (well, positive pin/pad of capacitor), otherwise that capacitor is effectively bypassed (dare I say it - ironically enough) by signal and thus completely useless.

As chip grows in complexity it may have easily 10 or even 20 supply pins and equal amount of ground pins. Each of supply pins should be bypassed separately. Now things are starting to get a bit annoying, having to place so damn many caps.

And if chip has several supply voltages, say 3.3v for logic and 1.8v for core? Even more annoying - first you have to figure out how to route both supplies (with space left for actual signals), and how to find space for caps. And large FPGAs? Well, let's just say that there is a reason why those boards often use 10+ layers...

But how about BGAs? This is the point where I'm starting to get seriously annoyed (not least because I don't really have much experience with them yet.)  Often the ground and supply balls are placed in somewhere in middle of the chip so you really can't either route supplies from outside there nor place bypass caps next to the chip itself. Often when you find yourself having to deal with BGA, you'll need at least 4-layer board, even if said BGA is relatively tiny (I think something up to 4x4 balls might be manageable with just two layers, anything larger is really pushing it.)

Often this means in practice that capacitors must be placed on the other side of the board so that first supply is passed from supply layer cap's layer, passed through its pad and then back on the other side of board to supply ball of chip.

Not like this, mind you:

This is from a board I've had half-finished for two years now but has been pretty low in my priority list. Red balls are obviously enough BGA balls on top layer; highlighted U-shaped trace is one of the supply voltages; inside it is another supply voltage (yes, two) and in center ground. Damn this is annoying pin layout, not made any easier by the fact that large parts of other side is pretty much untouchable - can't move things around there at occupied places (just take my word for it, please.)
Mind you, this is essentially my first board with BGAs, so they are a bit of unfamiliar territory to me to begin with.

Now, two years ago when I last worked with this board I had clearly noticed that supply rails need more bypass caps. So I had added one on the other side of the board, circled with yellow. Notice how it is in middle of trace (passed through the board with that green via), but to "side" of it?

When I noticed this I just had to whack myself on the head. That capacitor is completely useless.

Now, note the another capacitor on right, marked with purple? That's newer addition. Another supply rails comes in from right (thicker red trace), goes on the other side of the board, through cap's pad and then back on this side, towards left side. Still not great placement, but way better than the other, at least it helps a bit to smooth transitions.

Note, this board uses 4 layers with blind vias so the via overlap you might  see there is actually not a problem. It however makes prototyping damn expensive - small-run boards with blind vias are expensive.

Since noticing this I've fixed the supply routing, but I'm still not happy with it. Hopefully it is sufficient - although I'm not really pushing the capabilities of this chip here so even less than perfect supply structure might be sufficient. We'll see when I get this board made.





Ei kommentteja:

Lähetä kommentti