Sunteți pe pagina 1din 8

4 Way Traffic Light Control System with Arduino - Smart Technology Projects https://www.smarttechproject.com/4-way-traffic-light-control-system-wit...

(https://www.smarttechproject.com/)

Home (https://www.smarttechproject.com/) Projects (https://www.smarttechproject.com/projects/) Tutorials (https://www.smarttechproject.com/tutorials/)

Contact Us (https://www.smarttechproject.com/contact-us/) About Us (https://www.smarttechproject.com/about-us/)

4 Way Traffic Light Control System with Arduino NEED HELP W ITH Y O UR ELECTRO NI CS
PRO JECT?

We can design your project for you and guide


you through at an affordable price. Contact us
and get your project done.

Your Name (required)

Your Email (required)

Project Title

Explain your project

Introduction
SE ND
In our tutorial today, we shall be designing a 4-way traffic light control system. The foundation for
building this project was laid in our previous tutorial; how to interface LED with Arduino
SUBSCRI BE TO RECEI VE O UR LATEST
(https://www.smarttechproject.com/how-to-interface-led-with-arduino-uno/). To better understand this PRO JECTS AND TUTO RI ALS

project, you may want to check that out.


Traffic congestion is a problem we face today in most of our modern cities around the world. This has
led to many problems in populated cities; making it difficult and uncomfortable for travelers. Many SU BS CRI BE

lives and property have been lost, many lost opportunities among others. One of the ways to help
solve this problem of congestion is to have a proper guide for road users. This is the main aim of this JO IN O UR SUBSCRI BERS

design. This is a simple implementation of the traffic lights control system but can be extended to a
real-time system. It is easy to design and to implement, follow carefully the steps given in this
tutorial.

The advantage of this project

As stated earlier in the introduction, this is a project to help solve the problem of congestion in our
modern cities today. The understanding of the design and the implementation of this project will help
save lives and make traveling experience wonderful. This tutorial will also help you to build more
impressive projects from the principles learned here. The design process and programming is similar
to the design of many other electronics projects. This project is cost-effective from the design to the
implementation.

1 de 8 3/07/2019, 2:24 p. m.
4 Way Traffic Light Control System with Arduino - Smart Technology Projects https://www.smarttechproject.com/4-way-traffic-light-control-system-wit...
Lists of components

Arduino Uno
(https:/ (https:/
LED
Connecting wires /www.f /www.i
Traffic light (Red, Green, and Yellow)
4 Green LEDs (https:/ aceboo nstagr

Brief introduction of the components /twitter. k.com am.co

Arduino Uno com /Smart m

Arduino Uno is the main components of this design; it will coordinate all the switching of the lights /Smart Techno /smartt
and the timing. Arduino is a simple to use microcontroller board used in most engineering projects
Techpr logyPr echproj
where automation is needed. Sensor, modules and many others things can be interfaced with the
Arduino board to accomplish a task. Arduino is an open source board which means that all the
oj) oject/) ect/)
design specifications, schematics, and software library are available openly for all users. The Arduino
board has gained popularity today among many hobbyists because it is friendly and easy to use and M O ST RECENT PO STS

can be used to design complex projects. It can be easily programmed using its own software; the
How to Create New Project in Proteus 8 Pro
Arduino IDE. The nature of the Arduino language is friendly and makes it easy for everyone to (https://www.smarttechproject.com/how-to-create-

develop prototypes and hardware to suit their intended purpose. new-project-in-proteus-8-pro/)

Basics of Arduino Programming Language


LEDs (https://www.smarttechproject.com/basics-of-
arduino-programming-language/)
LED (Light Emitting Diode) is a P N junction diode which emits light when activated. It is activated
Hex File from Arduino IDE | How to get it
when the PN junction sustains a forward voltage (forward bias), a current from P to N, called forward (https://www.smarttechproject.com/hex-file-from-
arduino-ide-how-to-get-it/)
current. When this current is applied, electrons recombine with electron holes within the device
thereby releasing energy in form of light. LED finds application in traffic signals, lighting, camera Getting Started with Arduino Software (IDE)
(https://www.smarttechproject.com/getting-started-
flashes etc. The way to distinguish between the positive and negative terminal is, the positive is with-arduino-software-ide/)

longer than the negative in length.


How to Interface Ultrasonic Sensor with Arduino
(https://www.smarttechproject.com/how-to-
Traffic Light interface-ultrasonic-sensor-with-arduino/)

How to Interface Smoke Sensor MQ-2 with Arduino


This is a prototype from the proteus simulation software. It looks almost the same as the traffic light
(https://www.smarttechproject.com/how-to-
in real time. interface-smoke-sensor-mq-2-with-arduino/)

4 Way Traffic Light Control System with Arduino


Design process (https://www.smarttechproject.com/4-way-traffic-
light-control-system-with-arduino/)
Since we are implementing a traffic light control system for a 4-way intersection, the circuit consists
How to Interface LED with Arduino Uno
of the 4 prototype traffic light system which could be replaced by 12 LEDs (4 red, 4 green and 4 (https://www.smarttechproject.com/how-to-

yellow). This will control the lights for the vehicles moving straight forward either from North to South interface-led-with-arduino-uno/)

and vice versa or from West to East and vice versa. We also need 4 green LEDs to control vehicles How to Interface LED with 8051 Microcontroller
(https://www.smarttechproject.com/how-to-
intersecting either from South to West and North to East or from East to South and from West to
interface-led-with-8051-microcontroller/)
North. This flow of movement is shown below for better understanding.
Keil µVision software | Step by step guide with
All the traffic light prototype and the LEDs are connected to the Arduino Uno for controlling. diagram (https://www.smarttechproject.com/keil-

How the various components are connected as shown below. In the practical implementation of this %c2%b5vision-software-step-by-step-guide-with-
diagram/)
project, a current limiting resistor is needed in order not to burn the LEDs.

Working principle of the project

Control Light indication

There are three control lights or signals, which will provide the instruction to the driver.
RED light – instructs the driver to STOP at the intersection.
YELLOW light – instructs the driver to WAIT (If a red light is next) or GET READY (if a green light is
next)

2 de 8 3/07/2019, 2:24 p. m.
4 Way Traffic Light Control System with Arduino - Smart Technology Projects https://www.smarttechproject.com/4-way-traffic-light-control-system-wit...
GREEN light – instructs the driver to GO through the intersection.

The principle of this project is simple; it’s basically controlling the traffic light with lines of code. The
transition from one state to another state is coordinated by the Arduino Uno. The time interval for a
green, yellow or red light to be on is also coordinated by the Arduino Uno. According to the code
written and uploaded into the Arduino Uno, the traffic light is being controlled.
Note that this is a simple implementation of a 4-way traffic control system, it is not the ideal
implementation for a real-life scenario but it will give you an idea of the basic process behind the
traffic light control system.

For easy understanding, the four intersecting roads have been identified as North, South, West, and
East. The red arrow in the diagrams shows the direction of the movement for better understanding.

In the first state, the North and South get their green light turned on. This allows movements from
North to South and from South to North. At the same time, the movement is allowed from South to
East and also from North to West as shown in the diagram below. This state is maintained for about
5 seconds after which it transits to the next state.

The next state is a warning indicator, the green light of North and South get turned off and the yellow
light of North and South get turned on as shown in the diagram below. This indicates that the red
light is about to turn on and the direction of movement will change. This state is for about 2 seconds.

3 de 8 3/07/2019, 2:24 p. m.
4 Way Traffic Light Control System with Arduino - Smart Technology Projects https://www.smarttechproject.com/4-way-traffic-light-control-system-wit...

In the next state, the side light of North and South gives a green light. This allows vehicles to move
from South to West and also from North to East as shown in the diagram below. This state stays for
about 3 seconds after which it moves to the next state.

In this state, the East and West get their green light turned on. This allows movements from East to
West and from West to East. At the same time, the movement is allowed from East to North and
also from South to North as shown in the diagram below. This state is maintained for about 5
seconds after which it transit to the next state.

The next state is a warning indicator, the green light of East and West get turned off and the yellow
light of East and West get turned on as shown below. This indicates that the red light is about to turn

4 de 8 3/07/2019, 2:24 p. m.
4 Way Traffic Light Control System with Arduino - Smart Technology Projects https://www.smarttechproject.com/4-way-traffic-light-control-system-wit...
on and the direction of movement will change. This state is for about 2 seconds.

In this next state, the side light of East and West gives a green light. This allows vehicles to move
from East to South and also from West to North as shown in the diagram below. This state stays for
about 3 seconds.

The system then loops back to the first state where the process mentioned above will be repeated all
over again.

Code

The entire process is maintained by code, so after connecting the components as described above,
start the Arduino Software (IDE) and enter the code written below. To know to how to write code and
download it into the Arduino board, please check our tutorial on Getting started with Arduino
Software.

5 de 8 3/07/2019, 2:24 p. m.
4 Way Traffic Light Control System with Arduino - Smart Technology Projects https://www.smarttechproject.com/4-way-traffic-light-control-system-wit...

6 de 8 3/07/2019, 2:24 p. m.
4 Way Traffic Light Control System with Arduino - Smart Technology Projects https://www.smarttechproject.com/4-way-traffic-light-control-system-wit...

S hare Tweet Pin Em ail Share Share

YOU MIGHT AL SO L IKE

8051 Architecture |
Important Features
(https://www.smarttec
hproject.com/8051-
architect/)
May 22, 2018 (https://www.smarttechproject.
com/how-to-create-new-

(https://www.smarttechproject. project-in-proteus-8-pro/)
(https://www.smarttechproject.
com/how-to-interface- com/hex-file-from-arduino-ide- How to Create New
ultrasonic-sensor-with- how-to-get-it/) Project in Proteus 8
arduino/) Pro
Hex File from
(https://www.smarttec
Arduino IDE | How to
How to Interface hproject.com/how-to-
get it
Ultrasonic Sensor create-new-project-in-
(https://www.smarttec
with Arduino proteus-8-pro/)
hproject.com/hex-file-
(https://www.smarttec August 31, 2018
from-arduino-ide-
hproject.com/how-to-
how-to-get-it/)
interface-ultrasonic-
sensor-with-arduino/) August 22, 2018

August 20, 2018

Leave a Reply

Join the conversation via an occasional email to receive notification P O ST C OM MEN T

7 de 8 3/07/2019, 2:24 p. m.
4 Way Traffic Light Control System with Arduino - Smart Technology Projects https://www.smarttechproject.com/4-way-traffic-light-control-system-wit...

Home (https://www.smarttechproject.com/)
(https://www.facebook.com
/SmartTechnologyProject/) Contact Us (https://www.smarttechproject.com/contact-
us/)

(https://www.instagram.com/smarttechproject/) About Us (https://www.smarttechproject.com/about-us/)

Privacy Policy (https://www.smarttechproject.com


(https://twitter.com/SmartTechproj) /privacy-policy/)

8 de 8 3/07/2019, 2:24 p. m.

S-ar putea să vă placă și