Page 1 of 1

Computer Fan Sensor Wire

Posted: Wed Jul 18, 2018 8:18 pm
by jmmarino
I have a kegerator that I have successfully managed to setup temperature monitoring using 3 temperature probes one in the fridge, one in the tap tower and one outside to monitor the room temp. I also have grafana installed on the pi that graph the temp over time and will send out email alerts when the fridge gets either to warm or too cold. I have 2 80 mm computer fans hooked up 1 to circulate the air and the other as a tower cooler. They both have 3 wires. The yellow wire is currently not hooked up. Its my understanding that this yellow wire is used to determine fan state. My question is can I hook those yellow wires to the raspberry pi to tell if the fan is running. They are already running hooked up to a separate power supply so I am only concerned with the yellow wire. I know because these are 12v fans I can't just hook it up strait to the gpio. Could I drop the power down using a series of resistors perhaps 3.6 kΩ and 9.1 kΩ? I believe its called a voltage divider.

Re: Computer Fan Sensor Wire

Posted: Thu Jul 19, 2018 3:53 pm
by pfletch101
There are two issues.
The fan sensor wire probably outputs two 12V pulses for every rotation of the fan, and you certainly do need to condition that to something that can safely be fed to a GPIO pin - a resistor voltage divider circuit should work for that, though I might be inclined to add an appropriate Zener diode in parallel with the lower arm of the divider to protect against spikes.
The second is that of determining whether the fan is running. If this is all you want to know (the fan is either running or it isn't), it shouldn't take a great deal of effort to look at a GPIO input line every so often to see if it is being triggered.