Project Name(Traffic Light Control
With Arduino)
Project Report Submitted in partial fulfilment of the requirements for the degree
of Bachelor of Computer Science from Cooch Behar College(Panchanan Barma
University), West Bengal
By
Name:Rounak Debnath (Roll No. 2300441231813)
Name:Ashraful Hossain (Roll No. 2300441231804 )
Name:Robinson Mochary (Roll No. 2300441231821)
Under the Guidance of
Project Supervisor: Dr. Sourav Chakraborty
Department of Electronics and Communication Engineering
Cooch Behar Government Engineering College
Cooch Behar, West Bengal
2024
Acknowledgement
We extend our heartfelt gratitude to Mr. Sourav Chakraborty for the honour and
opportunity to undertake this project. His invaluable guidance, continuous
support, and insightful feedback have been instrumental in its successful
completion. Mr. Chakraborty's expertise and dedication have enriched our
knowledge and inspired us to strive for excellence. We deeply appreciate his
trust in our abilities and his unwavering mentorship and encouragement.
Project Members
Roll No. Name Signature
----------------------------- -------------------------------------------- --------------------------------------------
----------------------------- -------------------------------------------- --------------------------------------------
----------------------------- -------------------------------------------- --------------------------------------------
Contents (Traffic Light Control With Arduino)
Chapter 1
Introduction
Chapter 2
The Working Process of a 4-Way Traffic Light System
Chapter 3
Developing an Arduino-Based 4-Way Traffic Light System
to Enhance Road Safety in Heavy Traffic Areas
References
Chapter 1 INTRODUCTION
Arduino is an open-source electronics platform based on easy-to-use hardware and software. It is
designed for anyone interested in creating interactive projects. The key components of the Arduino
ecosystem include:
1. Arduino Board: A microcontroller board that can be programmed to read inputs
(such as light or temperature sensors) and control outputs (such as LEDs, motors, or
displays). Popular models include the Arduino Uno, Mega, and Nano.
The Arduino Uno is one of the most popular and widely used microcontroller boards in the
Arduino family. It is known for its simplicity, versatility, and user-friendly design, making it
an excellent choice for beginners and experienced developers alike. Here are some key
features and specifications of the Arduino Uno:
Key Features:
1. Microcontroller: ATmega328P
2. Operating Voltage: 5V
3. Input Voltage (recommended): 7-12V
4. Digital I/O Pins: 14 (of which 6 can provide PWM output)
5. Analog Input Pins: 6
6. Flash Memory: 32 KB (ATmega328P) of which 0.5 KB is used by the bootloader
7. SRAM: 2 KB (ATmega328P)
8. EEPROM: 1 KB (ATmega328P)
9. Clock Speed: 16 MHz
10. LED_BUILTIN: 13
Connectivity:
 USB Port: Used for programming and serial communication with a computer.
 Power Jack: For connecting an external power supply.
 ICSP Header: For programming the microcontroller directly.
 Reset Button: To reset the board.
Advantages:
 Ease of Use: The Arduino Uno is straightforward to set up and program, making it ideal for
beginners.
 Open-source: Both the hardware and software are open-source, providing extensive
documentation and community support.
 Versatility: Suitable for a wide range of applications, from simple LED projects to more
complex robotics and IoT systems.
Common Applications:
 Educational Projects: Often used in schools and universities to teach electronics and
programming.
 DIY Projects: Popular among hobbyists for creating interactive gadgets and art installations.
 Prototyping: Used by engineers and developers to prototype and test new ideas quickly.
Overall, the Arduino Uno is a powerful and flexible tool that has become a staple in the world
of DIY electronics and education.
2. Arduino IDE: The integrated development environment used to write, compile, and
upload code (also known as sketches) to the Arduino board. The IDE supports a
simplified version of C++ and provides a variety of libraries for different components
and sensors.
3. Open-source Community: A large, active community that contributes to a wealth of
resources, tutorials, and libraries, making it easier for beginners and experts alike to
develop projects.
Arduino is widely used in various applications, from simple hobbyist projects to complex
industrial systems, due to its flexibility, ease of use, and affordability.
Chapter 2 Working Process of a 4-Way Traffic Light System
A 4-way traffic light system is designed to manage the flow of vehicles and pedestrians at an
intersection where four roads meet. Here's a brief explanation of how it works:
Components
1. Traffic Lights: Positioned at each corner of the intersection for all four directions.
2. Sensors: Often embedded in the road to detect the presence of vehicles.
3. Controller: The central unit that manages the traffic light timings based on pre-programmed
algorithms and sensor data.
Working Process
1. Cycle Phases:
o Green Light Phase: Allows traffic to move in one direction.
o Yellow Light Phase: Warns that the light is about to change to red.
o Red Light Phase: Stops traffic to allow cross-directional traffic to move.
2. Signal Timings:
o Fixed-Time Control: The traffic lights change at fixed intervals regardless of traffic
conditions.
o Adaptive Control: The traffic lights change based on real-time traffic conditions
detected by sensors.
3. Sequence:
o North-South Green Phase: North and south-bound traffic move while east and west-
bound traffic are stopped.
o North-South Yellow Phase: Warns north and south-bound traffic to prepare to stop.
o North-South Red Phase: North and south-bound traffic stop, and east and west-
bound traffic prepare to move.
o East-West Green Phase: East and west-bound traffic move while north and south-
bound traffic are stopped.
o East-West Yellow Phase: Warns east and west-bound traffic to prepare to stop.
o East-West Red Phase: East and west-bound traffic stop, and the cycle restarts.
4. Pedestrian Signals:
o These signals are synchronized with traffic lights to ensure safe crossing times for
pedestrians.
5. Emergency Vehicle Preemption: Some systems allow emergency vehicles to
override normal operation, giving them a green light to pass through the intersection
quickly.
Additional Features
 Left Turn Arrows: Dedicated signals for vehicles turning left to reduce the risk of accidents.
 Coordination: In urban areas, multiple intersections may be coordinated to improve traffic
flow along a corridor.
This system helps ensure orderly and safe movement of traffic and pedestrians, minimizing
conflicts and improving overall efficiency at intersections.
Chapter 3 Developing an Arduino-Based 4-Way Traffic Light
System to Enhance Road Safety
in Heavy Traffic Areas
Creating a 4-way traffic light system using Arduino to reduce the chances of accidents on
heavy traffic:
Components Needed
1. Arduino Board: (e.g., Arduino Uno)
2. LEDs: Red, Yellow, and Green LEDs for each direction
3. Resistors: To protect the LEDs
4. Breadboard and Jumper Wires
Steps to Create the Model
1. Setup
 Connect LEDs: Connect the Red, Yellow, and Green LEDs for each direction to the Arduino
using the breadboard and appropriate resistors.
 Upload Code: Write and upload the Arduino code to manage the traffic lights based on
sensor input and timers.
2. Arduino Code
 Initialization: Define the pins for LEDs and buttons.
 Loop Function: Create a loop function that cycles through the traffic light phases (Green,
Yellow, Red) based on fixed intervals or sensor input.
The code used:
Objective: Reducing Accidents
 Adaptive Traffic Control: Use IR sensors to adjust light timings based on traffic density,
preventing long waits and reducing chances of running red lights.
 Pedestrian Safety: Incorporate pedestrian signals and ensure adequate crossing time.
 Emergency Vehicle Preemption: Add functionality to detect emergency vehicles and give
them green lights to pass quickly.
Testing and Optimization
 Simulation: Test the system using a simulation software or a small-scale physical model.
 Real-World Testing: Gradually test in real-world conditions, making adjustments based on
observations.
 Feedback: Gather feedback from users (drivers and pedestrians) to identify any issues and
make improvements.
This project can significantly improve traffic management and safety at intersections,
especially in areas with heavy traffic.
Reference
o Arduino-Based 4-Way Traffic Light System Inspired by
Khagrabari Chowpati Intersection

A smart Trafic light control using Adriano

  • 1.
    Project Name(Traffic LightControl With Arduino) Project Report Submitted in partial fulfilment of the requirements for the degree of Bachelor of Computer Science from Cooch Behar College(Panchanan Barma University), West Bengal By Name:Rounak Debnath (Roll No. 2300441231813) Name:Ashraful Hossain (Roll No. 2300441231804 ) Name:Robinson Mochary (Roll No. 2300441231821) Under the Guidance of Project Supervisor: Dr. Sourav Chakraborty Department of Electronics and Communication Engineering Cooch Behar Government Engineering College Cooch Behar, West Bengal 2024
  • 2.
    Acknowledgement We extend ourheartfelt gratitude to Mr. Sourav Chakraborty for the honour and opportunity to undertake this project. His invaluable guidance, continuous support, and insightful feedback have been instrumental in its successful completion. Mr. Chakraborty's expertise and dedication have enriched our knowledge and inspired us to strive for excellence. We deeply appreciate his trust in our abilities and his unwavering mentorship and encouragement. Project Members Roll No. Name Signature ----------------------------- -------------------------------------------- -------------------------------------------- ----------------------------- -------------------------------------------- -------------------------------------------- ----------------------------- -------------------------------------------- --------------------------------------------
  • 3.
    Contents (Traffic LightControl With Arduino) Chapter 1 Introduction Chapter 2 The Working Process of a 4-Way Traffic Light System Chapter 3 Developing an Arduino-Based 4-Way Traffic Light System to Enhance Road Safety in Heavy Traffic Areas References
  • 4.
    Chapter 1 INTRODUCTION Arduinois an open-source electronics platform based on easy-to-use hardware and software. It is designed for anyone interested in creating interactive projects. The key components of the Arduino ecosystem include: 1. Arduino Board: A microcontroller board that can be programmed to read inputs (such as light or temperature sensors) and control outputs (such as LEDs, motors, or displays). Popular models include the Arduino Uno, Mega, and Nano. The Arduino Uno is one of the most popular and widely used microcontroller boards in the Arduino family. It is known for its simplicity, versatility, and user-friendly design, making it an excellent choice for beginners and experienced developers alike. Here are some key features and specifications of the Arduino Uno: Key Features: 1. Microcontroller: ATmega328P 2. Operating Voltage: 5V 3. Input Voltage (recommended): 7-12V 4. Digital I/O Pins: 14 (of which 6 can provide PWM output) 5. Analog Input Pins: 6 6. Flash Memory: 32 KB (ATmega328P) of which 0.5 KB is used by the bootloader 7. SRAM: 2 KB (ATmega328P) 8. EEPROM: 1 KB (ATmega328P) 9. Clock Speed: 16 MHz 10. LED_BUILTIN: 13 Connectivity:  USB Port: Used for programming and serial communication with a computer.  Power Jack: For connecting an external power supply.  ICSP Header: For programming the microcontroller directly.  Reset Button: To reset the board. Advantages:  Ease of Use: The Arduino Uno is straightforward to set up and program, making it ideal for beginners.  Open-source: Both the hardware and software are open-source, providing extensive documentation and community support.  Versatility: Suitable for a wide range of applications, from simple LED projects to more complex robotics and IoT systems. Common Applications:  Educational Projects: Often used in schools and universities to teach electronics and programming.  DIY Projects: Popular among hobbyists for creating interactive gadgets and art installations.
  • 5.
     Prototyping: Usedby engineers and developers to prototype and test new ideas quickly. Overall, the Arduino Uno is a powerful and flexible tool that has become a staple in the world of DIY electronics and education. 2. Arduino IDE: The integrated development environment used to write, compile, and upload code (also known as sketches) to the Arduino board. The IDE supports a simplified version of C++ and provides a variety of libraries for different components and sensors. 3. Open-source Community: A large, active community that contributes to a wealth of resources, tutorials, and libraries, making it easier for beginners and experts alike to develop projects. Arduino is widely used in various applications, from simple hobbyist projects to complex industrial systems, due to its flexibility, ease of use, and affordability.
  • 6.
    Chapter 2 WorkingProcess of a 4-Way Traffic Light System A 4-way traffic light system is designed to manage the flow of vehicles and pedestrians at an intersection where four roads meet. Here's a brief explanation of how it works: Components 1. Traffic Lights: Positioned at each corner of the intersection for all four directions. 2. Sensors: Often embedded in the road to detect the presence of vehicles. 3. Controller: The central unit that manages the traffic light timings based on pre-programmed algorithms and sensor data. Working Process 1. Cycle Phases: o Green Light Phase: Allows traffic to move in one direction. o Yellow Light Phase: Warns that the light is about to change to red. o Red Light Phase: Stops traffic to allow cross-directional traffic to move. 2. Signal Timings: o Fixed-Time Control: The traffic lights change at fixed intervals regardless of traffic conditions. o Adaptive Control: The traffic lights change based on real-time traffic conditions detected by sensors. 3. Sequence: o North-South Green Phase: North and south-bound traffic move while east and west- bound traffic are stopped. o North-South Yellow Phase: Warns north and south-bound traffic to prepare to stop. o North-South Red Phase: North and south-bound traffic stop, and east and west- bound traffic prepare to move. o East-West Green Phase: East and west-bound traffic move while north and south- bound traffic are stopped. o East-West Yellow Phase: Warns east and west-bound traffic to prepare to stop. o East-West Red Phase: East and west-bound traffic stop, and the cycle restarts. 4. Pedestrian Signals: o These signals are synchronized with traffic lights to ensure safe crossing times for pedestrians. 5. Emergency Vehicle Preemption: Some systems allow emergency vehicles to override normal operation, giving them a green light to pass through the intersection quickly.
  • 7.
    Additional Features  LeftTurn Arrows: Dedicated signals for vehicles turning left to reduce the risk of accidents.  Coordination: In urban areas, multiple intersections may be coordinated to improve traffic flow along a corridor. This system helps ensure orderly and safe movement of traffic and pedestrians, minimizing conflicts and improving overall efficiency at intersections. Chapter 3 Developing an Arduino-Based 4-Way Traffic Light System to Enhance Road Safety in Heavy Traffic Areas
  • 8.
    Creating a 4-waytraffic light system using Arduino to reduce the chances of accidents on heavy traffic: Components Needed 1. Arduino Board: (e.g., Arduino Uno) 2. LEDs: Red, Yellow, and Green LEDs for each direction 3. Resistors: To protect the LEDs 4. Breadboard and Jumper Wires Steps to Create the Model 1. Setup  Connect LEDs: Connect the Red, Yellow, and Green LEDs for each direction to the Arduino using the breadboard and appropriate resistors.  Upload Code: Write and upload the Arduino code to manage the traffic lights based on sensor input and timers. 2. Arduino Code  Initialization: Define the pins for LEDs and buttons.  Loop Function: Create a loop function that cycles through the traffic light phases (Green, Yellow, Red) based on fixed intervals or sensor input. The code used: Objective: Reducing Accidents  Adaptive Traffic Control: Use IR sensors to adjust light timings based on traffic density, preventing long waits and reducing chances of running red lights.  Pedestrian Safety: Incorporate pedestrian signals and ensure adequate crossing time.  Emergency Vehicle Preemption: Add functionality to detect emergency vehicles and give them green lights to pass quickly. Testing and Optimization  Simulation: Test the system using a simulation software or a small-scale physical model.  Real-World Testing: Gradually test in real-world conditions, making adjustments based on observations.  Feedback: Gather feedback from users (drivers and pedestrians) to identify any issues and make improvements.
  • 9.
    This project cansignificantly improve traffic management and safety at intersections, especially in areas with heavy traffic. Reference o Arduino-Based 4-Way Traffic Light System Inspired by Khagrabari Chowpati Intersection