I am designing a simple circuit for weight controller and I am not sure where I should connect the drain of N-channel mosfet. My goal is to design a circuit that when powered off (both when button BN1 and pin B6 are low) should be inactive and drain nearly zero amperes (few microampers is fine). One of my attempts look in a following way:

first design

+12V and FGND is where a 12V acid battery will be connected to, and VCC (3.3V) and +5V are outputs of voltage regulators. The R25 and C23 duo form low pass filter to prevent double clicks when clicking the buttons. R22 is there just to provide a way to discharge capacitors C28/C30/C27/C25, but I am not sure if it is helping much.

I am not confident about this design choice. Especially what happens when both MOSFETs are turned off and ground slowly reaches 12V - what exactly will happen to the outputs of the voltages regulators? Will The PD across VCC/GND go negative? Can this negative PD cause damage to the unipolar capacitors C27 and C28? How can I improve this design?

My second design, which looks a little better to me:

second design

12V battery is connected to +12V/GND, RelativeGND is connected to the voltage regulators.

I don't like how the voltage regulators work with two different grounds. For input, the relative ground is used, and for output the real GND should be used, but I feel like this is not how the voltage regulators work, and that this may give me slightly increased PD across VCC/GND and 5V/GND pairs than the datasheet describes. Any feedback?

  • \$\begingroup\$ What are you doing with the signal RGND? \$\endgroup\$
    – vtolentino
    Commented Jun 4, 2020 at 7:50
  • \$\begingroup\$ IMO disconnect the whole circuit or nothing. It's not a clever idea to disconnect the ground of half circuit, something bad will happen. \$\endgroup\$ Commented Jun 4, 2020 at 7:50
  • \$\begingroup\$ @vtolentino RGND is just fed into those regulators and their outputs (VCC and 5V) is used for uC, display and adc converter. \$\endgroup\$
    – Possible
    Commented Jun 4, 2020 at 7:57
  • \$\begingroup\$ As @MarkoBuršič pointed out, you better just switch off the 12V rail using a PFET for example, or use LDOs which have an enable pin. \$\endgroup\$
    – vtolentino
    Commented Jun 4, 2020 at 8:05

2 Answers 2


Disconnecting (part of the) ground to switch on/off your circuit is really asking for trouble.

It is a really really bad idea.

Also, it will very likely not work and result in unexpected behavior.

For example: there are ESD diodes between all pins of all ICs. In the AMS1117 circuit, there will be a diode between pin 3 (out) and 2 (adj) of the IC. This diode will conduct when you want to switch the circuit off. So the circuit will not be off even when you think you're switching it off (by disconnecting the ground). There will still be a connection to ground via an ESD diode and that will be supplying power to your circuit.

This is just one of the reasons that no sane designer does this.

Instead what experienced designers do and what has been proven to work (these solutions are used in all your gadgets) is:

  • Use enable/disable pins on ICs that have them.

  • If your regulator does not have an enable pin, use a different regulator.

  • In some cases using a PMOS in series with the positive supply rail (not ground) can work, but you need to be careful. Take into account all ESD diodes that are in all ICs, watch this video to learn more.

  • put microcontrollers etc. in standby / low power mode, there is no need to disconnect the supply if you configure a uC properly.

  • \$\begingroup\$ Can I ask you to change "sane" to something else please? \$\endgroup\$
    – jonathanjo
    Commented Jun 4, 2020 at 8:14
  • 1
    \$\begingroup\$ Thanks for the answer, I will probably find different voltage regulators with enable pin. I already put the MCU into the deepest sleep mode, but given that this approach requires a working regulator, it is not most power efficient solution, and instead I just prefer to disconnect the whole circuit by setting the enable pin to low waiting to be set high by button press. \$\endgroup\$
    – Possible
    Commented Jun 4, 2020 at 8:16

Just adding to @Bimpelrekkie answer, if you still want to implement some sort of AND logic to your 12V supply rail using discrete components, you could try something similar to the following:

Beware that the PMOS adds some additional voltage drop to your supply voltage. The circuit basically connects the 12V rail to the load (in your case the LDOs), when both input signals (B1 and B2) are high. The zener diode prevents overdriving the PMOS when it is being turned on.

Note: The circuit must be optimized and tested for your case. circuit_1

  • \$\begingroup\$ I am still deciding between PMOS or new regulators, but I may get inspiration from this design for my OR gate switch (powered on when either user presses button, or MCU holds pin B6 active). \$\endgroup\$
    – Possible
    Commented Jun 4, 2020 at 8:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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