Automatic Railway Gate Control Using Arduino & IR Sensor




About a million people have died over the past 5 years in unmanned railway crossings all over the world. At least 1/3rd of the railway crossings are unmanned due to their remote placement and less traffic. The Automatic Railway Gate Control System using IR Sensor & Arduino focuses on systematic traffic control of railway gates that are both manned and unmanned. This project will not only make the system more reliable & precise, but also save the authorities from hiring man power to do the job. You may take it as a onetime investment.

Automatic Railway Gate Control Using Arduino & IR Sensor




The Automatic Railway Gate Control System Project makes use of an Arduino Nano to control the whole circuit. Two Servo motors are used to open and close the railway gates. Four IR sensors are used for sensing the arrival or departure of train. The main objective is to close the railway gates when the train approaches it, so as to block vehicles from going across the track. As soon as the train moves further away from the railway crossing, the gates must automatically open to allow vehicles to cross by.

Components Used

Components Specification Quantity
Arduino Nano 1
Servo Motor G9 `2
Buzzer 1
IR LED 4
Photodiode 4
LM358 2
Preset 10K 4
Adapter 12V 1
LED Red 4
Resistors 10K 4
Resistors 330 Ohms 8
Toy Train 1

Automatic Railway Gate Control System Using Microcontroller – Circuit

The automatic railway gate control makes use of 3 PCB’s. One is for the Arduino Nano, which works as controller of the whole project. The other two PCB’s are needed for the IR pairs. I designed all the three PCBs on EAGLE CAD software. If you want to make etched PCB, refer both the figures given below.

READ  Universal Remote Control with Alexa and IR

If you want to make the circuit on zero PCB or breadboard refer both the figures given below.

Output of all the sensors are connected to A0, A1, A2 and A3 pins of Arduino.

The pins D9 and D10 of the Arduino are PWM pins. These pins are connected to the Servo motor. Servos are controlled by sending an electrical pulse of variable width, or pulse width modulation (PWM), through the control wire.

IR pair is made with dual Op-amp IC LM358.  Only one IC is required for a pair. A preset is used for calibration.

Automatic Railway Gate Control Using Arduino & IR Sensor schematics

IR Sensors

Two IR pairs are used in the project. If you are familiar with PCB etching you can etch the PCB, but it is not necessary to use the etched PCB, you can use two IR sensors instead of one pair that is easily available in market.

If you are using ready-made IR sensors please replace “<” into “>” and “>” into “<” in the code, because output of ready-made IR sensor is invert of the sensor pair used in the project.

Read more: Automatic Railway Gate Control Using Arduino & IR Sensor




Leave a Comment

*
= 3 + 6

(Spamcheck Enabled)

Read previous post:
Using USB Type-C on hobbyist projects
Using USB Type-C on hobbyist projects

The new Type-C USB connector is the latest addition to the USB connector standards. It offers reversible plugs, direction independent...

Close
Scroll to top