Design and Calibration of a Digital Tachometer Using ESP32 and an IR Reflective Sensor
This preprint presents the design, implementation and calibration of a low-cost, non-contact digital tachometer built from an ESP32 microcontroller, a comparator-based infrared (IR) reflective sensor module and a 16x2 I2C character LCD. A single reflective marker on a gearbox DC motor shaft produces one pulse per revolution, which the firmware timestamps in an interrupt service routine and converts to RPS and RPM in real time. A hybrid estimator computes speed from the pulse period at higher speeds and from the pulse count within an adaptive time window at low speeds, with an adaptive lockout to reject comparator chatter, exponential smoothing and a stop timeout. The prototype was calibrated against a handheld laser tachometer at 12 operating points from 18.8 to 452.8 RPM. The mean absolute percentage error was 0.52%, the largest error was 1.73%, the absolute error never exceeded 1.6 RPM, and a linear fit of the ESP32 readings against the reference gave a slope of 0.9984 with R² = 0.99997. A simulation of the firmware with ideal pulses shows that the estimator itself stays within ±0.8 RPM of the true speed except between 100 and 150 RPM, where the 1.2 s minimum counting window makes the display vary by about ±9 RPM. The total component cost of the demonstrator is 1285 BDT. Files: preprint (PDF), ESP32 firmware source, calibration data (CSV), Python script that reproduces the calibration statistics and Fig. 4, firmware simulation script and its output, and LaTeX source.
Authors
- Md. Al Mohaimin Bhuiyan Arfin
- Mahmud Arif
- Ajasra Saha Prionto
Institutions
- Chittagong University of Engineering & Technology (BD)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-10-08
- DOI
- https://doi.org/10.5281/zenodo.23227471
- Primary Topic
- Arduino and IoT Applications
- Type
- preprint