11
\$\begingroup\$

I'm making a board which will host an ATmega 162 microcontroller in PDIP package. Unfortunately, VCC and GND pins are diagonally arranged. From what I've read, the capacitors should be as close to the pins as possible for maximum effect.

enter image description here

Right now, I can see 3 ways to connect the capacitors. Run wires to the capacitors so that they are at equal distance from both pins, place capacitors near ground and run wire to VCC or place capacitors near VCC and run wire to ground. There's always the "none of the above" option too.

How do I make right decision in this case? Or is is irrelevant?

\$\endgroup\$
  • \$\begingroup\$ Breadboard or PCB? \$\endgroup\$ – Thomas O Feb 9 '11 at 1:07
  • \$\begingroup\$ @Thomas O Actually, I'll be using a prototyping board which has an individual solder pad for each pin and the pins are later manually connected together. I think that they're called Perfboard in English, but I'm not 100% sure. \$\endgroup\$ – AndrejaKo Feb 9 '11 at 7:53
  • 1
    \$\begingroup\$ Use a better package? The TQFP/MLF packages have more power inputs, plus with all the space you save you could fit all the decoupling caps you like. \$\endgroup\$ – Nick T Feb 10 '11 at 18:47
  • \$\begingroup\$ @Nick T Good suggestion (it's in Atmel's documentation as well), but I haven't advanced enough to be able to make my own PCB and to solder such packages. \$\endgroup\$ – AndrejaKo Feb 10 '11 at 20:56
11
\$\begingroup\$

For these types of packages you should use at least two equal bypass capacitors, one at each side of the IC (one near ground and one near VCC). The parallel inductance of two traces to two different caps lowers the total trace inductance and the current flowing from each bypass cap in opposite directions helps cancel out EMI. See Henry Ott's book "Electromagnetic Compatibility Engineering" for more details here. Apparently this technique reduces noise by a significant amount and will also help functionally. This technique taken to the extreme would involve using a power and ground plane and surrounding the entire chip with bypass capacitors, or if you have the money to spare, using buried capacitance planes, but simply using two caps at either side of the package makes a large and measurable difference (as opposed to just at the VCC side) (I'm too lazy to look it up but I think we're talking 10dB+ improvement).

enter image description here

EDIT: Added my cheesy drawing. The arrows are supposed to show the canceling current loops (one clockwise the other counterclockwise), but note the capacitors should be placed closer to the chip then I drew.

\$\endgroup\$
  • \$\begingroup\$ I didn't know this - thanks! What is the book like? \$\endgroup\$ – tyblu Feb 9 '11 at 3:27
  • 1
    \$\begingroup\$ I attended a Henry Ott seminar and it blew my mind. There are a lot of conventional practices out there today that may be ineffective or even make things worse that he covers with down to earth explanations and studies or data to back it up. If you can't get work to send you to one of his seminars (or even if you can) I'd highly recommend the book. It's my EMC bible. It may be my favorite engineering book of all time. It covers almost everything and is written in a very understandable manner. It's also packed with great sources for further reading on almost every subject. \$\endgroup\$ – bt2 Feb 9 '11 at 3:35
  • \$\begingroup\$ Can you provide a sketch of the capacitor arrangement? \$\endgroup\$ – AndrejaKo Feb 9 '11 at 11:56
9
\$\begingroup\$

enter image description here

\$\endgroup\$
  • \$\begingroup\$ I really like this answer. I hope I'll be able correctly solder the capacitor. \$\endgroup\$ – AndrejaKo Feb 9 '11 at 11:57
  • 3
    \$\begingroup\$ Check digikey... I think some sockets actually come with that cap installed... \$\endgroup\$ – joeforker Feb 9 '11 at 14:28
  • \$\begingroup\$ Yes, they come with capacitor installed. They are also crazy expensive, over $10. Ant I tink a ground plane would have less series inductance than those long capacitor leads. \$\endgroup\$ – markrages Feb 9 '11 at 18:15
  • \$\begingroup\$ Clever! Where did you come across this technique? \$\endgroup\$ – W5VO Feb 9 '11 at 23:09
  • \$\begingroup\$ digikey ED2108-ND \$\endgroup\$ – markrages Feb 10 '11 at 1:06
7
\$\begingroup\$

The decoupling capacitor goes as close to the power pin as possible, as the power line has a higher impedance than the ground reference. There should be a large ground plane, ready to provide a very low impedance path. A power plane is sometimes employed in multilayer (4+) designs for, among other things, a low impedance source.

You talk about wires, which leads me to believe you are using a breadboard. In this case, decoupling capacitors are just as important, but parasitic inductance and capacitance and ohmic contacts will mask their effects. Use the power rails for power and ground, and tie them together in multiple locations -- no ground loops! I wouldn't bother with anything other than a large electrolytic (10uF) in a breadboard unless it doesn't work, as it is only for prototyping simple circuits. (Does this work?) Troubleshooting decoupling requires the real layout (if the final product is in a breadboard, then go for it).

\$\endgroup\$
  • \$\begingroup\$ He said in a comment that he was using perfboard. \$\endgroup\$ – Kevin Vermeer Feb 9 '11 at 14:33
  • \$\begingroup\$ I'm using a breadboard and I'm trying to figure out exactly what's going on with a decoupling capacitor ... what exactly does Use the power rails for power and ground, and tie them together in multiple locations -- no ground loops! mean? If I connect ground rail to power rail with a capacitor, is that not a loop (as ground rail is connected to GND and power rail is +5V)? I was just going to literally drop a capacitor in between VCC and GND on each of my shift registers but now I'm confused... Can you possibly provide a picture/diagram? \$\endgroup\$ – redstarcoder Jan 19 '17 at 17:20
  • \$\begingroup\$ This image answered my comment question. \$\endgroup\$ – redstarcoder Jan 19 '17 at 17:33
5
\$\begingroup\$

For a PCB design, I almost always use a ground plane and for chips with opposite power pins I place a cap next to the power pin and ground the other end. The ground plane has a low inductance which reduces the effect compared to wiring a single trace to Vss. The goal of the decoupling cap is to provide a local current source for the chip, so this works well.

If it's a breadboard, I usually just solder some wires to a 100n cap and wire it over the chip. Messy, but it works.

\$\endgroup\$
  • \$\begingroup\$ .. short version of what I wrote, and earlier! +1 for getting to the point! \$\endgroup\$ – tyblu Feb 9 '11 at 1:11
  • \$\begingroup\$ Well, is this a good approach in case of EMI? According to Olin, it is not :) Damn, PCB layout is a pain in the ass! \$\endgroup\$ – abdullah kahraman Apr 6 '12 at 7:05
0
\$\begingroup\$

Overall distance matters, as inductance increases as you increase the wire distance. However, the position of the capacitor along this wire should not matter.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.