5
\$\begingroup\$

I'm using a 5v linear regulator (specifically an LM7805) that outputs directly to an ATMEGA328P. According to the LM7805 datasheet (page 23) input and output bypass capacitors should be used, as seen below, to tame peaks and ensure stability. Schematic of LM7805 with bypass capacitors

It is good practice to also include a decoupling capacitor in front of an IC, in this case an ATMEGA328. Does the 0.1μF capacitor on the output side of the LM7805 act as a decoupling capacitor if the regulator feeds into the IC directly after the output bypass capacitor?

\$\endgroup\$
5
  • \$\begingroup\$ FYI, for my Unos and Nanos I always use 9V into the Vin pin, and then I get about 5.09V at the 5V pin. I need to do this because I am using the ADCs and need it to be a stable Vref. Plus, my personal belief is that it is smart to use 9V so the on-board regulator can dissipate less heat. \$\endgroup\$
    – SDsolar
    Commented Jul 23, 2017 at 4:58
  • \$\begingroup\$ @SDsolar So you're saying that you omit the voltage regulator all together and supply the VCC pin(s) with 9v? \$\endgroup\$
    – Gabe S.
    Commented Jul 23, 2017 at 5:03
  • \$\begingroup\$ No. It comes into the Vin pin, as I said above. But I am going to dump the 12-to-9 volt converters in favor of a 7809 mounted right at the Nano. \$\endgroup\$
    – SDsolar
    Commented Jul 23, 2017 at 5:12
  • \$\begingroup\$ @SDsolar Oh, understood. You mentioned the nano and I thought you were referring to the atmega instead of the 7805. My bad. \$\endgroup\$
    – Gabe S.
    Commented Jul 23, 2017 at 5:15
  • \$\begingroup\$ I haven't use the atmega, but I believe the power input circuitry is similar. The Nanos and Unos can handle 12V but their on-board regulators get hotter that way. And these cheap 12-to-9 converters fluctuate. So I believe you are on the right track here. In my situation I have found that bringing in 5V causes erratic behavior of the ADCs. And bringing voltage in directly to Vcc seems too risky. The 7809s have a great track record of stability - My units draw about 340 mA. Then the on-board regulator can bring it down to the 5V that makes the circuits happy. \$\endgroup\$
    – SDsolar
    Commented Jul 23, 2017 at 5:19

4 Answers 4

4
\$\begingroup\$

The most important thing about about decoupling capacitors is that they are placed physically close to the device they are decoupling, to minimize the trace inductance. The actual capacitance is often chosen by rule of thumb.

This implies that two chips can share a decoupling capacitor if their power supply pins are right near each other. Or, in other words, if two identical decoupling capacitors end up in parallel right near each other, you can drop one of them.

\$\endgroup\$
3
\$\begingroup\$

Decoupling capacitors should normally be placed as close as practical to the power supply and ground pins of their associated IC.

You should have capacitors at the output of the 7805 and at the ATMEGA328.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ So, @Peter, if I mount the 7809 right next to the Vin pin I presume I could use just one .1uF cap, correct? Extremely short lead lengths. \$\endgroup\$
    – SDsolar
    Commented Jul 23, 2017 at 5:29
0
\$\begingroup\$

If the ic is close to the regulator, one capacitor might be sufficient. However if the input to the regulator is loaded by some other circuit, there is a possibility that the regulator output can discharge quickly than the input. So I'd suggest putting a diode between the regulator input and output for reverse polarity protection.

\$\endgroup\$
0
\$\begingroup\$

THe Zout of 7805 is 0.016 Ω @ 1kHz* but since internal feedback gain like an Op Amp reduces with rising f, so does Zout rise with f thus at 10MHz it is out of bandwidth and limits to the load regulation = 100mV/5V=2% @ 1.5A 0.1V/1.5A=67mΩ

Then add any trace inductance and you get...

schematic

simulate this circuit – Schematic created using CircuitLab

The location of low impedance ceramic caps affects both what the regulator sees with the Q of the input RLC cct as well as the attenuation of a step C CMOS load dump on the voltage.

Thus as Peter says both locations become necessary for long traces with about 10nH per cm for traces 10:1 length /width up to 30nH/cm for 100:1 ratio as I recall for typical traces. so 50nH is 5cm or 2" for 0.5cm or 5mm wide power traces for 0.035mm thick.

But for power/Gnd planes this reduces to ~ 1nH/via ( depending on L/D ratio) and 2nH/cm for path length for any square plane and thinner dielectric also increases nF/cm^2 with low ESR inverse squared but limited by dielectric breakdown and defects for burrs shorting the supply. Commercial solutions for this exist.

p.s. C2 is the equivalent C for the uC and it also has ESR not shown. C causes dynamic power rise with clock rate. or delta Ic=CdV/dt * delta f. thus C can be estimated. Where dV/dt slew rate is assumed constant but rises with T ['C] thus C becomes the ratio of changes for ΔIc/Δf * 1/ slew rate. ESR is harder and depends on number of FETs switching each about 25 Ohms in parallel.

Thus a final ripple current depends on very low ESR*C =T values <= and >= rise time for load regulation of switched C from Coss of CMOS.

This is my technical analysis of our Rule of thumb to use low C values as close to both the source and the load. as smaller C have lower ESR values limited by smallest size. Tantalum and ultra-low ESR alum e-caps can as low 1us or <1MHz effectiveness, and Ceramic << 1us to <1ns for microwave caps with low ESL.

\$\endgroup\$

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