Hi

Having read lots of articles and posts on the theory of when to use GND or AGND, I was not really any wiser and, in fact, became even more confused. So, I decided to test for myself which was best.

Using an LM35CAZ temperature sensor, read every 0.5s for 1 minute by pin 19 (A5) of a Teensy 3.6, and a 4.7K resistor and 0.1uF capacitor between signal and ground, I tried all combinations of GND and AGND to see which produced the least noise. Input voltage was 5v. Results were read via the serial monitor and are given here as: LM35, resistor, capacitor, range (G = GND, A = AGND).

LM35, Res, Cap, Range
G, G, G, 46-81=35
A, A, A, 55-64=9
G, G, A, 57-66=9
G, A, A, 56-63=6
A, A, G, 51-69=18
A, G, G, 51-67=16
G, A, G, 58-69=11
A, G, A, 52-70=18
G, -, -, 46-93=47
A, -, -, 48-89=41
G, G, -, 55-73=18
G, A, -, 48-74=24
A, G, -, 56-67=11
A, A, -, 56-64=8
G, -, G, 47-86=39
G, -, A, 46-89=43
A, -, G, 41-82=41
A, -, A, 48-94=46

Although this was far from scientific, it is clear that at least one connection to AGND improves noise reduction greatly in analogue circuits. These combinations produced the best results: A A A, G G A, G A A, G A G, A G - and A A -. The differences between them are negligible. The success of A G - and A A - shows that the capacitor doesn't necessarily add any extra noise reduction and can be omitted if one of these combinations is used.

Averaging of the readings should remove the last remnants of variation.

Hope this helps other people like me.