On the internet, I found this plan to install and control a fan:

Image from https://www.raspberrypi.org/forums/viewtopic.php?t=305481

I wondered whether one needs protection against inrush current since I heard a fan might draw quite some current when it is starting up. If so, what would be the best option (NTC, current regulation diode,...)?

2 Answers 2


Welcome Manuel, Probably not, the inrush will be dissipated by the transistor. The amount of inrush depends on the motor. I see you did the right thing and added a flyback diode to protect the transistor. You did not state the electrical parameters for the motor so I am assuming you sized everything and are OK with the transistor. The data sheet shows the transistor is rated at 800mA and 40V, probably more then enough. Some motors have suppression built in, in this case I do not know. I would recommend not connecting the fan to the 5V pin, that trace runs on the board and may couple noise into other components.

Lets give it a try: When a motor starts it draws a lot of current, this “maximum, instantaneous input current” is called Inrush Current. As the motor builds RPM it generates back EMF which reduces the current required from the power source. In DC motor (actually all motors) inrush is important to know in order to select an adequate switching device, in your case the 2N2222 transistor. This inrush current if maintained such as a locked rotor will damage the motor. When the motor is switched off it generates what is called a back EMF which is the inductive windings discharging. When the DC is switched off the windings (inductors) will reverse polarity and discharge the magnetic field, if a flywheel is on the motor that much more current will need to be dissipated. Your diode adsorbes this discharge current and protects the transistor. The voltage will rise until the magnetic field is used up. The extra current is dissipated along with the normal current in the transistor as heat. The forward voltage drop (typically abug 0.7 volts for a silicon junction times the current will give you the wattage. That is the secret of switch mode regulators.

enter image description here

  • 2
    RE: inrush will be dissipated by the transistor. I'm not familiar with this - could you explain, or provide a reference?
    – Seamus
    Commented Aug 13, 2021 at 19:05

I applaud your concern, but no - you don't need inrush protection for a cooling fan for a Raspberry Pi. These are typically dc motors using "brushes", which have a well-known & well-behaved relationship between torque and current. The mass of the fan rotor and blades is very low in these tiny fans, and therefore the "inrush" current is also very low.

The current-regulating diode is an interesting idea. I'd encourage you to experiment with that & share what you learn. In the meantime, the schematic you've provided will work fine.

I'll also mention a device tree overlay that might be of interest if you're using the fan to cool the RPi's SoC.

  • 1
    What is a "current-regulating diode" in this context? Commented Aug 13, 2021 at 21:13
  • 2
    @KevinJWalters A current regulating diode also known as current-limiting diode is a device that is supposed to limit the current to a specified maximum value. It is not a diode in the general use of that term. It is a JFET + a resistor. Commented Aug 13, 2021 at 22:55
  • @KevinJWalters: All you wanted to know about current limit diodes
    – Seamus
    Commented Aug 14, 2021 at 4:43
  • Aren't pretty much all cooling fans brushless? But even more so, in that case the fan's own control electronics limit the current.
    – jpa
    Commented Aug 14, 2021 at 7:10
  • @jpa: Good question! It doesn't change the subject issue of inrush current, but if it's a brushless fan, the explanation is probably different. According to this article, all PC fans are brushless. Maybe so, but I've long felt that fans used in RPi "cooling kits" are brush-type because they are cheaper to manufacture than brushless fans. Also, most brushless fans used in PCs have 3 or 4 wire leads to allow the fan speed to be controlled externally. The only speed control you have with a two wire fan is the dc voltage applied.
    – Seamus
    Commented Aug 14, 2021 at 7:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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