Ever wonder how to calculate revolutions per minute using a microcontroller? This project shows you how by purposing an IR emitter and detector and a computer fan. As the fan blades spin they disrupt the beam of infrared light between the emitter and the receiver. This results in a waveform on the receiver’s circuit which can be easily used to trigger interrupts in any microcontroller. In this case a PIC 18F452 monitors the detector’s signals for a rising edge. By measuring time data between interrupts the period can be established and RPM calculated. You can see a video of the test rig after the break.
So what can you use this for? It’s the method that most spinning POV displays use to stabilize the display. You won’t be limited to an IR sensor, but can use a hall effect sensor in the same basic fashion.
[via Hacked Gadgets]