Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Simple circuit which turns a device on after a button is pressed for 3 seconds

Status
Not open for further replies.

DrWhoF

Advanced Member level 1
Joined
May 6, 2005
Messages
402
Helped
24
Reputation
48
Reaction score
11
Trophy points
1,298
Activity points
4,388
Can someone suggest a simple circuit which turns a device on after a button is pressed for 3s and when the button is pressed for the second time for another 3s turns the device off.
 

Re: 3s timer

Use the “New Millenium 555“ => PICAXE-08 microcontroller [8pin DIL] ..
Read one of it's pins then wait [1st second], the read it again and wait [2nd second], then read it again and wait [3rd second] and read it again ..
If the input is still L or H [your choice] then the output goes L or H [again, your choice] ..

Rgds,
IanP
 

    DrWhoF

    Points: 2
    Helpful Answer Positive Rating
3s timer

Hi.., I want to know whether ur design is microcontroller based device or just a simple analog/digital device? and pls mention the 3 second is critical for ur design? because u cant get exactly 3seconds with analog devices.

I have a micro controller based circuit. Its powered with a single push button. If u want to know I can give it for u.

Bye
 

    DrWhoF

    Points: 2
    Helpful Answer Positive Rating
Re: 3s timer

Ravin,
Circuit that I have to turn on/off is microcontriller based one but I have to reset other hardware on power-on.
IanP,
could you give more details on your idea?
 

Re: 3s timer

I guess simplest is to do it by loading up capacitor. And then just point this load to transistor base.

It is way simple, u need to know something about multi vibrators.

800px-Astable_multivibrator.png




Just use switch very close to the battery.
 

Re: 3s timer

Here is a circuit based on PICAXE08 (the smallest member of the PICAXE family) ..
Just follow the basic code to see how it works ..
Rgds,
IanP
Code:
' pin1 = input [pin6], on/off = output 2 [pin5]

	switch off 2

off2:
	if pin1 = 1 then cont1
	goto off2

cont1:

	for b1 = 0 to 9 ' 10*100ms = 1s
	pause 100
	if pin1 = 1 then cont2
	goto off2
cont2:next b1

	for b1 = 0 to 9 ' wait 2-nd 1sec
	pause 100
	if pin1 = 1 then cont3
	goto off2
cont3:next b1

	for b1 = 0 to 9 ' wait 3-rd 1sec
	pause 100
	if pin1 = 1 then cont4
	goto off2
cont4:next b1

on2:	switch on 2
	if pin1 = 0 then on3
	goto on2

on3:	if pin1 = 1 then cont5
	goto on3

cont5:
	for b1 = 0 to 9
	pause 100
	if pin1 = 1 then cont6
	goto on3
cont6:next b1

	for b1 = 0 to 9
	pause 100
	if pin1 = 1 then cont7
	goto on3
cont7:next b1

	for b1 = 0 to 9
	pause 100
	if pin1 = 1 then cont8
	goto on3
cont8:next b1

off3:	switch off 2
	if pin1 = 1 then off3
	goto off2

end
 

    DrWhoF

    Points: 2
    Helpful Answer Positive Rating
Re: 3s timer

Thanks so much.
It works fine but I need to switch +12V (same GND as +5V) and I don't want to use a relay.
Any suggestion?

Another question: why in the code you didn't use WAIT 1 as 1second delay but instead a loop with PAUSE 100?
 

Re: 3s timer

Just replace the relay with your device you want to switch, with its +ve end tied to +12V and the -ve end to the collector. BC548 is enough upto 400mA applications. Just check that the Chip should be capable of delivering Ic/β amount of current. If not use another transistor/opto-coupler drive. Take care of logic reversal.

P.S : - A lift of 0.2V (Vce sat) will be there between your device ground and the control circuit ground when it is ON. These two grounds should be isolated when the device is OFF. i.e. if any other wire (other than power) is going to the control circuit ground, the device will be always ON. Take care about this.

Regards,

SUjO
 

    DrWhoF

    Points: 2
    Helpful Answer Positive Rating
Re: 3s timer

First about WAIT and PAUSE: using WAIT 1 the input is read only 3 times in 1s intervals and it is possible that when someone presses button 3 times in ≈1s intervals it may turn the load on or off, whereas if PAUSE 100 is implemented the input is read 10 times per second and that makes false reading virtually impossible ..

As a switch you can use P-channel mosfet or PNP bjt, see attached picture ..

Rgds,
IanP
 

    DrWhoF

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top