Smart Traffic Light : AI-Powered Intelligent Traffic Signal Control System
A smart traffic light system using Ethernet to connect PC software with the traffic light controller.
Project Overview
The Smart Traffic Light project combines AI-based object detection and MCU-based signal control to build an intelligent traffic system.
Two cameras monitor traffic flow, and an AI model (YOLOv5) detects vehicles in real time.
Based on the detected traffic density, the green/red duration of each signal is automatically adjusted to optimize traffic flow.
Smart Traffic Light 프로젝트는 **영상 기반 차량 인식(AI)**과 MCU 기반 신호등 제어 시스템을 결합한 지능형 교통 관리 솔루션입니다.
두 대의 카메라로 교차로의 차량 수를 실시간 감지한 뒤, 각 도로의 차량 밀도에 따라 신호등의 녹색·적색 지속시간을 자동으로 제어합니다.본 프로젝트는 영상 처리, 실시간 통신, 신호 제어를 통합한 구조로 구성되어 있으며,
저비용 하드웨어 환경에서도 지능형 신호 제어 시스템이 가능함을 보여주는 교육·연구용 사례입니다.

This project uses a "W5500 lite" board (also called USR-E1)
This project was developed by Group 8 from class DHDTVT17D at Industrial University of Ho Chi Minh City (IUH).
이 프로젝트는 Industrial University of Ho Chi Minh City(호치민시 공업대학교) DHDTVT17D 반 8조(Group 8) 학생들이 개발하였습니다.
A full demonstration video and detailed explanation of the system are available on their YouTube channel.
- Approximately 2.8K views
- 17 comments
- Solid engagement for a student-built AI/embedded systems project
The positive feedback and steady viewership indicate that the project holds high external value,
with meaningful impact in the maker, education, and AI traffic control communities.
팀은 프로젝트 진행 과정을 직접 영상으로 제작하여 YouTube에 업로드했습니다.
- 조회수: 약 2.8천 회(2,800 views)
- 댓글: 17개
- 짧은 기간 안에 높은 관심을 받은 UCC 콘텐츠
이는 교육용/메이커 분야에서 이 프로젝트의 외부 가치와 시장 반응이 매우 긍정적임을 보여줍니다.
영상의 조회수뿐 아니라, 댓글에서도 시스템 완성도·활용성·구현 과정에 대한 긍정적인 반응이 이어지고 있습니다.
System Architecture
Data Flow
- Video input from 2 cameras
- YOLOv5 vehicle/motorbike detection
- Traffic density calculation
- Adaptive signal timing algorithm
- Raspberry Pi Pico controls the LED/relay traffic lights
- PC GUI displays real-time traffic data and charts
전체 흐름
- 카메라 2대에서 영상 수집
- YOLOv5 AI 모델로 차량/오토바이 탐지
- 방향별 차량 수 계산
- AI 기반 신호 시간 결정
- MCU(라즈베리파이 피코)가 신호등 제어
- PC GUI에서 상태 모니터링 및 그래프 표시
Hardware Components

| Component | Description |
|---|---|
| Raspberry Pi Pico | Controls traffic lights & communicates via Ethernet |
| Ethernet Module (USR-E1 / W5500) | Stable wired communication |
| Two Cameras | Real-time video input |
| PC (PyQt5 GUI) | Visualization & manual control |
| Traffic light module | LED/relay output |
YOLOv5 Training Details

The system relies on a YOLOv5 model trained to detect “car” and “motorbike”.
- Model: YOLOv5s
- Epochs: 50
- Batch Size: 16
- Image Size: 640×640
- Classes: Car, Motorbike
- Training Setup:
- Intel Core i7-12700F
- NVIDIA RTX 4060 Ti
All training scripts and the pretrained model file (.pt) are included, ensuring high reproducibility.
본 프로젝트의 핵심은 차량을 인식하는 YOLOv5 AI 모델입니다.
- 사용 모델: YOLOv5s
- Epoch: 50
- Batch Size: 16
- Input Size: 640×640
- 클래스: Car, Motorbike
- 학습 환경:
- Intel Core i7-12700F
- NVIDIA RTX 4060 Ti
모델 파일(.pt)과 학습 코드가 모두 공개되어 있어 누구나 쉽게 재학습 및 성능 개선이 가능합니다.
Communication Structure

The system uses wired Ethernet for reliable, low-latency communication.
Flow
- PC GUI sends control commands
- Ethernet module transmits data
- Pico receives and updates signal output
- Traffic count logs stored as CSV
Using WIZnet hardware further improves performance through:
- Hardware TCP/IP offloading
- Industrial-grade stability
- Lower latency
- PoE options
Ethernet 기반으로 PC와 MCU가 연결되어 실시간으로 신호 제어 데이터를 주고받습니다.
통신 흐름
- PC GUI → 제어 명령 생성
- Ethernet 전송 → Pico 수신
- Pico → LED/릴레이 출력
- 차량 카운트 데이터는 CSV로 저장 및 그래프 분석 가능
WIZnet Ethernet 칩셋 적용 시:
- HW TCP/IP Offload
- 낮은 지연
- 높은 안정성
- 산업용 환경 대응
- 등의 장점이 더해집니다.
Key Characteristics
- Full pipeline integration: video → AI → control → visualization
- Low-cost hardware with high functionality
- Strong documentation and organized structure
- Ideal for Maker projects, research, and education
- Highly expandable using WIZnet Ethernet products
- AI 영상 분석 + MCU 신호제어 + GUI를 통합한 완성형 구조
- 저비용 하드웨어 기반으로 지능형 교통 시스템의 핵심 기능 구현
- 문서 구성 및 코드 품질이 높아 Maker 프로젝트로 적합
- WIZnet Ethernet 제품과 결합 시 스마트시티 실용 솔루션으로 발전 가능
