### Author Topic: Q: Why capacitor across power pins  (Read 9310 times)

0 Members and 1 Guest are viewing this topic.

#### thaking

• Contributor
• Posts: 13
##### Q: Why capacitor across power pins
« on: October 02, 2010, 02:31:16 pm »
Can anyone explain in few words why we use capacitor across power pins?

#### KTP

• Frequent Contributor
• Posts: 515
##### Re: Q: Why capacitor across power pins
« Reply #1 on: October 02, 2010, 02:40:12 pm »
One use is a low impedance path for signals.  Z = 1/(j*2*pi*f*C)

(I mean such that a signal return does not have to travel a long path but can go through the capacitor)
« Last Edit: October 02, 2010, 02:41:44 pm by KTP »

#### Simon

• Global Moderator
• Posts: 13946
• Country:
• Did that just blow up? No? might work after all !!
##### Re: Q: Why capacitor across power pins
« Reply #2 on: October 02, 2010, 02:58:27 pm »
it os known as a decoupling capacitor and has a similar function to a filtering capacitor afer a rectifier but in reverse, it supplies peaks of power when required so as to help the power circuit be stable. The line from the MCU to the power supply will have a resistance and an instant power requirement (peak current pulse) will cause a voltage drop accross the path from the supply and so reduce the voltage supplied and cause an unstable supply, the capacitor help deal with this by supplying the initial surge of power required giving the supply to ajust to the change. in simple terms it's a power buffer.

as an example get a pic to deliver a stream of pulses to even a few Kohms of load and observe the power line to the pic with an oscilloscope, you will see negative and possibly positive (where the regulator over compensates) spikes at the same frequency as the output frequency
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559

#### Zero999

• Super Contributor
• Posts: 13200
• Country:
• 0999
##### Re: Q: Why capacitor across power pins
« Reply #3 on: October 02, 2010, 03:34:17 pm »

#### thaking

• Contributor
• Posts: 13
##### Re: Q: Why capacitor across power pins
« Reply #4 on: October 02, 2010, 03:41:04 pm »
Many thanks

#### Simon

• Global Moderator
• Posts: 13946
• Country:
• Did that just blow up? No? might work after all !!
##### Re: Q: Why capacitor across power pins
« Reply #5 on: October 02, 2010, 03:44:25 pm »
it's a basic rule that applies generally to any IC but in particular to digital ones and MCU's because the the high speed variations in power requirements as logic outputs swig rapidly from 0 to VCC and back again, usually a 0.1 uF (100 nF) ceramic or polyester cap is used sometimes with a small electrolytic capacitor capacitor in parallel.
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559

#### alm

• Guest
##### Re: Q: Why capacitor across power pins
« Reply #6 on: October 02, 2010, 06:08:42 pm »
it's a basic rule that applies generally to any IC but in particular to digital ones and MCU's because the the high speed variations in power requirements as logic outputs swig rapidly from 0 to VCC and back again, usually a 0.1 uF (100 nF) ceramic or polyester cap is used sometimes with a small electrolytic capacitor capacitor in parallel.
Yep, that's the standard and naive way.

#### Zero999

• Super Contributor
• Posts: 13200
• Country:
• 0999
##### Re: Q: Why capacitor across power pins
« Reply #7 on: October 02, 2010, 08:39:18 pm »
Very informative article alm, thanks for linking to it.

I might get shouted out for saying this: it's not always necessary to use a decoupling capacitor; many low frequency circuits will reliably without one.

In my experience, combinational logic circuits (not state machines) when used at low frequencies and op-amps such as the LM358  seem to do fine without decoupling. Schmitt trigger logic gates also seem to be inherently stable so it seems pretty pointless to stick a 100nF capacitor across the power supply rail of a 74HC14.

The more sensitive circuits seem to be those which are more picky about their power supply requirements (TTL, LS and HCT) and state machines (any circuit containing a flip-flop) which should always be well decoupled.

And of course a micrcontroller with a 4MHz internal oscillator is not a low frequency so decoupling is mandatory.

By the way, I'm surprised that Microchip haven't released a microcontroller in a DIP package with a capacitor built in. There's more than enough room for it and embedding it would mean it will be more effective.

#### mikeselectricstuff

• Super Contributor
• Posts: 12051
• Country:
##### Re: Q: Why capacitor across power pins
« Reply #8 on: October 03, 2010, 12:03:10 am »
By the way, I'm surprised that Microchip haven't released a microcontroller in a DIP package with a capacitor built in. There's more than enough room for it and embedding it would mean it will be more effective.
For the same reason no other company does this for devices at this sort of speed - you sometimes see decoupling in/on the package of big high-end processors and other very high speed chips but it would make no sense to add considrable cost by doing this when external decoupling is perfectly adequate for PICs. OK it may be slightly more effective, but unnecessary overkill.

Incidentally, a while ago just for fun I tried taking off all the decoupling caps on a 2-layer FPGA board running at 40MHz and it kept running just fine..!
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs

#### Time

• Frequent Contributor
• Posts: 725
• Country:
##### Re: Q: Why capacitor across power pins
« Reply #9 on: October 03, 2010, 12:08:24 am »
By the way, I'm surprised that Microchip haven't released a microcontroller in a DIP package with a capacitor built in. There's more than enough room for it and embedding it would mean it will be more effective.
For the same reason no other company does this for devices at this sort of speed - you sometimes see decoupling in/on the package of big high-end processors and other very high speed chips but it would make no sense to add considrable cost by doing this when external decoupling is perfectly adequate for PICs. OK it may be slightly more effective, but unnecessary overkill.

Incidentally, a while ago just for fun I tried taking off all the decoupling caps on a 2-layer FPGA board running at 40MHz and it kept running just fine..!

I was hoping someone would answer/ask this question.  Thats funny, Mike.  I have always guessed that was the case.  Perhaps they are there for localized EMI disturbances that can appear?
-Time

#### slburris

• Frequent Contributor
• Posts: 522
##### Re: Q: Why capacitor across power pins
« Reply #10 on: October 03, 2010, 12:25:15 am »
By the way, I'm surprised that Microchip haven't released a microcontroller in a DIP package with a capacitor built in. There's more than enough room for it and embedding it would mean it will be more effective.
For the same reason no other company does this for devices at this sort of speed - you sometimes see decoupling in/on the package of big high-end processors and other very high speed chips but it would make no sense to add considrable cost by doing this when external decoupling is perfectly adequate for PICs. OK it may be slightly more effective, but unnecessary overkill.

Incidentally, a while ago just for fun I tried taking off all the decoupling caps on a 2-layer FPGA board running at 40MHz and it kept running just fine..!

I was hoping someone would answer/ask this question.  Thats funny, Mike.  I have always guessed that was the case.  Perhaps they are there for localized EMI disturbances that can appear?

I gotta think the decoupling needs would be highly dependent on what's loaded into the FPGA,
how many simultaneous switching outputs you have, what the drive strength is set to, etc.

That being said, I tend to just throw in a bunch of 0.1uf bypass caps and a bulk electrolytic.
That's pretty much what the paper from TI said not to do :-)

Scott

#### allanw

• Frequent Contributor
• Posts: 343
##### Re: Q: Why capacitor across power pins
« Reply #11 on: October 03, 2010, 03:08:05 am »
They sell IC sockets with a 0.1uF cap between pins 1 and 14. But they're so much more expensive that it's not worth using...

#### Simon

• Global Moderator
• Posts: 13946
• Country:
• Did that just blow up? No? might work after all !!
##### Re: Q: Why capacitor across power pins
« Reply #12 on: October 03, 2010, 08:15:27 am »
instinctively I'd not bother with a decoupling cap on an op amp, maybe a power amp (not read the article yet as I should get on with my decorating).

I've seen stuff run fine without a decoupling cap as well, hec the crap water pumps with a pic based water detecting circuitry that they bought at work (long thread about it some where) managed to work with with no cap at all from the 78L05 reg to the pic but the power line was pretty ropy, there were -200mV and +300mV spikes on the 5V (totalling 0.5V or 10% of the supply !) to the pic at around 3 MHz but slightly non repetitive, the pic was driving a pump with a 50 Hz square wave via a mosfet. OK the things were an absolute disaster but as far as I can tell the actual running of the pic was unaffected, the problems were of a different nature. Of course this is not the sort of thing though you want to find in a product that was "designed" specifically for your needs. It's one thing to let it go in a home one off but in 500 units ?

my own DC to AC driver board had small spikes on the pic power supply even though it has an electrolytic capacitor across the supply and it's only driving a Kohm load of resistors, of course it works fine
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559

#### allanw

• Frequent Contributor
• Posts: 343
##### Re: Q: Why capacitor across power pins
« Reply #13 on: October 03, 2010, 08:21:20 am »
Decoupling caps are absolutely essential for high frequency op amps. Typical power supplies won't respond to frequencies in the order of 1MHz, and that's where the decoupling cap is useful.

Linear has a really good long detailed app note that shows what happens if you don't have decoupling caps (and plenty of other issues):

#### Simon

• Global Moderator
• Posts: 13946
• Country:
• Did that just blow up? No? might work after all !!
##### Re: Q: Why capacitor across power pins
« Reply #14 on: October 03, 2010, 08:30:55 am »
yea well a pic running at 4MHz with no caps at all was driving the 78L05 up the wall
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559

#### Zero999

• Super Contributor
• Posts: 13200
• Country:
• 0999
##### Re: Q: Why capacitor across power pins
« Reply #15 on: October 03, 2010, 08:37:33 am »
my own DC to AC driver board had small spikes on the pic power supply even though it has an electrolytic capacitor across the supply and it's only driving a Kohm load of resistors, of course it works fine

Adding a 100nF ceramic capacitor would probably help. Small electrolytic capacitors tend to have a high ESR and poor high frequency characteristics. Ceramic capacitors have a a lower ESR and work better at high frequencies.

Thaking,
Did you find the circuit on the tutorial linked below?
http://www.gooligum.com.au/tutorials/baseline/PIC_Base_A_1.pdf

It looks identical, if so, read the explanation on page 3.

#### mikeselectricstuff

• Super Contributor
• Posts: 12051
• Country:
##### Re: Q: Why capacitor across power pins
« Reply #16 on: October 03, 2010, 09:51:03 am »
By the way, I'm surprised that Microchip haven't released a microcontroller in a DIP package with a capacitor built in. There's more than enough room for it and embedding it would mean it will be more effective.
For the same reason no other company does this for devices at this sort of speed - you sometimes see decoupling in/on the package of big high-end processors and other very high speed chips but it would make no sense to add considrable cost by doing this when external decoupling is perfectly adequate for PICs. OK it may be slightly more effective, but unnecessary overkill.

Incidentally, a while ago just for fun I tried taking off all the decoupling caps on a 2-layer FPGA board running at 40MHz and it kept running just fine..!

I was hoping someone would answer/ask this question.  Thats funny, Mike.  I have always guessed that was the case.  Perhaps they are there for localized EMI disturbances that can appear?

I gotta think the decoupling needs would be highly dependent on what's loaded into the FPGA,
how many simultaneous switching outputs you have, what the drive strength is set to, etc.

That being said, I tend to just throw in a bunch of 0.1uf bypass caps and a bulk electrolytic.
That's pretty much what the paper from TI said not to do :-)

Scott

It was driving a moderate amount of capacitance - 24 lines into an LCD at 9MHz via its flex connector, plus another 16 or so into a NAND flash,.
Obviously I'd keep plenty of decouplers on a production design - I was just curious about whould happen.
Working/not working isn't a fixed threshold - it's about keeping sufficient margin, and there are other issues like EMC which depend heavily on effective decoupling.

Nowadays I tend to use 1uf X7R ceramics as the 'default' decoupler unless I'm pushed for space, as it avoids the need for extra bulk caps. Just need to make sure the voltage reg being used is stable with a lot of low-ESR ceramic capacitance on its output.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs

Smf