0
\$\begingroup\$

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

\$\endgroup\$
  • \$\begingroup\$ BC517 is a Darlington, btw. \$\endgroup\$ – pfabri Mar 23 '17 at 22:19
  • 1
    \$\begingroup\$ Why use a darlington? And why not use configuration B with a common-emitter PNP transistor? \$\endgroup\$ – user2233709 Mar 23 '17 at 22:23
  • 1
    \$\begingroup\$ no, you don't have to use a darlington. You need a MOSFET, probably. Darlington is definitely not the configuration of transistors you're looking for when aiming for low drop \$\endgroup\$ – Marcus Müller Mar 23 '17 at 22:35
  • 1
    \$\begingroup\$ @pfabri a MOSFET doesn't have a current gain at all. It just charges a (relatively small) capacitor and stays in the resulting state (on or off or something in between) for as long as that is charged; it's a voltage-controlled transistor instead of a current-controlled one, if you want so. \$\endgroup\$ – Marcus Müller Mar 23 '17 at 22:50
  • 2
    \$\begingroup\$ Also, I kind of suspect xyproblem.info here: Maybe you should tell us what you want to build rather than what you think you'll need for that. \$\endgroup\$ – Marcus Müller Mar 23 '17 at 22:52
1
\$\begingroup\$

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.

\$\endgroup\$
  • 2
    \$\begingroup\$ +1 for switching VCC. Switching GND will result in tears when you realize one of your components will get powered anyway from one of its pins through the ESD protection diodes, and commit suicide shortly afterwards. \$\endgroup\$ – peufeu Mar 28 '17 at 15:49
  • \$\begingroup\$ Good point. I think this can also happen with disconnecting the positive supply too. You could unintentionally power the device through a GPIO pin. \$\endgroup\$ – Mitchell Kline Mar 28 '17 at 16:46
  • \$\begingroup\$ Yes, it can also happen. Another drawback in switching grounds: connectors with ground pins on them... \$\endgroup\$ – peufeu Mar 28 '17 at 18:14
0
\$\begingroup\$

In this situation, I would use an N-channel MOSFET on the ground. Alternatively, as previously mentioned use a P-channel MOSFET on VCC. Either way works, as long as you are keen on ensuring there are no sneak paths.

Why?
Using an NPN will result in voltage drops Vbe and Vce. Using an N-channel results in Rds(ON). If Rds(ON) is low (e.g. milliohms) and your circuit only draws milliamps, your voltage drop would be very small and wouldn't effect your circuit.

\$\endgroup\$
0
\$\begingroup\$

First I'd use a mosfet rather than a transistor so your voltage losses will be much less if you are not pulling huge currents.

Whether to switch the high side or low side is really dependent on what's happening in the digital circuitry block on the right and anything else in the system.

You can use either method. HIGH side is usually preferred though to maintain the integrity of the grounding system.

However, great care has to be taken to ensure that no input or output on any gate of the micro or other devices can exceed the maximum and minimum voltage specifications when their power is turned off.

Your circuit seems to indicate there is an analog side to this design. As such, I have to assume there are signals leading from the analog side to the digital side. Appropriate circuitry needs to be added to ensure those signals do not fry your digital circuits.

Similarly, additional elements me be required to ensure that the digital circuitry does not affect the analog circuits when powered down.

\$\endgroup\$
  • \$\begingroup\$ So is it correct to say that if I go with high-side switching, then all my digital devices would use digital ground as their ground, and all the analogue circuits would have to use the analogue ground in the system. It must be ensured that they are kept separate at all times. In response to your assumption, there are no crossings: the analogue circuitry is only there to control when the MCU and its peripherals should be on/off. Why do you say that high side maintains the integrity of the grounding system? I'd have thought ground integrity = one ground for all, not two separate ones. \$\endgroup\$ – pfabri Apr 1 '17 at 22:25
  • \$\begingroup\$ I do apologise, I think my understanding if high/low side switching was the exact opposite of their meaning. I was hoping that someone would cross reference my two letter indexed schematics to say which is which. Anyway, this really made things much clearer. \$\endgroup\$ – pfabri Apr 1 '17 at 22:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.