Decoupling Capacitor on Vcc Pin

Go To Last Post
16 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,

I was just wondering... do I really need that capacitor between Vcc and Gnd near my AVR?

I mean I already took care of decoupling in my voltage regulator.

Do the PCB tracks contribute that much noise?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes and more than one.
easy rulles:
one 100n per VCC pin.
some application you can have 100p NOP too to reduce EMC noise.
1u or 10u to the Vcc digital is a good idee if you can too. That help to reduce the noice on the Vcc lign.
But you must the layout is very important for that.
Thierry

Thierry Pottier

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

vpmedina wrote:
Hi all,

I was just wondering... do I really need that capacitor between Vcc and Gnd near my AVR?

I mean I already took care of decoupling in my voltage regulator.

Do the PCB tracks contribute that much noise?

It depends how many meters your voltage regulator is from AVR. If they are within 1 cm, maybe you don't need it. It does not hurt to put it there. Who knows without measuring. I would put it there.

Not noise, not from PCB tracks itself. But PCB tracks are not 0 ohm superconductors, they have resistance and inductance. Now AVR or any other digital chip connected to same PCB tracks consume current in peaks, and current peaks turn into voltage peaks in inductance and resistance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As an experiment, I once left off the decoupling capacitors on a PCB for a Microchip dsPIC device, and I couldn't even program it. Of course, it was a much higher performance chip than any AVR, but it does illustrate the importance of good decoupling.

Leon Heller G1HSM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Can you get away without decoupling caps? The quick answer is 'maybe.' The problem has to do with the way digital circuits are designed. The typical 'totem pole' output has a pull up transistor to make the output go high, and a pull down transistor to make the output go low. At any given time, one of those transistors is on, and the other is off. The problem comes when the output changes state. Transistors tent to turn on faster than they turn off, so there's a brief period when both transistors are on. This creates a short circuit across the power supply for a few nanoseconds. With microprocessors, there are hundreds of logic gates, all synchronized by the clock to change at the same time.
The problems come when these very large, but short current spikes are being drawn through the resistance and inductance of the power supply wiring and circuit board traces. This causes the power supply voltage at the microprocessor pin to drop, potentially enough to reset the processor, or cause random data errors. If the power supply regulator is close to the microprocessor, you might get away without the decoupling capacitors. If it's not, you'll get random intermittent resets and crashes that are almost impossible to troubleshoot.
The bottom line is that unless you've got a very, very good reason not to put the capacitors in, saving a few pennies in capacitors just isn't worth the risk of having to deal with the problems lack of decoupling can cause. My rule of thumb is a 10uF or larger electrolytic capacitor at the regulator, or the point where the power enters the board if it's an off board regulator, and then a 100nF capacitor for each chip, located as physically close to the chip as possible.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That should be 100nF per supply pin, not per chip.

Leon Heller G1HSM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
That should be 100nF per supply pin, not per chip.

That makes sense. I don't often deal with chips having multiple supply pins

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Can you get away without decoupling caps? The quick answer is 'maybe.' The problem has to do with the way digital circuits are designed. The typical 'totem pole' output has a pull up transistor to make the output go high, and a pull down transistor to make the output go low.

I don't use maybe, it's a must have. And where some pins have some high frequency and some higher current to swicth, more cap is welcome and take care where you place it, make sure that it's on the tracks to be the source of current for the swicthing.
The bulk caps on your board, you can't forget too...

Quote:
As an experiment, I once left off the decoupling capacitors on a PCB for a Microchip dsPIC device, and I couldn't even program it. Of course, it was a much higher performance chip than any AVR, but it does illustrate the importance of good decoupling.

You aren't alone...

Regards,

Bruno Muswieck

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In my experience, the maybe will always come out to be bad. Put the caps.

The largest known prime number: 282589933-1

In my humble opinion, I'm always right. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The caps are not there to clean up a messy supply prior to entering the chip, but rather the other way around. They are there to prevent the noise generated by the chip from messing up the supply.

They are little local VCC reservoirs that provide the current for the switching spikes generated by the IC you are decoupling.

official AVR Consultant
www.veruslogic.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gr8 is right. If you have other chips using the same vcc, especially analog stuff, the decoupling caps are there primarily to keep the noise at the uC, being able to provide voltage support for the uC is a nice side benefit.

To increase the effectiveness of decoupling caps at isolating VCC noise, have thick and short tracks from the uC VCC pins to the cap, then run long and thin tracks to the power supply VCC. The uC will get most of the transient power from the cap due to the low resistance path to the cap. I am not a big fan of having VCC flood planes on PCBs, you have no control over the impedance between the decoupling cap and the power supply VCC.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do we need to caps to our I/O port to reduce noise?

cs

I'm happy ytd, today, and tmr :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
This causes the power supply voltage at the microprocessor pin to drop, potentially enough to reset the processor, or cause random data errors.

I see... Better not take that chance 8)

Quote:
The caps are not there to clean up a messy supply prior to entering the chip, but rather the other way around. They are there to prevent the noise generated by the chip from messing up the supply.

Wow! Did not know this. Thanks for this info.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

chanseng738 wrote:
Do we need to caps to our I/O port to reduce noise?

Probably not a good idea. Unless it is an analog input pin or the analog ref pin, then it would be ok. For digital input and output, it is a bad idea, exception would be if you are using the digital pin to supply power to device or circuit, but you should really use power supply for that and not uC IO if you can.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

chanseng738 wrote:
Do we need to caps to our I/O port to reduce noise?
Very rarely.
Primary method is to somewhat match driver impedance to characteristic impedance of the transmission line (PCB trace, twisted pair, ribbon cable, etc.) by adding a series resistor; some ICs/DRAM/SRAM/FPGAs have a driver strength parameter to aid matching.
Severe EMI can be reduced by increasing AC impedance (adding a series inductor): ferrite bead

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Atmel has a neat application note on that topic called:
"AVR042: AVR Hardware Design Considerations", good stuff...

atmel.kr/dyn/resources/prod_documents/doc2521.pdf