IOT Project Report
IOT Project Report
IOT Project Report
SUBALAKSHMI.K 9923017033
1. Abstract 1
2. Introduction 2
2.1. Motivation 3
3.2. Methodology 8
5. Conclusion 11
6. References 12
Appendix 13
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
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.
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.
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.
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.
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.
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
IR Sensor 3 IR Sensor 1
Arduino
Nano
IR Sensor 2
IR Sensor 4
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.
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.
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
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
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
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
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();
}
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();
}