LED & Rocker Switch detection
hmlittle59
Posts: 404
Hello All,
This is my first time attaching a schematic, so hopefully it will be readable. Lot of notes on the Schematic also.
But basically I'm coming off a BS2e I/O pin thru a 10k & 220 ohm Pull Up combo. At first I had a LED + 470 ohm along with a Rocker On/Off switch connected to short to "GND" when "ON". This may be the best way to go in the long run(over kill), but I wanted to better isolate the I/O pin from the LED with a Transistor switch. I'm using a 2n3906 along with (2) 10k resistors on the BASE & EMITTER(See Attachment). I've tried different Collector / Emitter combinations without the expected results on the "BASE" of Q1(Zero "0" Volts). However I did use the Single PNP trans. Pack like on the BS2's modules but it failed and would turned on my LED when it should have been OFF. I'm now using a PNP 2amp, so no chance of burn out. Just need to get it working. The LED is rated at 20ma and the Q1 was 200ma, don't know why it failed.
Putting this out their for now if anyone has any input or see my oops, or better yet "What the Heck were you thinking", let me know.
Must get sleep now. Will start all over tomorrow.
Thanks again
Howard
PS: Glad I did a "Preview", tried to clear up some areas and forgot to attach .sch
PS: The attachment steps was harsh....wow....what ever happen to just click the "Paper Clip"
This is my first time attaching a schematic, so hopefully it will be readable. Lot of notes on the Schematic also.
But basically I'm coming off a BS2e I/O pin thru a 10k & 220 ohm Pull Up combo. At first I had a LED + 470 ohm along with a Rocker On/Off switch connected to short to "GND" when "ON". This may be the best way to go in the long run(over kill), but I wanted to better isolate the I/O pin from the LED with a Transistor switch. I'm using a 2n3906 along with (2) 10k resistors on the BASE & EMITTER(See Attachment). I've tried different Collector / Emitter combinations without the expected results on the "BASE" of Q1(Zero "0" Volts). However I did use the Single PNP trans. Pack like on the BS2's modules but it failed and would turned on my LED when it should have been OFF. I'm now using a PNP 2amp, so no chance of burn out. Just need to get it working. The LED is rated at 20ma and the Q1 was 200ma, don't know why it failed.
Putting this out their for now if anyone has any input or see my oops, or better yet "What the Heck were you thinking", let me know.
Must get sleep now. Will start all over tomorrow.
Thanks again
Howard
PS: Glad I did a "Preview", tried to clear up some areas and forgot to attach .sch
PS: The attachment steps was harsh....wow....what ever happen to just click the "Paper Clip"
Comments
BTW, the 3906 should not have burned out in that circuit. The .470k resistor would limit the current through the led to less than 8mA. Perhaps you connected the switch directly to the base of the 3906. That would destroy it.
You will get more help if you explain what you are trying to do with this circuit.
Thanks T Chap and Kwinn for the replies. The circuit is not working as I had hoped. I have Prototypes with copper pour and It's making it harder to T/S. I did get one of the PCB's to work but there is still 3 V across the PNP(Collector) when OFF (5v) on the BASE, so I'll try the Emitter to Base resistor to try and reduce the 3 v. With the 5 V on the other side of the LED, the difference is not enough to turn it on.
BTW, the 3906 that I thought had burnt out before, very well could of been good like you said Kwinn, its just that it did not shut off all the way. I did have to change the way I applied the GND and 5 V to that part of the circuit. One of my previous PCB's has that dimm LED when it's suppose to be off and it has the old 5v/GND lay out.
I just tested my original concept again, turning the LED ON an OFF about 50 time and did not fail. I just did not want only a 220 & 470 Ohm resistors between the LED and MC.(SEE Sch.).
The original concept was to have 5 vdc on both sides of the LED. Then going through a Rocker Switch to GND and a standard Pull UP Switch also connected to the Rocker Switch to GND, when the RS was ON it would shunt both the LED and the Pull UP together to GND. Like I said before, this worked fine but kind of made me nervous with that type of connection. Maybe its been done before....don't know. I know that I've had it running like that here in my home for the pass 3 or 4 years and it still working. Anyway, I'm going to work up another circuit with some SMT and Thru Hole parts to work out all the bugs.
PS:any more input please let me know. I re did the sch. and will try and attach.
PS:WOW...It's even worse when your doing a quick reply.....WOW
I think it attached.
OOOPS. MY BAD. Trying to give a quick reply before going to bed, I screwed that up, good catch...I corrected the sch.
Thanks RDL2004 for the reply. R1 & R2 create a Pull Up switch for the MC. When the Rocker Switch is closed(GND), this is detected by the program and displays data to the LCD Screen. Also at the same time the LED that has 5 vdc on both sides and should not come on because of no difference of potential, should now turn ON because of the (GND) to the (Cathode/FLAG) side of the LED.
Corrected sch. attached.
my favorite part of this.
OOOPs. Didn't attach: