IoT based Four Way Smart Traffic Signal Controlling System With Priority to Dense Lanes and Emergency Vehicles

The conventional ways of controlling traffic jams in Pakistan is the presence of traffic guards and traffic signals, which have tended to prove old, static, and poorly planned system, as a result causing wastage of time and fuel, environmental pollution, and missed people?s opportunities. The proble

2025-06-28 16:28:05 - Adil Khan

Project Title

IoT based Four Way Smart Traffic Signal Controlling System With Priority to Dense Lanes and Emergency Vehicles

Project Area of Specialization Internet of ThingsProject Summary

The conventional ways of controlling traffic jams in Pakistan is the presence of traffic guards and traffic signals, which have tended to prove old, static, and poorly planned system, as a result causing wastage of time and fuel, environmental pollution, and missed people’s opportunities. The problem is also caused when there is improper management of traffic police and useless implementation of traffic lights on vacant roads than dense lanes. Several factors cause traffic congestion, including accidents, loss of time, delay of emergency vehicles, etc.

To solve the problems of traffic congestion, a smart yet cheap system is needed to detect the presence of vehicles density, emergency vehicles, and a proportionate time is given to each lane of the road intersection to pass the vehicles. The idea behind creating this system is that a smart way of handling traffic should be implemented in different areas of the country despite traffic guards or static time allocation to traffic signal lanes.

This project is intended to create an IoT (Internet of Things) based Four Way Smart Traffic Signal Controlling System with Priority to Dense Lanes and Emergency Vehicles. The system is cheap and very intelligent such that no on-ground traffic management is required. There will be a three-layer system model, the first layer belongs to input to the system from a surveillance camera and/or a sensor for emergency vehicles (most probably RFID), the second layers act as a middleware that communicates and makes decisions from the input layer to the application layer, the final layer connects the system to IoT to monitor and control within system application. The usage of IoT technology will cause real-time situation detection, which leads the system monitoring and may include taking the appropriate measures. Ultimately, causing a smooth and disciplined flow of traffic.

We have proposed this system that can be easily installed on a four-way road which identifies real-time traffic data based on the connection of the hardware components used in this model, that are cheaper and easily available in the market and this model will surely provide the desired results. With these features added in this project for identifying emergency vehicles and dense lanes to avoid stuck in congestion, there are a few aspects that are suggested for future study to improve the system by implementing new features. The scope of our project is to improve conventional systems of traffic in Pakistan, and it would be easy to manufacture such models in our country. This project could be programmed in any way to monitor and control the traffic and will be useful for planning a proper road system.

Project Objectives

Creating a real-time IoT-based Smart Traffic Signal Controlling System on a 4-way road intersection to avoid traffic congestion and giving signaling time priority to Dense Lanes and Emergency Vehicles. The objectives to achieve this aim are as follows:

  1. Using Raspberry Pi to control and manage the mechanism of traffic congestion, allotting a considerable amount of signal time to traffic lights, and handling different scenarios of traffic.
  2. Using an RFID-based emergency vehicle detection system.
  3. Identifying the density of traffic on lanes by using the cameras attached to Raspberry pi.
  4. To connect the system with real-time monitoring and controlling by an IoT-based application.
  5. Ensuring a smooth flow of traffic on a four-way road intersection at an appropriate signal time and handling different traffic scenarios of density and emergency vehicles.
Project Implementation Method

The main part of the project includes the hardware system, including the components: Raspberry Pi 4, Sensor (RFID), Surveillance Camera, traffic signals, Jumper Wires, and a four-way intersection model, which is later constructed physically so the actual working with traffic flow is examined. Lastly, the connection of the system to IoT is carried out so to check the actual working and implementation of the system on a real-time basis.

A Smart Traffic Signal Controlling System will be developed in the Raspberry Pi Python IDE. The connectivity of the internet is required on a full-time availability as it is based on IoT, so to send and monitor the traffic signal via surveillance camera from the remote monitoring and controlling. The entire design of the physical model will be done after testing each hardware device and obtaining its possible accurate results.

This system will include two main user classes. The vehicles who are in an emergency or those who have created dense traffic lanes. The following scenarios create the functions of this project.

  1. All the decisions of the system are based on the situations that these vehicles create. An emergency vehicle may arrive at the road, is to be noted by the RFID module, and the information is transmitted to the system (Raspberry Pi) as well as to the IoT-based Application.
  2. The IoT-based Application is under the control of the remote monitors, to look after this system to watch over any traffic incidents. Moreover, they are also authorized to control signals based on traffic incidents.
Benefits of the Project

IoT-based Four-way Smart Traffic Signal Controlling System provides a feasible and intelligent system that looks after the traffic congestion on a four-way traffic road and provides a considerable amount of time on each lane for smooth traffic flow. Given below are the benefits of the system.

  1. The project is implemented on a four-way road which is used to examine and generate a system of handling every possible case of traffic flow on the 4-way intersection.
  2. The system detects the emergency vehicles which pass through the 4-way intersection at a certain distance from the traffic signals (for our project, the RFID is used for emergency vehicle detection which is placed at a distance of few centimeters from the signal).
  3. The project is beneficial in the way that it uses Image Processing of vehicles through the cameras that come near to signal to identify the count of vehicles and determine whether the traffic density situations have arrived based on a pre-defined threshold.
  4. The system increases the time duration of the green signal (probably 10+ seconds more) whenever a traffic density has occurred on any lane of the road intersection.
  5. It prioritizes the emergency vehicle by immediately setting the green signal to turn on, on that particular lane to pass that vehicle first. 
  6. The project uses a smart method of handling the traffic density and emergency vehicles on the 4-way road than that of older traffic management systems.
  7. The project is under remote surveillance and control, in a way that it is connected to an IoT application that has the privilege to monitor and control the traffic in case of any failure of hardware or a traffic accident.
Technical Details of Final Deliverable

The project was intended to be completed in two semesters. The initial months of the project used Arduino as microcontroller and different sensors for emergency vehicles detection such as ultrasonic sensors and traffic density detection such as ultrasonic sensors. By the end of the first semester, the project came upon a fixed solution to use those hardware devices which provided accurate results.

  1. For the controller of the system, a Raspberry Pi Model 4 is to be used, a memory card is used as a storage.
  2. Emergency vehicles are detected by using four Radio Frequency Identification (RFID) module on four lanes.
  3. For the detection of traffic density, four cameras are attached with each raspberry pi placed on the model, which processes the vehicle image to recognize and count the number of vehicles as density on lanes.
  4. Four traffic signals are used on each of the four lanes.
  5. All the connections of RFID, traffic signals, and cameras with raspberry pi are done using the jumper wires.
  6. As the display of raspberry pi, a laptop is used with a mini-HDMI cable converter (or a monitor screen can be used).
  7. For the power supply of raspberry pi, a C-Type charger is used.
  8. Mouse and Keyboard are separately plugged in with the raspberry pi.
  9. The system is also connected to IoT application for monitoring as well as controlling the system remotely. 
  10. The entire project is built on a thermocol sheet. Layers and designing of chart sheet with poles to fix the signals and hardware devices. A number of toy cars are used as vehicles to create a real time traffic flow.
Final Deliverable of the Project HW/SW integrated systemCore Industry TransportationOther Industries Education , IT , Security Core Technology Internet of Things (IoT)Other TechnologiesSustainable Development Goals Good Health and Well-Being for People, Decent Work and Economic Growth, Industry, Innovation and Infrastructure, Sustainable Cities and CommunitiesRequired Resources
Item Name Type No. of Units Per Unit Cost (in Rs) Total (in Rs)
Total in (Rs) 69900
Raspberry Pi Equipment22600052000
C-Type Charger Equipment110001000
Memory Card Equipment210002000
RFID Equipment55002500
Pi Camera Equipment510005000
Jumper Wires Equipment200102000
HDMI Equipment25001000
Traffic Lights Equipment64002400
Thermocol Sheet Miscellaneous 2200400
Chart sheet Miscellaneous 4100400
Toy Cars Miscellaneous 101001000
Raspberry Pi GPIO extension Equipment2100200

More Posts