Hi, Probably this is a very simple and obvious question but i am not very bright with transistors so sorry about this. I am trying to use a pnp transistor to act as a switch which will switch on an LED when the input on the base is 0V and switch off the LED if the base is connected to 5V. I came up with this simple diagram but it does not seem to work. I think I am doing something wrong Any pointers will be greatly appreciated Thanks.
Conventional current flow (positive to negative) always follows the transistor symbol's arrow. That's why they're drawn like that.
Your diagram shows the PNP transistor, with the 2N3904 label. But 2N3904 is an NPN part. Your are probably using 2N3906, right?
This is going to sound horrible but I haven't actually checked if it was a PNP or NPN, I just grabbed the 2N3904 from a plastic bag labeled PNP so yes the schematic is wrong. If I were to do it with an NPN transistor, would it be something like this? now the curent flow matches the transistor's arrow (as cpemma suggested). one more thing is should i actually use a 10k resistor on the base of the transistor. the current level going to the base is around 4mA and do I want to limit that even more? I know I am hopeless with this and thanks a lot for all your answers
I think things got confused here a while ago. Note that it's supposed to be an INVERTER. I think he was very close in the first diagram, just a little off... I'm going to draw up my hypothesis here Edit: This should exhibit the proper behaviour for the given input voltages. It does use the 2N3906 PNP transistor, to get the easy inverter effect.
That won't act as a switch if that's what he's after unless the base can be pulled up to Vcc. You've drawn it as an emitter follower. PNP for high side switching and NPN for low side switching. I wouldn't rely on your diagram if you're interfacing with logic as it's not guaranteed to swing the full supply voltage range.
Going back to the original (but with a PNP connected the right way round) you can get round SteveyG's concern that the control signal may not swing high enough (over 4.3V) to turn the PNP off by putting the LED on the emitter (top) side and the resistor on the collector (bottom) side. Now 'High' only needs to be over (5V-0.7V - LED forward voltage), say over 2.5V, to shut the PNP down. Using a single NPN as switch you've two choices, Rewrite the software so a logic high signal turns the LED on, Put the LED across the NPN so the 'on' transistor shorts out the lit LED, with the resistor on the collector to limit either LED current or transistor current.
DOH. You're completely correct. In my defense, he did specify Vcc and GND inputs, but yes, it would be reasonable to assume that these are coming from logic gates with questionable rail swing That's why I shouldn't do stuff quickly Like this! I was thinking about that base resistor too, and considering if hfe was low. So, shrinking that down to 4.7k seemed to make sense. Vi = 0V Vb = 5V - 2.0V (guestimated LED forward) - 0.7V = 2.3V Ib = 2.3V / 4.7k = 0.5mA (Gain eqn) Ic ~= ßIb = 50 * 0.5mA = 25mA [ This is pretty beta ] Now, on our collector resistor: Vc = 5V - Vled - Vce(sat) = 5V - 2.0V - 0.1V = 2.9V Real Ic = 2.9V / 220ohm = 13.1mA (Real Ic < Gain eqn Ic) => Transistor in Saturation!
Following the final schematic drawn by fat-tony I managed to get this thing working SteveyG, cpemma, MisterX, fat-tony: Thanks a lot for all your help!