1
\$\begingroup\$

I'm connecting CdS photoresitor and ADC (MCP3204) to the RPi. And MCP has DGND and AGND.

I am about to connect both GNDs to the GND on RPi's GPIO, naively.

Is that problematic if I want to read the value from ADC at maximum rate? Say... 100kSps.

MUST I use separate GND for each of them? If it can't be, putting capacitor, or diode can mitigate some potential risks?

\$\endgroup\$
1
  • \$\begingroup\$ Have you considered connecting AGND directly to supply ground instead? \$\endgroup\$ Commented Jul 4, 2014 at 5:34

3 Answers 3

3
\$\begingroup\$

I think there is no definitive answer here and you should consider every one and pick the best of all.

Why? This is common, when one talks about ground loops, return currents, or just proper grounding to get tons of replies that come up with completely different conclusions. They all have good technical arguments. All will explain that they have done so or so thousands of time and that it solved the problem all the time... Well, probably they are right and this is true.

BUT

Proper grounding is dependent of the application. Good practices in analog design are disastrous in high speed digital. RF grounind has nothing to do with high power DC grounding. Then comes the argument of safety ground (Earth) and ESD/EMC/EMI issues. For instance, there is a good book about the subject "Electromagnetic Compatibility Engineering" by Henry Ott, which is very good. But good at what? The book is oriented towards EMC/EMI. It doesn't address (or at least not thoroughly) proper grounding for audio for instance.

This doesn't answer your problem alone, but combined with the other answer you will get, it may help a little bit.

In order to contribute more to the final answer I would say that: What defines if your solution is correct or not? In your case it's if the amount of noise you get at the input of your ADC, relative to AGND at the ADC pin, is lower than the resolution of that ADC. Thus we need to know the amplitude of your input signal and the requirement in term of noise.

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

There has to be a current path from GND on the converter to GND on the controller. However, the AGND and DGND pins on the converter must be connected to each other (see http://www.analog.com/en/content/raq_groundingadcs/fca.html). If noise may be an issue, then you could put a ferrite bead or LC filter in. Definitely do not use a diode.

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

Usually ICs recommend using seperate GNDs for analog and digital because of ground loops mostly caused by high frequency transients. When digital signals switch from a 0 to 1, there is a current spike as the power supply reacts to this greater current demand. This isn't too big a problem for digital circuits because the logic levels for digit signals have a large tolerance built in (+0.5V is still a digital 0 for example). But for analog devices it is a significant problems, especially with an ADC where +0.5V difference in an analog signal is HUGE. What is then recommending is to use 'Star Grounding'. This is a pretty good article explaining star grounding. Essentially, you connect all your grounds at 1 centrallized location. And This is a good article about grounding in general, which also touches on star grounding.

Just connect the two separate ground pins (AGND and DGND) at a single point, like the analog ground pin on the GPIO of the RPi. The document linked by Alex Forencich, states that if doing star grounding, make it as close to the supplies as possible to improve noise performance on the analog side.

A capacitor will only limit DC but the noise from the digital side will be high frequency. If needed you can throw on a ferrite bead, but make sure you know the affects first. I think I have referred to this document a few times.

\$\endgroup\$
4
  • \$\begingroup\$ Please note that the converter AGND and DGND pins must both be connected to the system analog ground; not split between the analog and digital grounds. \$\endgroup\$ Commented Jul 4, 2014 at 6:55
  • \$\begingroup\$ @alex.forencich I'm not sure I follow what you mean. There are multiple GND pins on the RPi's GPIO. If OP connects AGND to one pin and DGND to another pin then both AGND and DGND planes would be connected. I would only hope that the makers of the RPi followed proper grounding. \$\endgroup\$ Commented Jul 4, 2014 at 7:36
  • 1
    \$\begingroup\$ Connect all ground pins on the converter to the AGND pin of the raspberry PI. My point is that even if the ADC has separate AGND and DGND pins, they should both be routed to the analog ground. The converter DGND pin should not be connected to a separate ground plane. See: analog.com/en/content/raq_groundingadcs/fca.html \$\endgroup\$ Commented Jul 4, 2014 at 8:11
  • \$\begingroup\$ Ahh I see your point now. I will edit my answer to reflect this. Thanks for letting me know this. \$\endgroup\$ Commented Jul 4, 2014 at 9:00

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.