0
\$\begingroup\$

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:

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

\$\endgroup\$
2
  • \$\begingroup\$ Welcome to EE.SE. Please draw a schematic. \$\endgroup\$
    – winny
    Jun 18 at 13:19
  • \$\begingroup\$ 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. \$\endgroup\$
    – Gil
    Jun 18 at 22:42
4
\$\begingroup\$

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:

enter image description here

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.

\$\endgroup\$
4
  • \$\begingroup\$ If this is the only transistor the asker has on hand, a Darlington pair would overcome the problem, though. \$\endgroup\$
    – Hearth
    Jun 18 at 13:25
  • \$\begingroup\$ @Hearth It adds a new problem of the high voltage drop though- more than one Vbe, so likely in the 1V range. \$\endgroup\$ Jun 18 at 13:27
  • \$\begingroup\$ 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. \$\endgroup\$
    – Hearth
    Jun 18 at 13:31
  • 2
    \$\begingroup\$ @Hearth Seems quite a shame to waste a low-hFE but high-voltage (160Vceo) transistor on a high-hFE but low voltage application. \$\endgroup\$ Jun 18 at 13:33
3
\$\begingroup\$

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

schematic

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.

\$\endgroup\$
-1
\$\begingroup\$

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.

\$\endgroup\$
5
  • 1
    \$\begingroup\$ No. The B-E junction has nothing to do directly with Vce(sat). \$\endgroup\$ Jun 18 at 13:23
  • \$\begingroup\$ @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. \$\endgroup\$
    – Hearth
    Jun 18 at 13:24
  • \$\begingroup\$ @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. \$\endgroup\$ Jun 18 at 13:31
  • \$\begingroup\$ @SpehroPefhany I'm not familiar with the pinout of the raspberry pi. \$\endgroup\$
    – Hearth
    Jun 18 at 13:32
  • \$\begingroup\$ I founded that when fan is disconnected voltage on the diode is 5V, but when I connect It voltage is only 3V \$\endgroup\$
    – Д Т
    Jun 18 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.