2

Author Topic: Transistor Issues  (Read 1692 times)

0 Members and 1 Guest are viewing this topic.

Offline VegaObscuraTopic starter

  • Robot Overlord
  • ****
  • Posts: 153
  • Helpful? 6
Transistor Issues
« on: November 24, 2010, 05:34:56 PM »
I'm still new and learning how to use electronic components.  I understand resistors, capacitors, LEDs, etc. but one thing I'm having issues with is transistors.  To the best I can understand it, you just hook up +V to the collector, gnd to the emitter, and to turn it on send a small current to the base.  Naturally, it sounds like something extremely useful to use in conjunction with a microcontroller, so I went out and bought a cheap pack of them from radioshack so I could play with them and make sure I understand how to use them correctly.  There were a lot of different kinds to choose from.  Attached is a picture of the pack I ended up getting.  It cost somewhere around $1.  The top is a bit torn from opening it, but it said "These transistors are designed for high-speed, medium-power switching and general purpose amplifier applications."

So I get home and get out my multimeter and set it to the 200ohms range.  I connect the + side of the multimeter to the base and the other side to one of the side pins.  The meter jumps to 71ohms then goes to open circuit.  I move the negative side of the meter to the other pin.  Still nothing.  I decide to switch and put the negative side of the meter on the base and try the positive side on the other pins.  Nothing happens at all.  I try changing the range of the meter; still nothing.  I just can't get the transistors to do anything.  I tried a few different transistors, all the with the same results.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Transistor Issues
« Reply #1 on: November 24, 2010, 06:29:01 PM »
There were a lot of different kinds to choose from.  Attached is a picture of the pack I ended up getting.  It cost somewhere around $1.  The top is a bit torn from opening it, but it said "These transistors are designed for high-speed, medium-power switching and general purpose amplifier applications."
The actual type (name) is more usable than the "designed for high speed yada yada" they put on the bag.
What is written on each transistor?


So I get home and get out my multimeter and set it to the 200ohms range.  I connect the + side of the multimeter to the base and the other side to one of the side pins.  The meter jumps to 71ohms then goes to open circuit.  I move the negative side of the meter to the other pin.  Still nothing.  I decide to switch and put the negative side of the meter on the base and try the positive side on the other pins.  Nothing happens at all.  I try changing the range of the meter; still nothing.  I just can't get the transistors to do anything.  I tried a few different transistors, all the with the same results.

Use the "Diode check" on your multimeter.

Then, for NPN's (as you have)...
Red on base (B) and black on emitter (E) and collector (C), not at the same time, should give a reading of around 0.6 to 0.8V (for silicium BjT's) - they will be close, but never identical.
Black on B and red on either C or E should give an open reading (over-range, usually shown as a "1" in the left side of the display) and so should measuring E to C (either way).
Any readings differing from that indicate a dud transistor (or problems with the DMM leads, probes or their use - a moist finger can really make a difference in such measurements).
For PNP's, just swap red and black for the same readings.

Lots of DMM's have h_FE test sockets and they're easier to use (no fiddling with probes).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline VegaObscuraTopic starter

  • Robot Overlord
  • ****
  • Posts: 153
  • Helpful? 6
Re: Transistor Issues
« Reply #2 on: November 24, 2010, 08:49:36 PM »
The front of the package just says NPN-Type Switching Transistors.

Diode check... I don't know why I didn't try that.  My diode check mode seems to indicate resistance, not voltage.

With red on base, putting black on emitter reads 779.  Black on collector indicates 780.  I'm assuming this means ohms.
Black on base with red on the other pins does in fact indicate out of range, and so does any other combination that does not involve red on base.


My multimeter does have an hFE test socket, but I have no idea what I'm looking for.  When I plug one of my transistors into it fluctuates erratically but stays mostly around 120.  This is the current gain, right?

The transistors are pretty small.  They're not the kind with a built-in heatsink.  The writing says:
2N
4401
-331

I'm assuming the diode test coming out like it did means that the transistors are good.  So now I have some questions:
What is the minimum and maximum voltage and current I need to put into the base pin to switch the transistor to fully on?
How much voltage and current can I send through the collector-emitter portion of the transistor without killing it?  This is the Vce(voltage for collector-emitter junction) and Ie (current for collector) right?  So they should be able to handle up to 30V and 800mA going through the collector-emitter junction, right?

And with a gain of 120, in order to switch it on I need to use 800/120 = ~7mA?  Am I doing this correctly?  So at 5V, I need a resistor of around 714Ohms?  Would I fry the transistor if I were to use one of the 330ohm resistors I have lying around??  What about 1k?

This is all very confusing, but I think I'm learning and I refuse to give up.
« Last Edit: November 24, 2010, 09:46:42 PM by VegaObscura »

Offline sparcheta

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Re: Transistor Issues
« Reply #3 on: November 24, 2010, 11:00:28 PM »
I'll start by going backwards through your questions.
Quote
with a gain of 120, in order to switch it on I need to use 800/120 = ~7mA?

No. The gain is how you figure out the Ic current.

Ie = Ic + Ib
Ic = G*Ib   --- G is your gain of 120 in this case.

So if you put 7mA into the base of the transistor you will get 7mA*120 = 840mA through the collector/emitter junction.

Quote
How much voltage and current can I send through the collector-emitter portion of the transistor without killing it?

Data sheets like this one http://www.datasheetcatalog.org/datasheet/philips/2N4401_3.pdf are extremely helpful with this. according to it, the collector-emitter junction can handle 40V. Also from the datasheet it appears the maximum current you want to put through the collector (continuously) is around 600 mA although it can handle quick spikes of 800 mA.

Quote
What is the minimum and maximum voltage and current I need to put into the base pin to switch the transistor to fully on?

Data sheet again. Look for the max Ibm. In this case it's 200 mA so don't put more than that into the base. As for the voltage, most transistors I've worked with turn on with ~0.8 V.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Transistor Issues
« Reply #4 on: November 24, 2010, 11:20:09 PM »
Hi,

Diode check... I don't know why I didn't try that.  My diode check mode seems to indicate resistance, not voltage.

No, it shows voltage drop.


With red on base, putting black on emitter reads 779.  Black on collector indicates 780.  I'm assuming this means ohms.
Black on base with red on the other pins does in fact indicate out of range, and so does any other combination that does not involve red on base.

The "779" and  "780" sounds correct. That means voltage drops of 779mV and 780mV respectively.
So, the transistor tested is good.


My multimeter does have an hFE test socket, but I have no idea what I'm looking for.  When I plug one of my transistors into it fluctuates erratically but stays mostly around 120.  This is the current gain, right?

Oh, you do have an idea then, as it is inbdeed the current gain. However, take it as a loose indication - h_FE is dependant on the current through it (more current, less gain).


The transistors are pretty small.  They're not the kind with a built-in heatsink.  The writing says:
2N
4401
-331

They are 2N4401's then. Here's a 2N4401 data sheet that you may want to fetch.


What is the minimum and maximum voltage and current I need to put into the base pin to switch the transistor to fully on?

Working from the h_FE of 120 (a bit low according to the data sheet) the absolute max. continuos current is 600mA (the value where it starts shaking its knees), so let's aim for 500mA of collector current. With a h_FE of 120, the base current needs to be at least 500mA/120=4.2mA, better round up to 5mA.
Say you want to control it from a 5V output pin. The voltage drop of the resistor is the 5V minus the drop over b-e of the transistor (which you measured to 0.78V), so the resistor have to be:
 (5V - 0.78V) / 0.005A = 844 Ohm, select the nearest standard value which is 820 Ohm.

Assuming the output pin can handle up to eg. 10mA, you have some give and can use any value between 422 and 844 Ohm.


How much voltage and current can I send through the collector-emitter portion of the transistor without killing it?

This is what you use the data sheet for ;)


This is the Vce(voltage for collector-emitter junction) and Ie (current for collector) right?  So they should be able to handle up to 30V and 800mA going through the collector-emitter junction, right?

Not according to the data sheet I linked to - and the ones you have may be sub-standard (very common with components sold in bags to hobbyists and the h_FE you got is an induicator in that direction :/)


And with a gain of 120, in order to switch it on I need to use 800/120 = ~7mA?  Am I doing this correctly?  So at 5V, I need a resistor of around 714Ohms?  Would I fry the transistor if I were to use one of the 330ohm resistors I have lying around??  What about 1k?

See above and remember the base-emitter voltage drop goes from the available voltage.


This is all very confusing, but I think I'm learning and I refuse to give up.

That's the spirit!
Read the data sheet  and ask when you hit something you don't understand.

A very important thing in data sheets, that most hobbyists (and some pro designers as well I'm afraid) get wrong is, that they see the abs. max. (a.k.a. limiting parameters) as numbers they can reach unharmed. They're not! They're the values where the average component starts to break down, so shouldn't be taken as design parameters.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Transistor Issues
« Reply #5 on: November 24, 2010, 11:33:41 PM »
Hi,

I'll start by going backwards through your questions.
Quote
with a gain of 120, in order to switch it on I need to use 800/120 = ~7mA?
No. The gain is how you figure out the Ic current.

Ie = Ic + Ib
Ic = G*Ib   --- G is your gain of 120 in this case.

So if you put 7mA into the base of the transistor you will get 7mA*120 = 840mA through the collector/emitter junction.
Nonsense, it's not the transistor that decides the current through it (unless the designer is dumber than 2 lbs of silica sand).

When using a transistor as a switch, i.e. saturated, the transistor should be chosen with a higher current ability than the load demands. Using it as a current limiter would severely ruin the entire act.

You start with a known load, then you find a transistor that can handle at least a bit more than the load and then you go: load current/gain=base current.
That's how you make sure it works.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline VegaObscuraTopic starter

  • Robot Overlord
  • ****
  • Posts: 153
  • Helpful? 6
Re: Transistor Issues
« Reply #6 on: November 25, 2010, 02:00:45 AM »
Thanks so much.  I'll be attempting to make an H-bridge out of them tomorrow.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Transistor Issues
« Reply #7 on: November 25, 2010, 09:18:21 AM »
Hi,

Thanks so much.  I'll be attempting to make an H-bridge out of them tomorrow.
You're welcome and to save you the disappointment of wiping out a few transistors...
- Remember diodes to protect the transistors against the inductive kick back from the motor.
- Make sure the current surge when starting the motor as well as the locked rotor current is below what your transistors can safely handle. For short times, like the inrush, you may get away with 800mA, but it has to be quite a small motor to not draw at least 1A when stalled.

That said - if you burn a few transistors, consider it learning expenses   :)

Keeping a notebook handy (and using it) when experimenting will soon give you a valuable reference book, as valuable as any textbook on the subject.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline VegaObscuraTopic starter

  • Robot Overlord
  • ****
  • Posts: 153
  • Helpful? 6
Re: Transistor Issues
« Reply #8 on: November 25, 2010, 04:09:08 PM »
I checked the stall current and it peaks at barely over 1 amp - not good.  There are 2 ways I'm hoping I can use to fix this.  If I apply just 4mA to the base then there should be no more than 4*120 = 480mA to pass through the collector-emitter junction, right?  I know this would make the motors run weaker but it should keep everything from burning out right?

The second way I was thinking of is adding a resistor in series with each motor.  I want no more than 500mA going through, but there's currently around 1.04A at 5V at stall.  So I have a surplus of about 500mA that I need to resist.  So to bring that 1A down to 500mA I need a resistor that will bring the circuit resistance to 10ohms.  To verify, with the motor stalled the resistance is 5V/1A = 5Ohms.  So stall resistance without a resistor is 5ohms.  If I add 5 ohms in series, the circuit now has 10ohms at 5V.  5V/10 = 500mA.  Am I doing this right?

But here's the part I've always struggled to understand.  If I add a 5ohm resistor in series with the motor to bring its current down to a reasonable level, and the motor has 5ohms resistance itself, then the voltage drop would go from 5V across the motor to 2.5V across the resistor and 2.5V across the motor, right?  So now the motor is not only at half current, but also half voltage?  So it would only operate at 1/4 power?  Am I understanding this correctly?

If this is true, then my only real option is to use transistors with a higher current rating, right?  Then I would need to recalculate the resistance I need for the base pin.  But now I know all I have to do is use the formula:
(max amp rating/current gain) = current to apply to base
and
(V/current to apply to base) = resistor value

As for the diode, I can just put one rectifier diode (making sure its turned the right way, of course) on the emitter pin of each transistor, right?

Is there anything I overlooked?

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Transistor Issues
« Reply #9 on: November 26, 2010, 07:35:05 AM »
Hi,

If I apply just 4mA to the base then there should be no more than 4*120 = 480mA to pass through the collector-emitter junction, right?  I know this would make the motors run weaker but it should keep everything from burning out right?
It won't work. your transistors will have different gain and you shouldn't let the transistor work as a current limiter anyway. In the case of your 4401's, they'd die from the power they had to dissipate.
The only way to use them is to switch them, as they dissipate minimal power then ('cuse they're either off dissipating 0, or saturated having a low c-e voltage drop which multiplied by I_ce gives the dissipated power).


The second way I was thinking of is adding a resistor in series with each motor.  I want no more than 500mA going through, but there's currently around 1.04A at 5V at stall.  So I have a surplus of about 500mA that I need to resist.  So to bring that 1A down to 500mA I need a resistor that will bring the circuit resistance to 10ohms.  To verify, with the motor stalled the resistance is 5V/1A = 5Ohms.  So stall resistance without a resistor is 5ohms.  If I add 5 ohms in series, the circuit now has 10ohms at 5V.  5V/10 = 500mA.  Am I doing this right?
It would have a very low efficiency, so I'd have to say no.


But here's the part I've always struggled to understand.  If I add a 5ohm resistor in series with the motor to bring its current down to a reasonable level, and the motor has 5ohms resistance itself, then the voltage drop would go from 5V across the motor to 2.5V across the resistor and 2.5V across the motor, right?  So now the motor is not only at half current, but also half voltage?  So it would only operate at 1/4 power?  Am I understanding this correctly?
Yes.


If this is true, then my only real option is to use transistors with a higher current rating, right?  Then I would need to recalculate the resistance I need for the base pin.  But now I know all I have to do is use the formula:
(max amp rating/current gain) = current to apply to base
and
(V/current to apply to base) = resistor value
Resistor is (V_supply - V_be)/I_be
You should really use PNP's for the topmost transistors of the bridge.

I am on my way out for a dinner date, but will draw you a schematic when I return.


As for the diode, I can just put one rectifier diode (making sure its turned the right way, of course) on the emitter pin of each transistor, right?
Yes (well, from collector to emitter).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Transistor Issues
« Reply #10 on: November 26, 2010, 09:39:38 PM »
Dinner done, diagram deployed...


(Click for full res.)

The controller used should act upon the SHUT_DOWN line, making sure both FORWARD and REVERSE are held low whenever SHUT_DOWN goes low(*1). At the controller side, a pull up resistor should be used, whether internal or external. This is your current limiter.

FORWARD must never become high when REVERSE is and v.v. (*2)
Speed control is by PWM to the active one of the two lines.

V+ can be 5V like the controller, but it could just as well be higher, up to 15V should be fine if R5, R6, R8 and R9 is changed to 1kOhm.

C can be whatever value you have (at least 10µF), with a voltage rating of 16V or better, 25V if you decide to go with a 15V supply, the larger the capacity value, the better the buffering of the battery voltage.

*1  Could be implemented in hardware, if you find it hard doing it in software.
*2  Ditto.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline VegaObscuraTopic starter

  • Robot Overlord
  • ****
  • Posts: 153
  • Helpful? 6
Re: Transistor Issues
« Reply #11 on: November 27, 2010, 12:17:20 AM »
I do hope you enjoyed your dinner.

What's the advantage of using PNP transistors for the top?  Why not simply have 4 NPN transistors, each with a resistor on its base, then connect the "forward" pin to the top left and bottom right transistors and the "backward" pin to the top right and bottom left, and use the same protective diode setup as the one in the schematic?
« Last Edit: November 27, 2010, 12:32:19 AM by VegaObscura »

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Transistor Issues
« Reply #12 on: November 27, 2010, 06:54:01 PM »
Hi,

I do hope you enjoyed your dinner.
Thanks, I did :)


What's the advantage of using PNP transistors for the top?  Why not simply have 4 NPN transistors, each with a resistor on its base, then connect the "forward" pin to the top left and bottom right transistors and the "backward" pin to the top right and bottom left, and use the same protective diode setup as the one in the schematic?
The emitter of an NPN transistor will always be around 0.7V lower than the base when open (i.e. with 5V, you'd have ~4.3V max. to the motor).
With PNP's the base have to be at least ~0.7V negative, relative to the emitter (which is at 5V).
So, it's about getting as much voltage as possible through to the motor.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

 


Get Your Ad Here

data_list