Automatic Railway Crossing System Using Arduino Based Embedded Platform

by theSTEMpedia in Circuits > Sensors

4444 Views, 5 Favorites, 0 Comments

Automatic Railway Crossing System Using Arduino Based Embedded Platform

Complete Assembly 2.jpg
Complete Assembly 4.jpg
Complete Assembly 3.jpg

Christmas is only a week away! Everybody’s busy with the celebrations and getting gifts, which, by the way, gets all the more difficult to get with never-ending possibilities all around us. How about going by a classic gift and add a touch of DIY to it this year? All you need (apart from the train set, of course) is an ultrasonic sensor, two servo motors, your buddy evive, a dash of creativity, and the spirit of DIYing! Your DIY automatic railway crossing is ready for some learning by doing action!

Want to build one? Then, climb on the DIYing sledge!

Things You'll Need

  • evive
  • Ultrasonic Sensor
  • Servo Motors
  • Thick Cardboard
  • Chart Papers
  • Jumper Wires

Making of the Railway Track

Marking of the railway crossign.jpg
Adding green patch.jpg
Adding Railway Track.jpg

Take thick cardboard and glue the white chart paper over it.

Open this paper we will be making our Railway Crossing System.

Draw the outline of your track on the paper.

Once done, we will stick a green patch made of color paper. Now we will introduce our railway tracks.
We have 3D printed the tracks.

Glue the track on the outline made using a glue gun.

Thus we have completed the making of the track.

Making of the Railway Crossing

Making of Road 1.jpg
Making of Road 2.jpg
Solid White Marking 1.jpg
Solide White Marking 2.jpg
20 mm of broken white marking.jpg
Broken White Marking 1.jpg
Broken White Marking 2.jpg
Broken White Marking 3.jpg

Once done with the tracks, we will focus on making of the crossing.

We will glue black chart paper on both the sides of the track on the green patch, indicating the road.

To add more details, we will be adding the solid white markings on the sides of the road and broken white markings in the center.

We have made broken marking of equal length and placed them at equal distance.

Adding the Barriers

Servo in Foam Sheet.jpg
P1088584.jpg
Adding the Servo Horn.jpg
Adding the barriers.jpg
Glue the Barries.jpg

Now the most important part the barriers.

We are all familiar with their functionalities, which is they will block the traffic when the train arrives and let the traffic pass when the train is gone.

We will be making them using servo motors.
Take two servos one for each side and cover it in foam sheets and tape.
Do not cover the head of the servo.

Fix the servo horn. And glue a long stick on top of it.
You can even use straws for the same purpose.

Install these barriers on both the sides of the track.

The Train

3D Printed Train.jpg
Adding Ultrasonic Sensor.jpg

We have made a 3D printed train.

We will add a sensor that will sense when the train arrives and send a signal to evive.
Add Ultrasonic Sensor for the same purpose.

Place ultrasonic sensor at some distance from the crossing.

Make the connections of servo and sensor as shown in the next step.

Connection

railway-fritzing-diagram.jpg

Make the above connections.

Arduino Code

Upload the following code to evive.

Completing the Assembly and Working

Flowchart.jpg
Complete Assembly 1.jpg
Add Stones 2.jpg
Add Stones 1.jpg
Add Plants 1.jpg

Once done, we will be adding some artificial plants and stones to make it look better.

The Ultrasonic Sensor will sense the train and notify evive.
The servo horns then rotate so that the sticks attached to them completely blocks the road and the status of the barrier will be updated on the screen to ‘CLOSE’.

Once the train has passed, the barriers will open up and the screen will show ‘OPEN’.

Conclusion

With this, your DIY automatic railway crossing is ready to save the day and provide some learning while doing!