Touch on, hold off with auto power-off IC needed

Thread Starter

MrSoftware

Joined Oct 29, 2013
2,273
Does anyone know of single IC that will provide single touch power on, hold power off and auto power-off timer all in a single IC, or two? There are a number of press-on/hold-off IC's, but I haven't found any with configurable auto-off feature. This is for a small low current (< 30mA) battery powered device, and to keep parts count low I want a single power button (press on / hold off) and auto power-off after about 5 minutes in case the user forgets to turn it off.
 

danadak

Joined Mar 10, 2018
4,057
Unless I do not fully understand a low end mciro
could do this -

1) Button on wakes micro thru GPIO interrupt.
2) Long button push to power down, say seconds...
3) Micro puts itself to sleep after extended timeout occurs, say minutes or longer

ATTINY Atmel Series
PSOC 4 or 5LP family

Regards, Dana.
 

Thread Starter

MrSoftware

Joined Oct 29, 2013
2,273
Yes a micro would do this easily, but then I need parts to support the micro, and someone would need to flash the micro during assembly. I'm trying to keep parts count low, and keep assembly as simple (fast) as possible. If all goes well, I'll be making a number of these any anything extra during assembly adds cost. :)
 

joeyd999

Joined Jun 6, 2011
6,279
I'm trying to keep parts count low, and keep assembly as simple (fast) as possible...I'll be making a number of these any anything extra during assembly adds cost.
I don't know what your application looks like, but have you considered that you may be able to integrate most of the parts you use already -- along with the switch/power logic you described -- in one small MCU?

You don't necessarily need to flash the micros during assembly. Your MCU distributor can do that for you at a nominal charge.
 

Papabravo

Joined Feb 24, 2006
22,082
Watson: what do you think, Holmes?

Holmes: Elementary, my dear Watson. After eliminating all the other possible solutions, whatever you are left with, no matter how improbable, must be the answer.
 

Thread Starter

MrSoftware

Joined Oct 29, 2013
2,273
Now that I think about it, I don't even need hold-off functionality, simple toggle press once for on, once for off is fine, but I do need the auto-off feature.
 

MaxHeadRoom

Joined Jul 18, 2013
30,654
+1 on the micro, only need 8 pin tops, and can have sleep/wake-up mode for battery saving.
No need to worry, about turning off!;)
Max.
 

danadak

Joined Mar 10, 2018
4,057
  1. Yes a micro would do this easily, but then I need parts to support the micro, and someone would need to flash the micro during assembly. I'm trying to keep parts count low, and keep assembly as simple (fast) as possible. If all goes well, I'll be making a number of these any anything extra during assembly adds cost.
Does final assembly include a bed of nails test for shorts/opens etc.... ? Thats where an auto
program of part could be done....And no external parts on micro needed for this, other than
a bypass on its Vdd pin. Internal pullup on switch input pin would take care of that issue.

Regards, Dana.
 

Thread Starter

MrSoftware

Joined Oct 29, 2013
2,273
I'm not planning any bed of nails test, I think the volume will be too low to support the cost of setting that up. I'll probably only make a couple hundred at a time at most. It's a very simple device, essentially a voltage reference, an ADC and an LCD. It's a diagnostic tool, the QA test will be plugging it into a sensor with a known feedback and verifying what the screen reads. So far all parts are off the shelf with no coding required.
 

AnalogKid

Joined Aug 1, 2013
12,126
Two MOSFETs (one signal and one power) can do the toggle/power switch stuff. The problem is the 5 minute timer. That's a loooong time for an R-C stage. A CD4060 can do it easily with very low quiescent current when off, if you can handle that level of circuit complexity.

ak
 

Thread Starter

MrSoftware

Joined Oct 29, 2013
2,273
Thanks everyone for the suggestions and links, that all gives me an idea. I think I can use a flip-flop (maybe controlling a mosfet for current capacity) in series with this circuit , and use the same button to trigger the flip flop and to charge C1 in the circuit I linked. The flip flop would provide on/off and the the circuit I linked would provide auto shut off. Maybe I need to use a schmitt trigger on the gate to Q1 to prevent brown outs, but I think the general idea is OK. Can anyone see a fault with this, or a better way?
 

jaredwolff

Joined Jul 1, 2017
58
I made something similar that you connect a single button to which can act as both a DFU reset (in the case it's totally borked) and on/off.

15F8F4CF-8915-4BA0-9C7D-A00700AFD4C0.jpg

I've used variants of it with a D-flip flop (which is a good direction to go BTW) for a much more complicated product.

In your case, lets say that D-flip flop holds your power supply high. Then you will need to figure out how it can be reset to a low state thus shutting everything down.

So modified you may end up with something like this:

upload_2018-7-25_14-43-54.png

The reason why I have non-inverting buffers (5v tolerant by the way) is it provides a stable supply if you're missing that. I typically build lots of things with batteries which require an extra power supply to get something like that. Thinking about it more you may need an always on power supply but without knowing your application can't really go crazy.

Alternatively you could just do a latching load switch (which is similar just no d-flip)

F1B02690-5035-4E12-967C-37A06A220DA0.jpg

VSYS would be however your powering your device. (battery or whatever)

[Edit] Oh and

DIO-0001 == BAT54C
IC-0005 == AP22802BW5-7
IC-0024 == 74LVC2G17GW,125

I would go the uC route too but if you don't have a uC there's no reason to add one!!!

I did write up an explanation on this on my site but I think you already got the gist of it here.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,504
My "Cat Eye" bike lights have exactly that function, in a small blob mounted chip- on-board. I think that you can do it witjh a CD4013 dual flipflop IC and an MPSA13 transistor to power the load. I am trying to recall the circuit, but no luck yet. Possibly it has also been done with a 555 timer IC, I don't recall.
It is very late here and my memory may not be 100% correct. I will post more possibly tomorrow.
 

MisterBill2

Joined Jan 23, 2018
27,504
The circuit that EEtech presents will certainly deliver the function as described, but I was proposing a simpler version that did not require the schmidt inverters. Just the FF, with the button press pulsing the "T" input, or possibly the "Set" input through a small cap, while a longer press charges a cap connected to the "Reset" input, through a larger resistance. A medium value resistor, 4K7 or so would be used for pulling down the "Set" input so that it will not float. Then the "Q" and "Qbar" outputs of the first FF would drive the second FF set and reset pins to provide some de-bouncing effect.
OR, the posted circuit could be implemented using a 4001 quad nor gate, with 2 gates connected as a set-reset FF and the other two connected as inverters.
 
Top