Electrical – Best way to control power with MCU gpio pin

gpiomosfetpowerresetswitches

Circuit

This is my circuit. An MCU gpio pin should control the power of another IC. Because the component requires more current than the gpio pin can drive, an N-Channel MOSFET is used. This is IC has no ENABLE/SHUTDOWN/RESET pin. VCC may be different from MCU VCC. However in this configuration a virtual ground for that component is created because of the RDS_ON resistance of the MOSFET that causes a voltage drop.

A certain number of question arises:

  1. Is this a good way? Is there a better way?
  2. In order not to left components ground floating (if the MOSFET is not conducting) is this 100K pull-up resistor required or is it even allowed? Is a floating ground a problem in most situations?

Update: New circuit based on Michael's reply Unfortunately wrong.

If I understand, the circuit can even be simplified by using one logic P-Channel MOSFET like following circuit (assuming SSM3J328R P-Channel MOSFET):

P-Channel MOSFET based only circuit

Best Answer

The way that you propose is not a good way to switch the power to the load. You should instead switch the VCC power side and keep all the GNDs common between the MCU and the power switched device.

The technique used to achieve this would be to use a P-Channel MOSFET for the power switch and then an additional small signal transistor to provide level translation from the MCU GPIO voltage levels to the Gate drive for the P-Channel MOSFET.

Here is a picture of such a design. I show using an NPN BJT for the level translator but a small signal N-FET could be used as well as long as the gate level threshold is compatible with the MCU GPIO levels.

enter image description here

Note that there are some situations where you could be switching power to a load device and it would be desirable to keep the MCU GND separate from the switched load. This may be the case if the load generates a lot of noise, huge current surges or is a dangerous voltage such as AC mains. In this instance the load switching would be done through a relay or an opto-isolator.

Related Topic