Fan Speed Measurement using IR Sensor & Arduino

Fan Speed Measurement using IR Sensor & Arduino (Last Updated On: February 5, 2019)

Fan Speed Measurement using IR Sensor & Arduino:

In this project we have designed Digital Tachometer using IR Sensor with Arduino for measuring the number of rotations of rotating fan in RPM. Simply we have interfaced IR sensor module with Arduino and 16*2 LCD module for display. The IR sensor module consists of IR Transmitter & Receiver in a single pair that can work a Digital Tachometer. So lets learn about Fan Speed Measurement using IR Sensor & Arduino.

Tachometer is a RPM counter which counts the no. of rotation per minute. There are two types of tachometer one mechanical and other one is digital. Here we are going to design an Arduino based digital tachometer using IR sensor module to detect object for count rotation of any rotating body. As IR transmits IR rays which reflect back to IR receiver and then IR Module generates an output or pulse which is detected by the arduino controller when we press start button. It counts continuously for 5 seconds.

Components Required

For designing Fan Speed Measurement Circuit using IR Sensor & Arduino we need the following components:

1. Arduino UNO Board (Buy Online From Amazon)
2. 16*2 LCD (Buy Online From Amazon)
3. IR Sensor module (Buy Online From Amazon)
4. Breadboard
5. Connecting Jumper Wires

Circuit Diagram

Circuit Diagram Fan Speed Measurement using IR Sensor & Arduino

IR Sensor Module


An infrared sensor is an electronic instrument which is used to sense certain characteristics of its surroundings by either emitting and/or detecting infrared radiation. Infrared sensors are also capable of measuring the heat being emitted by an object and detecting motion.

The wavelength region which ranges from 0.75 to 3µm is known as the near infrared regions. The region between 3 and 6µm is known as the mid-infrared and infrared radiation which has a wavelength greater higher than 6µm is known as far infrared.

An IR sensor consists of an IR LED and an IR Photodiode; together they are called as Photo–Coupler or Opto–Coupler. As said before,the Infrared Obstacle Sensor has builtin IR transmitter and IR receiver.Infrared Transmitter is a light emitting diode (LED) which emits infrared radiations. Hence, they are called IR LED’s. Even though an IR LED looks like a normal LED, the radiation emitted by it is invisible to the human eye. Infrared receivers are also called as infrared sensors as they detect the radiation from an IR transmitter. IR receivers come in the form of photodiodes and phototransistors. Infrared Photodiodes are different from normal photo diodes as they detect only infrared radiation. When the IR transmitter emits radiation, it reaches the object and some of the radiation reflects back to the IR receiver. Based on the intensity of the reception by the IR receiver, the output of the sensor is defined.


1. Operating Voltage: 3.0V – 5.0V
2. Detection range: 2cm – 30cm (Adjustable using potentiometer)
3. Current Consumption:at 3.3V : ~23 mA,at 5.0V: ~43 mA
4. Active output level: Outputs Low logic level when obstacle is detected
5. On board Obstacle Detection LED indicator

Source Code/Program:

LiquidCrystal lcd(12,11,10,9,8,7);
float value=0;
float rev=0;
int rpm;
int oldtime=0;
int time;

void isr() //interrupt service routine

void setup()
lcd.begin(16,2); //initialize LCD
attachInterrupt(0,isr,RISING); //attaching the interrupt

void loop()
detachInterrupt(0); //detaches the interrupt
time=millis()-oldtime; //finds the time
rpm=(rev/time)*60000*3; //calculates rpm for blades
oldtime=millis(); //saves the current time
lcd.print( rpm);
lcd.print(" RPM");
lcd.print(" ");

Video Tutorial:

Recommended For You

Ask A Question .......