3

I want to (de)activate a fan, which is connected to the pins 4 and 6, depending on the temperature of the CPU.

Is it possible to (de)activate Pin 4 (or Pin 2) at the Raspberry Pi 4 via python? I have already read this article: How to turn power off on 5V dc gpio pin with python, but is there another way just via python, without using a transistor?

3
  • 1
    This question has been asked dozens of times. You could write a program, but there is no need. The kernel has inbuilt fan control raspberrypi.stackexchange.com/a/105820/8697 Commented May 25, 2020 at 0:51
  • Does this answer your question? How to turn power off on 5V dc gpio pin with python Commented May 25, 2020 at 3:32
  • I've already read this post, but I just wanted to assure myself. Thanks for the upper link! Commented May 25, 2020 at 12:03

1 Answer 1

5

No.

Pin 6 is connected to the Pi's ground rail.

Pins 2 and 4 are connected to the Pi's 5V rail.

5
  • So the real only possibility is to interrupt the power circuit? Commented May 24, 2020 at 20:02
  • @Meiki Yes, with a switch, e.g. manual switch, relay, transistor etc. Commented May 24, 2020 at 20:13
  • But is it possible to control the transistor via python, e.g. via using a GPIO-pin? Commented May 24, 2020 at 20:16
  • 1
    Yes. Plenty of answers showing how. Commented May 24, 2020 at 20:19
  • 1
    This other question in this forum provides more information. raspberrypi.stackexchange.com/questions/95710/… Commented May 24, 2020 at 23:49

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.