I have an old 3 wire computer DC fan. Just for fun and learning sake I am trying to build a speed control circuit and corresponding software.
I already wrote some code to measure the RPM from the sense pin and that works fine. My next goal is to have an RPM setpoint in Arduino code and I want to be able to control the fan speed via software to continually adjust it and make sure the measure equals the set point.
At first my goal was to just use a fake PID approach but eventually I want to implement a true PID loop.
Can I use a mosfet to control the fan speed? And do I want to smooth out the Arduino PWM (with low pass filter) into a voltage before feeding it into the gate or do I want to feed straight PWM signal into the mosfet gate?