
Railway track laying, construction, and maintenance demand precise measurement of the gauge between two parallel tracks and superelevation, that is, the height difference between rails. For long welded rail tracks, track temperature monitoring is also critical, as rail behaviour is highly sensitive to weather-induced thermal variations. The availability of low-cost sensors and microcontrollers such as Arduino now enables the development of compact digital systems that perform these measurements automatically with improved accuracy.
POC Video Tutorial
This system uses an Arduino Nano as the main controller to measure and display track level, its gauge, and temperature. An MPU6050 sensor is employed for tilt (level) measurement, a VL53L0X laser distance sensor measures the track gauge or gap, and a DS18B20 sensor monitors rail track temperature. All measured parameters are clearly displayed on an OLED display, while a single push-button enables switching between different measurement modes.

Powered by a small battery, the system is fully portable and well suited for field use. It is intended for hobbyists, field engineers, and DIY enthusiasts who require a simple, reliable, and accurate electronic measuring instrument. Fig. 1 shows the author’s prototype, and the required components are listed in the Bill of Materials table.
| Bill Of Materials | |
| Components | Quantity |
| Arduino Nano (MCU1) | 1 |
| SSD1306 OLED display (OLED1) | 1 |
| MPU6050 IMU sensor (S1) | 1 |
| VL53L0X TOF sensor (S2) | 1 |
| DS18B20 sensor (S3) | 1 |
| 3.7V battery | 1 |
| TP4056 battery charger and power module (U2) | 1 |
| 4.7k resistor (R1) | 1 |
| Push-to-on switch (SW1) | 1 |
Circuit and working
Fig. 2 shows the circuit diagram of the digital gauge and super elevation measuring system. The circuit is built around an Arduino Nano (MCU1), a TP4056 module (U2), an SSD1306 OLED display (OLED 1), an MPU6050 IMU sensor (S1), a VL53L0X Time-of-Flight sensor (S2), a DS18B20 temperature sensor (S3), and a few additional components. The Arduino Nano interfaces with three sensors and an OLED display to measure track level, gauge, and temperature. The design is compact and suitable for portable field use.

A 3.7V rechargeable Li-ion/LiPo battery powers the system. Since the Arduino Nano and sensors require a regulated 5V supply, the battery output is stepped up using a DC-DC boost converter. The regulated 5V output is connected to the Arduino Nano and all peripheral modules. All sensors, except the DS18B20, communicate with the Nano through the I²C bus using the SDA and SCL lines.
The MPU6050, VL53L0X, and OLED display communicate using the I²C protocol. This allows multiple devices to share the same two signal lines, resulting in a clean and simplified wiring layout. A single push-button (SW1) connected to digital pin 8 (D5) is used to switch between different display modes.
On the first press of SW1, the display shows the tilt or angle data from the MPU6050. The second press displays the gauge or distance measured by the VL53L0X sensor, while the third press shows the temperature reading from the DS18B20 sensor. With each subsequent press, the cycle repeats continuously.
The TP4056 module’s output is connected to the Arduino Nano’s Vin pin. The Arduino Nano 5V supply powers the OLED display, MPU6050, and VL53L0X sensors. A common ground is maintained for all modules to ensure stable operation.









