power on\of with delay

Thread Starter

david1234

Joined Nov 27, 2013
104
Hello,
I want to be able to power on my device (work on 9-12V)
only when I press the power for 3-4 seconds
and also to shut it down when pressing 3-4 seconds
something like in all the mobile phone now
I was thinking about FlipFlop ?
how can I do this?
simple and cheap?

Thanks ,
 

Thread Starter

david1234

Joined Nov 27, 2013
104
it's not what I need
first of all is to big - I don't need the option of AC
second from what I can see it only delay for turn on OR off
I need both.....
 

AnalogKid

Joined Aug 1, 2013
10,987
A cell phone uses a custom IC with extremely low standby current because that part is powered all the time. It has to be powered when the phone is off so it can detect when to turn the phone on. The functions are easy to replicate with standard parts, but they will drain your battery during the off times unless care is paid to minimize current.

The 9V goes to the delay circuit, the FF, and the source of a p-channel FET. The FET drain runs the rest of the circuits. The on/standby switch that you press drives the input to the delay circuit. Its output drives the clock of a toggle FF, and the Q- output drives the electronic switch.

The FF can be CMOS and the switch device can be a p-channel FET, so the only real power budget to deal with is the delay generator. Very large R, very low leakage current C, and something that detects a very slow level change and produces an edge fast enough for the FF. Two 7002 small signal FETs in series might work here, and get you some hysteresis to boot.

ak
 

Thread Starter

david1234

Joined Nov 27, 2013
104
O.K
this is what I thought ,
can you show me a schematic of this circuit ?
and also how much I "lost" during storage ?
if I'm losing up to 5mAh it's good for me.

I will try to make a sketch of the circuit and upload ,

Thanks .
 

inwo

Joined Nov 7, 2013
2,419
Hello,
I want to be able to power on my device (work on 9-12V)
only when I press the power for 3-4 seconds
and also to shut it down when pressing 3-4 seconds
something like in all the mobile phone now
I was thinking about FlipFlop ?
how can I do this?
simple and cheap?

Thanks ,
Flip flop won't add delay.

3-4 seconds seems long.

If it's for a project you're building, it can easily be done with timer or in software.

If adding to an existing circuit, just an rc circuit between switch and circuit may give enough delay. Plus an added transistor if slow switching times aren't accepted by device.

Do you need two? On and off? Or is the same switch used to toggle on-off?
 

crutschow

Joined Mar 14, 2008
34,285
Below is the LTspice simulation of a circuit that gives a delay for both turn-on and turn-off from one momentary PB switch. It uses CD4000 series CMOS ICs which can operate directly from up to 15V so you don't need a voltage regulator.

It uses Schmitt-trigger inverters to give a sharp clock pulse edges to the FF, otherwise it might not trigger properly.

The R2 and the diode provide for fast discharge of C1 so it is ready for the next PB press.

Note that power and ground connections are not shown for the IC's. The circuit draws negligible power so can be left connected to the power source.

The R1C1 values shown give a delay of about 3.5s for both turn-on and turn-off.
Edit: These values may need some tweaking to get the desired delay in the built circuit.

It uses a P-MOSFET at the output for efficient high-side switching of your load. The device can be just about any P-MOSFET that has at least a 20V rating and at least double the current rating of the highest load current.

Delayed Switch.gif
View attachment Delayed Alternate Action Switch.asc
 
Last edited:

AnalogKid

Joined Aug 1, 2013
10,987
Below is the LTspice simulation of a circuit that gives a delay for both turn-on and turn-off from one momentary PB switch.
Looks good to me. Since you are using the Q output for control, I would add a small RC network to the FF Set input to guarantee a power off condition on first time power up.

ak
 

crutschow

Joined Mar 14, 2008
34,285
Looks good to me. Since you are using the Q output for control, I would add a small RC network to the FF Set input to guarantee a power off condition on first time power up.
That's a good idea. A 1MΩ resistor from the Set input to ground and a 0.1μF ceramic cap from the Set input to V+ should work for that.
 

AnalogKid

Joined Aug 1, 2013
10,987
For any of you geezers out there that remember the GE Transistor Manual, you can implement the toggle FF with two NAND gates and eliminate the 4013.

Or see the attached schematic, but use a 4093. Tie Q- to D to make it a toggle FF, and drive the clock input with the R1-C1 node in the post #10 schematic. Since it isn't critically important that the Q and Q- outputs transition at exactly the same time, a small RC delay in one of the gate #2 inputs will assure a consistant power-on condition.

The 4093 is the near-perfect basic logic component. The only way it could be better is if it were a 741.

ak
 

Attachments

Last edited:

crutschow

Joined Mar 14, 2008
34,285
For any of you geezers out there that remember the GE Transistor Manual, you can implement the toggle FF with two NAND gates and eliminate the 4013.

Or see the attached schematic, but use a 4093. Tie Q- to D to make it a toggle FF, and drive the clock input with the R1-C1 node in the post #10 schematic. Since it isn't critically important that the Q and Q- outputs transition at exactly the same time, a small RC delay in one of the gate #2 inputs will assure a consistant power-on condition.
......................
Since that design using NAND gates is a level-triggered FF and not an edge-triggered type, if you connect the D input to the Q- output it will oscillate as a ring oscillator when the clock input is high. For it to work as a toggle FF the clock pulse width would need to be shorter than the propagation time of the oscillator.
 

Thread Starter

david1234

Joined Nov 27, 2013
104
Thanks -
I do have some questions (also mark in the circuit)
1. I want to use a reset button - not 2 state switch. so I will need to press the button for 2-3 seconds and them the device will be turn on\off , not press and then wait.
there is a different - you agree,right?
is it what you did there? because I don't thinks or I didn't understand it correctly.

2. why do I need to use 2 CD4093B ?
3. maybe my calculation is wrong - but if I do R1*C1= 4114*10^-6 ==> that isn't 3.5 seconds, it's 4mS...
4. and what about the power for the FlipFlop and the cd4093b - they need to connected to VCC all the time? or I can connect them after the switch? I need to save the battery
Thanks again ,
I just need to understand before I go out and buy this parts
 

Attachments

Last edited:

crutschow

Joined Mar 14, 2008
34,285
1. I want to use a reset button - not 2 state switch. so I will need to press the button for 2-3 seconds and them the device will be turn on\off , not press and then wait.
there is a different - you agree,right?
is it what you did there? because I don't thinks or I didn't understand it correctly.
No, I don't understand the difference between "press the button for 2-3 seconds" and "press and wait". To me they are the same thing. :confused:
My circuit changes state (on\off) when you push and hold the momentary button (S1) for about 3.6s as shown in the simulation plot.

Originally you said 3-4 seconds, now you say 2-3 seconds. Which do you want?

As noted on the schematic, V2 is just for simulation purposes (to turn S1 on and off).
2. why do I need to use 2 CD4093B ?
Since the CD4093 is an inverter I used two in series so that the input and output are in-phase. Since there are 4 gates in one-chip, it only requires one part.
3. maybe my calculation is wrong - but if I do R1*C1= 4114*10^-6 ==> that isn't 3.5 seconds, it's 4mS...
Your math is off. It's 187,000 * 22e-6 = 4.1s.
4. and what about the power for the FlipFlop and the cd4093b - they need to connected to VCC all the time? or I can connect them after the switch? I need to save the battery
As I stated in my first post, the power connections are not shown. Due to the very low current required by the CMOS chips and MOSFET (essentially leakage current) you can leave them connected to the battery with negligible drain.
 

Thread Starter

david1234

Joined Nov 27, 2013
104
again - thanks for the explaining , very helpful
now:
1. my mistake , I thought I wrote 2-3 seconds...... sorry (but it is the same, just to change the RC- so ignore this )
there is a different between pressing for 2-3 seconds and just get a delay for this time - for example:
I don't wont that if someone press by mistake the power button (or something touch it) for a time less then 2 seconds it start working , I want to make sure it will start not by mistake.
take you Iphone\HTC\Samsung for example - when the phone is close only a long press of 2 seconds will start it , if you press it by mistake it won't start.
now do you understand what I mean? only a LONG press will stat the circuit
2. no problem with the amount of the device - just to understand the electronic.
3.I guess I have made mistake in putting the numbers in the calculator, sorry - I see now my mistake.
4.O.K , I understand.I will build the schematic for the all circuit and post it

Thanks ,
 
Last edited:

Thread Starter

david1234

Joined Nov 27, 2013
104
looking good - this is want I have wanted
Thanks !!

just 2 understanding questions:
1. the push button his job is to start the 555, right?
so isn't he need to be between the VCC and PIN8 ?
I don't want it to work the all time - its take to much mA,or am I wrong?
2. how did you calculate the 2.9 seconds? using witch R and C?


Thanks,
 
Top