LED PROJECTS

Arduino Multi Traffic Light Controller Project

The Arduino Traffic Light Controller Project is an exciting endeavor that combines electronics, microcontroller programming, and real-world applications. It replicates the functionality of a traffic light system, offering a hands-on experience for Arduino enthusiasts and engineering students. This project showcases how Arduino can be used to simulate and control a traffic intersection.

Component List:

NameQuantityComponent
U11Arduino Uno R3
D1
D3
D8
3Yellow LED
D2
D5
D7
3Red LED
D4
D6
D9
3Green LED
R1
R2
R3
3220 Ω Resistor

LEDs and Resistors: Connect the red, yellow, and green LEDs to digital pins on the Arduino through their respective resistors. These resistors limit the current and protect the LEDs.

In the Arduino IDE, create a sketch to control the LEDs, simulating a traffic light’s behavior. You can program the LEDs to switch in a sequence, mimicking the actual traffic light pattern.

Arduino code:

void setup() {
// configure the output pins
pinMode(2,OUTPUT);
pinMode(3,OUTPUT);
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
pinMode(6,OUTPUT);
pinMode(7,OUTPUT);
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
}
void loop()
{
digitalWrite(2,1); //enables the 1st set of signals
digitalWrite(7,1);
digitalWrite(10,1);
digitalWrite(4,0);
digitalWrite(3,0);
digitalWrite(6,0);
digitalWrite(8,0);
digitalWrite(9,0);
digitalWrite(5,0);
delay(5000);
digitalWrite(3,1); //enables the yellow lights
digitalWrite(6,1);
digitalWrite(2,0);
digitalWrite(7,0);
delay(1000);
digitalWrite(4,1); //enables the 2nd set of signals
digitalWrite(5,1);
digitalWrite(10,1);
digitalWrite(2,0);
digitalWrite(3,0);
digitalWrite(6,0);
digitalWrite(8,0);
digitalWrite(9,0);
digitalWrite(7,0);
delay(5000);
digitalWrite(9,1); //enables the yellow lights
digitalWrite(6,1);
digitalWrite(10,0);
digitalWrite(5,0);
digitalWrite(4,0);
delay(1000);
digitalWrite(8,1); //enables the 3rd set of signals
digitalWrite(4,1);
digitalWrite(7,1);
digitalWrite(2,0);
digitalWrite(3,0);
digitalWrite(5,0);
digitalWrite(6,0);
digitalWrite(9,0);
digitalWrite(10,0);
delay(5000);
digitalWrite(9,1); //enables the yellow lights
digitalWrite(3,1);
digitalWrite(7,0);
digitalWrite(8,0);
digitalWrite(4,0);
delay(1000);
}

The Arduino Traffic Light Controller Project provides an engaging introduction to Arduino-based automation. It demonstrates how a microcontroller can effectively manage a simulated traffic intersection, making it a valuable learning tool for students and hobbyists.

By implementing this project, you gain a deeper understanding of programming logic, electronic components, and system integration. It serves as a stepping stone for more complex projects involving sensors and IoT connectivity, while also offering a tangible representation of real-world traffic management systems.

This project exemplifies the practical applications of Arduino technology and its potential for innovation in various domains, including smart cities and transportation.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button