-2

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):

enter image description here

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?

user3578847
  • 55
  • 2
  • 7
  • 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
  • 2
    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
  • @Tyler yes, Sir, that was my plan. Cut the negative wire between the power supply and the LED's, put in between the transistor, ground my controller to the LED's negative terminal and controllers positive terminal goes into the base (with a resistor in between), is this wrong way of doing it? – user3578847 Apr 18 '16 at 14:34
  • @user3578847, Yes, since you will short circuit your controller through the transistors's base – Dmitry Grigoryev Apr 18 '16 at 14:42
  • @DmitryGrigoryev can you please explain why? how can electricity get into the base if transistor is strong enough to withstand the current? I don't understand.. – user3578847 Apr 18 '16 at 14:44
  • 1
    Why don't you draw a circuit first? I'm bad at guessing games. – Dmitry Grigoryev Apr 18 '16 at 14:47
  • Additionally, you could do some research on "MOSFET as a switch". There are tons and tons of examples, and it may be a better solution. – Tyler Apr 18 '16 at 14:49
  • @DmitryGrigoryev http://i.stack.imgur.com/gd8aI.png but my question is WHY, not HOW – user3578847 Apr 18 '16 at 14:49
  • Well, now that you have added the picture (and the information it contained) we can now see that you are trying to switch 37V, which is very close to the Absolute Maximum Vceo of 40V. – Tyler Apr 18 '16 at 14:52
  • 1
    @user3578847 You didn't mention R1, that's why I thought of a short circuit. – Dmitry Grigoryev Apr 18 '16 at 14:52
  • @WesleyLee did you even read my question? I'm asking CAN THE CURRENT COME INTO THE BASE IF TRANSISTOR MATCHES THE REQUIRENMENTS, not HOW TO CONNECT IT – user3578847 Apr 18 '16 at 14:53
  • @user3578847 No. Current will flow into the base and collector, and out of the emitter. – Adam Haun Apr 18 '16 at 21:35

2 Answers2

4

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).

Passerby
  • 72,580
  • 7
  • 90
  • 202
  • 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. – user57037 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. – user57037 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
  • Not enough information yet. But more margin would be beneficial, eg. higher Vce max. Also, can your Arduino pin supply 5 mA at 5V? Current gain of say 30 means base current from Arduino needs to be 150/30 = 5 mA. That would drop 4 V on 800ohm, so needs about 5V. – scorpdaddy Apr 18 '16 at 17:28
0

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.

Dmitry Grigoryev
  • 25,576
  • 5
  • 45
  • 106