Skip to content
← All projects
2018hardware

Smart Railway System

Automated railway crossing prototype.

ArduinoC++Sensors
Smart Railway System · case study

Context

Across India, more than 5,000 railway crossings still rely on a guard, a flag, and a horn. Late nights, low visibility, and human attention spans don't compose well. The 2017 wave of crossing accidents made this a national concern; my high-school class wanted to build something tangible in response.

Problem

Design a cheap, end-to-end automated railway crossing system using off-the-shelf components a school lab could afford — sensors that detect an approaching train far enough out, gates that close in time, warning lights and a buzzer for vehicles, and a fail-safe state if anything fails.

Approach

Two infrared trip-sensors placed at a known distance from the crossing detected the train. An Arduino read both signals, calculated whether the order was correct, then sequenced the warning lights, buzzer, and servo-driven gates with deliberate timing buffers. A second pair on the far side confirmed clearance and re-opened the gates.

Build

  • Hand-built trackside structures, gate housings, and a model crossing in plywood and ABS.
  • Arduino UNO controller with two IR sensor pairs (approach and clearance), 4 LEDs, a piezo buzzer, and 2 servo motors for the gates.
  • State machine in C: IDLE → TRAIN_APPROACHING → CLOSING → BLOCKED → CLEARING → IDLE; explicit timeouts so a stuck train wouldn't deadlock the gates.
  • Manual override switch for the demonstrator (also acted as a fail-safe in the model).
  • Documented build, schematic, BOM, and a one-page risk note for the judges.

Outcome

First place in Uttar Pradesh under the Transportation category at the CBSE Regional Science Exhibition; selected as a National Finalist representing the state at the national-level exhibition. The first thing I shipped that worked end-to-end. Possibly still the most satisfying.

What I would change

I would replace the IR sensors with magnetometers — IR fails in fog and at night, exactly when crossings are most dangerous. And I'd add a redundant micro-controller with a dead-man timer; one Arduino is one point of failure.

← Previous
C-Shell
Custom Unix shell from scratch.
Next →
voidDopeArt
Digital art and photography under one brand.