Latch power switch with a timer (no micro controller)

Thread Starter

BarryTron

Joined Nov 18, 2018
76
I have created a latch power switch with a timer using a micro controller, and I am wondering if i can do same but without a micro controller.

Here are the requirements:
  • zero power when off
  • one on/off switch
  • timer option before turning power off: 30min, 60min,90min
  • no micro controller

Please let me know if above is feasible. Any help is appreciated
 

LesJones

Joined Jan 8, 2017
2,362
It is feasible using a few ICs. The method suggested will depend on how accurate the times need to be. Will it be switched on using a toggle switch or a push button ? Do you need to be able to switch it off manually before the set time ?

Les.
 

Alec_t

Joined Sep 17, 2013
10,470
..... but doing it without a micro will take up more board space and probably end up more expensive than using a micro. Is that ok?
 

iimagine

Joined Dec 20, 2010
388
1 IC Solution: CD4069UB

DeleteMe11.png

There should be a D at the end of the last inverter, i forgot to label it
Should be able to get you more then 60mins max delay
 

Thread Starter

BarryTron

Joined Nov 18, 2018
76
It is feasible using a few ICs. The method suggested will depend on how accurate the times need to be. Will it be switched on using a toggle switch or a push button ? Do you need to be able to switch it off manually before the set time ?

Les.
Great questions Les, please see answers below,

How accurate the times need to be: +/- 5min will suffice
Will it be switched on using a toggle switch or a push button: Push Button would be ideal
Do you need to be able to switch it off manually before the set time: That would be a great if possible. Turning it off after the timer has started (maybe using same push button).
 

danadak

Joined Mar 10, 2018
3,630
4 issues -

1) Debounce the button

2) Not using caps in logic design inputs (which are not a good idea, slow rise/fall times in CMOS
asking for problems, power down cap discharge issue) -

http://www.ti.com/lit/an/scba004d/scba004d.pdf

3) Circuit glitches due to power up/down issues (not present in most UP chips anymore)

4) Timing accuracy of delays, response time.....

Simple functionality like this can be done w/o a lot of programming (Block language, 6'th
graders doing robot control with it) and simple cheap UPs, like ATTINY series, Atmel.

Post # 9 on - https://forum.allaboutcircuits.com/threads/push-button-long-press-on-off-dual-function.130963/#post-1427020


Regards, Dana.
 

rsjsouza

Joined Apr 21, 2014
211
A 555 is the IC designed for timers like these. Use it in a monostable configuration. Check figure 9 of this datasheet. The only issue is that you will need an extra switch for the time selector.

A small latch circuit for power ON/OFF via a pushbutton can be useful for this operation. Check here.

As Dana mentioned, a debouncer circuit for the pushbutton can be useful. Check here.

Back in the 80's when I started in electronics, we had to use these devices or discrete transistors.

Good luck!
 

iimagine

Joined Dec 20, 2010
388
We are not designing a computer here, lets keep it simple right? Timing will always be an issue with such circuit no matter what you do and again we are not doing rapid switching so response time is irrelevant.
 

Thread Starter

BarryTron

Joined Nov 18, 2018
76
what are the specs? what is the voltage this needs to operate on? 230VAC?
Great question. The idea is that I will be able to set a timer to turn ON/OFF a 110V device via relay. It will use zero power then it's off. When i turn it on i will have an option to select from the 30/90/120min timer, the device will stay on for the selected amount and then the whole thing will power down.

An option that I really like from Les, is to be able to turn if off manually when it's on.

Currently i am using a micro controller with two push buttons and 3 LEDs to indicated the timer selection. But I am thinking about just using one push button
 

LesJones

Joined Jan 8, 2017
2,362
A few questions.
In post #1 you say you want settings of 30, 60 & 90 minutes but in post #13 you say 30, 90, 120. Which is it ?
Is this a school project or similar ?

About 30 years ago I built a timer for a bathroom extractor fan that is controlled by a single rocker switch so it is the same as the light switches. This is the way it works. If you switch the switch on and then off for about a second it starts the timer. (For about 30 minutes.) If you want to turn the fan off before the end of the 30 minutes you switch the switch on and then off after about 5 seconds. If you just turn the switch on it just behaves like a normal switch so it stays on until the switch is switched off. This uses 4000 series CMOS ICs ( CD4060, CD4013 and CD4001) This does not use zero power when off. I consumes a few micro amps from a 12 volt supply. If I was doing this today I would use an ATtiny13a or a PIC12F1840 or similar. (8 pin devices.) I will have a look at the schematic and see if I can modify it to take zero power when off.

Les.
 

Thread Starter

BarryTron

Joined Nov 18, 2018
76
Hi Les,

No, this is not for school, this is more as a hobby and self learning. I am very comfortable with creating stuff using a micro controller or most stuff that are AC related, but I have a very weak knowledge about complex DC circuits. I have even purchased an old oscilloscope to help me visualize the DC.

The numbers that I provided are just for reference. The idea is that the the time can be adjusted if I understand the basic concept. From reading all the feedback it looks like I am way over my head and I will have to scale my ambition down a bit.

I was able to find a great video about push ON/OFF Latch . I have ordered some of the parts that I am missing (100K resister), I still have no idea how I will go about the timer part.
 

MisterBill2

Joined Jan 23, 2018
4,061
Not for 90 minutes. Ok in theory, but in practice the high capacitor and resistor values involved are problematic because of leakage currents.
I have seen systems using a 555 timer for quite long delays, the challenge has been finding capacitors with a low enough leakage current that they will work for timing. That is one simple choice. Another option is an oscillator/counter IC, such as the CD4060. A bot of binary decoding and it is all set for a number of time intervals.
Set and reset can be a simple RS flipflop, such as a 4013. And still much cheaper than one of those toy computer blocks, with no coding required.
 

LesJones

Joined Jan 8, 2017
2,362
Here is the start of an idea. It will take zero power from the 12 volt supply when off but if you require it to take zero power from the 110 volt supply that powers the 110 volt (I assume AC supply.) to 12 volt DC power supply then it becomes more complicated. This basic schematic does not cater for terminating the timing period.
300819.png
It is based round a 14 stage binary counter with the option of an oscillator to clock it. The timing will be arranged so the Q13 output goes high after 30 minutes. The Q14 output will go high after 60 minutes. selecting these outputs with a switch will give those two time values. After 90 minutes both Q13 and Q14 will be high. IC2A will give a low output for this condition. IC2B just acts as an inverter converting this low to a high. This connects to the third position of the delay select switch (90 minute position.) The output of the switch is inverted by IC2C so IC2C's output will be high until the end of delay condition. This holds Q1 on (Via D1) which drives the relay. S2 is a push button switch to start the timer.
When it is pressed its output is differentiated by C2 and R3 to give a short pulse which pulses Q1 on via D2. The contacts on the relay then supply power to the ICs. The pulse also resets all the flip flops in the 4060 In this condition the output of IC2C will be high holding Q1 on. At the end of the start pulse the reset condition is removed from the 4060 so it starts counting up. As the 30 minute stage is Q13 we need to clock the 4060 every 1800 divided by 2^13 (8192) = 0.2197 seconds. I have not yet calculated the values for C1, R1 & R2 to give this timing. You could use switch selection of the timing components instead of decoding the binary outputs of the counter. You could also use an external oscillator such as a CMOS 555.
Do you require it to take zero power from the 110 volts power supply in the off state ? Showing us how you have done this with the microcontroller version may give us ideas on how to do it with the above schematic.

Les.
 
Top