Maker Pro
Maker Pro

Transistors heating up when sinking from motor

snake0

Mar 30, 2014
54
Joined
Mar 30, 2014
Messages
54
Hi there I have been trying to figure out why my transistors end up smoking when I get them to sink current from a 5VDC motor but I still don't understand it.

I am able to use the transistor to switch 3-5V to the motor, with the negative end of the motor sinked to ground, but if I try to sink current coming out of the motor using the same transistor it quickly starts to smoke. Use of resistors just makes the motor stop (not enough voltage). When both sourcing or sinking current the value is around 200mA, since its the same current passing through either way I can't understand why one way is fine but not the other. Can anyone give an explanation to this? The transistor I'm using is NPN 2N3904. I've tried it with multiple different transistors (all the same model number), and it gives the same result.

Please help!
 
Last edited:

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
Hey there
welcome to Electronics Point

how about showing us you schematic and also a sharl well lit photo of your construction

Dave
 

snake0

Mar 30, 2014
54
Joined
Mar 30, 2014
Messages
54
Heres the schem, nothing complicated, literally just one motor and one transistor
 

Attachments

  • trans.png
    trans.png
    9.1 KB · Views: 204

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
In the first circuit you are shorting your power supply through the transistor. Place a resistor in series with the base to limit the current.

The resistor should be chosen so that:

R = V/I Where V is the supply voltage less 0.7V, and I is twice the motor current divided by the transistor gain.

For example, if V = 4.3, and if the motor current is 250mA and the transistor gain is at least 70, then the resistor should be 4.3 / ( 2* (0.25 / 70 )) = 602. I would use a 560 ohm resistor.
 
Last edited:

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
The circuit with motor 1 lacks a seres resistor into the base of the transistor. A bipolar transistor (NPN in your case) has a base-emitter voltage of ~700mV. Your circuit forces 5V onto the base, thus driving a huge current into the base. It is this current that destroys the transistor.
A suitable currentlimiting resistor can be calculated as follows:
Assuming a motor current of 200mA, the base current is lower by the current gain of the transistor. I can'r find a datasheet for a 2N8027 transistor, but a typical small transistor gain would be around 100. This results in a base current of 200mA/100=2mA.
The voltage across the resistor is 5V-0.7V=4.3V.
The resistor is therefore R=V/I=4.3V/2mA=2.15kOhm. 2.2kOhm is a standard value that should work.
With the resistor in place this is the right circuit to control the motor, as the motor will see almost the full battery voltage, less the collector emittter saturation voltage of 100mV...200mV, which is rather small.

Your circuit with mortor 2 works nondestructively because the voltage on the emitter of Q3 is approximately 4.3V.
Why is this so? When you turn on Q3, the voltage at the emittter is initially 0V, the base is driven by 5V. This leads to a current spike turning transistor Q3 conductive in a very short time. The voltage on the motor and thus on the emitter of Q3 rises quickly, trying to go to 5V. One it reaches 4.3V, however, the base-emitter voltage is 0.7V (5V-4.3V) and any further rise in emitter voltage will reduce the base-emitter voltage below 0.7V. A base-emitter voltage <0.7V will automatically reduce the base current, thus limiting collector current and conseqeuntly limiting the emitter voltage.
This circuit is not good because the motor will never see the full 5V but only 4.3V. The remaining 0.7V will develop a constant power loss of 0.7V*0.2A=0.14W across the transistor.

By the way: a motor is an inductive load. You need to put a flyback )or kickback) diode across the motor to protect the transistor from transient overvoltages. Here's a tutorial on how to use a transistor as a switch.

Just an afterthought: In both cases the transistor sources current to the motor.
To sink current means that the motor would act as a generator ans be the source of the current. This is not the case.
 
Last edited:

snake0

Mar 30, 2014
54
Joined
Mar 30, 2014
Messages
54
Thanks for the help guys, I understand why most schematics show resistors going into the Base now. In fact when I originally built it I had resistors there but the motor wouldn't run so I took it out. I think it may be the cheap Chinese transistors I am using but there are still problems.

I get the following results:

Setting R1 going into the base at 2k, I get a boost from 2.2mA base to 140mA emitter current, which is around 63 gain.

Setting R1 to 1k makes 4.4mA base to 180mA emitter, which is around 40 gain.

In both cases the motor doesn't run and the transistor gets super hot.

Base-Emitter voltage is around 0.63V.
Collector-Emitter voltage is around 4.7V.
Voltage across motor is about 0.5V.

Once again checked all wiring and rebuilt it several times with different transistors, and get roughly the same results.
 

Attachments

  • trans2.png
    trans2.png
    5.2 KB · Views: 177

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I've just modified my calculation above. I gave a resistor 4 times too large.

However you need to note that the value of the resistor required depends on the current drawn by the motor and the gain of the transistor.

We guessed at both of those..

In your case, clearly the transistor gain is lower, and the motor current is higher.

You need to put appropriate values into the equations, not just use the random values we did.

A lower gain is to be expected from higher power transistors. I can't find the datasheet for your transistor, so I don't know what the gain is.

Also you *MUST* place a diode across the motor or your transistors will rapidly die. The diode needs to be oriented so that it normally doesn't conduct. If your motor current is under 1A, a 1N4001 would be sufficient.
 

snake0

Mar 30, 2014
54
Joined
Mar 30, 2014
Messages
54
Hi Steve

I knew that I didn't just have to use a random value for the resistor, in fact I got the same value of 2k when I did the calculation myself based on a gain of 100, however even replacing lower resistors (470, 330 ohm) afterwards, while getting the current up as far as 200mA, still doesn't move the motor, so I think it's a different problem.

I will try putting in the flyback diode and see if it changes anything
 

snake0

Mar 30, 2014
54
Joined
Mar 30, 2014
Messages
54
Tried with diode, still same, only 0.5V across motor. I can get over 200mA now though with a 330ohm resistor on Base.

This isn't a current issue so I don't think its the base resistor at fault anymore, any other ideas?
 

snake0

Mar 30, 2014
54
Joined
Mar 30, 2014
Messages
54
Sorry for some reason i wrote the wrong part number, its actually 2N3904s I'm using.. Current gain should be 300, but I'm not seeing anywhere near that.
 

snake0

Mar 30, 2014
54
Joined
Mar 30, 2014
Messages
54
Just used multimeter to test Hfe, says 170
Data sheet says 0.65 gate voltage

New calculations are:

Hfe = 170
Vr = 5V - 0.65V = 4.35V
Ir = 200mA/170 = 1.76 mA
Rr = Vr/Ir = 4.35/1.76mA = 2.47kohm

However using even a 2k doesn't give 200mA.

So I guess the multimeter isn't too accurate.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
The fault is probably not one of your multimeter.
You need to be aware of the distinction between DC current gain and AC current gain. and of the method used to measure each.
Your number of gain=170 is the AC current gain. Look closely in the datasheet, you will find that this gain is specified for a Vce of 5V (or 10V), depending on where you look.

The ST datasheet for the 2N3904 characterizes the DC current gain at Ice=100ma as being as low as 30 (with a variance up to 300) which means you need at least 3.3mA base current or equivalently a 1.2kOhm resistor (use 1k to be on the save side).
 
Last edited:

snake0

Mar 30, 2014
54
Joined
Mar 30, 2014
Messages
54
Ok well I am pretty clear on the gain now.
Testing 1k gives 150mA, testing 330ohm gives 210mA.

So in any case, 210mA should be enough to run the motor. But the problem is that I only get 0.5V across the motor (that's regardless of resistor used too).

Is there something else I can try to resolve this?


Edit: tried to plug the negative end of the motor into the negative terminal directly, sure enough the motor spins and gives 4.3V, which is correct as its in parallel with the base resistor. But plugging it into the collector of the transistor gives 0.5 across motor. How can this be?
 
Last edited:

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Are you sure you are using the correct pinout for the transistor? How much current does the motor draw when you connect it without the transistor?

Bob
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Tried with diode, still same, only 0.5V across motor. I can get over 200mA now though with a 330ohm resistor on Base.
Only 0.5V across the motor with 200 mA current? That sounds like you've connected something wrong or have a faulty transistor.

You should be comparing the base current with the collector current, not the emitter current. If everything is connected properly and all the base current is coming out the emitter, with nothing (much) flowing in the collector path, the transistor is dead.

The diode across the motor needs to be connected with its cathode to the positive rail, so that it's reverse-biased while the motor is running.

When you're driving a transistor to switch a load like that, you need to saturate it. That means that you need to feed in several times the amount of base current than you would calculate based on the load current divided by the transistor's current gain. If your load needs 200 mA, try feeding 10 mA into the base. That should saturate it pretty well. You can tell whether the transistor is saturated properly or not by measuring the collector-emitter voltage when the transistor is ON. For a small signal transistor like the 2N3904, it should be around 0.3V or less.

Calculating forwards from the base current multiplied by the transistor's current gain is not a good way to go. The load's resistance limits the collector current. Once the transistor is saturated, and almost all of the supply voltage is present across the load, the load will only draw a certain amount of current, and there's no way to make it draw more without increasing the supply voltage. If the base current is 10 mA and the current gain is 100, you would calculate a collector current of 1A, but with 5V across it, the motor may only draw 200 mA. This is why the transistor is said to be saturated. It is conducting as hard as it can.

If you don't saturate the transistor, there will be some significant voltage across it. Combined with the collector current, this causes power dissipation in the transistor, and it gets hot. Power dissipated in a transistor is equal to the collector current multiplied by the collector-emitter voltage (ignoring the base current, because it's quite a lot smaller). So if you don't saturate the transistor, it might have 2.5V across it, and 100 mA flowing in the collector path, so it would dissipate 0.25 watts. This will make it warm, not hot, but it's still no good, because you want the full 5V (or as much of it as possible) across your load. Also, the current gain is not a well controlled parameter and varies with temperature. The proper solution is to saturate the transistor.

I hope this all makes sense!

Edit: I think either your transistor is dead, or as Bob says, you are connecting to the wrong wires. The pinout for a 2N3904 is E, B, C from left to right, looking at the flat side with the leads pointing downwards.
 

snake0

Mar 30, 2014
54
Joined
Mar 30, 2014
Messages
54
Thanks for the help guys

Are you sure you are using the correct pinout for the transistor?
Absolutely sure.

How much current does the motor draw when you connect it without the transistor?
Around 200mA.

The diode across the motor needs to be connected with its cathode to the positive rail, so that it's reverse-biased while the motor is running.
Yep, that's the way I had it.

For a small signal transistor like the 2N3904, collector-emitter voltage when the transistor is ON should be around 0.3V or less.
Negative. Voltage between C-E is 4.3V with 330ohm resistor at base, 4.7V with 1k resistor at base.
Current measured from resistor to base is 11mA.

If you don't saturate the transistor, there will be some significant voltage across it. Combined with the collector current, this causes power dissipation in the transistor, and it gets hot.
Bingo - this was my first instinct about 7 hours ago lol

Power dissipated in a transistor is equal to the collector current multiplied by the collector-emitter voltage
Just calculated collector current in this configuration as 43.6mA. 43.6mA x 4.3V = 187mW.. but it is definitely "hot" to the touch, not "warm"....

All above tests were tried with a brand new transistor (I have a bag of them). Pinout is definitely right since I did a bunch of stuff with LEDs no problem, and it reads E,B,C from the flat side.
 

snake0

Mar 30, 2014
54
Joined
Mar 30, 2014
Messages
54
So, I guess the question is, how do I saturate the transistor? I'm using the lowest value resistor I have 330ohms. Is there something else I can do?
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Either that or the motor really requires way more than 200mA to run.

Bob
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Actually, what you are saying is consistent with the diode being backwards. The side with the band is on the connected to the + voltage and the other side to the collector?

Bob
 

snake0

Mar 30, 2014
54
Joined
Mar 30, 2014
Messages
54
No, just tested it with multimeter again. Connected motor directly to DC through ammeter and its 210 mA at most.
Like I said - voltage across motor is around 0.8V - 1V when using the transistor.
 
Top