I have a 3-wire 12v DC fan (Sanyo Denki 9S1212M4011). It's actually getting 15V because my "12V" wall wart isn't accurate.
When the fan is not running my multimeter tells me there is 14V on the yellow sensor wire. When the fan is running the sensor presents approx 1.7V. I don't have a oscilloscope, but I guess this represents 3.3V at a 50% duty cycle as generated by the sensor.
I'm successfully measuring the fan speed with a Raspberry Pi. I connect the sensor to a GPIO pin, pull it high, and then run a little C code to count each time the pin is pulled low by the fan sensor.
My problem is that I have to connect the sensor directly to the GPIO to be able to read the speed. This feels very wrong because when the fan is not running there are 14V on the pin. I tried using a voltage divider so that the pin never sees more than 3.3V, but when I do that the GPIO never gets pulled high.
So I haven't blown the pin yet on Pi, but I half expect that I will. What's the right way to connect the sensor to the Pi?
Sadly my Pi is now dead! There's no power - the red LED doesn't even come on. The configuration was as described above and nothing unusual happened - I just came home to find it dead. I assume it is related to the 14V on the pin, but I don't know what lesson to learn from this. Bummer!