Skip to content

usersnameisshubham/Advanced-TrafficLightController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advanced Traffic Light Controller

An intelligent Arduino-based traffic management system designed to optimize traffic flow using sensor-driven lane monitoring, emergency handling, pedestrian control, Bluetooth communication, and adaptive signal timing.

This project simulates a smart city traffic intersection capable of dynamically adjusting traffic signals based on real-time road conditions.


Quick Brief

Smart Arduino-based adaptive traffic light controller using IR sensors, ultrasonic sensing, Bluetooth communication, servo-assisted lane scanning, and dynamic signal timing to optimize traffic flow, handle emergencies, and improve pedestrian safety.


Introduction

Traditional traffic lights operate on fixed timers regardless of traffic density. This causes:

  • Unnecessary waiting time
  • Traffic congestion
  • Fuel wastage
  • Increased pollution
  • Delays during emergency situations

This project solves these problems using:

  • IR Sensors
  • Ultrasonic Sensors
  • Bluetooth Communication
  • Servo-Based Scanning
  • Adaptive Signal Timing
  • Emergency Lane Control
  • Pedestrian Crossing Support

The controller dynamically allocates green signal timing based on traffic density and road conditions.


Project Features

1. Adaptive Traffic Signal Timing

The system dynamically changes green light duration based on traffic density.

Features

  • Minimum and maximum green timing
  • Real-time lane monitoring
  • Dynamic lane prioritization
  • Reduced idle waiting

2. IR Sensor Based Vehicle Detection

IR sensors are used to detect vehicle presence in each lane.

Purpose

  • Detect congestion
  • Monitor lane activity
  • Trigger adaptive timing

3. Ultrasonic + Servo Based Lane Scanning

Ultrasonic sensors mounted with servo motors scan traffic density across lanes.

Servo Operations

  • Measure distance
  • Detect queue length
  • Estimate lane occupancy

This enables smarter signal timing decisions.


4. Emergency Vehicle Handling

Dedicated emergency lane handling allows:

  • Fast lane clearance
  • Signal prioritization
  • Reduced emergency response delay

Emergency events can override normal signal flow.


5. Pedestrian Crossing Mode

The system supports pedestrian requests using push buttons.

Features

  • Safe crossing interval
  • Countdown handling
  • Temporary traffic halt
  • Automatic resume after crossing

6. Bluetooth Communication (Custom App Control)

HC-05 Bluetooth module support enables:

  • Wireless communication
  • Remote control
  • Signal updates
  • Event triggering

Useful For

  • Mobile control
  • Monitoring systems
  • Smart traffic integration

7. RGB LED Traffic Signals

RGB LEDs simulate real traffic signals.

Colors Used

  • Red → Stop
  • Green → Go
  • Blue/Alternate States → Additional status indication

8. LCD Display Support

An I2C LCD is used to display:

  • Lane status
  • Countdown timer
  • Emergency alerts
  • Pedestrian state
  • Signal information

Hardware Components Used

Component Purpose
Arduino Uno Main controller
HC-05 Bluetooth Module Wireless communication
IR Sensors Vehicle detection
Ultrasonic Sensors Distance and density measurement
Servo Motors Sensor scanning
RGB LEDs Traffic signal indication
Push Buttons Pedestrian and emergency control
I2C LCD Display Real-time system display
Jumper Wires Circuit connections
Breadboard Prototyping

Technologies Used

  • Arduino C/C++
  • Embedded Systems
  • Sensor Integration
  • Bluetooth Communication
  • Real-Time Control Systems
  • Smart Traffic Management

File Structure

.
├── traffic_controller.ino
├── bluetooth_module.ino
├── adaptive_lane_controller.ino
└── README.md

Hardware Connections

1. Bluetooth RGB Controller Board

Used for:

  • Bluetooth communication
  • RGB LED traffic indication

HC-05 Bluetooth Module

HC-05 Pin Arduino Pin
VCC 5V
GND GND
TXD Pin 0 (RX)
RXD Pin 1 (TX) (use voltage divider)

RGB LED Connections

RGB LED Pin Arduino Pin
Red Pin 8
Green Pin 7
Blue Pin 5
Common GND GND via 220Ω resistors

2. Adaptive Lane Controller Board

Used for:

  • Traffic density scanning
  • Servo control
  • Ultrasonic sensing
  • Lane signal management

Lane 1 RGB Signal

Signal Arduino Pin
Red Pin 4
Green Pin 3
Blue Pin 2

Lane 2 RGB Signal

Signal Arduino Pin
Red Pin 5
Green Pin 11
Blue Pin 13

IR Sensors

Sensor Arduino Pin
IR Lane 1 A0
IR Lane 2 A1

Ultrasonic Sensors

Lane 1 Ultrasonic

Sensor Pin Arduino Pin
Trigger Pin 6
Echo Pin 8

Lane 2 Ultrasonic

Sensor Pin Arduino Pin
Trigger Pin 7
Echo Pin 12

Servo Motors

Servo Arduino Pin
Servo 1 Pin 9
Servo 2 Pin 10

I2C Communication

I2C Pin Arduino
SDA SDA
SCL SCL

Slave Address:

0x04

3. Master Controller Board

Used for:

  • LCD display
  • Pedestrian control
  • Emergency handling
  • Master traffic scheduling

LCD I2C Display

LCD Pin Arduino
VCC 5V
GND GND
SDA SDA
SCL SCL

LCD Address:

0x27

Bluetooth Module

HC-05 Pin Arduino Pin
TXD Pin 10
RXD Pin 11

Control Buttons

Button Arduino Pin
Pause Button Pin 7
Lane 1 Request Pin 2
Lane 2 Request Pin 3
Lane 3 Request Pin 4
Lane 4 Request Pin 6
Pedestrian Button Pin 8

All buttons use:

INPUT_PULLUP

I2C Master Communication

I2C Pin Arduino
SDA SDA
SCL SCL

Connected Slave Addresses:

0x04
0x05

Circuit Features

  • Multi-lane traffic handling
  • Real-time sensor integration
  • Wireless Bluetooth support
  • Servo-assisted scanning
  • LCD feedback system
  • Intelligent signal scheduling

Advantages

  • Reduces traffic congestion
  • Improves signal efficiency
  • Supports emergency vehicles
  • Enhances pedestrian safety
  • Reduces unnecessary delays
  • More efficient than fixed-time traffic systems

Applications

  • Smart Cities
  • Traffic Signal Automation
  • Intelligent Transportation Systems
  • Embedded Systems Projects
  • IoT-Based Traffic Monitoring
  • Educational Demonstrations

Future Improvements

Possible future extensions:

  • AI-based traffic prediction
  • Camera-based vehicle counting
  • Cloud monitoring dashboard
  • IoT integration
  • Mobile application control
  • Automatic emergency vehicle recognition
  • Number plate recognition

Requirements

Hardware

  • Arduino Uno
  • HC-05 Bluetooth Module
  • IR Sensors
  • Ultrasonic Sensors
  • Servo Motors
  • RGB LEDs
  • LCD I2C Display
  • Push Buttons

Software

  • Arduino IDE

Required Libraries

  • Wire.h
  • LiquidCrystal_I2C.h
  • Servo.h
  • SoftwareSerial.h

How to Run

  1. Open the .ino files in Arduino IDE.
  2. Install all required libraries.
  3. Connect all hardware components properly.
  4. Upload the code to the respective Arduino boards.
  5. Power the circuit.
  6. Observe adaptive traffic signal behavior.

Project Highlights

  • Smart adaptive traffic management
  • Real-time traffic density monitoring
  • Emergency vehicle prioritization
  • Pedestrian crossing support
  • Bluetooth-enabled control system
  • Embedded systems and IoT concepts combined

About

Smart Arduino-based adaptive traffic light controller using IR sensors, ultrasonic sensing, Bluetooth communication, servo-assisted lane scanning, and dynamic signal timing to optimize traffic flow, handle emergencies, and improve pedestrian safety.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages