Read the statement by Michael Teeuw here.
A fan script for a beginner
-
Sorry that was a wrong picture. I have changed the picture now.
So when I connect the fan to PIN 1 and PIN 3, the fan runs.
That means for me that the fan works with 5V.
Do not I have to connect the yellow wire to a GPIO PIN to get the signal from there to turn the fan on and off?
-
https://hackernoon.com/how-to-control-a-fan-to-cool-the-cpu-of-your-raspberrypi-3313b6e7f92c
I use this.
It works fine, even wit a Google AIY Hat on top of the RPI.
I hope it works for you too.
Peter -
@peter so, you made a transistor based relay… cool…
but that doesn’t help his speed control question…
-
@cyrus1337 the specs do not say how the yellow wire is used to control the fan.
-
Maybe you misunderstand me. I just want to turn on the fan and turn it off when the CPU has more than 50 °. I have 3 wires on my fan as shown above.
-
That is exactly what I told you before.
Read the article and you will see how to connect the 3 wires.
And you can change the temperature of the fan to start.
My fan starts at 65 and runs for 30 seconds to cool the cpu.
Peter -
Thanks, I want to try it