Fork me on GitHub

Project Notes

#175 Soft-latch Switch

Test a soft-latching power switching circuit based on a p-channel MOSFET.


Here’s a quick video of the circuit in action:

SwitchSoftLatch demo


This is a neat circuit with low component count that provides an on/off toggle with a momentary push-button. It would be suitable for switching a power supply for a circuit.

Dave Jones explains it best in EEVblog #262 - World’s Simplest Soft Latching Power Switch Circuit, but the essence of the circuit is this:

When Q1 (power) MOSFET is off:

  • pressing the switch pulls up the base of Q2 NPN
  • Q2 turns on
  • Q2 in turn pulls down Q1 gate and Q1 turns on
  • Q2 kept on via R2

When Q1 (power) MOSFET is on:

  • Q3 NPN turns on once C1 is charged (per R4, C1 time constant)
  • with Q3 on, pressing the switch pulls down the base of Q2 NPN
  • Q2 turns off
  • Q1 gate pulls high via R1 and turns off

Component Selection

The R4/C1 time constant can be adjusted to debounce the switch and/or enforce a minimum “on time” before it is possible to turn the circuit off.

I have a BS250P p-channel MOSFET on hand; it’s not really for power applications but I’m using it here as Q1 just for demonstration purposes.


What this circuit does well:

  • when off, load current cust clean to 0mA (perhaps fractional µA at most)
  • the R/C network does effective button de-bouncing

A couple of things that could probably be improved:

  • the component values used here work OK at 5V, but not at higher input voltages like 9V (can’t turn off)
  • the capacitor holds its charge long after the circuit is powered down (slow to discharge through Q3 base)
  • the circuit starts up “ON”, though theoretically it shouldn’t. I suspect this is due to residual capacitance in C1.

So perhaps I’ll need to try some improvements or test some alternative circuits like this one from Talking Electronics



The Schematic


Credits and References

Project Source on GitHub Project Gallery Return to the LEAP Catalog

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

LEAP is just my personal collection of projects. Two main themes have emerged in recent years, sometimes combined:

  • electronics - usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting
  • scale modelling - I caught the bug after deciding to build a Harrier during covid to demonstrate an electronic jet engine simulation. Let the fun begin..
To be honest, I haven't quite figured out if these two interests belong in the same GitHub repo or not. But for now - they are all here!

Projects are often inspired by things found wild on the net, or ideas from the many great electronics and scale modelling podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know (or send a PR!). See the individual projects for credits where due.