selecting resistor values for transistors

I see that in circuit schematics, transistors often have resistors attatched to the base lead.

I recently discovered why (I sizzled one in a test circuit without a resistor, no Arduinos were hurt).

So the question is how to select the proper value for a resistor that is connected in this way? (another question is how to select the proper transistor for a given load and signal)

Thanks in advance.

no Arduinos were hurt

Don't put money on it. Your arduino was damaged although it might still be functioning for now.

Base resistors are not critical. You need to supply the base with the current you want to flow from the collector to the emitter divided by the gain of the transistor. Then you double that current for luck. Too much current is not normally an issue unless there is no limit. Normally use 1K to 10K.

Grumpy_Mike:

no Arduinos were hurt

Don't put money on it. Your arduino was damaged although it might still be functioning for now.

Base resistors are not critical. You need to supply the base with the current you want to flow from the collector to the emitter divided by the gain of the transistor. Then you double that current for luck. Too much current is not normally an issue unless there is no limit. Normally use 1K to 10K.

  1. I would put money on it, because the Arduino was in another room, and not connected to the circuit in any way. :stuck_out_tongue:
  2. So what you are saying is that it isn't an exact science, and that there's a lot of play in the numbers... (up to the maximum for the transistor)
  3. Do transistors also have a voltage gain, as well as a current gain? (this is unrelated, but because voltage is the main factor in motor speed?)
  4. I'll probably be using these for the future: http://www.radioshack.com/product/index.jsp?productId=2062586#pr-header-2062586 (mostly because they're cheap-ish), If anybody has better options, tell me.

It can be an exact science.

Arduino Vout 5V.
Vbe of transistor 0.7V
desired current 20mA

(5V - 0.7V)/.02A = 215 ohm

Vout can be as low as 4.3V at higher loads
Vbe can different.
Put in your numbers, do the math.

CrossRoads:
It can be an exact science.

Arduino Vout 5V.
Vbe of transistor 0.7V
desired current 20mA

(5V - 0.7V)/.02A = 215 ohm

Vout can be as low as 4.3V at higher loads
Vbe can different.
Put in your numbers, do the math.

so, i.e. same math as for LED & resistor?

Yes.

Do transistors also have a voltage gain, as well as a current gain?

Yes the gain of a transistor can be expressed as either a current gain or voltage gain depending on how configure the circuit and do the maths.

( because voltage is the main factor in motor speed?)

No the main factor in motor speed is current. Remember you need a voltage to push a current through a circuit but it is only when current goes through a winding is a magnetic field generated and the motor moves. A winding is inductive and so there is a phase lag between current and voltage.

I'll probably be using these for the future: .......

No get a real transistor, one with a manufacturers part number, that way you can look at the data sheet and see what you have. That transistor has no real data associated with it.

Grumpy_Mike:
No get a real transistor, one with a manufacturers part number, that way you can look at the data sheet and see what you have. That transistor has no real data associated with it.

All the datasheets are online, part numbers are listed as:
five 2n2222 transistors
five 2n4401 transistors
five 2n3904 transistors

I don't know about you, but I can find dozens of datasheets online for them, and if that's not "real data", then tell me what is...

If that is indeed what you get then that is fine. From the link you gave I did not get that information that those parts were what was for sale.

Grumpy_Mike:
If that is indeed what you get then that is fine. From the link you gave I did not get that information that those parts were what was for sale.

I would appreciate if you would actually read the pages that are linked to, Thanks.

That information is listed 5 times on the page.

I would appreciate if you would actually read the pages that are linked to

I did several times. But I did not gleen that information from it.

thepenguin:
4. I'll probably be using these for the future: http://www.radioshack.com/product/index.jsp?productId=2062586#pr-header-2062586 (mostly because they're cheap-ish), If anybody has better options, tell me.

Those are actually fairly expensive. Unless you need them "now" and can get them from your local radio shack (even then - they are still fairly expensive)...

Check your local area for electronic parts surplus and/or recyclers. If you're in a big enough city, you might get lucky. If you are anywhere near LA, NYC, Bay Area, Los Alamos, Chicago or Phoenix - you'll be in real luck!

Otherwise - check online. I like to shop at these places:

http://www.allelectronics.com/

http://www.goldmine-elec-products.com/

If you want a real "treat" (and perhaps a mess on your hands as well) - purchase one of these from that second link:

http://www.goldmine-elec-products.com/prodinfo.asp?number=G9321

...for just a few bucks more than that Radio Shack "bargain", you'll have all the small transistors you could ever want. And resistors, and caps, and a bunch of other doohickeys and whatnot! They also sell a smaller box, if that's too much...

Take a look through all of those sites - and drool over the possibilities!

Finally - if you can afford the wait - shopping chinese suppliers via Ebay for electronic components can save you a lot of money as well...

cr0sh:
Those are actually fairly expensive. Unless you need them "now" and can get them from your local radio shack (even then - they are still fairly expensive)...

Check your local area for electronic parts surplus and/or recyclers. If you're in a big enough city, you might get lucky. If you are anywhere near LA, NYC, Bay Area, Los Alamos, Chicago or Phoenix - you'll be in real luck!

Otherwise - check online. I like to shop at these places:
http://www.allelectronics.com/
http://www.goldmine-elec-products.com/
http://www.alltronics.com/

If you want a real "treat" (and perhaps a mess on your hands as well) - purchase one of these from that second link:

http://www.goldmine-elec-products.com/prodinfo.asp?number=G9321

...for just a few bucks more than that Radio Shack "bargain", you'll have all the small transistors you could ever want. And resistors, and caps, and a bunch of other doohickeys and whatnot! They also sell a smaller box, if that's too much...

Take a look through all of those sites - and drool over the possibilities!

Finally - if you can afford the wait - shopping chinese suppliers via Ebay for electronic components can save you a lot of money as well...

I know that radioshack is absurdly expensive compared to other options, but when you consider that you can get components NOW, and also that they don't raise hell over returns is nice (and worth a few bucks compared to the chinese versions that aren't returnable).

Also, there's no recyclers/surplus things out here in the middle of nowhere...

I will check these other sites (though in the case of the variety pack, I'd prefer to know what I'm buying than to just randomly hope that I get something after checking far too many data sheets).

Although there are some parts that radioshack has marked as 'web only', so I don't see any reason to use them for these parts rather than another vendor who is cheaper.

Where is "here in the middle of nowhere"?

Well, that's hardly the middle of nowhere. FedEx/UPS can all deliver overnight from digikey or mouser.
Why pay extra for crap from RS when you can get the right stuff the next day.

Wish this mob were in Oz
http://www.goldmine-elec-products.com/prodinfo.asp?number=G9321

Adrian

I hate digging thru a box of junk trying to find the right part to fill a need.
Bet 90% or more of that stuff never gets used.

For 3 bucks and you need them now, go for it...

for 1.95 you can get 50 npn 2n2222 transistors including free shipping!

cjdelphi:
For 3 bucks and you need them now, go for it...
for 1.95 you can get 50 npn 2n2222 transistors including free shipping!

If you only need 4, 50 is overkill.

CrossRoads:
Well, that's hardly the middle of nowhere. FedEx/UPS can all deliver overnight from digikey or mouser.
Why pay extra for crap from RS when you can get the right stuff the next day.

I don't like the phrase "crap", but I like to endorse physical locations (that, by the way, happen to have the "right stuff"...)

If you only need 4, 50 is overkill.

No if you are going to do anything in electronics other than this one project then 50 is fine. You might take a year or two to finish them off but then you will always have them on hand.
I always get at least one more of anything that I order to "have in", this cuts down on the postage you have to pay each time when you buy in penny numbers.