Latch power switch with a timer (no micro controller)

danadak

Joined Mar 10, 2018
4,057
Something like this.

Could replace dip switch with variable button press time detection
to either turn on, turn off, set time delay, in code.

upload_2019-8-31_6-56-18.png


Micro is ATTINY. Glitch free startup, ~ 2% accurate delay time control. And ability
to sleep the ATTINY to reduce current.


Regards, Dana.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,507
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.
View attachment 185090
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.
To have a reset function added just put a pushbutton switch in the reset line to pin12.
 

danadak

Joined Mar 10, 2018
4,057
The title clearly stated 'no micro controller' :rolleyes:

And the TS said that hes already accomplished this by using micro controller

Seems like you are advertising attiny every where
And the TS also reacted to some of the issues with discrete logic circuits discussed,
power up issues, glitching, unpredictable behavior.

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.
He is an experienced processor user, self stated, and considerations
for timing accuracy, power up/down glitch issues not taken care of in the
proposed discrete logic circuits, and parts count/reliability.

Seems like you have a problem with users of Atmel ATTINY ? Not sure why.
I also like, per my posts, PSOC, Freescale Coldfire, is that too much for you ?
 

iimagine

Joined Dec 20, 2010
512
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.
He is an experienced processor user, self stated
Then why are you trying to sell him attiny?

I dont have any problem with any micro processor, I think that attiny is great, but when someone is trying to learn electronic, I do not steer them away from their course by saying that its too complicated, dont bother, just go for micro controller! Should have encourage them instead, this is an electronic forum after all
 

danadak

Joined Mar 10, 2018
4,057
Then why are you trying to sell him attiny?

I dont have any problem with any micro processor, I think that attiny is great, but when someone is trying to learn electronic, I do not steer them away from their course by saying that its too complicated, dont bother, just go for micro controller! Should have encourage them instead, this is an electronic forum after all
I had no idea this is an electronic forum, I thought it was for knitting skullcaps.

Encouraging a person is, on this forum, using good practice. My comments stand about power up/down glitching
in circuits not designed to handle that, timing accuracy considerations, parts count/reliability/cost. Thats encouraging
people, helping them to successful and hopefully safe designs. Especially after TS clearly stated, as a result of comments, he was
rethinking the design.

As far as "sell him ATTINY", I do not sell parts. I offer advice and considerations on possible solutions.
Like the forum does by posters on a broad basis. Thats our duty to people soliciting help. Present users
with alternatives and may the best advice of the contributors bubble up to the surface in the process.

Have a good day.
 
Last edited:

LesJones

Joined Jan 8, 2017
4,511
Hi MisterBill2,
A pulse to pin 12 (Reset pin) of the 4060 would just restart the timing sequence. The TS wants the option to terminate the timing sequence and switch the output off before the end of the set time and he would like to do this using the same push button as the one used to start the timer. I can think of ways to do this and achieve zero power consumption on the 12 volt supply in the off state but I have not worked out how to do it and achieve zero power on the 110 volt input to the 100 to 12 volt power supply. It is easy to achieve zero power on the 110 volts by using the relay contacts to switch the 110 volts to the power supply and having the start button in parallel with these contacts. with this method the top end of C2 would go directly to the + 12 volt rail to generate the initial reset pulse to the 4060. The timing sequence could be terminated using a second push button with normally closed contacts in series with the contacts on the relay.

Les.
 

eetech00

Joined Jun 8, 2013
4,705
Hi MisterBill2,
A pulse to pin 12 (Reset pin) of the 4060 would just restart the timing sequence. The TS wants the option to terminate the timing sequence and switch the output off before the end of the set time and he would like to do this using the same push button as the one used to start the timer. I can think of ways to do this and achieve zero power consumption on the 12 volt supply in the off state but I have not worked out how to do it and achieve zero power on the 110 volt input to the 100 to 12 volt power supply. It is easy to achieve zero power on the 110 volts by using the relay contacts to switch the 110 volts to the power supply and having the start button in parallel with these contacts. with this method the top end of C2 would go directly to the + 12 volt rail to generate the initial reset pulse to the 4060. The timing sequence could be terminated using a second push button with normally closed contacts in series with the contacts on the relay.

Les.
Hi

Seems like this could be accomplished using a CD4013B driven by the start/stop button. The FF output could hold the 4060 in "reset" until pressed. But it would require some power for the circuit to maintain its state. A battery maybe?

Hmmmm.

eT
 

MisterBill2

Joined Jan 23, 2018
27,507
Hi

Seems like this could be accomplished using a CD4013B driven by the start/stop button. The FF output could hold the 4060 in "reset" until pressed. But it would require some power for the circuit to maintain its state. A battery maybe?

Hmmmm.

eT
At one time the national electrical code mandated that switches should have a definite "off" position. My preference is always for the "off" button to never have any other function. That is also why I consider that putting that big button in cars that works for both start and stop is just plain STUPID, because when I want the engine to stop it needs to stop NOW! An off button for lights that was always an off button makes a lot more sense at all times.
 

eetech00

Joined Jun 8, 2013
4,705
At one time the national electrical code mandated that switches should have a definite "off" position. My preference is always for the "off" button to never have any other function. That is also why I consider that putting that big button in cars that works for both start and stop is just plain STUPID, because when I want the engine to stop it needs to stop NOW! An off button for lights that was always an off button makes a lot more sense at all times.
Heh....I agree.

Especially when its getting increasing difficult to know if the engine is even running.:D
 

ElectricSpidey

Joined Dec 2, 2017
3,334
Note: timer 555 has its CV tied to positive with a 1k resistor, this allows for a much smaller timing cap.
I think plus minus 5 minutes is doable if you choose the right caps, and the trim pots enable more calibration.

Push_Button_Select_Timer.JPG
 
Last edited:

AnalogKid

Joined Aug 1, 2013
12,126
To get a 120 m period out of a CD4060, the Q14 full-cycle period is 240 m or 14,400 s. Divided by 2^14 = an oscillator period of 0.87 s. Large, but not impossible to deal with.

Rather than switch outputs into decoding logic, I would use a 3-position switch on R1 (above). This way, you can switch the timing period at any time without pushing glitches into the relay driver. Any switch glitch or bounce is one or two cycles in a 8,192 cycle period.

When power is applied, the R3-C2 POR (power-on reset) circuit drives Q14 is low and the relay is on.

When Q14 goes high, the relay is off and Q14 inhibits the oscillator with a feedback diode. Everything is parked until power is bounced

ak
 
Top