Introduction: 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!
Step 1: Things You'll Need
- Ultrasonic Sensor
- Servo Motors
- Thick Cardboard
- Chart Papers
- Jumper Wires
Step 2: 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.
Step 3: 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.
Step 4: 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.
Step 5: 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.
Step 6: Connection
Make the above connections.
Step 7: Arduino Code
Upload the following code to evive.
Step 8: 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’.
Step 9: Conclusion
With this, your DIY automatic railway crossing is ready to save the day and provide some learning while doing!
Participated in the
Big and Small Contest