Railway transportation is one of the most widely used and economical modes of travel, especially in countries like India. However, railway accidents caused by track damage, human error, or obstacles on the track can lead to serious loss of life and property. To address this issue, a smart safety system based on the Arduino Uno can be implemented to detect potential hazards and prevent accidents before they occur.
The proposed system uses sensors such as infrared (IR) sensors and ultrasonic sensors to monitor the condition of railway tracks and detect any obstacles. IR sensors are placed along the track to identify cracks or discontinuities, while the ultrasonic sensor measures the distance of any object present on the track. When a fault or obstacle is detected, the Arduino Uno processes the data and immediately activates a buzzer and warning lights to alert nearby personnel.
In addition to local alerts, the system can be integrated with a GSM module to send real-time notifications to railway authorities, allowing for quick action. A relay module is also used to automatically stop the train motor in case of danger, preventing collisions or derailments.
This Arduino-based solution is cost-effective, reliable, and easy to implement. It reduces human dependency and enhances railway safety through automation and real-time monitoring. With further improvements such as GPS tracking and IoT connectivity, this system can play a significant role in modernizing railway safety infrastructure and saving lives.
Introduction
Railway accidents often happen due to:
-
Track cracks
-
Collisions between trains
-
Human errors
-
Obstacles on track
This project uses an Arduino Uno–based smart safety system that can:
-
Detect cracks in railway tracks
-
Detect obstacles on track
-
Automatically alert railway control room
-
Stop train to avoid accidents
🎯 2. Objective
To design a low-cost smart railway safety system using Arduino that can:
-
Detect track damage
-
Detect obstacles
-
Send alerts
-
Prevent train collision
⚙️ 3. Components Required
| Component | Quantity |
|---|---|
| Arduino Uno | 1 |
| Ultrasonic Sensor (HC-SR04) | 1 |
| IR Sensor Module | 2 |
| Buzzer | 1 |
| LED (Red + Green) | 2 |
| GSM Module (SIM800L/900A) | 1 |
| Relay Module | 1 |
| DC Motor (Train simulation) | 1 |
| Battery / Power Supply | 1 |
| Connecting wires | As required |
| Breadboard | 1 |
🧠 4. System Working Principle
🔍 A. Track Crack Detection
-
IR sensors are placed along the railway track.
-
If a crack occurs, the IR signal breaks.
-
Arduino detects this and sends an alert.
🚧 B. Obstacle Detection
-
Ultrasonic sensor detects objects on track.
-
If distance < threshold (e.g., 20 cm), it triggers alarm.
📡 C. Alert System
-
GSM module sends SMS to railway authority.
-
Buzzer + Red LED alerts nearby people.
🛑 D. Automatic Train Stop
-
Relay cuts off motor power (train stops).
🔌 5. Block Diagram
IR Sensors ─┐
├──> Arduino Uno ───> Relay ──> Motor (Train)
Ultrasonic ─┘ │
├──> GSM Module (SMS Alert)
├──> Buzzer
└──> LED Indicator
🔗 6. Circuit Connections
Ultrasonic Sensor (HC-SR04)
-
VCC → 5V
-
GND → GND
-
Trig → Pin 9
-
Echo → Pin 10
IR Sensors
-
Output → Pin 2 and Pin 3
Relay Module
-
IN → Pin 7
Buzzer
-
-
→ Pin 6
-
LEDs
-
Red → Pin 4
-
Green → Pin 5
GSM Module
-
TX → Pin 11
-
RX → Pin 12
💻 7. Arduino Code
#define trigPin 9
#define echoPin 10
#define ir1 2
#define ir2 3
#define buzzer 6
#define relay 7
#define redLED 4
#define greenLED 5
long duration;
int distance;
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(ir1, INPUT);
pinMode(ir2, INPUT);
pinMode(buzzer, OUTPUT);
pinMode(relay, OUTPUT);
pinMode(redLED, OUTPUT);
pinMode(greenLED, OUTPUT);
Serial.begin(9600);
digitalWrite(relay, HIGH); // motor ON
digitalWrite(greenLED, HIGH);
}
void loop() {
// Ultrasonic distance
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = duration * 0.034 / 2;
int crack1 = digitalRead(ir1);
int crack2 = digitalRead(ir2);
if (distance < 20 || crack1 == LOW || crack2 == LOW) {
digitalWrite(buzzer, HIGH);
digitalWrite(redLED, HIGH);
digitalWrite(greenLED, LOW);
digitalWrite(relay, LOW); // Stop train
Serial.println("ALERT! Track Damage or Obstacle Detected");
} else {
digitalWrite(buzzer, LOW);
digitalWrite(redLED, LOW);
digitalWrite(greenLED, HIGH);
digitalWrite(relay, HIGH); // Train running
}
delay(500);
}
📲 8. GSM Alert Message Example
When fault occurs, system sends SMS like:
ALERT!
Track Crack or Obstacle Detected
Location: Track Section A12
📊 9. Advantages
✔ Prevents railway accidents
✔ Low cost system
✔ Automatic detection
✔ Real-time alert system
✔ Easy to install






0 comments:
Post a Comment