Soft latch

I liked the circuit so much I made two of them. Here's front and back.
I liked the circuit so much I made two of them. Here’s front and back. The one on the left has an extra electrolytic cap; its addition did not affect the switching circuit at all.

Catching up on the bench back catalog: here’s a useful little module – a soft latch that isn’t finicky, works when you first plug it in, draws effectively no power when not changing states, and operates over a relatively wide range of input voltages. What’s not to like?

The basic idea is that mechanical switches, even simple toggles, are much more expensive than push buttons. It would be nice to be able to push a cheap push button and have it turn devices on and off. Some bad ways to do this would be to have the circuit twiddling its fingers, burning power, waiting for button presses – for example, having a microprocessor down stream of a voltage regulator idling until it detects a change in state on the pin connected to the push button. Sure, the microprocessor could be throttled down in some energy-saving mode and might only consume microamps, but the upstream voltage regulator would be consuming power, certainly true for linear regulators, and to a lesser extent for switchers.

I’ve seen some designs that have the virtue of minimalism, but are touchy – literally, they need some debouncing – or that default to an “on” state when plugged in. One of the minimalist designs was discussed on the eevblog #262 and it’s pretty clever; various riffs on this design can be found on the net. The major issue is that this design powers up in the on state or, at least, does so unpredictably. I’ll note that there are also designs that involve more intelligent circuitry, like one that first powers up a microprocessor long enough for it to execute code so that the microprocessor monitors the switch state and can power itself down. That’s an interesting approach, but ties up at least two pins on the microprocessor.

However, I did find a solid design that works reliably on the Mosaic Industries website. It’s not minimalist: it requires two inverter stages for the basic design. As suggested on that site, a nice implementation can be built with half a CD4011 quad NAND gate. I had a large collection of these jellybean ICs in my junque box, so I went ahead and built both the basic on/off circuit and the circuit with an RC delay to require a longer push for shutoff. Of the two, I like the basic on/off circuit because it does not have a refractory period after being turned off.

While CMOS may seem passé, it’s just the thing here: wide range of acceptable input voltages and, aside from minimal leakage current, just about no power consumption except while actually switching. Once on, a high-side p-channel mosfet keeps the current flowing until shut down. P-ch devices have gotten more efficient (and cheaper). In my implementation, I used a nds9340, a power hexfet in soic-8 package. I extracted quite a few of these off motherboards, where they were involved in power regulation. They’re not the most recent or best spec, but their Rds(on) is around 50mOhm. I don’t anticipate using these switches on large loads (at least, not directly), although the package is rated to 5.3A drain current with adequate temperature control. Even if the load pulled an amp, the package would have no trouble dissipating 50mW without any sort of thermal consequences.

I built the circuit up on some vector board using my time honored medieval orthodontic approach and copious amounts of solder.

It does seems like a waste not to use the other half of the chip for something...
It does seems like a waste not to use the other half of the chip for something…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.