Electrical – Two grounds when using transistor switching

groundtransistorsvirtual-ground

Background

I'm designing a small circuit in which an MCU and all its peripherals should be shut down unless a certain condition is met, which is represented by a switch in this simplified schematic.

The MCU requires a 5V power source from which it supplies 3.3 Volts for the peripherals.

In its simplest form I came up with the two solutions below. The measurements reflect reality — I probed both circuits on a breadboard.

Question

Which alternative is more suitable for this:

enter image description here

Observations:
In case 'A' the MCU receives 4.3 V, which should be sufficient for the internal regulator to operate and output a proper stabilised output, however, two separate grounds will result. Digital ground will be comparatively higher than 'real' or analogue ground. Peripherals will have to stick to using the digital ground, everything else (i.e. not connected to the MCU) may use the real one.


enter image description here

Observations: I case 'B' digital and analogue grounds are the same but the MCU only receives 3.7 V instead of 5 V. It still operates and establishes the 3.3 V output, but I think this it is really pushing it and is bound to fail intermittently.

Is either of these a viable solution, or should I do something along the lines of this (which will increase the part count):

enter image description here

Best Answer

If you have analog signals crossing the boundary, and that is your "analog ground" in the sense that it is the reference for all of your analog signals, then I think the high side switch is less likely to give you problems. The low side switch will introduce a potentially nasty voltage between the two references due to its finite on-resistance and need to handle the switching current from the digital logic. The "digital" ground could also be the reference for internal ADCs, for example.

As others have commented, a P-channel MOSFET is a better choice for a high side switch. It is a good idea to decouple the MCU side to provide a low impedance source for the switching current.