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
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
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
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
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
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
Make the above connections.
Arduino Code
Upload the following code to evive.
Downloads
Completing the Assembly and Working
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!