IOT

Digital Tachometer using IR Sensor with Arduino for measuring RPM

In this project, we created a digital tachometer that measures the number of rotations made by the revolving motor in RPM using an IR sensor and Arduino. The IR sensor module and 16*2 LCD module have simply been interfaced with Arduino. The IR sensor module is made up of an IR transmitter and receiver that may function as a digital tachometer to measure the speed of any rotating object.

The number of rotations per minute is counted using a tachometer, which is an RPM counter. There are two different kinds of tachometers: mechanical and digital. Here, we’ll construct a digital tachometer for Arduino that uses an IR sensor module to identify objects and track the rotation of any rotating body. When we push the start button, the Arduino controller detects the output or pulse generated by the IR module as it delivers IR rays that reflect back to the IR receiver. For five seconds, the count is continuous.

Components Required

  • Arduino UNO R3 Development Board
  • IR sensor Module
  • 16×2 LCD
  • Breadboard
  • 9-volt battery
  • Connecting wires

IR Sensor Module

An electrical device known as an infrared sensor uses infrared radiation to detect and/or emit specific features of its environment. Additionally to detecting motion, infrared sensors can measure the heat that an item emits.

The term “near-infrared area” refers to the wavelength range between 0.75 and 3 m. Mid-infrared radiation is that with a wavelength between 3 and 6 m, and far-infrared radiation is that with a wavelength higher than 6 m.

The two components of an IR sensor, an IR LED and an IR Photodiode, are collectively referred to as a Photo-Coupler or Opto-Coupler. The Infrared Obstacle Sensor features an integrated IR transmitter and receiver, as was previously mentioned. A light-emitting diode (LED) that produces infrared radiation is referred to as an infrared transmitter. They are hence known as IR LEDs. Although an IR LED appears to be a regular LED, the radiation it emits cannot be seen by the human eye. As they pick up the radiation from an IR transmitter, infrared receivers are also known as infrared sensors. Photodiodes and phototransistors are used as IR receivers. Because they exclusively pick up infrared light, infrared photodiodes are distinct from ordinary photodiodes. The IR transmitter generates radiation that travels to the object and interacts with part of it.

Features:

  • 5VDC Operating voltage
  • I/O pins are 5V and 3.3V compliant
  • Range: Up to 20cm
  • Adjustable Sensing range
  • Built-in Ambient Light Sensor
  • 20mA supply current
  • Mounting hole

Digital Tachometer using IR Sensor with Arduino for measuring RPM

Now after managing these components do the following connection for designing Digital Tachometer using IR Sensor with Arduino for measuring RPM

  • LCD Pins 1, 3 ,5 ,16 ——— GND
  • LCD Pins 2, 15————— VCC (+5V)
  • LCD Pin 4 —————— – Arduino pin D7
  • LCD Pin 6 —————— – Arduino pin D6
  • LCD Pin 11 ——————- Arduino pin D5
  • LCD Pin 12 ——————- Arduino pin D4
  • LCD Pin 13 ——————- Arduino pin D3
  • LCD Pin 14 ——————- Arduino pin D2
  • IR Sensor Module Pin -GND —— GND
  • IR Sensor Pin +VCC —— VCC
  • IR Sensor Pin OUT — Arduino Pin D9
  • Tact Switch one end ————- Arduino PinD12
  • Tact Switch another end ————-GND
  • A connection diagram is given below as well. Simply assemble the circuit like this.
Digital Tachometer using IR Sensor with Arduino

The Arduino Uno, IR sensor module, buzzer, and LCD are all present in the tachometer circuit as it is depicted above. The entire process is managed by Arduino, including reading the pulse that the IR sensor module generates in response to object recognition, computing RPM, and sending the RPM value to the LCD. For object sensing, IR sensors are employed. The built-in potentiometer on the IR module allows us to adjust the sensitivity of this sensor module.

Pin 18 is directly connected to the output pin of the IR sensor module (A4). The Arduino’s Vcc and GND are connected to each other. In 4-bit mode, an Arduino is connected to a 16×2 LCD. The Arduino pins 2, GND, and 3 are directly connected to the control pins RS, RW, and En. Additionally, Arduino’s pins 4, 5, 6, and 7 are connected to data pins D4-D7. In this project, a push-button is also added. Pressing this button causes the Arduino Tachometer to begin counting RPM for five seconds whenever we need to. This push button is attached to Arduino pin 10 with regard to the ground. In this circuit tutorial, you can read more about how the IR transmitter and receiver circuit function.

Working Mechanism

In this circuit, the IR sensor module is interfaced with Arduino to measure fan rotation speed in RPM. The calculation is done on this basis.

After 5 seconds Arduino calculates RPM for a minute using the given formula.

RPM= Count x 12 for a single object rotating body.

But here we demonstrate this project using a ceiling fan. So we have done some changes that is given below:

RPM=count x 12 / objects

Where object = number of the blade in a fan.

Arduino Source Code/Program:

So, here is the source code for creating an Arduino-based digital tachometer utilizing an IR sensor. Copy the code, then use the Arduino IDE to upload it to your Arduino board.

include
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
define sensor 9
define start 12
int delay1()
{
//unsigned int long k;
int i,j;
unsigned int count=0;
for(i=0;i<1000;i++)
{
for(j=0;j<1000;j++)
{
if(digitalRead(sensor))
{
count++;
while(digitalRead(sensor));
}
}
}
return count;
}
void setup()
{
pinMode(sensor, INPUT);
pinMode(start, INPUT);
pinMode(2, OUTPUT);
lcd.begin(16, 2);
lcd.print(” Tachometer”);
delay(2000);
digitalWrite(start, HIGH);
}
void loop()
{
unsigned int time=0,RPM=0;
lcd.clear();
lcd.print(” Please Press “);
lcd.setCursor(0,1);
lcd.print(“Button to Start “);
while(digitalRead(start));
lcd.clear();
lcd.print(“Reading RPM…..”);
time=delay1();
lcd.clear();
lcd.print(“Please Wait…..”);
RPM=(time*12)/3;
delay(2000);
lcd.clear();
lcd.print(“RPM=”);
lcd.print(RPM);
delay(5000);
}

ConclusionI hope all of you understand how to use Digital Tachometer using IR Sensor with Arduino for measuring RPM. We MATHA ELECTRONICS will be back soon with more informative blogs.

Back to list

Leave a Reply

Your email address will not be published.