2

I have a Raspberry Pi 4B and a fan. According to the instructions paper of the fan, it should be connected to

  • a ground and a 3.3V power

  • , or a ground and a 5V power.

So I've used the former setup which uses pins 1 and 6 as marked red in the image below and it's working without any problems for months.

The problem is that generally it is impossible to control power pins using a software. But I'd like to turn on or off the fan according to the cpu temperature. According to the documentation, GPIO output is 3.3V or 0V, so it seems the number of voltages are same as the 3.3V power pin.

Questions:

  1. Is it possible and safe to drive the fan using GPIO pins?

  2. If possible, which pins can I use?

Since I'm a very beginner of GPIO and electronics, I'm sorry if the question doesn't make sense.

enter image description here

(The image above is an edited version of a image found in the official documentation.)

ynn
  • 141
  • 1
  • 6
  • Perhaps helpful discussion: [Difference between GPIO and 3.3V pin](https://www.raspberrypi.org/forums/viewtopic.php?t=128529) – ynn Jun 01 '20 at 17:17

1 Answers1

3

No. You can not power a fan from a Pi GPIO.

A Pi GPIO can only supply about 16mA at 3V3 which is not enough to power a fan.

Additionally directly connecting a Pi GPIO to any inductive load (DC motor, relay coil etc.) can destroy the GPIO and the Pi.

joan
  • 67,803
  • 5
  • 67
  • 102
  • So there is no way to control the fan programmatically (as far as I stick to using the fan)? It's a little bit noisy since my room is very silent. – ynn Jun 01 '20 at 17:18
  • 1
    @ynn You need to use a switch to turn the power on/off for the fan. The switch can be controlled by a GPIO. E.g. a transistor is an electronic switch. – joan Jun 01 '20 at 17:21
  • Thanks to your hint, I found many articles explaining it. Thank you :) – ynn Jun 01 '20 at 17:39