Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

circuit help, push button--> light turns/stays on

Status
Not open for further replies.

bd13

New Member
don't take this the wrong way, this is not a simple battery and switch circuit, what i need is a circuit that will activate an LED once a push button switch is...well... pushed. and then when you release the push button the LED continues to stay on, forever...(until you cut the power, then it should turn off...but if it stayed on with no power, then that would be a discovery that would make billions....)

any help would be appreciated.
 
You are looking for a latching circuit of some sort, there are various different ways you can go about this but the easiest is probably to use a d-type flip flop, these will latch on with the switch and stay on untill you either press the switch again or turn the power of. You should be able to drive the led from the chip but check as it will depend on which chip and which led you are using. Should be able to find loads of examples of d-type flip flop latching circuits by searching on google, hope this helps.
 
Diffirent ways to do that. The scematic below uses transistors. You could also use an analog switch like a fet, or the switch in a 4066.
Any normal transisor's sould work fine. If you use BC547 - 557 pair then
10K for R2 and 4.7K for R3 - R4 should work
 

Attachments

  • Start_without_stop.JPG
    Start_without_stop.JPG
    8.6 KB · Views: 899
bd13 said:
don't take this the wrong way, this is not a simple battery and switch circuit, what i need is a circuit that will activate an LED once a push button switch is...well... pushed. and then when you release the push button the LED continues to stay on, forever...(until you cut the power, then it should turn off...but if it stayed on with no power, then that would be a discovery that would make billions....)

any help would be appreciated.


that sounds like an SCR to me ...
 
yeah,
that's pretty much what i meant.
that description fits an SCR exactly.

i usually put a limiting resistor in the gate,
but maybe its not needed.

John :)
 
Phasor said:
And Exo's circuit looks just like the equivalent circuit of a triac... :wink:

Actually for an SCR (thyristor), it's been used quite a lot over the years commercially - usually as a latching trip circuit in PSU's. I believe it's actually called a 'gate controlled switch' - it can have two inputs, one positive going, and the other negative going.
 
ok, i tried Exo's schematic but all i got was a complicated way to turn a light on and off (i push the switch--> light turns on, i release the switch--> light turns off). i really don't know what i'm doing wrong, i put all the right parts on, but the light doesn't stay on after i release the switch...the only thing i could be doing wrong is with the switch, i'm using a regular push button, and Exo did say something about using a fet. but i didn't know if that was referring to the schematic or whether it was just a general statement.
 
are you sure you used a NPN for the lower transistor and a PNP for the top one. Cause it works for me. 1 thing i forgot is you should add a resistor between the lower transistor's base and GND to improve stability. This resistor should be lower then the base resistor itself. So if you used 10K for R2 you could use a 2K2 resistor between base and GND
 
Exo said:
1 thing i forgot is you should add a resistor between the lower transistor's base and GND to improve stability. This resistor should be lower then the base resistor itself. So if you used 10K for R2 you could use a 2K2 resistor between base and GND

That wouldn't stop it latching anyway, it would help to reduce spurious triggering.

I can only assume that it's been wired wrong, or (as Exo suggested) not used the correct NPN and PNP transistors. I've used this circuit many times, it's really very fool proof.
 
ok i still don't know what i'm doing wrong. i tried to re-do the circuit 3 times and now all i get each time is that the light turns on when i turn the power on (plug in the battery). so here's what i'll do: i assume as of now i'm using the wrong parts, so here is a list of what i'm using and from there you can see what i'm doing wrong.

R1- 1k
R2- 10k
R3- 4.7k
R4- 4.7k
Q1- PNP general purpose (PN2907-type)
Q2- NPN (2N3904)
S1- push button type
V+ = 9v (with zener diode, so its probaly a little less)


*both transistors are from radioshack, so if i have the wrong ones just give the part #
 
bd13 said:
i tried to re-do the circuit 3 times and now all i get each time is that the light turns on when i turn the power on (plug in the battery).

Try adding a resistor (2K2 or something) between GND and Q2's Base (like i said in my previous post).
When the button is not pushed yet Q2's input is floating, wich may cause it to self-activate. Adding the resistor should keep it pulled to ground until you push the button.
 
right ... the thing is that there is already a resistor between the GND and Q2's base, its R2. do you mean Q2's emitter or something? or just add another resistor in series with R2?
 
ok i think i know what you mean when you say 'self-activate'. what i did, and this was not intentional, was mess around with the circuit when the battery was in. when i removed the PNP transistor and re-inserted it, sometimes the light would come on and other times it would not. when the light didn't turn on and then the button was pressed the light would then turn and stay on. i can only assume its getting triggered spontaneously every time power is applied... :(

so just clarify where to put that resistor and i should be fine! :D
 
NOW THAT WORKS! :D

i was under the impression that i was supposed to add a resistor on a pre-existing wire, which was a really stupid thought, but now i understand, and the best part is it WORKS! thanks a bunch for helping me!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top