Fan speed monitor

Aim

I needed to measure the speed of a fan and the non-contact tachometer products I had found were very expensive for the occasional need I have so decided to make my own.

The meter needs to measure fan speeds up to 3000 rpm.

Components

Method

The reflectance sensor has an analogue output that can be sampled by one of the mbed's analogue inputs. The more light that is reflected the higher the output voltage. It is particularly suited to measuring fan speeds as the blades are black and so it is easy to detect differences.

The first step is to put a dot of TipEx on the tip of one of the fan blades if the fan under test. The reflectance sensor will detect this white dot and the output will go high, effectively creating a periodic voltage pulse. The program on the mbed will measure the amount of time between consecutive pulses and so calculate the RPM of the fan.

The code uses a timer to measure the time between consecutive high pulses and stores the readings in an array up to a predefined size. Once the array is full the average time is calculated and this is then converted into RPM.

Due to the sample speed of the mbed more than one sample will occur across the white spot of TipEx - it is important not to reset the timer and take a reading each time this happens so a flag is set in the code called "newDetection". This flag makes sure that once the white dot is detected the timer will not be reset and read until the dot has passed and the reflectance sensor has returned to the low output voltage state caused by the black fan blades.

The average of this s then printed to a terminal screen on a computer, but an LCD display would work equally well.

Import programRPMMonitor

Mbed Fan RPM/Speed meter using QTR-1A Reflectance Sensor

Tip

Setting this up in a large, dark box improves the accuracy.


Please log in to post comments.