1

I'm a new Raspberry Pi 4 user. I have bought the Labists Kit which includes 3 heatsinks and a fan.

As far as I understand the fan is connected directly two the GPIO pins (see for example this video that I followed when assembling the kit at 1:49). The kit does not include transistors or other stuff.

When I connect the Pi to the main's the fan starts spinning... all the time. Even when the Pi is shutdown.

Is there a way to control the fan status based on whether the temperature is above a certain degree?

I have found a couple similar questions, for example this one,that suggest using something like gpiozero Python library to turn the pins on or off... in most examples they use gpio number 18, however I already tried to turn off all pins <= 32 and nothing seems to happen, the fan is always on.

Is there a way to control fan use with the kit provided by Labists without having to solder some transistor or other stuff in the Pi?


Note that the average temperature of the Cpu is something like 32-33 °C so it certainly doesn't need the fan right now. I don't plan to use the Pi for cpu-intesive stuff, so I might simply remove the fan if there is no simple solution.

Bakuriu
  • 111
  • 1
  • 4

2 Answers2

3

The fan is not connected to a GPIO. The GPIO can not supply enough current to power a fan (they can supply perhaps 20 milliamps at 3.3 volts).

If you attempt to power a fan (or any inductive load such as a DC motor) from the GPIO you will likely destroy the GPIO and the Pi.

The video shows that the fan is connected to a 5V pin and a ground pin on the expansion header. They are NOT GPIO. They are part of the voltage supply rail.

https://pinout.xyz/

Power is always present on the 5V rail while the Pi is switched on.

If you want to switch the fan on and off you will need to add additional circuitry (such as transistor and diode) to control the fan power via a GPIO.

joan
  • 67,803
  • 5
  • 67
  • 102
  • thanks a lot. Believe it or not but for an electronics noob like me this was not obvious. I understand now I have to cope with the **loudy** fan shipped with the Labists starter pack. – vc 74 Mar 05 '20 at 18:35
  • You can plug a 5v fan on 3.3v pin (pin 1 or pin 17), still working but at lower speed. Reduce a bit cooling effect but less noisy. – Camille Jan 27 '21 at 16:10
2

I know nothing about this kit, but the following is an example of how to control a fan only when needed. https://raspberrypi.stackexchange.com/a/105820/8697

There is no way to control a fan without additional circuitry.

Milliways
  • 54,718
  • 26
  • 92
  • 182