Problem reading RPM when using PWM on 4-pin fan

Hi all,

The Problem:
The problem I have is that when when I try to read a 4-pin fans RPM speed it only works when I am not trying to control it via PWM. Otherwise it gives a false (much higher) speed.

I have been searching for an answer to my problem, but I haven't found anyone with the same issue that has been answered.

I have been making a fan controller using an Arduino Nano, an Artic F12 PWM 4-pin fan as well as a 1-wire temperatue sensor and a HD44780 LCD for a display.

I am using PWM library to run the fans at 25khz and that seems to work great. -

I am using a 10k pull up to read the RPM and when the PWM is not being used then it reads correctly at 1250rpm, but when the PWM line is used the value goes crazy.

Many thanks for any advice you can give,


So you have connected the fan to a 12volt supply, and shared ground with the Nano.
And you drive the PWM pin of the fan with a PWM pin of the Nano.
And have connected the tach pin of the fan to a digital input of the Nano, with a 10k resistor to 5volt.

How do you measure RPM.
Post your code (inside code tags).


We also need a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks... Tom.. :slight_smile:


Thanks for the replies. I have actually managed to fix it...but I am not sure why it does...

I was able to setup my kit based oscilloscope to monitor the RPM reading and I could see a nice square wave that was changing based on the PWM value.

Plus while the oscilloscope was connected in parallel, the Arduino could read the value properly! So I took the oscilloscope out and put a 1uf cap in it's place (connected between the input pin and ground) and it works.

I don't know enough to know why this works. If anyone can explain it like I am 5, that would be much appreciated.