# Where to put regulator when separating analog and digital grounds?

I have an STM32F051 MCU, A XBEE module and an analog sensor I want to read its value using my MCU. I've read (and also practiced in action) that to have a precise ADC readings(which is important for my application), you have to separate analog and digital grounds, like this figure:

I have two questions:

1. Where should I connect the regulator ground? AGND or DGND? Why?
2. Where should I choose as a star point for connecting two grounds? Regulator or near the MCU?

Here is what my MCU power pin connections look like now(I've assumed the regulator as the star point, So I've connected the MCU to the AGND):

• The star point is shown in your diagram so that answers Q2. Q1 connections to the star point for both regulators ideally. Aug 25, 2017 at 13:25
• I have only one regulator, and the whole question is about what to do in this situation.
– MHTB
Aug 25, 2017 at 13:34
• Your picture (top) implies 2. Aug 25, 2017 at 13:39
• OK. It was just a sample to show the whole idea. I wonder if I have just one regulator what should I do?
– MHTB
Aug 25, 2017 at 13:55

Use a Ground plane, place the regulator in the middle; the low impedance of the plane (no slits in it; just some tiny holes for vias) makes the voltage drops low. The resistance of 1/2 square of copper foil, at 0.000500 ohms per square, is 250 microOhms. A DC current of 10mA causes 2.5 microVolts DC drop/error.

2.5 microvolts out of 2.5 volts FullScale ADC is 1ppm, thus 20 bits Accuracy.

DO NOT USE a split plane, unless you design the return currents and use the slits/slots to guide the digital currents away from the analog regions.

Consider this diagram showing return currents WITHOUT SLITS, for high current (XBEE) loads

simulate this circuit – Schematic created using CircuitLab

As all the GND current crowds into the regulator GND pin, the change in current --- 50mA --- scaled by PCB foil resistance near the GND pin, will cause a change in voltage. Sketch out that current crowding. Assume 3 milliOhms resistance around the pin. 50mA change causes 150 microVolts upset. Is 150uV smaller than your ADC quanta? 10dB smaller? 20dB smaller?

How to keep the XBEE currents out of the analog region? would your original diagram, with one tiny connection point, achieve that isolation? YES. But currents needing to cross that tiny connection point will cause I*R voltage drop.