1
\$\begingroup\$

This is my schematic:

Confused with what I have to do with the PIN 32

Should I connect a capacitor between the PIN 32 and GND Pin or AGND Pin?

From the AVR Hardware Design Application Note:

2.2. Analog Supply

The AVR devices that have a built-in ADC which have a separate analog supply voltage pin, A V CC . This separate voltage supply ensures that the analog circuits are less prone to the digital noise originating from the switching of the digital circuits.

To improve the accuracy of the ADC, the analog supply voltage must be decoupled separately, similar to the digital supply voltage. AREF must also be decoupled. The typical value for the capacitor is 100nF. If a separate analog ground (AGND) is present, the analog ground should be separated from the digital ground so that the analog and digital grounds are only connected at a single point (at the power supply GND).

Grounds are all same. Right? So does it make a difference if it is decoupled with analog one or the digital one?

NOTE : It doesn't need an critical ADC application but I would want to use ADC later. Application doesn't need precise or accurate ADC since it is more sort of learning project but it would be helpful if solutions or suggestions provided are for making it perfect.

\$\endgroup\$
10
  • \$\begingroup\$ Are your analog signals critical in your application? \$\endgroup\$
    – Wesley Lee
    Commented Dec 21, 2016 at 4:31
  • \$\begingroup\$ I'll second @Wesley 's question: what's the nature of the analog signals in your design? \$\endgroup\$ Commented Dec 21, 2016 at 4:35
  • \$\begingroup\$ @WesleyLee Nope \$\endgroup\$
    – MaNyYaCk
    Commented Dec 21, 2016 at 4:39
  • 1
    \$\begingroup\$ Then it would have been useful to say this originally. People have been trying to answer in context, but you gave none. In this case, Ken's answer is good (so +1 for him from me). If you're creating something "general", then that app note you linked has suggested schematics and layouts too. Just follow them. \$\endgroup\$ Commented Dec 21, 2016 at 5:49
  • 1
    \$\begingroup\$ The datasheet would answer those questions specifically, but I would be very surprised if you could run AVcc higher than Vcc. That has nothing to do with decoupling, which is largely about noise and stability from the ADC point of view. For example AtMega328P on page 375 says that AVcc must be within the range Vcc-0.3V to Vcc+0.3V. \$\endgroup\$ Commented Dec 21, 2016 at 6:28

1 Answer 1

5
\$\begingroup\$

To answer your specific question, you want the decoupling capacitor between AREF and AGND.

The underlying idea is that you separate the analog power/ground from the digital power/ground, so digital transients and interference don't show up in the ADC. As the datasheet says, you connect the analog ground and digital ground together only at the power supply.

Theoretically grounds are all the same, but in practice, the wires/traces have some impedance so different parts of the ground trace won't have exactly the same voltage. By using separate wires for the analog and digital ground (a star ground), the decoupling capacitors will filter out most of the digital transients before they can get to the analog side.

This article (Staying Well Grounded, H. Zumbahle, Analog Dialogue Jun 2012, V46) provides more detail.

\$\endgroup\$
2
  • \$\begingroup\$ So I need to put a decoupling capacitor between pin 31 and 32 as well? \$\endgroup\$
    – MaNyYaCk
    Commented Dec 21, 2016 at 5:36
  • \$\begingroup\$ Yes, that's AGND and AREF. \$\endgroup\$ Commented Dec 21, 2016 at 5:38

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.