IOT Project Report

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

Experimental Level Project Report

IOT-SENSORS AND DEVICES

Project Title Automatic Traffic Controller using IoT

SUBALAKSHMI.K 9923017033

Team Members SRI VIGNESWARI.B 9923017089


(Reg. No & Name)
PREM BABU 9923017138
MUTHUKUMAR.A 9923017051
VISHAL ANAND 9923017139
Faculty In Charge Dr.K. Indhumathimurugesan
BONAFIDE CERTIFICATE

Bonafide record of work done by _______________________________________________


___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
of ____________________________________________________________ Department
during Odd semester in Academic Year 2023-24, as part of Experimental Elective Course -
IOT-Sensors and Devices Course level project.

Faculty In charge Head of the Department

Submitted for the evaluation of Experimental level project of Experimental Elective


Course - IOT-Sensors and Devices course held on ______________

Internal Examiner External Examiner


Table of Contents

S. No. Name of the Content Page No

1. Abstract 1

2. Introduction 2

2.1. Motivation 3

2.2. Objective of the project 5

3. General Block Diagram 6

3.1. Components used 7

3.2. Methodology 8

4. Prototype and Implementation 10

5. Conclusion 11

6. References 12

Appendix 13

Publication / Competition certificate (if any)


1.ABSTRACT

Traffic congestion and road safety continue to be significant concerns in urban areas. To
address these issues, this research presents the design and implementation of an Automatic
Traffic Controller (ATC) system based on Infrared (IR) sensors. The proposed ATC system
utilizes a network of IR sensors strategically placed at key points along roadways to monitor
the presence of vehicles and control traffic flow efficiently.

The IR sensor technology is chosen for its effectiveness in detecting vehicles under various
environmental conditions and its ability to provide real-time data. The ATC system leverages
this sensor network to gather vehicle information and, in turn, make dynamic decisions to
optimize traffic flow and minimize congestion. The controller employs a sophisticated
algorithm that takes into account various factors such as traffic density, vehicle speed, and
road conditions, allowing it to adjust traffic signal timings and manage the flow of vehicles in
a synchronized manner.

The research focuses on the development and validation of the ATC system using simulation
and practical testing in real-world scenarios. By employing IR sensor technology, the
proposed ATC system offers several advantages, including improved road safety, reduced
congestion, and decreased travel times for commuters. The results of the study demonstrate
the potential for IR sensor-based traffic control systems to enhance the efficiency of urban
transportation networks and contribute to safer, more sustainable urban environments.

This research contributes to the growing field of intelligent transportation systems and
presents a promising solution for addressing urban traffic challenges through the innovative
application of IR sensor technology.
2.INTRODUCTION

Traffic management is a critical aspect of urban infrastructure, playing a pivotal role in


ensuring the safety, efficiency, and smooth flow of vehicular and pedestrian movement. With
the continuous growth of urban populations and the increasing number of vehicles on the
road, effective traffic control systems have become more essential than ever. In response to
this need, Automatic Traffic Controllers (ATCs) have emerged as innovative solutions to
address traffic congestion and improve road safety.

One key technology that has revolutionized traffic control systems is the use of Infrared (IR)
sensors. IR sensors are widely employed in various applications, including automatic traffic
control, due to their accuracy, reliability, and cost-effectiveness. These sensors are capable of
detecting the presence and movement of vehicles, cyclists, and pedestrians, making them
integral components of modern traffic management systems.

This introduction provides an overview of the Automatic Traffic Controller using IR sensors,
highlighting the significance of this technology in optimizing traffic flow and enhancing road
safety. We will delve deeper into the workings of IR sensors, their applications in traffic
management, and the benefits they offer in this context. Furthermore, we will explore the
potential of IR sensor-based ATCs to revolutionize the way we manage traffic in urban and
suburban areas.

The benefits of implementing IR sensor-based ATCs are substantial. They contribute to a


reduction in fuel consumption and greenhouse gas emissions by optimizing traffic flow,
ultimately making urban transportation more sustainable. Moreover, they enhance road safety
by providing real-time information to traffic controllers, enabling quicker responses to
accidents and
emergencies.
2.1. MOTIVATION

In today's fast-paced world, urban traffic congestion has become a significant challenge that
affects the quality of life for millions of people worldwide. Traffic jams lead to wasted time,
increased pollution, and decreased overall efficiency. To address this pressing issue, we
propose the development of an Automatic Traffic Controller (ATC) system powered by
Infrared (IR) sensors. This innovative solution holds the potential to revolutionize urban
traffic management, making cities more livable, sustainable, and efficient.

Improved Traffic Flow:


One of the most compelling reasons to develop an ATC system with IR sensors is the
potential to significantly improve traffic flow. By accurately detecting vehicle presence,
count, and speed, IR sensors can provide real-time data to the traffic control center, allowing
for dynamic adjustments of signal timings. As a result, traffic can be managed more
efficiently, reducing congestion and enabling smoother commutes for all.

Reduction in Emissions:
Traffic congestion contributes to increased greenhouse gas emissions and air pollution. An
automatic traffic controller powered by IR sensors can help reduce idle times and traffic
jams, leading to a significant decrease in fuel consumption and emissions. This eco-friendly
aspect of the system aligns with global efforts to combat climate change and improve air
quality.

Enhanced Safety:
Safety on the road is a paramount concern. IR sensors can play a vital role in preventing
accidents by detecting and reacting to hazardous situations in real time. They can identify
obstacles, pedestrians, and even monitor vehicle speeds. By automatically adjusting traffic
signals and warning systems, an ATC system can mitigate potential accidents and save lives.

Optimal Resource Utilization:


Cities spend substantial resources on maintaining and expanding road infrastructure. An IR
sensor-based ATC system can optimize resource utilization by efficiently allocating road
capacity. By reducing unnecessary construction and widening projects, this technology can
save cities money and limit the environmental impact of urban expansion.

Smart and Sustainable Cities:


The development of an ATC system using IR sensors aligns with the broader vision of smart
and sustainable cities. With the integration of advanced technologies, traffic management can
be more data-driven, responsive, and sustainable. Such a system can be a cornerstone in
building cities that are not only efficient but also more livable and attractive for residents and
visitors alike.

Economic Benefits:
Reducing traffic congestion and improving overall traffic flow can have a profound impact
on a city's economy. Less time spent in traffic means more time for work, recreation, and
other activities, which can boost productivity and stimulate local businesses.

Technological Advancements:
Embracing cutting-edge technologies like IR sensors is a testament to a city's commitment to
progress. By investing in the development of an automatic traffic controller, a city
demonstrates its dedication to staying at the forefront of innovation and providing its
residents with the best possible quality of life.

In conclusion, the motivation to develop an Automatic Traffic Controller using IR sensors is


rooted in the need to address the pressing challenges posed by urban traffic congestion. By
utilizing the capabilities of IR sensors, we can create a more efficient, safe, and sustainable
urban transportation system that benefits everyone.
2.2. OBJECTIVE
To design and implement an automatic traffic controller system using IR (Infrared) sensors
with the goal of improving traffic flow, safety, and energy efficiency in urban and suburban
environments.

Key Components of the Objective:

Sensor Network: Develop a network of IR sensors strategically placed at intersections,


pedestrian crossings, and other key traffic areas to detect the presence of vehicles and
pedestrians.

Data Collection and Processing: Collect data from the IR sensors regarding the number of
vehicles, their speed, and the presence of pedestrians. Process this data in real-time to analyze
traffic conditions.

Traffic Light Control: Design an algorithm that uses the sensor data to dynamically control
traffic signals at intersections. The system should prioritize the most congested direction and
adapt to changing traffic patterns.

Pedestrian Safety: Implement pedestrian-detection capabilities in the system to ensure safe


crossings. The system should include features such as automatic walk signals and the ability
to extend green lights when pedestrians are present.

Energy Efficiency: Optimize the traffic light control algorithm to reduce unnecessary waiting
times and minimize energy consumption, thus contributing to environmental sustainability.

Remote Monitoring and Control: Provide a remote monitoring and control interface for traffic
management authorities to oversee and adjust the system as needed, taking into account
special events or emergency situations.

Testing and Validation: Conduct thorough testing and validation of the system's performance
under various traffic scenarios, including heavy congestion, low traffic .
3. BLOCK DIAGRAM

LED traffic light


LED traffic light

IR Sensor 3 IR Sensor 1

Arduino
Nano

IR Sensor 2
IR Sensor 4

LED traffic light


LED traffic light

3.1. COMPONENTS USED


1. Arduino Nano
2. Bread Board
3. IR Sensor
4. 220 Ohm Resistor
5. LED Lights
6. Normal Connecting Wires
7. Cable port
8. Jumper Wires:
M To M
M To F
3.2. METHODOLOGY

1. Components Setup:
Assemble the necessary components, including Arduino Nano, IR Sensors, LED lights
, Resistance, Jumper Wires, Connecting Wires, 220-ohm resistor in the bread board and
do the connection as given in circuit diagram.
Connect the components as follows:

Connect the IR sensor to the Arduino Nano using appropriate pins (e.g., VCC, GND,
and DATA).

Connect the all IR Sensors together with the help of connecting wires upto suitable
distance so that it will cover all the four sides of the road.

Connect the Cable Port to the Arduino Nano .


Set up the LED lights through resistance and join all the connection as provided in the
circuit diagram

2. Arduino Programming:
Write the Arduino sketch to automate the traffic controller by using LED lights ,In this
the red light indicates stop, yellow for Get ready, and green to indicates the vehicles to
move .
We will give some delay amount of time between traffic lights , As there is four sided
road ,So it has four traffic light.
When there is high density it will show green light for that road only, others sided is
red light only. Similarly ,it works for all four sides of the road.

4. Circuit Assembly:
Assemble the components on the bread board, ensuring proper connections, and use the
cable port to power the entire system.
Make sure to follow safety precautions and double-check your connections to avoid
any short circuits or electrical issues.
5. Calibration:

Calibrate the system to set the desired led light for different delay time. You may need
to set the accordingly delay time for different lights.

6.Testing and Troubleshooting:

Test the system under various conditions to ensure it functions as expected.


Monitor the LED lights for the functioning of traffic lights .Troubleshoot all the
connection under the system.

7. Final Integration:

Once the system is working correctly, integrate it into the desired environment, such as
Two sided road and Four Sided Road according to Density or busy area of the road.

8. Documentation:

Document the entire project, including the circuit diagram, Arduino code, and any
calibration settings.
Include instructions for maintenance and future modifications.

By following this methodology, you can create an Automatic traffic controller using
IoT using Arduino and defined programming with the listed components. This system
will help regulate the better movement of vehicles on the road as it is based on density
of vehicles, So it helps to remove congestion on the roads.
4.PROTOTYPE & IMPLEMENTATION
5.CONCLUSION

In conclusion, the implementation of an automatic traffic controller using IR sensors


represents a significant advancement in traffic management and safety. By harnessing the
power of IR sensors, this system offers a more efficient and reliable means of regulating
traffic flow, reducing congestion, and enhancing road safety. The ability to detect vehicles
and pedestrians accurately, even in adverse weather conditions, makes it a valuable asset for
modern transportation infrastructure.

Furthermore, this technology holds the potential to minimize human error and biases in traffic
management, as it operates solely based on data and predefined algorithms. As a result, it
promotes fairness and consistency in traffic control, ensuring that all road users receive
equitable treatment.

The automatic traffic controller using IR sensors can be a valuable addition to smart cities
and urban planning efforts, leading to improved traffic flow, reduced fuel consumption, and a
decrease in traffic-related accidents. As technology continues to evolve, it is essential to stay
up-to-date with the latest advancements and continuously improve these systems to meet the
growing demands of our ever-expanding urban landscapes. Ultimately, the integration of IR
sensor-based traffic controllers is a step in the right direction towards more efficient, safer,
and sustainable transportation networks.
6. REFERENCES

1. Automatic Traffic Controller(IoT)


Authors: Srinivas P , Kavinkumar B , Arun Venkat A , Dr.R.Senthil Kumar

2. “An IoT based automated traffic control system with real-time update capability”
Authors: B.L.Tanmai, K.RISHITHA, M.V.S.S.PRATYUSHA,
SK.KHAMURUNNISA, M.PADMA

3. Automatic lights Controller using Arduino


Authors: Shivashankar Adsule, Shivani Mohite, Rahul Patil,
Prof.Namratha Dhawas.

4. “Automated Real-Time Intelligent Traffic Control System for Smart Cities Using
Wireless Sensor Networks” - This article proposes an intelligent traffic control
system based on the design of a wireless sensor network (WSN) in order to collect
data on road traffic and also on available parking spaces in a smart city.

5. “Automatic Street Light Controller Using LDR and Solar” - This paper discusses
an automatic road light controller framework utilizing wireless sensor networks.
The system uses Arduino Uno board and various sensors to detect traffic on the
road
7.APPENDIX
Circuit Diagram:

Code:
#define ledA1 2
#define ledA2 3
#define ledA3 4

#define ledB1 5
#define ledB2 6
#define ledB3 7

#define ledC1 8
#define ledC2 9
#define ledC3 10

#define ledD1 12
#define ledD2 11
#define ledD3 13

int a1, a2, b1, b2, c1, c2, d1, d2;

void setup() {

Serial.begin(9600);

pinMode(ledA1, OUTPUT);
pinMode(ledA2, OUTPUT);
pinMode(ledA3, OUTPUT);

pinMode(ledB1, OUTPUT);
pinMode(ledB2, OUTPUT);
pinMode(ledB3, OUTPUT);

pinMode(ledC1, OUTPUT);
pinMode(ledC2, OUTPUT);
pinMode(ledC3, OUTPUT);

pinMode(ledD1, OUTPUT);
pinMode(ledD2, OUTPUT);
pinMode(ledD3, OUTPUT);

void loop() {

readSensor();

if (b1 == 1 && b2 == 1)
{
roadBopen();
}
else if (d1 == 1 && d2 == 1 && (b1 == 0 || b2 == 0))
{
roadDopen();
if (b1 == 1 && b2 == 1)
{
roadBopen();
}
}
else if (a1 == 1 && a2 == 1 && ((d2 == 0 || b2 == 0) || (d1 == 0 || b1 == 0)))
{
roadAopen();
if (b1 == 1 && b2 == 1)
{
roadBopen();
}
else if (d1 == 1 && d2 == 1 && (b1 == 0 || b2 == 0))
{
roadDopen();
}
}
else if (c1 == 1 && c2 == 1 && ((d2 == 0 || b2 == 0 || a2 == 0) || (d1 == 0 || b1
== 0 || a1 == 0)))
{
roadCopen();
if (b1 == 1 && b2 == 1)
{
roadBopen();
}
else if (d1 == 1 && d2 == 1 && (b1 == 0 || b2 == 0))
{
roadDopen();
}
}
else if ((b1 == 1 && b2 == 0) && (c1 == 1 || d1 == 1 || b1 == 1) && (c2 == 1 &&
d2 == 1 && b2 == 1))
{
roadBopen();
}
else if ((d1 == 1 && d2 == 0) && (c1 == 1 || a1 == 1) && (b1 == 0 && b2 ==
0) && (c2 == 0 && a2 == 0))
{
roadDopen();
}
else if ((a1 == 1 && a2 == 0) && (c1 == 1 && c2 == 0) && (d1 == 0 && d2
== 0) && (b1 == 0 && b2 == 0))
{
roadAopen();
}
else if ((c1 == 1 && c2 == 0) && (b1 == 0 || b2 == 0) && (d1 == 0 || d2 == 0)
&& (a1 == 0 || a2 == 0))
{
roadCopen();
}
else if ((b1 == 1 && b2 == 0) && (c1 == 0 || c2 == 0) && (d1 == 0 || d2 == 0)
&& (a1 == 0 || a2 == 0))
{
roadBopen();
}
else if ((d1 == 1 && d2 == 0) && (c1 == 0 || c2 == 0) && (b1 == 0 || b2 == 0)
&& (a1 == 0 || a2 == 0))
{
roadDopen();
}

else if ((a1 == 1 && a2 == 0) && (c1 == 0 || c2 == 0) && (d1 == 0 || d2 == 0)


&& (b1 == 0 || b2 == 0))
{
roadAopen();
}

else if (a1 == 0 && b1 == 0 && c1 == 0 && d1 == 0)


{
roadBopen();
if (a1 == 0 && b1 == 0 && c1 == 0 && d1 == 0)
{
roadDopen();
}
if (a1 == 0 && b1 == 0 && c1 == 0 && d1 == 0)
{
roadAopen();
}
if (a1 == 0 && b1 == 0 && c1 == 0 && d1 == 0)
{
roadCopen();
}
}
}

void readSensor()
{
a1 = analogRead(A7);
a2 = analogRead(A6);
b1 = analogRead(A4);
b2 = analogRead(A5);
c1 = analogRead(A1);
c2 = analogRead(A0);
d1 = analogRead(A3);
d2 = analogRead(A2);
if (a1 < 400) a1 = 1; else a1 = 0; if (a2 < 400) a2 = 1; else a2 = 0;
if (b1 < 400) b1 = 1; else b1 = 0; if (b2 < 400) b2 = 1; else b2 = 0;
if (c1 < 400) c1 = 1; else c1 = 0; if (c2 < 400) c2 = 1; else c2 = 0;
if (d1 < 400) d1 = 1; else d1 = 0; if (d2 < 400) d2 = 1; else d2 = 0;

Serial.print(a1);
Serial.print("\t");
Serial.print(a2);
Serial.print("\t");
Serial.print(b1);
Serial.print("\t");
Serial.print(b2);
Serial.print("\t");
Serial.print(c1);
Serial.print("\t");
Serial.print(c2);
Serial.print("\t");
Serial.print(d1);
Serial.print("\t");
Serial.print(d2);
Serial.println("\t");

void roadAopen()
{
digitalWrite(ledA3, LOW);

digitalWrite(ledA1, HIGH);
digitalWrite(ledB3, HIGH);
digitalWrite(ledC3, HIGH);
digitalWrite(ledD3, HIGH);
delay(10000);
digitalWrite(ledA1, LOW);
digitalWrite(ledA2, HIGH);
delay(1000);
digitalWrite(ledA2, LOW);
readSensor();
}

void roadBopen()
{
digitalWrite(ledB3, LOW);

digitalWrite(ledA3, HIGH);
digitalWrite(ledB1, HIGH);
digitalWrite(ledC3, HIGH);
digitalWrite(ledD3, HIGH);
delay(10000);
digitalWrite(ledB1, LOW);
digitalWrite(ledB2, HIGH);
delay(1000);
digitalWrite(ledB2, LOW);
readSensor();
}

void roadCopen()
{
digitalWrite(ledC3, LOW);

digitalWrite(ledA3, HIGH);
digitalWrite(ledB3, HIGH);
digitalWrite(ledC1, HIGH);
digitalWrite(ledD3, HIGH);
delay(10000);
digitalWrite(ledC1, LOW);
digitalWrite(ledC2, HIGH);
delay(1000);
digitalWrite(ledC2, LOW);
readSensor();
}

void roadDopen()
{
digitalWrite(ledD3, LOW);

digitalWrite(ledA3, HIGH);
digitalWrite(ledB3, HIGH);
digitalWrite(ledC3, HIGH);
digitalWrite(ledD1, HIGH);
delay(10000);
digitalWrite(ledD1, LOW);
digitalWrite(ledD2, HIGH);
delay(1000);
digitalWrite(ledD2, LOW);
readSensor();
}

You might also like