I am running a rpi 3b+, with Recommended Raspbian installed, and also with a Noctura NF-A4x10 5V, mounted on the lid, with vent holes, of the official rpi case. I will eventually turn this model into a game emulation center, but for now i am just using it to program an sd card for my rpi 3b model project of using ladder programming with a relay module. I have played around and and failed at achieving my goals, I usually try to avoid asking questions online ad search for the answers instead but for some reason I'm really struggling this time. For the purposes of being ready to try again I have reinstalled a fresh Raspbian and am now going to start on a separate sd card and keep trying.


Program the GPIO pins 4(5v) & 6(gnd), which my 5v Fan is plugged into, to firstly either delay or at a slower speed that default(100%?), and secondly have it run at a variable speed based on temperature of the rpi. Due to the rpi not having enough power at startup to power everything at once, which then I lose ethernet, usb or hdmi, which is only restored once I unplug the fan then plug it back in. The variable speed wasn't my original goal but now that I have stumbled into the possibility, I think that i should since it will prolong the fans life and I have read that with heat sinks the fan is unnecessary but I cant imagine other than my power issue that the fan can be a bad thing, plus I do plan to stress its emulating capabilities.


I have gone through what I could find online and all use mosfets, trasistors, etc, but my fan works perfectly now, and I believe that those electronic components are unnecessary, as long as it is possible to program specific instruction into the GPIO pins and also with my lack of experience with programming and Raspbian I struggle to understand provided coding (how to enter it, whether to enter it in python or cmd, if any parameters need to change before being enters, and how they need to change for my situation).

Partially Solved! I salvaged a electronic board that had my electrical components needed for a safe start up and shut down on the pi. The fan is long story short powered through the pi's USB port instead of the 5v rail. My fan has a third wire which is yellow and the manufacturer labels has a non pmw, rpm signal cable.

So what I am after now is code based off of gpio 18 (#12 pin), which the yellow wire is plugged into (the only wire on the gpio pins at all), but only once I learn what rpm signal's purpose is and whether or not I can just simple read its speed or control it.

What can I do with Noctua's rpm signal wire? What is the code for doing these such possibilities?

  • 2
    So what is the question? I also fail to understand your remark the fan works perfectly, when you state that you loose HDMI, USB or Ethernet at boot. For all but the smallest fans, the GPIO pin will be insufficient to provide enough power; the extra transistor etc. is in general used to get that extra power directly from the power supply, so your pi will start-up wit hdmi, usb and ethernet. Commented Mar 31, 2019 at 17:23
  • Ok so if it does come down to that i need these electronic components in order to keep my fan on the pins while starting up then thats what i will do. If I could learn how to program a delay or a slower speed at start up instead then I dont have to order, wait, install and fit this all into the pi case. Commented Apr 1, 2019 at 3:51
  • Do you have any coding suggestions? Commented Apr 2, 2019 at 0:35

1 Answer 1


Pins 4 and 6 are not GPIO. Pin 4 is connected to the 5V power rail. Pin 6 is connected to the ground rail. As long as the Pi is powered pin 4 has 5V.

As to the GPIO they are all switchable between 0V and 3V3. But bear in mind they can only supply a few milliamps (say 16) of current. That would not be enough to power a motor. Furthermore you should never connect a GPIO to a load such as a motor. The back EMF generated when the magnetic field collapses could destroy the GPIO and the Pi.

That's why people use transistors and motor driver boards. The Pi GPIO can control a transistor or motor driver board, which in turn can safely drive the load.

  • Its not the fan that has issues running, it is everything else, not at once just one of the functions randomly and only on start up. everything seems to run fine once it has started up, which I'm assuming is due to a high instant demand. Commented Apr 1, 2019 at 3:54
  • I can happily look into installing electronic components, but would like to avoid if possible, as well as still need python coding regardless. Commented Apr 1, 2019 at 3:55
  • Are you also implying that it is not possible to program the 5V pin through python? Commented Apr 1, 2019 at 4:00
  • @TomPaquette I thought my words re the 5V pin were clear. Which part are you having a problem with?
    – joan
    Commented Apr 1, 2019 at 7:13
  • They were clear, I just don't have enough understanding of all of this yet, but that why I'm doing it. Do you have any coding suggestions Joan? Commented Apr 2, 2019 at 0:34

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.