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.
Suspected IR emitter for the PixMob units, mounted on a lighting tower (marked here in white). PixMob hardware has been known to change over time. This version has two RGB LEDs (an earlier version ...