Today in our project, we have designed and built a Digital RPM Meter using an infrared sensor and an Arduino to measure the number of rotations of the motor in RPM. We have interfaced the IR sensor module with Arduino and the 16×2 LCD as the display module. The IR sensor module consists of an IR Transmitter and Receiver in a single pair that works as an RPM meter for measuring the speed of any rotating object.
The RPM meter works as an RPM counter which counts the number of rotations per minute. In general, we get to see mainly two types of RPM Meter one is mechanical and another one is digital. In this project, we are going to design a digital RPM meter which is based on Arduino by using an IR sensor module to count the rotation of any rotating body. IR transmits IR rays which reflect back to the IR receiver and then IR Module generates an output or pulse that is detected by the Arduino controller when the start button is pressed. It counts the rotation for 5 seconds.
Must Read Infrared Sensor Using 555 Timer
Circuit Diagram

Components Required
- Arduino UNO
- 16×2 LCD Display
- IR Sensor Module
- Tact Switch
- Connecting Wires
- Breadboard
- 3.7V Lithium-Ion Battery
Circuit Connection for Digital RPM Meter
Now then, after assembling the above-mentioned components we have to do the following connection to design the digital RPM meter which uses IR Sensor with Arduino to measure the RPM.
Arduino Pin | LCD Display Pin |
---|---|
A4 | SDA |
A5 | SCL |
+5V | VCC |
GND | GND |
Arduino Pin | IR Sensor Pin |
---|---|
D3 | OUT |
+5V | VCC |
GND | GND |
About Parts of a Digital RPM Meter
Infrared Sensor
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 can also measure the heat being emitted by an object and detect motion.

The wavelength region which ranges from 0.75 to 3µm is known as the near-infrared region. The region between 3 and 6µm is known as the mid-infrared and infrared radiation that has a wavelength greater or higher than 6µm is generally called far-infrared
An IR sensor is made of an IR LED and an IR Photodiode; together they are called Photo–Coupler or Opto–Coupler. As we know, the Infrared Obstacle Sensor has a built-in IR transmitter and IR receiver. An infrared Transmitter is a light-emitting diode (LED) that emits infrared radiation. Hence, they are called IR LEDs. Even though an IR LED looks the same as a normal LED, the radiation emitted by it is invisible to the human eye.
Infrared receivers can also be used as infrared sensors because they detect radiation from an IR transmitter. IR receivers come in the form of photodiodes and phototransistors. Infrared Photodiodes are a whole other thing than standard photodiodes as they detect only infrared radiation. When the IR transmitter emits radiation and it reaches the object, some of the radiation is reflected back to the IR receiver. Based on the intensity of the reception by the IR receiver, the output of the sensor is defined.
For how to build your own Infrared Sensor Module, please visit this link.
PCB Design
After designing the schematic diagram of the Digital RPM Meter, the assembled components and wiring are too clumsy and looked very unprofessional. In fact, the wiring also has a chance of loose connection. To give it a clean and professional look and also to compress the size, I decided to build its PCB prototype using EasyEDA software as it is so simple to use. Now come to the main part, where we need to order our PCB prototype. I always prefer PCBWay for their quality assurance, fastest delivery and also for 24/7 customer support.
PCB View


I’ve done several runs with PCBWay and am happy with the results, it’s good quality. It is one of the most experienced PCB manufacturing companies based in China with an experience of more than a decade in the field of PCB prototype and fabrication. PCBWay has always been committed to technological innovation and meeting the needs of their customers from different industries in terms of quality, delivery, cost-effectiveness and any other demanding requests. The etching, solder mask, and hole sizes are all done well and that is what matters to me. It takes a few hours for a design to get approved and then a couple of days to finish and ship.
With more than a decade in the field of PCB prototypes and fabrication, PCBWay has proved its assurance from time to time. They always look at the customer’s needs from different regions in terms of quality, on-time delivery, cost-effectiveness and any other demanding requests.


These PCBs were manufactured by PCBWay and the finish quality really impressive, especially with the gold finish path. If you want to finish your product faster you could also ask PCBWay to make a panelized order where you receive multiple PCBs in a single panel. With this, you will also receive SMT Stencil from PCBWay, saving you time and effort. All the orders are high quality and could select a lot of settings such as thickness, flexible PCB, the colour of the solder masks, the number of layers, material, surface finish and more.

How to Order PCB from PCBWay?
Working Principle of Digital RPM Meter
In this circuit, the IR sensor module is interfaced with Arduino so that it can measure the fan rotation speed in RPM. It does the calculation on this basis. After 5 seconds Arduino calculates RPM through a minute using the given formula.
RPM= Count x 12 for a single object rotating body
But here we present this project on a 12V DC fan. So we made some changes that are mentioned below.
RPM = Count x 12 / Objects
Where object = number of the blade in a fan
Arduino Code
To run and compile the below code you have to install this library to the Arduino IDE software.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27, 16, 2); #define ir_sensor 3 #define start 12 int delay1() { int i, j; unsigned int count = 0; for (i = 0; i < 1000; i++) { for (j = 0; j < 1000; j++) { if (digitalRead(ir_sensor)) { count++; while (digitalRead(ir_sensor)); } } } return count; } void setup() { pinMode(ir_sensor, INPUT); pinMode(start, INPUT); pinMode(2, OUTPUT); lcd.init(); lcd.backlight(); lcd.print(” RPM Meter ”); delay(2000); digitalWrite(start, HIGH); } void loop() { unsigned int time = 0, RPM = 0; lcd.clear(); lcd.print(” Press Button “); lcd.setCursor(0, 1); lcd.print(“ 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); } |