This IoT-based system was developed for South Asia Gateway Terminals (SAGT), Port of
Colombo, Sri Lanka, to address the challenges of manual working hour tracking for Prime
Mover vehicles. The solution implements real-time, automated monitoring of engine hours
using ESP32 microcontrollers, MQTT protocol, and a comprehensive MERN stack dashboard,
eliminating manual recording errors and significantly improving operational efficiency.
Prime movers are critical assets in container terminal operations. Traditionally, their
working hours were recorded manually from mechanical or local electronic meters, which was:
- Time-Consuming: Required manual inspections of each vehicle
- Error-Prone: Susceptible to human recording mistakes
- Labor-Intensive: Needed dedicated staff for data collection
- Not Real-Time: Delayed maintenance scheduling and reporting
- Automated Tracking: Implement real-time tracking of engine working hours using
IoT technology
- Centralized Dashboard: Create a web-based dashboard for maintenance teams to view
all units simultaneously
- Data Accuracy: Eliminate manual recording errors and ensure data persistence
- Scalability: Design a low-cost solution deployable across the entire Prime Mover
fleet
Hardware Architecture:
- Microcontroller: ESP32 Development Board (selected for built-in Wi-Fi and
cost-effectiveness)
- Signal Detection: Monitors 24V DC signal from Prime Mover's alternator to
determine engine status
- Isolation & Protection: PC817 Optocoupler or 24V DC Relay for signal isolation
from ESP32
- Power Management: 24V to 5V DC-DC Buck Converter for powering ESP32 from vehicle
battery
- Data Persistence: EEPROM storage for cumulative hours, preventing data loss
during power cycles
Software & Communication:
- Firmware: C++/Arduino with Wi-Fi auto-reconnection and signal debouncing
- Protocol: MQTT (Mosquitto) for lightweight, real-time data transmission
- Backend: Node.js & Express.js for API and business logic
- Frontend: ReactJS for responsive, interactive dashboard
- Database: MongoDB for historical data and unit configurations
- Real-Time Status: Live ON/OFF status indicators for each Prime Mover
- Unit Cards: Display unit name, total hours, last update timestamp, and initial
readings
- Advanced Filtering: Search by PM number, range, or operational status
- Data Export: Excel/CSV export capability for administrative reporting
- Favorites System: Star/prioritize specific units for quick access
- Secure Access: User authentication for authorized maintenance staff only
- Historical Tracking: Time-series visualization of working hour trends
The system was successfully piloted at South Asia Gateway Terminals (SAGT), delivering
significant operational improvements:
- Eliminated manual data collection workload for maintenance department
- Enabled predictive maintenance scheduling based on accurate hour tracking
- Reduced equipment downtime through timely maintenance interventions
- Provided real-time fleet visibility for management decision-making
Future Enhancements: Integration with Terminal Operating System (TOS) and predictive
maintenance algorithms for breakdown prediction.