# The transistor does not amplify the current enough

I have a raspberry and a fan for it. But fan is noisy and I want to start it only when CPU temperature is about some value.

Fan needs 300mA and 5V.

I use this scheme:

I use a 2N5551L transistor. Its current gain is 80. When I apply a voltage to the blue wire, the current on the base is 2.7mA, but the fan gets about 50mA, when he should get at least 2.7 * 80 = 216 mA. I used 1K resistor, but I was trying to use a 100 Om resistor, but current on the fun still was too small. I don't want to try smaller resistanse, because the current on raspberry GPIO will be too big. Do you know how to fix it?

Later I want to control fan speed using PWM. Scheme will be similar, but I will replace slable 3.3V with hardware PWM. Will it work?

EDITED: I founded that when fan is disconnected, voltage on the diode is 5V, but when I connect It, voltage is only 3V

• Welcome to EE.SE. Please draw a schematic. Commented Jun 18, 2021 at 13:19
• The transistor is rated at 300mA continuous so you are at its max. When using it as a switch the Hfe does not have much effect. I generally use a gain of 10 for hard switching, 20 for soft switching. A MOSFET or darlington transistor would work better but realize with the darlington you will lose about 1.4V across the transistor instead of the 0.7 you now lose. This is just a guess as I do not read frizzys.
– Gil
Commented Jun 18, 2021 at 22:42

You need to read the datasheet carefully. The 2N5551 is not a very good choice for this. The minimum gain is indeed 80, but only at 10mA and with 5V Vce. You would prefer it have a few hundred mV Vce (well saturated) and the current should be around 300mA. Let's check the typical hFE curve:

Oops- depending on junction temperature, at 300mA we're looking at a typical (some units will be worse, some better) hFE of around 10, give or take. So you'd need to feed the base perhaps 100mA to get good saturation. Not practical.

You could use a beefier BJT or a MOSFET to do this. Something like a BC337 or 2N4401 with a fair bit of base current (maybe 15mA), or a tiny SOT23 MOSFET such as AO3400.

• If this is the only transistor the asker has on hand, a Darlington pair would overcome the problem, though. Commented Jun 18, 2021 at 13:25
• @Hearth It adds a new problem of the high voltage drop though- more than one Vbe, so likely in the 1V range. Commented Jun 18, 2021 at 13:27
• The fan may work well enough on 4~4.2 volts; I don't have any way to know. The obvious answer would be a MOSFET or a better BJT, of course, as you note; I just remember my hobbyist days of trying to make do with the transistors I had. Commented Jun 18, 2021 at 13:31
• @Hearth Seems quite a shame to waste a low-hFE but high-voltage (160Vceo) transistor on a high-hFE but low voltage application. Commented Jun 18, 2021 at 13:33

Using a schematics is much more practical than a wiring diagram:

simulate this circuit – Schematic created using CircuitLab

I don't see anything strange with your design But I don't know which 2N5551L you are using. Some models of that transistor have the pin swapped. That might explain your strange behavior.

The fan needs 5V, but you only offer it 4.3V. Why? Because the bipolar transistor BE diode steals away 0.7V.

Check what current the fan draws when connected to a 4.3V bench supply.

• No. The B-E junction has nothing to do directly with Vce(sat). Commented Jun 18, 2021 at 13:23
• @SpehroPefhany I was about to comment this myself, but with the caveat that depending on the pinout, this may be an emitter follower, which would drop the voltage by Vbe. Another answer notes that some manufacturers have different pinouts on this transistor. Commented Jun 18, 2021 at 13:24
• @Hearth If the wiring diagram and transistor type (NPN) are correct, I don't see how you get a working emitter follower out of that. Commented Jun 18, 2021 at 13:31
• @SpehroPefhany I'm not familiar with the pinout of the raspberry pi. Commented Jun 18, 2021 at 13:32
• I founded that when fan is disconnected voltage on the diode is 5V, but when I connect It voltage is only 3V
– Д Т
Commented Jun 18, 2021 at 13:37