I'm looking to make a soft-latching interface with a single momentary push button.

Required features for my build are (edited, sorry for bad description) :

  • Circuit should always start in OFF position (hence auto reset) ;

  • Should work as press to power ON, hold to shut down ;

  • Must be compatible up to 60V ;

  • Must be able carry the battery's nominal voltage to the module it switches ON and OFF (said module needs high voltage to go HIGH else it stays LOW)

Can you please tell me if anything is wrong ? How should I solve it ?


Edit (2) : For the 5v regulator I use a LM317HVT with a pair of resistors. NAND used is a CD4011 and mosfet used to switch ON/OFF is an irf510.

Soft-latch switch with momentary push button LM317HVT based

  • 2
    \$\begingroup\$ Not sure about your schematic. Are you trying to high side switch a load with a N-channel MOSFET? \$\endgroup\$
    – Dejvid_no1
    Commented Mar 10, 2018 at 20:45
  • \$\begingroup\$ Thank you for your comment. Yes that's what I'm looking to achieve. The load needs to be +20 volts at least to trigger the module I want to control with the circuit. \$\endgroup\$
    – Vanarian
    Commented Mar 10, 2018 at 21:23
  • \$\begingroup\$ perhaps use CD4011 for then NANDS and run it at 12V to get more gate drive to the mosfet. \$\endgroup\$ Commented Mar 10, 2018 at 22:54
  • \$\begingroup\$ Ok I will try that and report ; I limited to 12v because I was afraid to kill the NAND. \$\endgroup\$
    – Vanarian
    Commented Mar 11, 2018 at 2:15
  • \$\begingroup\$ What FET and what DC load resistance? \$\endgroup\$ Commented Mar 11, 2018 at 3:17

2 Answers 2


With a little bit of cooperation from the host, you can do this entirely with discrete devices. See this answer here: How can I make this "automatic turn off" work using some GPIO pins on a MCU?

These circuits will need a bit of modification to work with 60V: voltage dividers to limit the FET gate-source voltages. But otherwise they meet your criteria for reliable power-on state and switch denounce: instant-on with the first button press, and the micro can then monitor the button and implement the hold-for-off function.

I would also recommend using a step-down DCDC, maybe even a flyback type, as the regulator losses for a linear type will be large. Here’s an example that’s just $3. https://www.ebay.com/itm/152828093871


This "analogic" circuit simply delays switch contact >0.5s and debounces the switch. There are far simpler ways to do this with a single RC filter and Schmitt trigger gate.

There is no latch.

  • \$\begingroup\$ If the argument is that they will not, it might be useful to explain why the cross connected NANDs do not function as a toggle element. \$\endgroup\$ Commented Mar 10, 2018 at 22:51
  • \$\begingroup\$ The spec is "auto-reset itself in OFF position (always need to press button to power ON) " so no latch function defined. Only the title incorrectly defines it this way. If it were defined as a push-push delayed switch then a toggle latch is spec'd \$\endgroup\$ Commented Mar 10, 2018 at 23:08
  • \$\begingroup\$ That sounds more like an argument for a close vote than an answer. \$\endgroup\$ Commented Mar 10, 2018 at 23:10
  • \$\begingroup\$ Yes the Specs are very poorly defined for transfer function \$\endgroup\$ Commented Mar 10, 2018 at 23:34
  • \$\begingroup\$ My bad for describing it wrong, I corrected the features required ; I indeed look for a press ON / hold OFF single button layout which always starts first in OFF first when wired to my battery. I simulated the NAND without a live wire first and ended with an always OFF state no matter if button was pressed. Could please elaborate on how I should correct this to make the latch functional? \$\endgroup\$
    – Vanarian
    Commented Mar 11, 2018 at 2:16

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.