5
\$\begingroup\$

I've read the datasheet and the application notes elated to AVR Hardware Design Considerations and EMI. From them and various Internet sources I came up with pictured design for power supply circuit for ATmega162. AVR would be connected after C3. Right now, I plan to run the device form its internal clock source, but later I plan to try with external 16 MHz crystal.

Image 1

There are few things I'm not certain about. First, I'm I overdoing it with 4 capacitors near the microcontroller? Some sources say that decoupling capacitors should be placed in decades while some say that the 100nF is enough. I was thinking about using multilayer capacitors for 100 nF and 10 nF and ceramic disk for 1 nF. Would that work?

Next point is the inductor. In one document, it is placed between the electrolytic capacitor and in the other document between last capacitor and power supply. Which location would be better? I'm thinking about placing it after last capacitor close to the microcontroller, but the HDC document made me uncertain about that. As far as I understand it, coils do their best to keep current constant, so the coil should prevent spreading of pulses as the controller switches states.

AVR Hardware Design Considerations recommend tantalum electrolytic capacitor. Is there any special reason for that?

On the board, I'd place a MAX232, couple of 20 mA LEDs and 2*16 character LCD screen. What decoupling capacitor should I use near the power connector of the board?

\$\endgroup\$
  • \$\begingroup\$ I say don't fix what ain't broke! Use 1 bigger (1uF-100uF) regulator output electrolytic, then 1 smaller (10nF-100nF) ceramic decoupler near each supply and reference. If there are issues, patch in fixes. \$\endgroup\$ – tyblu Feb 8 '11 at 23:47
4
\$\begingroup\$

It depends a lot on your requirements as a simple logic circuit will run properly with just 100 nF and nothing else. If you have sensitive analog voltages the choke (or, maybe better, ferrite) can be helpful.

I don't think 1 nF and 10 nF will give you any advantage, but if you have a lot of input ripple or want very low output ripple, I'd add 10 µF on the right side (there are even ceramics in 0805 nowadays).

The inductor needs to be on the power supply side, not near the controller. If it would be there, the controller's supply voltage would drop seriously every time it switches something (internally or externally).

Multilayer ceramics are the new tantalum. ;) I guess, they recommend them in contrast to aluminium electrolytics because of their low ESR.

Your circuit won't draw much current, so maybe 100 µF electrolytic or less at the input? That's really just a guess because if you have a clean supply you probably don't need any capacitors at the input at all (but they won't hurt).

\$\endgroup\$
  • \$\begingroup\$ Well, my supply can give up to 0.2 V of AC voltage. I don't know how big problem would that be. You mentioned 10 µF on the right. The right of what? Should I put 10 µF and after it 4.7 µF? This is my first µC circuit, so I don't really know what to expect. Also, in one document the used 47 nH coil. Would that be a problem? It's written in the datasheet that the coil can be of any inductance as long as it makes an insignificant voltage drop. \$\endgroup\$ – AndrejaKo Feb 8 '11 at 19:31
  • \$\begingroup\$ Supply -> L -> 10µF -> 100nF -> Controller. For the inductor I'd prefer a ferrite which actually has insignificant resistance. \$\endgroup\$ – AndreKR Feb 8 '11 at 19:35
3
\$\begingroup\$

Your solution is way overkill, and if you would use this in a professional design, the review team should disapprove of it for cost reasons.

Decoupling capacitors are there to cover minor dips in the power supply because of fast switching in the controller. The more complex the controller (i.e. the more transistors switch simultaneously) and the faster the switching the deeper the dips. That's because the PCB's traces' inductance prevents the power supply to deliver the extra power quickly enough. So the decoupling capacitor acts as a local power buffer. You can calculate and measure what capacitance is needed but everybody gets away with just placing 100nF. The smaller ones are not necessary.

The inductor's task is to filter ripple from the power supply, but unless you have a very poorly designed power supply this isn't necessary either. As a matter of fact, a few mV ripple are less harmful to the microcontroller's operation than the switching dips.
An inductor or small series resistor is recommended however if your digital supply is also used to power analog parts like an ADC, which often has separate power pins.

\$\endgroup\$
  • \$\begingroup\$ The timing of this answer is interesting. I was just thinking about decoupling capacitors for another project, but there in addition to the microcontroller and a few logic chips, I'd have an array of LEDs consuming about 1 A being turned on and off at say 100 Hz and a 2 m power cable to the wall-wart. Would similar setup for microcontroller be an overkill even in that case? Maybe I should ask that as a separate question. \$\endgroup\$ – AndrejaKo Apr 6 '12 at 17:07

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.