digital GND vs. power GND vs. analog GND

Till yesterday I thought that the three GND pins on the Uno can be used equivalent. So it doesn't matter to use the GND pin on the digital side or the two GND near the analoge pins, see

A electronic engineer told me yesterday that I should better use different GNDs for different purpose. So he recommended to group the high power consuming parts and use a GND point for this and all digital parts and all analog working items and group them also. I think he said to use the GND pin near AREF for the "less power" parts and the other tow for more power hungry and switching parts.

How important is this? and is there a difference between the three ground on the Uno. It is always recommended to connect all ground especially in case you use different power sources e.g. for an Arduino and a stepper. So I thought all is connected anyway. But is the order where what confluence so important?

It matters when using analog signals where you don't want erroneous IR voltage offsets and
noise superimposed on the signals. The classic example would be an audio signal where a few mV
of noise makes the difference between acceptable and unacceptable.

All wires are resistors, just low-valued resistors. Put significant current down a wire and the two
ends are not at the same voltage. If that wire is a ground wire to some analog sensor that
voltage gets added to the signal seen at the Arduino. The worst case would be sharing ground
wires between a motor supply and a high-precision analog sensor. Thus you route the ground
return for the analog sensor separately to any current-carrying ground (such as the supply in
or one carrying significant current/power out.).

I do gather here that you are referring not to the ATmega328 chip itself


Which has two grounds which simply must both be connected together and directly to ground,

but to the UNO board.


whose three grounds are simply part of the combined ground plane of the PCB, so there is nothing really to distinguish one from another. There is nothing special about the location of the Aref pin except that it is not adjacent to the power terminals, so it may be marginally less affected by current flow through those terminals.

In fact, the "take-home message" is that no part of the Arduino board should be carrying any current in excess of two hundred milliamps and certainly not that required for steppers, motors, solenoids and such. Your design task is to keep these currents completely off the Arduino board though a given ground terminal may be used as the "star" point for all the system grounds.

Clemens:
....
A electronic engineer told me yesterday that I should better use different GNDs for different purpose. So he recommended to group the high power consuming parts and use a GND point for this and all digital parts and all analog working items and group them also. I think he said to use the GND pin near AREF for the "less power" parts and the other tow for more power hungry and switching parts.
....

Strictly speaking, in regards good design, he's right, and you can look at some documents written by the big analog companies, like Analog Devices, Maxim and TI, for further info.

https://www.google.com/search?q=analog%20digital%20grounding&rct=j

However, unless you design you own pcb, you're stuck with the Arduino boards, which are not the best laid out for analog isolation, and especially that Aref is way over on the "wrong" side of the board. OTOH, as the ADC resolution is only 10-bits, and most of the pins operate at slowish speeds, it's probably not a big issue in the first place. Critical designs will have analog and digital cktry on opposite sides of the pcb, and have separate analog and digital ground planes that don't overlap.

If you want some noise immunity, you can average N = 8 or 16 ADC readings to reduce noise. Noise goes down by about 1/square_root(N), so 16 readings averaged should reduce noise by about 4X.

On another note, it is EXTREMELY important to properly wire up the power distribution to your boards in general. See the section in the first reference on "Star Grounding", and investigate more if not clear. Proper star grounding reduces "ground loop" problems [a 4-letter phenomenon in electronics], noise, and oscillations. As you noted, you want to keep high-current wiring [to motors, servos, steppers, etc] on a separate arm of the star from the power to your logic cktry, like the Arduino board.

IOW, you have a central distribution point where everything is tied together, and you run BOTH separate power AND ground leads out each arm of the star to the relevant modules. You never daisy-chain power or ground directly between the arms of the star.