# Why do I need to know the current of the other device when using transistor [duplicate]

I have a LED lamp (it already HAS a power adapter), all I'm trying to do is turn it on using a NPN transistor (2N3904):

Someone told me that I will burn my transistor or controller attached to the base if I don't know how much current the device (the LED lamp) is using.

I can only understand that I need to know this, so I can be sure that the transistor can handle that much current, but I don't understand what does it has to do with base and burning down the controller or whatever is attached to the base? Do I need to know the current of the device because extra current might come into the base? I'm completely lost..

My question: "Under what conditions can extra current come into the base?"

UPDATE: I measured the current for the LED, and it uses 150mA, does that mean I can safely use 2n3904?

## marked as duplicate by uint128_t, Daniel Grillo, Scott Seidman, placeholder, BimpelrekkieApr 25 '16 at 8:13

• That transistor has an absolute maximum current Ic of 200mA. How many amps does your LED need? – Tyler Apr 18 '16 at 14:23
• @tyler that's the problem, it doesn't say on the adapter, I guess the sticker is missing. I'm a beginner in eletronics, I can easily measure the current if it's not stated, correct? and If the lamp uses more than 200mA, then the transistor will burn, correct? – user3578847 Apr 18 '16 at 14:26
• And where are you going to put this transistor? This is sounding like a "cut the power cord insert transistor" project. – Tyler Apr 18 '16 at 14:31
• Why don't you draw a circuit first? I'm bad at guessing games. – Dmitry Grigoryev Apr 18 '16 at 14:47
• @user3578847 You didn't mention R1, that's why I thought of a short circuit. – Dmitry Grigoryev Apr 18 '16 at 14:52

My question: "Under what conditions can extra current come into the base?"

Whenever you exceed the specs of the transistor. If you break the transistor by connecting it to a higher voltage, current or power than it can handle, it can be damaged in unexpected ways. As a non-isolating device, it could in theory fail closed, connecting the collector to the base, in which case it will connect whatever voltage on there to your controller. The base resistor will help keep the current low, but if your controller only accepts 5V on the pin, and you suddenly have 37 volts on it, good bye controller.

You also need to know the collector current, in order to make sure your base current needs can be met, based on the transistors gain/hfe/beta.

So you always need to know what voltage and current the transistor will see to design this properly. If not, use an isolating circuit like a relay (which also needs to be sized for the appropriate current).

• For the OP: Since nobody else mentioned it, I will. Make sure you do not exceed the power dissipation limit of the transistor. This is a separate step from making sure you don't exceed the maximum current. Dissipation is Vce * Ic + Vbe * Ib. – mkeith Apr 18 '16 at 15:21
• @mkeith I did mention power :) – Passerby Apr 18 '16 at 15:27
• OK. True. But you said don't connect it to a higher power than it can handle. I tried to be more explicit. Anyway, it is a good answer and I upvoted it and commented on it because I think it will end up being the best answer. – mkeith Apr 18 '16 at 15:30
• Also note the maximum Vce. A quick google search finds a Q2N3904 with a max Vce of 40V. This is close to the applied 37V. A little more margin between Vce limit and Vapplied would be wise. Allows for power supply tolerance and unexpected variation. If the transistor is forced to fail from too much Vce, it may again fail in unexpected ways, perhaps jolting the micro. – scorpdaddy Apr 18 '16 at 15:47
• Thank you for the responses! @scorpdaddy I measured the current, it's 150mA, does that mean I can safelly connect 2N3604 to 37v/150mA? – user3578847 Apr 18 '16 at 15:59

This schematic is fine, provided that the load doesn't exceed the nominal collector current of the transistor. Your microcontroller should be safe.

And yes, you can measure the current consumed by your load if this info is missing. Connect it in series with an amperemeter to the nominal voltage (is it really 37 volts or did you just reuse someone else's schematic?) and note the value. If it's close to 200 mA or more, use a different transistor.

• Thous are my schematics. I measured, it's 37v, 150mA, does that mean I can safely use 2N3604? – user3578847 Apr 18 '16 at 15:58