Is it possible to switch off a LED when current is applied to base of a transistor? I am using the circuit below but when current is applied to the base, the LED is ON. I need the LED to be off when SW1 is on. I am using 2N1613.
Electronic – Switching transistor off when current is supplied to it’s base
switchingtransistors
Related Solutions
Very nice presentation of your problem. Well done, and thanks.
(1) Check that your switch connects left to right when pressed and not top to bottom.
Remove switch - does LED go out.
Use a piece of wire. Does LED turn on?
(2) It appears that the problem is that the circuit they have given you is utterly and completely and inexplicably scrambled. It would be hard to have the circuit much wronger that that and still light the LED! It just MAY be sort of correct given several unlikely assumptions.
How can this be?
I so didn't believe what I was seeing that I checked several times.
What transistor are YOU using? What is the pinout.
Even if YOU are not using a 2N2222 they should be.
The circuit is wrong because:
They say 2n2222 so it should be NPN
It is normal to put the LED in the collector circuit but not essential.
If R3 is in collector then it should not go to V- power rail but to V+.
If we assume LED is in Emitter circuit then R1 must be in collector circuit and the transistor is being used as an "emitter follower". Not what you would usually do or for a beginner but say that's correct. And the pinout is backwards. Let's assume it is.
Then base should be being pulled +ve to turn on. It is.
They should have a pulldown on the bas to ground to turnthe transistor off - especially when used as an emitter follower. Connect another 10k from SW1/R1 junction to ground. Test . report.
BUT
Ensure transistor is CBE bottom to top as per 2N2222 datasheet or find what it really is.
Identify C B E with certainty. Ensure NPN transistor.
Collector via R3 and LED to V+
Emitter to ground
10K from Base to ground
10K via switch to V+
Like this with different values, but I have added extra 10k from base to ground (a wise precaution).
I checkd 2N2222 data sheets from several manufacturers. ALL I found including metal can ones show transistor is CBE readingUP the breadboard as shown. (terminals 48-49-50) SO there is NO DOUBT that they have the circuit VERY WRONG as shown. Their C (terminal 48( goes via R3 to B- (ground). For an NPN transistor it should be B+ / +12v. etc. Build the circuit as I have suggested. It will work ;-). Transistor MAY be dead.
Datasheets
[TO18 & TO39 metal can both the same](metal can )
All TO92 plastic seem to be ONSemi - several distributors:
Did they provide a proper circuit diagram?
If so please show it.
Update:
Here is the book concerned .
(1) The transistor is reversed. Turn it around 180 degrees and their circuit is as they intended. Their basic data shows the transistor wrongly.
(2) And / But - the circuit is an emittee follower as it was obvious it would be if you "just" reversed the transistor. This is such an 'interesting' way to do things that it was hard to believe that it was intended. It was.
Their "rather interesting" circuit:
One, that switch does not directly control the motor. It's most likely a few mA at best, as it signals a microcontroller inside the cdrom to open/close the tray.
Two, what you are looking for is simple ohms law. Resistor = (Source Voltage - The Transistor Base/Emitter Drop) / Current Required in Amps. Since the hFE or current multiplication ability of the TIP120 is 1000, so roughly it will allow 1000 times the base current at the collector, any amount of current should be good at the base. Let's just use 5mA. The Base/Emitter drop is 1.25V minimum, as there are two transistor diodes.
Resistor = (5v - 1.25V) / 0.005A or 3.75V / 0.005A = 750Ω or close.
Update To further answer the question, you calculate the base resistor within the safe range of your source (Arduino, 40mA per pin, 200mA total at any given time). The unknown collector current in this case would be minimal for a button. For actual loads like a motor, you could simply max out the transistor by saturating it, giving the base transistor as much current as possible. In this case, you would have to have multiple arduino pins in parallel since the TIP120 base limit is 120mA and the Arduino is 40mA per pin. This is not ideal because you don't know the current at C-E or the amount of voltage it will drop.
The best answer is that you DONT. A proper design will find out how much current will be at the collector. Use a ammeter or multimeter in current mode to find out.
Best Answer
You could use the switch to shunt the base current away from the transistor:
If you really need to apply base current to switch the LED off, you could use the transistor to bypass the LED:
However, this wastes all of the current that normally goes through the LED. A more power-efficient circuit would use another transistor that gets its base current shunted away by the first transistor: