I am trying to make a simple Press ON - Hold OFF latching circuits using a momentary swicth. Here is a very well explained method. I made the exact same as fig6, with same passive value, but using differents MOSFET : Si2312CDS and Si2333CDS. Also not I am using a Schotkky diode MBR0530 instead of the BAV99. My main power is a regulated 3.3V. I fixed the Auto-OFF configuration, as I would like the system to stay switch OFF at boot.

Here is my exact schematic : enter image description here

The left part is the 3.3V regulation from a sigle cell LiPo battery. On the right end the POWER_OFF signal is controled by a microcontroller GPIO in order to switch OFF by software.

After soldering a prototype, some functions looks to be OK :

  • Press ON : it is powering ON when short press is applyed to switch
  • Hold OFF : need to hold the switch for several second to switch OFF the system

But I also have an unwanted behaviour :

  • when OFF, it automatically switch ON after 2 seconds or so...

This does not look like the Auto-OFF(/ON) feature, even if at first boot the system goes ON (after 2 seconds) but we are in Auto-OFF case... It is more because it does not keep the OFF state...

Maybe because I use the Si2312/33 MOSFETs, that have Vgs different that the recommended iRF7319, and the passive components values are triggering the switch ON procedure ???

Does anybody can help me looking for the issue ? I can stick my oscilloscope into the system, but I am not sure to know what I should see...


  • 1
    \$\begingroup\$ Not gonna follow a link to get essential information about the question. In any case, this is easy to do with a microcontroller. Debouncing can be handled in firmware, and the timing can be explicit according to what you type in. The only hardware other than the micro would be the bypass cap, since internal pullups are common. Even the tiny PIC 10F200 can do this. \$\endgroup\$ – Olin Lathrop Apr 28 '17 at 17:38
  • \$\begingroup\$ In other words post the schematic of what you implemented and note that a schematic that somewhat resembles what you built IS NOT an option. \$\endgroup\$ – Andy aka Apr 28 '17 at 17:47
  • \$\begingroup\$ OK I see, I am modifying the question to add exact board design. \$\endgroup\$ – GPTechinno Apr 28 '17 at 17:52

Try connecting a load because the leakage current from the p channel mosfet will turn on the n channel mosfet which in turn will activate the p channel mosfet and reproduce the unwanted effect you witness. It needs a load and not an open circuit. Take note what it said in the original circuit description: -

For it to reliably turn OFF, the load should draw sufficient current so that any downstream capacitors will discharge within a few seconds, allowing the gate drive of the N-MOSFET to decay.

  • \$\begingroup\$ I see, this is a good point... During my first testing, I didn't mount full load the board will have. But it was not an open circuit neither, it had LED indicator for power status, around 5mA of current... I will try adding full load to see difference. \$\endgroup\$ – GPTechinno Apr 28 '17 at 18:15
  • \$\begingroup\$ The led will not draw current until the supply has risen to a couple of volts and by then the deal is done. Assume maybe 10 uA can flow from the p channel mosfet so if you have a 10 kohm load resistor it should do the job. \$\endgroup\$ – Andy aka Apr 28 '17 at 18:23
  • \$\begingroup\$ ok, thanks a lot, i will continue testing tomorrow morning with the 10k load resistor. I will keep you updated here, of course. \$\endgroup\$ – GPTechinno Apr 28 '17 at 18:26
  • \$\begingroup\$ Feel free to try 1 kohm too just in case the p channel fet is leaker than it says in the data sheet or has been subject to bad handling that may have weakened its insulation characteristics. Feel free to upvote and mark answer as accepted should it work! \$\endgroup\$ – Andy aka Apr 28 '17 at 18:28
  • \$\begingroup\$ So I added real board load (2 MCU + other ICs), and it didn't fix the broken OFF state latch. I added a 10k load resistor, not better result. 1k -> same. I am really thinking this is due to the MOSFET I am using how has very low Vgs(th) of 0.45V and so the latch is not strongly locked... There is more, now I have the full load, when in OFF state, I still can measure 1.7V on the switched 3.3V rail (should be closer to 0V) !!! I will plug the oscilloscope to see if this 1,7V is DC or some kind of oscillating voltage... \$\endgroup\$ – GPTechinno Apr 29 '17 at 9:49

a mcu would be the easiest solution.

otherwise, I would go with logic gates + rc + diode to delay timing.

essentially the logic is:

PRESSED AND NOT(HELD), all active high.

edit: I just played around it and it can be done with a minimum of 1 HC132 + 1 diode/cap/resistor.

  • \$\begingroup\$ Hello, using NAND with schimt trigger and some passive ? interesting, can you tell me more about the circuit you tried ? how do you switch off the load ? you should need a mosfet or so to do it, right ? \$\endgroup\$ – GPTechinno Apr 28 '17 at 18:28
  • \$\begingroup\$ @GPTechinno the circuit you shown in your question supplies control signal to the MCU's pin, and then MCU turns another device off. You can program this MCU just to sense state of its input pin, implementing simple debouncing electronics circuit (so that one key press would not look like a series of short presses and releases), and then in MCU program you just sense the state of input line. If another device you control is off, and input line becomes active, you turn that device immediately, however if device is on, your MCU waits until its input line becomes inactive (button is released). \$\endgroup\$ – Anonymous Apr 29 '17 at 9:36

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.