caoc10 wrote:First of all thanks for your answers.
After overclock the raspberry I've noticed that the fan isn't needed but once that I have it why not to put it in use and learn something new!
In the base I have a 6.8k resistor.
I know that my transistor has an Ic value to low for my fan, but the problem is that I can't understand almost anything on the datasheets, so I can't pick up the right transistor.
It would help a lot if you can give me a transistor model that is perfect to the situation once that I just can't figure it out!
If you also know any good tutorials to learn something about this I would appreciate it!
Thank you all!
Ok, don't worry about the Ic limit. Your transistor might get warm.
The simplest way to think about a transistor is a current multiplier. Current in the base is multiplied to current in the collector. The multiplier (or gain
) is known as hfe. You can find it on the transistor datasheet, but you can use a value of 100 for estimating the result.
So, if you want 200mA through the collector you need 200/hfe mA in the base, which is 200/100 = 2mA.
Assume your base is at a voltage of 3.3V because the GPIO is high. The current through the base resistor can be calculated with Ohm's law as Ib=(Vb-0.6)/Rb. We subtract 0.6V because there is a small voltage drop across the base-emitter junction (it's about one diode-drop...). So, your base current is
Ib=(3.3-0.6)/6.8k = 0.4mA
It's too low.
If you use a smaller resistor, the base current will be higher, so the collector current will be even higher. But, you shouldn't draw more than about 13mA from the GPIO or you will damage it.
The typical value for a base resistor for a transistor switch is 1k, because everyone has one in their junk box. Try one and see if it works. If the fan is still slow, try something smaller like 680R.