A Traffic Light System using Arduino is a beginner-friendly project that simulates real traffic signals using LEDs and timing logic. It helps learners understand how traffic control works and teaches Arduino programming, LED control, and timing functions. This project is ideal for smart city prototypes and educational demonstrations.
✅ Main Components Required
- Arduino Uno (or compatible board)
- Red, Yellow, Green LEDs
- 220Ω Resistors (3 pcs)
- Breadboard
- Jumper Wires
- Power Supply (USB or Battery)
(Optional)
- Push Buttons for pedestrian control
- Buzzer for sound alerts
✅ What is a Traffic Light System?
A Traffic Light System is an arrangement of lights that control the flow of vehicles and pedestrians at intersections. It uses red, yellow, and green lights to manage traffic in a systematic and safe manner. This Arduino-based version replicates real-world functionality for learning and experimentation.
✅ How Does the System Work?
- Arduino sends signals to LEDs based on timing intervals.
- Red LED turns ON to stop vehicles, then switches to Green for movement, and Yellow for transition.
- Timing loops simulate real traffic light cycles.
- (Optional) A button can be added for pedestrian crossings.
✅ Step-by-Step Setup Guide
- Place the LEDs:
Red, Yellow, and Green LEDs on a breadboard.
- Connect Components:
Red LED → Pin 8 via 220Ω resistor
Yellow LED → Pin 9 via 220Ω resistor
Green LED → Pin 10 via 220Ω resistor
Common GND to Arduino GND - Write & Upload Code:
Use Arduino IDE to upload the timing sequence. - Test the System:
Verify LED sequence: Red → Green → Yellow.
✅ Sample Arduino Code
int red = 8;
int yellow = 9;
int green = 10;
void setup() {
pinMode(red, OUTPUT);
pinMode(yellow, OUTPUT);
pinMode(green, OUTPUT);
}
void loop() {
digitalWrite(red, HIGH);
delay(5000); // Red for 5 seconds
digitalWrite(red, LOW);
digitalWrite(green, HIGH);
delay(5000); // Green for 5 seconds
digitalWrite(green, LOW);
digitalWrite(yellow, HIGH);
delay(2000); // Yellow for 2 seconds
digitalWrite(yellow, LOW);
}
✅ Advantages of Arduino-Based Traffic Light System
- Cost-Effective & Simple for beginners
- Practical Learning of traffic control concepts
- Customizable Timing to simulate real-world scenarios
- Expandable with sensors and pedestrian systems
- Great for STEM Projects
✅ Enhancements You Can Add
- Pedestrian Crossing Button
- Buzzer Alerts for Signal Changes
- IR Sensors for Vehicle Detection
- LCD Display for Countdown Timer
- IoT Integration for Smart Traffic Control
✅ The STEMMakers Capability in Arduino Development
At The StemMakers based out of Vijayawada near DV Manor Hotel, we have successfully developed 20+ custom Arduino projects for student science exhibitions, IoT prototypes, and smart city concepts for various science fairs and competitions.
Contact us for kits, workshops, and expert guidance:
📧 asha@thestemmakers.com | 🌐 www.thestemmakers.com
Discover additional Arduino projects by The STEM Makers through the links below.
Know More about Arduino Consulting at The STEM Makers
How to build a water level indicator Arduino
How to Build a Smart Dustbin using Arduino
How to Build a Smart Home Automation using Arduino
How to Build a Traffic Light System using Arduino
How to Build a Temperature & Humidity Monitor using Arduino
How to build an Obstacle Avoiding Robot using Arduino
How to build an Automatic Plant Watering System using Arduino