Track Eye: Automated Railway Crack & Obstacle
Detection System
Sugitha A
Dept. of Computer Science Engineering (Cyber Security)
Sri Krishna College of Technology
Coimbatore, India
Navearasu M Aadhithaya N Sharene Kumar T
Dept. of Computer Science Engineering Dept. of Computer Science Engineering Dept. of Computer Science Engineering
(Internet of Things) (Internet of Things) (Internet of Things)
Sri Krishna College of Technology Sri Krishna College of Technology Sri Krishna College of Technology
Coimbatore, India Coimbatore, India Coimbatore, India
727822tuio032@[Link] 727822tuio001@[Link] 727823tuio602@[Link]
Abstract deployment, enabling faster decision-making and reducing
reliance on manual inspections.
Railway track cracks are a leading cause of derailments,
posing serious risks to passengers and freight. Existing II. RELATED WORK
manual inspection methods are slow, labor-intensive, and
prone to human error. Our proposed system integrates dual Recent studies have explored IoT-based solutions for railway
ultrasonic sensors for crack detection, an IR sensor for safety. Ultrasonic testing methods [1] have been used to
obstacle identification, GPS for real-time location tracking, detect cracks, but these systems are limited by single-sensor
GSM for automated SMS alerts, and a Pi Camera for visual configurations, reducing accuracy. IoT-enabled monitoring
proof. A Raspberry Pi acts as the main controller, processing systems [2] have introduced GSM and GPS integration,
sensor inputs in real time, displaying results on an LCD, and allowing location tracking and remote alerts, yet they often
logging detection events for analysis. The system improves lack automation and visual verification. Other approaches [3]
accuracy, reduces human effort, and ensures faster responses, employ Arduino-based designs that improve portability and
enhancing railway safety and reliability. cost-effectiveness but remain constrained by minimal sensor
diversity and absence of real-time data logging. While these
Keywords— Railway Safety, Crack Detection, Raspberry efforts demonstrate progress in railway crack detection,
Pi, Ultrasonic Sensor, GSM, GPS, Iot limited work integrates multi-sensor crack detection, obstacle
monitoring, GPS/GSM communication, and camera-based
I. INTRODUCTION visual proof into a unified, automated system suitable for
large-scale deployment. Improving over static GPS-based
Railway transportation is a critical backbone of national estimates. However, limited work integrates safety.
infrastructure, ensuring safe, efficient, and cost-effective
movement of passengers and goods. However, the
reliability of railway operations is often compromised by III. PROPOSED SYSTEM
undetected cracks and obstacles on tracks, which can lead
to derailments, accidents, and significant operational
A. Real-Time Monitoring with IoT Sensors
disruptions. Traditional inspection methods rely on
Dual ultrasonic sensors are placed on both rails to
manual patrols, which are slow, labor-intensive, and prone
continuously monitor track integrity. An infrared (IR)
to human error, limiting their effectiveness across vast
sensor is integrated to detect foreign objects or obstacles.
railway networks.
All sensor readings are processed in real time by a
Raspberry Pi controller, ensuring immediate crack and
With the integration of IoT sensors, embedded systems, obstacle detection.
and intelligent monitoring, railway safety can evolve into
a proactive framework that not only detects cracks and
B. Automated Safety Alerts
obstacles in real time but also provides accurate location
When a potential crack or obstacle is identified, the system
data, visual evidence, and automated alerts. This paper
automatically triggers a Pi Camera to capture visual proof
presents a novel automated railway crack and obstacle
of the fault. Simultaneously, the GPS module fetches the
detection system that leverages dual ultrasonic sensors, IR
exact location, and the GSM module sends an SMS alert
sensing, GPS, GSM, and a Pi Camera integrated with a
containing the coordinates and event details to railway
Raspberry Pi controller. Unlike conventional approaches,
authorities for quick action.
the proposed framework emphasizes real-time analytics,
early detection, and extensibility for large-scale
XXX-X-XXXX-XXXX-X/XX/$XX.00 ©20XX IEEE
C. Intelligent Data Logging and Visualization Multi-sensor integration: To design a system that combines
An LCD display shows live detection results to field ultrasonic sensors, IR sensors, GPS, GSM, and a Pi Camera
operators, while the system logs all events with for reliable crack and obstacle detection.
timestamps and images for future analysis. This ensures
traceability, helps in preventive maintenance planning, and Real-time monitoring: To employ IoT technologies that allow
improves overall railway safety. continuous sensing, quick decision-making, and instant alerts
to authorities. To automatically generate SMS notifications
Appr Techn Accu Advan Limita with GPS location and visual proof whenever an anomaly is
oach ology racy tages tions detected. To ensure the framework is expandable to cover
Used long-distance railway tracks and adaptable for large-scale
Manual Human Low Simple, Error- deployment. Reduction in human dependency: To minimize
Inspecti observati low cost prone, manual inspection and reduce risks to field inspectors.
on on, tools time-
consumin
g
Ultrason Arduino Medium Affordabl Limited
ic-based + e, real- detection
Detectio Ultrasoni time range
n c Sensors alerts Technolog Range Power Dat Use
Image Camera + High Non- Requires y Consumptio a Case
Processi Compute contact, high n Rat
ng r Vision scalable processin e
Approac (CNN) g power Wi-Fi Mediu High Hig Real-time
h m h monitorin
IoT- Sensors + Very Remote Higher g in small
based Cloud + High monitorin initial areas
Smart IoT g, digital setup cost Zigbee Shor Very Low Low Sensor
Monitor storage t networks,
ing agricultur
e
LoRaWAN Lon Low Low Smart
Table 1: Crack Detection Approaches g city,
railway
monitorin
g
GSM/4G/5 Ver Medium Hig Large-
From Table 1, it is evident that traditional manual G y to High h scale
inspection methods are highly error-prone and inefficient Lon remote
for large-scale railway networks. While ultrasonic-based g monitorin
detection offers a cost-effective and real-time alternative, g
its range is limited and may not capture fine structural
defects. Image-processing techniques using computer
vision provide higher accuracy but demand significant
computational resources, making them less practical in
Table 2: Communication Technologies in IoT
remote areas. IoT-based smart monitoring systems, though
requiring higher initial investment, deliver the most
reliable solution by enabling real-time, remote monitoring Table 2 compares different IoT communication
with cloud integration. Hence, the proposed approach technologies based on range, power, and data rate. Wi-Fi
combines the advantages of sensor-based detection and offers high speed but is limited to small areas due to higher
IoT connectivity to ensure scalability, safety, and long- power use. Zigbee is energy-efficient but supports only
term cost-effectiveness. short-range, low-data applications. LoRaWAN provides
long-range, low-power connectivity, making it ideal for
railway track monitoring. GSM/4G/5G ensures wide
coverage and high data rates, suitable for large-scale
deployments. For railway safety applications, LoRaWAN
Objectives of the Work and GSM/5G are the most practical, balancing range,
efficiency, and reliability.
The objectives of this research are aligned with improving
safety, reducing inspection time, and enabling intelligent
monitoring in railway systems. The major goals are:
IV. IMPLEMENTATION AND METHODOLOGY D. System Deployment and Integration
The final system was deployed on a Raspberry Pi platform
This section outlines the sensor modules, preprocessing steps, with all modules integrate to the system development and
detection logic, and system deployment for the proposed integration.
automated railway crack and obstacle detection system. The
workflow integrates Iot sensors, Raspberry Pi control, and
real time communication.
A. DataCollection . The workflow included:
Since large-scale railway datasets were not available, a
miniature railway track was designed with controlled Real-Time Monitoring: Sensor values and
defects to simulate real-world conditions. The dataset detection status displayed on an LCD for field
included: operators.
B. Ultrasonic sensor readings over cracks of varying
Automated Alerts: SMS notifications with GPS
widths (1 mm, 2 mm, and 5 mm).
coordinates and event details sent to railway
authorities.
IR sensor outputs indicating the presence or Data Logging: Detection events, GPS data, and
absence of obstacles on the track. captured images stored locally for future analysis
and preventive maintenance.
GPS coordinates corresponding to each detection
event.
Camera images captured at the moment of crack or
Project Objective Technology Outcome
obstacle detection.
Track Detect cracks Ultrasonic Reduces
Crack automatically + Arduino accidents
This controlled setup enabled accurate testing and under Detection due to
different lighting and movement conditions. System track
failure
B. Data Preprocessing Smart Automate IoT + Prevents
Raw signals from the sensors were subject to noise and Signaling railway Cloud signal
environmental variations, requiring preprocessing before System signal errors
final detection:
control
Driver Monitor Camera + Reduces
Noise Filtering – A median filter was applied to Alertness driver fatigue Sensors accidents
ultrasonic readings to remove sudden fluctuations Monitoring due to
caused by external disturbances. human
fatigue
Validation – GPS data was checked for satellite Smart Automate Sensors + Prevents
lock and consistency to ensure precise fault location Crossing level IoT accidents
reporting. System crossing at
gates crossings
Timestamping – All detection events, images, and
sensor readings were logged with time stamps for Table 3: Railway Safety
chronological record-keeping.
Table 3 compares different railway safety projects. The
C. Detection Logic Track Crack Detection System focuses on preventing
The ultrasonic sensors measure the distance from the rail derailments through automated crack identification. The
surface Smart Signaling System improves operational safety by
Crack Detection: The ultrasonic sensors measure reducing human errors in signal handling. Driver Alertness
the distance from the rail surface. If the measured Monitoring enhances safety by detecting fatigue-related
gap exceeds the preset threshold (1.5 cm), the risks, while the Smart Crossing System prevents accidents
system flags it as a crack or discontinuity. at level crossings. Together, these projects demonstrate
Obstacle Detection: The IR sensor outputs a HIGH how IoT and automation can address multiple aspects of
signal when an object is present on the track, railway safety, with the proposed system focusing on crack
indicating a blockage. and obstacle detection as a critical component.
Event Triggering: Upon detection of cracks or
obstacles, the Raspberry Pi activates the Pi Camera These projects highlight the diversity of approaches to
to capture images, fetches GPS coordinates, sends improving railway safety through IoT and automation.
an automated SMS alert through the GSM module.
While each system contributes to a specific area, the Basic OR fusion (alert if any sensor flags):
proposed work integrates crack detection and obstacle
identification, which are among the most critical causes
of railway accidents. By combining multiple sensors,
GPS-based location tracking, GSM-based alerts, and
Weighted confidence fusion (continuous score):
camera validation, the proposed system offers a holistic
solution that complements other smart railway
projects and strengthens the overall safety ecosystem. • Su = normalized ultrasonic score (0..1)
• Sir= IR score (0 or 1)
IV. Mathematical Model • Sc = camera verification score (0..1; e.g.,
manual/automatic check)
The proposed system can be mathematically expressed Alert if S>Sth . Weights w sum to 1.
using sensor equations and decision functions.
6) Moving median / smoothing (noise
1) Ultrasonic distance (time-of-flight) suppression)
Median filter over window N:
d~[k]=median(d[k−N+1],…,d[k])
Or moving average:
where
• d = distance (cm)
• v = speed of sound in air (≈ 343 m/s at 20°C =
34300 cm/s)
• t = round-trip echo time (s)
Use to remove spurious spikes before thresholding.
Use: basic distance reading from HC-SR04.
7) Debounce / confirmation rule
Temperature correction:
Require MMM consecutive detections in window
WWW before alert:
(m/s) → convert to cm/s if TTT in °C.
Use v(T)v(T)v(T) in the distance formula for
improved accuracy in different ambient
temperatures.
Example: W=5, M=3.
2) Crack detection threshold
A crack is flagged when the measured distance
deviates from nominal beyond a threshold: Flow chart & Block diagram
If
where di is the current distance and dth is the
calibrated threshold.
3) Dual-sensor gap / deviation
Monitor left and right rails:
Δd>Δdth → possible rail misalignment / crack.
4) IR sensor binary output
5) Final decision / sensor fusion (logical)
Fig No: 1 Railway Track Monitoring
The flowchart provides a structured view of the autonomous Obstacle Handler – Depending on severity, the
railway track monitoring robot, ensuring that the system robot halts movement, sends alerts, or bypasses
performs all critical operations in a logical, sequential the obstacle if safe.
manner. Each stage of the workflow has been carefully This multi-layered validation ensures that false
designed to achieve accuracy, reliability, and fault tolerance detections are minimized and authorities receive
in real-time railway monitoring. actionable data.
1. Start & Self-test
When powered on, the system undergoes an initial self- 6. Loop Operation
diagnostic phase. Checking sensor connectivity (ultrasonic,
IR, GPS, GSM, camera). Ensuring calibration values are After recording and responding to an event, the system
within limits. Testing the motion system to confirm stability. continues its sensing cycle. The loop allows uninterrupted
If any component fails, the robot does not proceed further. scanning of extended tracks. Logged data builds a historical
Instead, it transmits an error message to operators. This record for predictive maintenance. The robot acts not only as
prevention-first strategy avoids incorrect data collection. a detection tool but also as a data collection platform for
railway analytics.
2. Move on Track
7. Low Battery Handling
Once validation is complete, the robot starts moving along
the railway track. Speed is regulated for stable sensing and The system includes an intelligent power management
power efficiency. Wheel alignment ensures that ultrasonic module. Battery levels are monitored continuously. On
sensors remain properly oriented with both rails. The system detecting low charge, the system sends a GSM alert with the
adjusts dynamically for curves, slopes, and uneven terrain, latest GPS location and event log. Data is stored safely before
enabling consistent monitoring in real environments. initiating a controlled shutdown.
This guarantees system integrity and data preservation,
3. Continuous Sensing Loop even under resource limitations.
The sensing loop is the heart of the system. Data from V. Graph
ultrasonic sensors, IR sensors, and GPS is continuously
streamed to the Raspberry Pi. Preprocessing methods, such as
median filtering, are applied to eliminate noise. The system
operates in a loop, ensuring every rail section is scanned
without gaps.
This stage allows the robot to function as a real-time safety
guard for railway infrastructure.
4. Rail Gap Detection
Dual ultrasonic sensors measure the distance between sensor
and rail surface. If deviation exceeds a predefined threshold
(e.g., 1.5 cm), it is flagged as a crack. Dual-sensor cross-
validation ensures reliability and reduces false alarms.
This redundancy-driven design significantly improves fault
detection accuracy.
5. Obstacle Detection and Response
The IR sensor continuously scans for foreign
objects. If detected, the system performs a multi- Fig No: 2 Railway Crack Detection System
step response:
Camera Capture – The Pi Camera is triggered
to capture images of the anomaly, tagged with The processed detection results are then arranged into a
timestamps for proof and documentation. multi-criteria decision framework, where each event is
classified as “normal,” “potential crack,” or “confirmed
GPS Logging – Accurate geographic coordinates
crack with obstacle.” This ensures that only verified
of the detection site are recorded.
detections trigger GSM-based SMS alerts to authorities.
Data Storage & LCD Update – Sensor values,
Since the raspberry pi controller integrates all modules
images, and event logs are stored locally and
in real time, the optimization is computationally efficient
displayed to operators in real time.
and suitable for large-scale deployment across extensive contributes to environmental sustainability. One of the
railway networks. major benefits of this work is the reduction in accidents,
which directly lowers repair costs, minimizes material
VI. Crack Detection Optimization wastage, and reduces carbon emissions associated with
reconstruction and derailment recovery.
Efficient detection of detection and reporting of cracks is a
fundamental requirement in railway safety systems. In this The proposed system utilizes low-power IoT devices,
work, a multi-sensor–based optimization method is employed enabling energy-efficient monitoring over long
to ensure that detections are accurate, reliable, and actionable durations. By consuming minimal electricity and relying
in real time. The method formulates crack identification as a on optimized communication protocols, the system
threshold-based decision problem, where each sensor reading reduces its carbon footprint compared to conventional
is compared against predefined safety limits, and only heavy inspection machinery.
confirmed abnormalities trigger alerts.
Furthermore, the integration of predictive and preventive
To achive this, a detection function is defined that captures maintenance planning reduces unnecessary repairs and
the key decision parameters of the system. For a given track extends the lifecycle of railway infrastructure. This eco-
section, the function incorporates: friendly approach ensures that resources are used
efficiently, aligning with global sustainability goals and
smart transportation initiatives.
Ultrasonic distance measurements – deviations
beyond the preset 1.5 cm safe threshold indicate
Conclusion
possible cracks or discontinuities.
Dual-sensor validation – readings from both rails
are cross-checked to minimize false positives and This work demonstrates an IoT-driven approach to
ensure comprehensive coverage. railway safety, combining multi-sensor crack detection,
IR sensor verification – obstacles on the track are obstacle monitoring, and real-time alert communication.
confirmed to distinguish between structural cracks The proposed system improves accuracy, reliability, and
and temporary blockages. response time while reducing dependence on manual
inspections. By integrating ultrasonic sensors, IR
GPS accuracy – verified coordinates are attached to
sensing, GPS, GSM, and camera-based validation on a
each detection event to assist maintenance teams in
Raspberry Pi platform, the framework provides
locating faults precisely.
actionable insights for railway authorities and enhances
Camera confirmation – real-time images of the
operational safety. Future extensions include the use of
affected section are captured for visual validation
image analysis, predictive fault classification, and cloud-
and documentation.
enabled monitoring, positioning the system as a scalable
solution for intelligent railway infrastructure
The processed detection results are then arranged into a management.
multi-criteria decision framework, where each event is
classified as “normal,” “potential crack,” or “confirmed
crack with obstacle.” This ensures that only verified Acknowledgment
detections trigger GSM-based SMS alerts to authorities.
Since the raspberry pi controller integrates all modules The authors thank Sri Krishna College of Technology for
in real time, the optimization is computationally efficient guidance and support in carrying out this project.
and suitable for large-scale deployment across extensive
railway networks.
The primary advantage of adopting this multi-sensor REFERENCES
optimization approach is its ability to balance multiple
objectives simultaneously—ensuring high detection
[1] M. S. Vinitha, G. Nithin Kumar, G. Raju, N. Sashank Rithwak, and
accuracy, reducing false positives, and providing visual P. Harsha Chandra, “Arduino-Based Railway Track Crack Detection
and locational proof for maintenance. By considering System with Ultrasonic Sensor Integration,” International Journal of
ultrasonic, IR, GPS, and imaging data together, the Innovative Engineering and Management Research (IJIEMR), vol. 12,
system enhances both operational reliability and safety. no. 4, pp. 314–327, Apr. 2023. doi:
10.48047/IJIEMR/V12/ISSUE04/41.
Furthermore, the framework can be extended with ai-
[2] R. Jayakumar, S. G. Kumar, and R. S. Kumar, “Crack detection in
based image analysis and cloud-based monitoring, railway tracks using ultrasonic testing,” in Proc. Int. Conf. Innovations
making it scalable for future intelligent railway safety in Information, Embedded and Communication Systems (ICIIECS),
systems. 2017, pp. 1–5. IEEE.
[3] G. Gopinath and T. Bhuvaneswari, “Intelligent crack detection and
warning system for railway tracks using IoT,” Measurement, vol. 152,
Environmental Impact and Sustainability p. 107460, Jan. 2020.
[4] M. P. Kadam and A. B. Chaudhari, “Development of Arduino-
The adoption of IoT-based crack and obstacle detection based crack detection system for railway tracks,” in Proc. Int. Conf.
systems not only improves railway safety but also
Intelligent Computing and Control Systems (ICICCS), 2017, pp. 218– [16] N. Rahim, “The Development of a Railway Route Crack Detection
223. IEEE. System,” in Proceedings of the 2024 International Conference on
[5] Y. Teng, L. Chen, H. Liu, and W. Zhao, “Crack detection system Smart Transportation Systems, pp. 321–325, 2024. doi:10.1007/978-3-
for high-speed railway based on ultrasonic guided wave and deep 031-56844-2_21.
learning,” Sensors, vol. 19, no. 10, p. 2368, May 2019. [17] T. Anwar Shikdar, “IoT-Based Automated Crack and Object
[6] Arduino, “Arduino - Home.” [Online]. Available: Identifier Vehicle for Railway System,” ResearchGate, 2022. [Online].
[Link] [Accessed: Mar. 21, 2023]. Available: [Link]
Based_Automated_Crack_and_Object_Identifier_Vehicle_for_Railw
[7] Adafruit, “Adafruit Industries, Unique & Fun DIY Electronics and
ay_System.
Kits.” [Online]. Available: [Link] [Accessed:
Mar. 21, 2023]. [18] S. Ali, “Crack Detection in Railway Track using AI-based Image
Recognition Techniques,” International Journal of Software &
[8] J. Liu, “Enhancing crack detection in railway tracks through AI,”
Hardware Research in Engineering, vol. 10, no. 8, pp. 80–87, 2022.
Journal of Railway Engineering and Technology, vol. 15, no. 2, pp.
[Online]. Available: [Link]
45–58, 2024. doi:10.1016/[Link].2024.03.005.
content/uploads/2022/10/[Link].
[9] D. M. Revathi, “IoT Based Railway Track Crack Detection
[19] S. Kumar, “Wireless Sensor Networks for Railway Track Crack
System,” SSRN, 2024. [Online]. Available:
Detection,” International Journal of Advanced Research in Science,
[Link]
Engineering and Technology, vol. 8, no. 3, pp. 1–7, 2023. [Online].
[10] A. Kumar, “A systematic literature review of defect detection in Available:
railways,” Journal of Rail Transport Planning & Management, vol. 18, [Link]
p. 100234, 2024. doi:10.1016/[Link].2024.100234.
[20] A. Kumar, “Railway Track Crack Detection System,”
[11] S. S. Benazer, “Efficient model for IoT based railway crack International Journal of Progressive Research in Science and
detection system,” Procedia Computer Science, vol. 171, pp. 1389– Engineering, vol. 3, no. 1, pp. 1–5, 2024. [Online]. Available:
1396, 2021. doi:10.1016/[Link].2020.04.151. [Link]
[12] A. d’Arms, “Automated Railway Crack Detection Using Machine 2888/final/fin_ijprems1710588137.pdf.
Learning,” Proceedings of the 2024 International Conference on [21] S. Kumar, “Railway Track Crack Detection System by Image
Intelligent Engineering Systems, pp. 112–117, 2024. [Online]. Processing,” International Journal of Engineering and Applied
Available: [Link] Science, vol. 5, no. 2, pp. 1–6, 2024. [Online]. Available:
[13] M. Hashmi, “Computer-Vision Based Visual Inspection and [Link]
Crack Detection in Railway Tracks,” Proceedings of the 2014 292%2CTesma605%[Link].
International Conference on Control, Automation, Robotics and [22] M. Kumar, “Railway Track Crack Detection System using
Embedded Systems, pp. 1–6, 2014. [Online]. Available: Ultrasonic and PIR Sensors,” International Journal of Creative
[Link] Research Thoughts, vol. 7, no. 11, pp. 1–6, 2022. [Online]. Available:
[Link]. [Link]
[14] S. Reddy, “Railway Track Crack Detection System by Image [23] R. Kumar, “Railway Track Crack Detection System,”
Processing,” MATLAB Central File Exchange, 2018. [Online]. International Journal of Engineering and Technology, vol. 7, no. 4, pp.
Available: 1–5, 2024. [Online]. Available:
[Link] [Link]
railway-track-crack-detection-system-by-image-processing. 0Crack%20Detection%[Link].
[15] R. Kumar, “Railway Track Crack Detection System,”
International Journal of Innovative Research in Science, Engineering
and Technology, vol. 8, no. 6, pp. 1–6, 2025. [Online]. Available:
[Link]
0Crack%20Detection%[Link].