An AI-powered Smart Traffic Management System that dynamically controls traffic signals using live traffic data from the TomTom Traffic API. The project integrates Python, Arduino Nano, IR Sensors, and SIM900A GSM to optimize traffic flow, detect red-light violations, and provide emergency traffic control.
Traditional traffic signals operate using fixed timing regardless of traffic conditions, leading to congestion and delays.
This project overcomes these limitations by using live traffic congestion data from the TomTom Traffic API to dynamically adjust traffic signal timings. The system also detects red-light violations using IR sensors and sends SMS alerts using a SIM900A GSM module. An Emergency Override Mode allows all traffic signals to turn RED instantly during emergency situations.
- Develop an AI-based smart traffic management system.
- Dynamically adjust signal timing using live traffic data.
- Detect red-light violations automatically.
- Send SMS alerts using SIM900A GSM.
- Implement an Emergency Override mode.
- Demonstrate hardware and software integration.
- π¦ Dynamic Traffic Signal Control
- π Live TomTom Traffic API Integration
- π§ AI-Based Congestion Analysis
- π Red-Light Violation Detection
- π© SMS Alerts using SIM900A GSM
- π¨ Emergency Override Mode
- π Python-Arduino Serial Communication
- π Real-Time Traffic Monitoring
- Arduino Nano
- SIM900A GSM Module
- 4 IR Sensors
- 4 Red LEDs
- 4 Green LEDs
- Push Button (Emergency)
- Breadboard
- Jumper Wires
- USB Cable
- Laptop
- Python 3.x
- Arduino IDE
- Visual Studio Code
- TomTom Traffic API
- PySerial
- Requests Library
| Device | Arduino Pin |
|---|---|
| Lane 1 Red LED | D2 |
| Lane 1 Green LED | D3 |
| Lane 2 Red LED | D4 |
| Lane 2 Green LED | D5 |
| Lane 3 Red LED | D6 |
| Lane 3 Green LED | D7 |
| Lane 4 Red LED | D8 |
| Lane 4 Green LED | D9 |
| SIM900A TX | D10 |
| SIM900A RX | D11 |
| Emergency Button | D12 |
| IR Sensor Lane 1 | A0 |
| IR Sensor Lane 2 | A1 |
| IR Sensor Lane 3 | A2 |
| IR Sensor Lane 4 | A3 |
TomTom Traffic API
β
βΌ
Python AI Program
β
USB Serial (COM)
βΌ
Arduino Nano
β
βββββββββββββββββββΌβββββββββββββββββββ
β β β
βΌ βΌ βΌ
Traffic Lights IR Sensors Emergency Button
β β β
β Vehicle crosses RED β
β β β
β Threshold > 150 β
β β β
βββββββββββββββββββΌβββββββββββββββββββ
βΌ
SIM900A GSM
β
ββββββββββββββββ΄βββββββββββββββ
βΌ βΌ
Violation SMS Alert Emergency SMS Alert
- Python fetches live traffic data from the TomTom Traffic API.
- Traffic congestion is converted into congestion levels (1β9).
- Python sends congestion values to the Arduino Nano through USB Serial.
- Arduino dynamically adjusts the green signal duration for each lane.
- IR sensors monitor all RED signal lanes.
- If a vehicle crosses a RED signal, the Arduino detects a violation.
- SIM900A GSM sends an SMS alert containing the violation information.
- Pressing the Emergency Button immediately turns all traffic signals RED and sends an Emergency SMS.
A demonstration video of the complete working system is available in the Videos folder of this repository.
Clone the repository
git clone https://github.com/phani446/Traffic-Management-Using-TomTom-API.gitInstall Python libraries
pip install requests pyserialOpen Arduino IDE
- Upload SmartTrafficSystem.ino
Open Python
python version_1.py- Camera-based Vehicle Detection
- Automatic Number Plate Recognition (ANPR)
- Cloud Database Integration
- Mobile Application
- AI-Based Traffic Prediction
- Smart City Integration
- IoT Dashboard
Traffic-Management-Using-TomTom-API
β
βββ Arduino/
β βββ SmartTrafficSystem.ino
β
βββ Python/
β βββ version_1.py
β βββ requirements.txt
β
βββ Images/
β βββ Working_Model.jpeg
β βββ SMS_Output.jpeg
β βββ Screenshot (6).png
β βββ Screenshot (7).png
β
βββ Videos/
β βββ Demo.mp4
β
βββ README.md
βββ LICENSE
Panniru Phanidhar
B.Tech β Electronics and Communication Engineering
JNTUH University College of Engineering Rajanna Sircilla
GitHub: https://github.com/phani446
If you found this project useful, please consider giving this repository a β Star.
This project is licensed under the MIT License.


.png)
.png)