I sometimes wanted a stand alone device that is capable of measuring or testing CPU Cooler Fans independent of the computer. And here it is, a PIC16F627 based CPU Cooler Fan Speed Tester. The speed is displayed on 4 units of 7 segment display as shown.
To measure the speed of the fan, is a simple matter of calculating the pulses sent to the PIC via the Tachometric pulse pin on the fan. In fact, the computer also measures the speed of the fan in the same manner. A pull-up resistor is used to tie the Tachometric pulse pin to 5V in order to generate 5V pulses. The TMR0 and TMR1 is utilized together to capture the pulses and the elapsed time. For instance, by capturing the amount of pulses within the period of 1 second would yield the frequency at which the fan spins, e.g. 60Hz. To convert to RPM it is a simple matter of multiplying the frequency in Hz by 60, which in this case yields 3600 RPM.
Since there is quite a few 7 segments displays, there will be one hell of wiring to do if all segments were to be controlled simultaneously. Therefore to minimize the amount of wiring and current consumption, a switching method is used. By using individual transistor to switch on/off each segment, the PIC will display one number at the time on the seven segment displays. For this project, it will display the numbers from right to left. Logically speaking, it is a matter of the following. Let us say, the RPM measured is 4189 RPM, then the following happens,
Display 9 on the 1st segment from the right, then delay 20ms.
Display 8 on the 2st segment from the right, then delay 20ms.
Display 1 on the 3st segment from the right, then delay 20ms.
Display 4 on the 4st segment from the right, then delay 20ms.
Visit Here for more.