I want to read the rpm and control the speed of a 12V - four wire fan through Arduino. There are many articles describing the procedure, yet I have some questions.
Read Speed:
So, 12V and Gnd are connected to the who wires of the fan, and the third wire is connected to the Arduino's input pin through a pull-up resistor (internal or external), in order to read the pulses, thus the speed of the fan. I guess that it works like in the schematic below:
simulate this circuit – Schematic created using CircuitLab
If so, how much is the voltage that the input pin reads when the sensor switch is closed, 5V ορ 12V? I believe that it is 12V, but that would damage the board, right? Should I put something like an optocoupler between fan and input pin, in order to isolate them?
Control Speed
Just about the same question for controlling the speed. Can I stick the fourth wire of the fan to a PWM pin? Is it true that the PWM pole of the fan accepts max.5.0V? Just to be on the safe side, should I use a motor driver IC, like L293D?
Thank you