A ₹910 non-contact tachometer for fans, motors and wheels. A small IR sensor sees a piece of reflective tape on the shaft each turn, the Arduino measures the time between pulses and converts it to RPM, and a 16×2 screen shows the result. The page covers the maths, why timing beats counting at low speeds, and what limits the top speed.
Scope: intermediate. This is a design worksheet with illustrative costs. It has not been bench-tested by this site. The period-to-RPM table was computed by script. Do not hold anything near a spinning fan blade or shaft while it runs; fix the sensor to a stand and keep fingers, loose hair and sleeves clear. The speed limits of the sensor module depend on the part and are not stated here as fact.
How it works
With one piece of tape, the sensor gives one pulse per turn, so RPM = 60,000,000 divided by the period in microseconds. A 20 ms period is 3,000 RPM and a 100 ms period is 600 RPM. With two pieces of tape the pulses per turn doubles, so divide by that number as well.
Timing the gap between two pulses with micros() gives fine resolution even at low speed. Counting pulses for a fixed window gives only whole counts, which is coarse when the shaft is slow: at 60 RPM with a one-second window the count is 1, which is a 100 percent step. The sketch shows RPM as zero if no pulse arrives for two seconds, which sets its lowest reading at about 30 RPM.
Bill of materials
| Part | Qty | Unit | Total |
|---|---|---|---|
| Arduino Uno R3 (or compatible) | 1 | ₹550 | ₹550 |
| IR obstacle or reflective sensor module | 1 | ₹40 | ₹40 |
| 16×2 LCD with I2C backpack | 1 | ₹250 | ₹250 |
| Reflective tape | 1 | ₹20 | ₹20 |
| Jumper wires | 1 | ₹50 | ₹50 |
| Parts total | ₹910 | ||
Scroll the table sideways to see every column.
Prices checked Nov 2026. Shipping and tools are not included.
Prices are illustrative figures for Indian sellers in November 2026, before shipping, and have not been checked against current listings.
The numbers
| Pulse period | Pulses per turn | RPM |
|---|---|---|
| 500 ms | 1 | 120 |
| 100 ms | 1 | 600 |
| 20 ms | 1 | 3,000 |
| 10 ms | 1 | 6,000 |
| 10 ms | 2 | 3,000 |
| 5 ms | 2 | 6,000 |
The Uno’s micros() counts in steps of 4 microseconds, so even at 6,000 RPM (10 ms period) the timing step is 0.04 percent, which is far smaller than other errors. The real limits are the sensor’s response time and whether the tape pulse is wide enough to register.
Power and wiring
| Part | Connects to | Note |
|---|---|---|
| IR module OUT | D2 (interrupt) | Check whether the output goes low or high on tape |
| IR module VCC and GND | 5V and GND | |
| LCD SDA / SCL | A4 / A5 | I2C backpack address is often 0x27 or 0x3F |
| LCD VCC and GND | 5V and GND |
The sketch
// Digital tachometer: Uno + IR sensor module + I2C LCD
// Design worksheet: check the LCD address and the sensor polarity.
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
const int SENSOR = 2;
const int PULSES_PER_TURN = 1;
const unsigned long MIN_GAP_US = 1000UL; // ignore pulses closer than 1 ms
const unsigned long TIMEOUT_US = 2000000UL; // no pulse for 2 s: show 0
LiquidCrystal_I2C lcd(0x27, 16, 2);
volatile unsigned long lastUs = 0, periodUs = 0;
void onPulse() {
unsigned long now = micros();
unsigned long gap = now - lastUs;
if (gap < MIN_GAP_US) return; // reject noise
periodUs = gap;
lastUs = now;
}
void setup() {
pinMode(SENSOR, INPUT);
attachInterrupt(digitalPinToInterrupt(SENSOR), onPulse, FALLING);
lcd.init(); lcd.backlight();
lcd.setCursor(0, 0); lcd.print("RPM");
}
void loop() {
noInterrupts();
unsigned long p = periodUs, last = lastUs;
interrupts();
float rpm = 0;
if (p > 0 && (micros() - last) < TIMEOUT_US) {
rpm = 60000000.0 / ((float)p * PULSES_PER_TURN);
}
lcd.setCursor(0, 1);
lcd.print(rpm, 0);
lcd.print(" ");
delay(250);
}If readings are double what you expect, there is probably a second reflective patch or the module triggers on both edges of a wide strip; use only a narrow tape and one edge. If the module output goes high on tape, change FALLING to RISING. The sketch has been proofread but not compiled on this site.
Test plan
- Known speed: measure a fan or a drill at a speed you can verify another way, such as a phone slow-motion count of a marked blade.
- Tape width: try narrow and wide tape and compare how steady the reading is.
- Distance: find the range of sensor distances that gives a reliable pulse.
- Ambient light: try in sunlight and indoors; IR in sunlight can wash out the module.
- Low speed: turn the shaft by hand and see the reading around 30 to 60 RPM.
- Two patches: add a second tape patch and set PULSES_PER_TURN to 2.
What usually goes wrong
| Symptom | Likely cause | Fix |
|---|---|---|
| Reads double | Two pulses per turn | Use one narrow patch or set PULSES_PER_TURN to 2 |
| Reads zero | No pulses | Check sensor distance and the indicator LED |
| Jumps around | Reflections from other surfaces | Black out the surroundings and use narrow tape |
| LCD blank | Wrong address or contrast | Try 0x3F and adjust the contrast screw |
| Wrong at high speed | Sensor too slow | Use a faster sensor and less tape |
Upgrades
- Averaging: average the last few periods for a steadier display.
- Max hold: add a button that holds the peak RPM.
- Logging: send RPM over serial and plot it.
- Hall sensor: use a magnet and a Hall sensor on dirty shafts.
Cost and parts notes
The ₹910 total is an illustration and does not include shipping. Use the cost calculator to compare sellers.
Common questions
Why measure the time between pulses?
It gives much finer resolution at low speed than counting pulses in a fixed window.
How do I measure a wheel?
Put a patch on the wheel; each turn gives one pulse. Multiply RPM by the wheel circumference for distance per minute.
Why show zero after two seconds?
With no pulse for that long, the speed is below about 30 RPM or the shaft has stopped.
Is it safe on a fan?
Only with the sensor clamped clear of the blades. Never hold your hand near a spinning part.
Last reviewed: November 2026. This is a design worksheet with illustrative costs. It has not been bench-tested by this site; library names, pins and limits must be checked against your board and the current library versions, and measurements from your build are welcome.