3
\$\begingroup\$

I'm working on a project and read that decoupling caps should be connected across the VDD and VSS pins of PIC microcontrollers(or rather all microcontrollers?). I'm using a 9V battery with a 7805 voltage regulator as the source and have two decoupling capacitors connected with the regulator like so:

enter image description here

So do I really require the decoupling capacitors across the VDD and VSS pins or is it okay to not use them?

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Side note: a 9V battery will quite quickly drop below the minimum 8 V required by some 7805's! Some require 3V difference between input and output, some require 2V. \$\endgroup\$ Commented Nov 11, 2012 at 20:06
  • \$\begingroup\$ @WoutervanOoijen - To be honest I was concerned about this. I was considering adding a dc jack along with the battery but it seemed odd for my project(digital thermometer). Do you have any suggestions? \$\endgroup\$
    – Ammar
    Commented Nov 11, 2012 at 20:37
  • 1
    \$\begingroup\$ Find a low dropout linear regulator. These will only require anywhere from 200 - 400 millivolts above the output voltage. The range isn't exact, but those are typical numbers. \$\endgroup\$ Commented Nov 11, 2012 at 20:52
  • 1
    \$\begingroup\$ In my answer at electronics.stackexchange.com/a/15143/4512 I also discuss why decoupling caps are needed. \$\endgroup\$ Commented Nov 11, 2012 at 22:55

1 Answer 1

12
\$\begingroup\$

Why your regulator needs bypass capacitors

Those capacitors are usually there to provide stability to the output of the regulator itself. Linear regulators use a feedback loop to regulate under changing load conditions... the bypass capacitors helps stabilize the feedback loop to prevent oscillations.

Why bypass/decoupling capacitors are required

The general recommendation is to bypass at the point of load for all your ICs which, in this case, would be the Vdd pins on your microcontroller. A small ceramic cap, 0402 or 0603, close to each Vdd pin, with a short via to your ground plane (or to your ground track) of 0.1uF value should suffice nicely.

This is because the power draw from something like a microcontroller is pulsed... not steady. Think about it like this: your microcontroller is running a task very frequently... let's say a single task 20 times a second. If the regulator adjusts to deliver power when the microcontroller is idle, and then your task runs, the voltage is going to sag as the regulator tries to meet the current demand. The bypass capacitors are there to supply power when the regulator can't supply it fast enough. This is due simply to the fact they are capacitors and due to the fact they are placed physically close to the IC... closer than the voltage regulator is.

This is leaving out a lot of stuff, like the signal return path, but generally speaking, you're just trying to make sure that current demands can be met locally without tons of current having to travel all over the board. There's also the issue of reducing noise (I believe because you're reducing the di/dt traveling across your power traces by having current loops stay local to your bypass capacitors) but I don't want to try and explain that because my knowledge isn't that great in that area. :)

\$\endgroup\$
5
  • \$\begingroup\$ Thank you! That makes sense but I have one more question. Why do we even need those caps at all considering that the source is pretty stable? Is it just a precaution? \$\endgroup\$
    – Ammar
    Commented Nov 11, 2012 at 20:17
  • \$\begingroup\$ I edited my answer to address that point. \$\endgroup\$ Commented Nov 11, 2012 at 22:09
  • \$\begingroup\$ The 0.33 uF can be omitted if the voltage regulator is within a certain distance of the power supply's filter caps. IIRC from the datasheet. \$\endgroup\$
    – Kaz
    Commented Nov 12, 2012 at 3:29
  • \$\begingroup\$ @Kaz - Thanks for the suggestion but I looked through the datasheet and wasn't able to find it. I might have missed it though. \$\endgroup\$
    – Ammar
    Commented Nov 12, 2012 at 5:54
  • \$\begingroup\$ Whose datasheet are you looking at? For instance ON Semi's has some usage notes: onsemi.com/pub/Collateral/MC7800-D.PDF, page 21. \$\endgroup\$
    – Kaz
    Commented Nov 13, 2012 at 0:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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