Tachometer Using Arduino and IR Sensor
Tachometer Using Arduino and IR Sensor
Group Members
MUHAMMAD HUZAIFA 1070/FET/BSME/F21
AQIB FAZAL 1072/FET/BSME/F21
IBRAHIM YOUSAFZAI 1055/FET/BSME/F21
Table of Contents
ABSTRACT:...................................................................................................................................3
INTRODUCTION:..........................................................................................................................4
MATERIAL USED:........................................................................................................................4
METHADOLOGY:.........................................................................................................................5
Hard ware setup:..........................................................................................................................5
Arduino Programing:...................................................................................................................5
Code:............................................................................................................................................5
Testing and Calibration................................................................................................................6
RESULTS AND CONCLUSION:..................................................................................................6
FUTURE IMPROVEMENT:..........................................................................................................7
REFRENCES:..................................................................................................................................7
ABSTRACT:
This report documents the construction of a tachometer using an Arduino
microcontroller and an IR (Infrared) sensor. The tachometer measures the rotational speed of an
object by detecting interruptions in the infrared beam caused by the object's rotation. The project
involved assembling the hardware components, programming the Arduino, and testing the
tachometer's functionality.
INTRODUCTION:
A tachometer is a device used to measure the rotational speed of an object,
commonly used in automotive applications to monitor the engine's RPM (revolutions per
minute). In this project, we utilized an Arduino microcontroller and an IR sensor to create a
tachometer that detects interruptions in an infrared beam, translating these interruptions into
RPM readings.
MATERIAL USED:
METHADOLOGY:
Hard ware setup:
Connect the IR sensor module to the Arduino Uno using jumper wires. The connections
typically include power (VCC), ground (GND), and signal (usually labeled as OUT).
Set up the IR sensor and ensure it's positioned to detect interruptions caused by the
rotating object. Align the sensor and the object in such a way that the rotating parts
obstruct the IR beam intermittently.
Power the Arduino Uno using a suitable power source.
Arduino Programing:
Write a program in the Arduino IDE to read data from the IR sensor and calculate the
RPM based on the interruptions detected.
Implement a code that reads the sensor's output and calculates the time between
interruptions, converting this data into RPM.
Code:
#define TACH_PIN 2
#include <Tachometer.h>
Tachometer tacho;
void setup() {
Serial.begin(9600);
pinMode(TACH_PIN, INPUT_PULLUP);
attachInterrupt(0, isr, FALLING);
}
void isr() {
tacho.tick();
}
void loop() {
static uint32_t tmr;
if (millis() - tmr > 100) {
tmr = millis();
Serial.println(tacho.getRPM());
}
}
Testing and Calibration
Upload the code to the Arduino and open the Serial Monitor in the Arduino IDE to view
the RPM readings.
Test the tachometer with the rotating object and observe the RPM values displayed on the
Serial Monitor.
Fine-tune the code or sensor positioning if necessary to improve accuracy.
FUTURE IMPROVEMENT:
Further enhancements could involve refining the code for better RPM accuracy,
implementing a display interface (LCD or OLED) for standalone operation, or integrating
additional sensors for broader applications.
REFRENCES:
Arduino official website and documentation
IR sensor module datasheet (if available)
This report outlines the process of creating a tachometer using an Arduino and an IR sensor. It
covers the steps involved in setting up the hardware, programming the Arduino, testing the
device, and potential areas for improvement or expansion.