Latching Circuit

Hello

I am designing a handheld Arduino project that will run from a 1s 3.7v lipo.

The device will have two tactile switches for functionality and I would like one of these to also act as a power on button. After a bit of reading online about latching circuits I found the one in the image attached.

I am in the process of building and testing this but I would like to know what is the best way to achieve the same result but with absolute minimum power draw.

I assume the transistor will require a small amount of current and keeping the mosfet on will also require power, also would I be right in thinking the mosfet itself will lose some power due to efficiency losses.

The project will consume somewhere in the region of 40mA at max draw with it being idle a lot of the time. So no high power capable devices are required.

If anyone could offer an alternative with minimum power loss I would be grateful. Many thanks.

That circuit is not latching. As soon as you stop pressing the button it switches off. You might as well just have a switch.

If you are prepared to press the button for long enough for your sketch to startup, then the code can latch it, but that's not the same as being self-latching.

Yes you are correct, as long as the start up time is less than 5 seconds I can't see it being a huge problem. I also like how then the sketch can turn itself off which would be very useful for my application.

Rather than a P-channel MOSFET could one use an N-channel and connect the load (the arduino) to the high side? Could the use of the transistor be omitted too?

A latching power switch needs a bistable circuit that can be set (push button) and reset (by Arduino pin).

I'd recommend using CMOS logic chip for the bistable element, perhaps a set-reset flip-flop or a couple of
NOR gates wired as a SR flipflop. Since CMOS circuitry uses almost no current at all this can be permanently
powered and control the switching element.

One subtlety is ensuring the initial state on power-up, ie before the button is pushed you'd expect the switch
to be off.

Check out EEVBlog #262.

MarkT:
One subtlety is ensuring the initial state on power-up, ie before the button is pushed you'd expect the switch
to be off.

I suspect a 47k resistor would sort that out.

OP image

Ahh, right!

Well, that circuit is very badly done. It is certainly not self-latching, but relies on the controlled device to "hold" it on which is exactly what you want. As long as that device pulls the "GPIO" line high immediately on turn-on, there is no delay problem.

The 220k resistor on the left is spurious. The 100k pull-down will serve adequately being a lower value in any case. The 220 on the right is clearly wrong, should be 220k as the transistor gain is more than sufficient to pull down the 100k on the FET gate, the FET providing essentially no loading at all. So the switch and its diode can connect directly to the right hand side of the now 220k and the 10k is spurious.

I use this....

Works well - power consumption when off is not detected on the uA scale on my Agilent Multimeter.

By removing the bootloader, the arduino boots instantaneously (in terms of a button press) and turns itself off when you program it to do so.

Which type of arduino are you going to be using, and what other devices will be connected to it?

The simplest thing would be to put the arduino into sleep mode, and use the button to trigger the interrupt pin that wakes it up. Using a minimal atmega328 design (such as the pro mini), and bypassing the voltage regulator and power LED, the power consumption in sleep mode is a small fraction of a milliamp.

david_2018:
... and bypassing the voltage regulator and power LED, the power consumption in sleep mode is a small fraction of a milliamp.

In other words, you remove the regulator and resistor for the power LED.

The Arduino schematic for the Pro Mini shows a jumper to disconnect those two components in one go which would be just perfect. I do not see that on the commonly available modules however.