0% found this document useful (0 votes)
3 views12 pages

KHUSHI

The document outlines a project for a Two-Way Traffic Light System using Arduino, aimed at managing traffic flow at an intersection. It details the components, design, workflow, and example code for controlling the traffic lights, which alternate between two directions. Future improvements include sensor integration and IoT capabilities for enhanced traffic management.

Uploaded by

Manik gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views12 pages

KHUSHI

The document outlines a project for a Two-Way Traffic Light System using Arduino, aimed at managing traffic flow at an intersection. It details the components, design, workflow, and example code for controlling the traffic lights, which alternate between two directions. Future improvements include sensor integration and IoT capabilities for enhanced traffic management.

Uploaded by

Manik gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

PRESENTATION OF THE TWO-

WAY TRAFFIC LIGHT SYSTEM


PROJECT USING ARDUINO

• Project Title: Two-Way Traffic Light System Using Arduino


• Objective: The objective of this project is to design and implement a
traffic light system for a two-way intersection using an Arduino. The
system will manage the traffic flow at an intersection by controlling
the sequence of red, yellow, and green lights for both directions of
traffic
INTRODUCTION
Traffic light systems are crucial for maintaining the smooth flow of traffic
and ensuring safety on the roads. This project demonstrates a simple and
effective two-way traffic light system implemented using an Arduino
microcontroller. The Arduino will control the traffic lights at two
intersections, alternating between two directions and ensuring that each side
gets an appropriate amount of green time while the other side has a red light.
SYSTEM COMPONENTS

 Arduino Uno: The microcontroller used to control the traffic light sequence.
 LEDs: Three LEDs for each direction (red, yellow, and green), for a total of six LEDs.
 Resistors: Used to limit current to the LEDs.
 Breadboard and Wires: For connecting the components.
 Push Buttons (Optional): To simulate pedestrian crossings or external triggers.
Power Supply: A 9V battery or USB power source for the Arduino
SYSTEM DESIGN AND WORKFLOW
The system consists of two sets of traffic lights (one for each direction) which follow a sequence:
1. Green Light (Go): Vehicles can move.
2. Yellow Light (Caution): Prepare to stop; the light will soon turn red.
3. Red Light (Stop): No vehicles should move.
Each set of traffic lights is controlled in a fixed sequence with timing intervals.
Traffic Light Sequence:
 Direction 1 (North-South)
o Green for 10 seconds.
o Yellow for 2 seconds.
o Red for 10 seconds.
 Direction 2 (East-West)
o Green for 10 seconds.
o Yellow for 2 seconds.
o Red for 10 seconds.
The system alternates between these two directions, ensuring that only one direction gets a green light at any time.
O CODE (EXAMPLE)
Below is an example Arduino code for controlling the
two-way traffic light system:
// Pin configuration for the traffic lights
int redNS = 2; // North-South Red
int yellowNS = 3; // North-South Yellow
int greenNS = 4; // North-South Green
int redEW = 5; // East-West Red
int yellowEW = 6; // East-West Yellow
int greenEW = 7; // East-West Green

void setup() {
// Set all traffic light pins as output
pinMode(redNS, OUTPUT);
pinMode(yellowNS, OUTPUT);
pinMode(greenNS, OUTPUT);
pinMode(redEW, OUTPUT);
pinMode(yellowEW, OUTPUT);
pinMode(greenEW, OUTPUT);
}
void loop() {
// North-South Green, East-West Red
digitalWrite(greenNS, HIGH);
digitalWrite(redEW, HIGH);
digitalWrite(yellowNS, LOW);
digitalWrite(yellowEW, LOW);
delay(10000); // Green for 10 seconds

// North-South Yellow, East-West Red


digitalWrite(yellowNS, HIGH);
delay(2000); // Yellow for 2 seconds

// North-South Red, East-West Red


digitalWrite(redNS, HIGH);
digitalWrite(yellowNS, LOW);
delay(1000); // Red for 10 seconds

// East-West Green, North-South Red


digitalWrite(greenEW, HIGH);
digitalWrite(redNS, HIGH);
digitalWrite(yellowEW, LOW);
delay(10000); // Green for 10 seconds

// East-West Yellow, North-South Red


digitalWrite(yellowEW, HIGH);
delay(2000); // Yellow for 2 seconds

// East-West Red, North-South Red


digitalWrite(redEW, HIGH);
digitalWrite(yellowEW, LOW);
delay(1000); // Red for 10 seconds
}
CIRCUIT DIAGRAM
The basic circuit consists of:
 Six LEDs connected to the Arduino through appropriate resistors.
 Arduino pins are used to control the traffic lights: three pins for each direction (red,
yellow, green).
A simple circuit diagram might look like:
Arduino Pins -> Resistors -> LEDs -> Ground
(Red, Yellow, Green for North-South)
(Red, Yellow, Green for East-West)
WORKING
1. The traffic light system is powered on, and the Arduino starts its program.
2. It first turns Green for the North-South direction, allowing traffic to move.
3. After 10 seconds, the light turns Yellow, signaling that the green light will soon turn off.
4. After 2 seconds, the North-South light turns Red, while the East-West direction stays red.
5. The system then switches to the East-West direction, where the traffic light turns Green, allowing vehicles to
move in that direction.
This process continues to alternate between North-South and East-West directions.
OPTIONAL FEATURES

 Pedestrian Crossing Button: Adding push buttons for pedestrians to request a crossing signal.
 LED Display: Display real-time traffic light status on an LCD or LED display.
Adjustable Timing: The duration for each light (green, yellow, red) can be dynamically adjusted using a
potentiometer
APPLICATIONS

 Traffic Control: Can be used for small intersections to manage vehicle flow.
 Educational Tool: A learning project to understand the basics of Arduino programming,
traffic management, and electronics.
Prototyping: Can serve as a prototype for larger, more complex traffic systems
CONCLUSION

The Two-Way Traffic Light System using Arduino provides an efficient solution for managing traffic at an
intersection. It introduces the concepts of embedded systems, electronics, and control systems. With further
enhancements, it can be integrated with sensors, time-based logic, and communication systems to create a
smarter traffic management solution
FUTURE IMPROVEMENTS

 Sensor Integration: Use of ultrasonic or infrared sensors to detect the presence of cars and adjust
the light sequence dynamically.
 Internet of Things (IoT): Incorporating IoT features to remotely control or monitor the traffic light
system.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy