OK so I am looking for a transistor capable of running a 12v 0.10a fan from an external power source, powered by the Arduino. I have a mixture of transistors but don’t know if any are able to cope with the 12v/0.10a being carried through them. I have looked up the datasheets for a few of them but do not understand which bit it is that I am suppose to be checking, e.g. Collector-Emitter Voltage, Collector-Base Voltage or Emitter-Base Voltage?
Any help would be greatly appreciated, thanks!
OK, a few things to know is what to look for in a transistor. The transistor has to carry at least 0.1 amperes, so you look for Ic to be at least 0.1 amperes (or more - usually at least 2 to 5 times more.
When the transistor it turned off, there will be a voltage between the collector and emitter (called Vceo). Of course, Vceo will be 12 volts, so you look for a spec higher than that.
Next thing is current gain. You want the transistor to be fully turned on by the Arduino output pin while not exceeding the specs of the ATMEGA chip for output current. So, let’s choose a conservative number… say 5 milliamps. That is, I want the Arduino pin to have to put out no more than 0.005 amperes to turn the fan on.
The fan needs 100 milliamps, and we want to control that with 5 milliamps, so the current gain (Hfe) has to be at least 100 / 5 or 20.
So, now let’s pick a common switching transistor (the 2N2222) and look at the data sheet.
Vceo = 40 volts (more than enough - need 12 minimum)
Ic = 1.0A (more than enough - need only 0.1)
Hfe = 100 minimum (5 times better than we need)
So, it looks like the 2N2222 will do the job. Now, look at the circuit diagram attached.
We need to figure out one more thing… what resistor to use. The Arduino is going to put out 5.0 volts when the pin is turned on.
From the transistor data sheet, we see that the Base/Emitter saturation voltage Vbe(sat) is 1.2 volts. This spec is with a base current of 15 milliamps. We won’t be pushing it that hard (we are only looking for 5 milliamps), so we can guesstimate that the voltage will be about 1.0 volts. So, what drops across the resistor is 5.0 volts from the port minus 1.0 volts across the base-emitter junction or 4.0 volts.
Use Ohms law: R = 4 / 0.005, R = 800 ohms. Since it’s not critical, we’ll pick a standard value close to 800 ohms… how about 1000 ohms (1K)?
So the base resistor is a 1K, the transistor is a 2N2222 and the circuit is as you see in the diagram. Hope this helps.
(edit to add): Obviously, the Arduino goes in place of the “5 volt battery” in the diagram.