← Back to Explore

Smart Tracks, Safe Trains

CYSF · 2026

Thumbnail supplied by the source for Smart Tracks, Safe Trains

Overview

This project uses ESP32 to control multiple trains and switches to avoid collision in real time. This project shows how we can use technology and logic to improve train safety in real-world scenario.

Analysis

Data showed that accurate collision prevention depends on proper sensor threshold calibration and timing delays in the program. Higher speeds required longer stopping distances. The addition of a third sensor improved system reliability by confirming track clearance before allowing the second train to proceed. The ESP32 processed sensor input quickly enough to prevent collisions when within Bluetooth range.

Conclusion

We concluded that we could control and automate two LEGO trains and two switches using an ESP32 microcontroller and three photo sensors. This logic can be safely used in a shared track system. The hypothesis was supported. The system successfully prevented collisions when sensors and timing logic were properly calibrated.

Citations

1. https://chatgpt.com/ ← used chat GPT to troubleshoot errors in the code.

2. https://www.youtube.com/watch?v=h-5FmGfYzRs&t=152s ← Switch design

3. https://www.arduino.cc/en/software

Acknowledgement

I acknowledge the help I received from my mom (Deepthi Kannanayakal) with troubleshooting my programs. I also acknowledge Julie Girard (Mme. Girard) for giving me time to work on the project.

Awards (1)

  • SILVER

Competition history

  • CYSF 2026 Category not listed

Resources

Related projects

Closest projects by meaning, across every fair and year in the corpus.

Source: Calgary Youth Science Fair

Save projects to your library

Sign in with Google to keep track of projects you find interesting, organized into folders. An account also raises your daily allowance for “Has this been done?”, and lets you create a key for the MCP server with a much higher limit than anonymous use. Browsing stays public.

Continue with Google