20MTE032

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

MICRO CONTROLLER AND EMBEDDED DESIGN

COMPLEX ENGINEERING PROBLEM


ASSIGNMENT
Submitted To: Mam Memona Memon
Submitted By: Rohan Khalid Arain
Roll No: 20MTE032
Department: MECHATRONICS
TABLE OF
CONTENTS

 OBJECT………………………………………………………………………………………………

 INTRODUCTION……………………………….....................................................

 COMPONENTS……………………………………………………………………………………

 ADVANTAGES OF TRAFFIC LIGHT SIGNALS………………………………………….

 WORKING OF TRAFFIC LIGHT SIGNAL……...............................................

 CIRCUIT DIAGRAM…………………………………………………………………………….

 SIMULATION AND IMPLEMENTATION OF TRAFFIC LIGHT CONTROL

SYSTEM………………………………………………………………………………………………

 CODE………………………………………………………………………………………………….

 CONCLUSION…………………………………......................................................
OBJECT:
Design a traffic light signal containing Interfacing and operation of seven segment
display (down counter) starting from 15 seconds to allow and forbid the flow of traffic through
an 8051 microcontroller.

Introduction:
Traffic light system was one of the fascinating applications of Embedded
systems and have been using the same till this day. Automotive technologies are gaining importance
in modern day traffic control systems, since the number of road vehicles and passengers is rapidly
growing. Hence there is a perpetual need for safety-critical traffic signal control automation. The main goal
of engineering is the planning and management of traffic control works. The developing of technology,
microcontroller is becoming more suitable chip to control electronic, electrical and mechanical devices.
Microcontroller are used in automatically controlled products. Therefore, this provide easy approach to a
microcontroller based traffic light system, because microcontroller can operate the traffic light control
system without the help of any additional devices. The traffic lights implemented using LED’s arrays This
system uses 8051 microcontroller 7-segments and LED’s for indication. The LED’s which was
used as lights was connected to the Microcontroller. A seven segment display module is an
electronic device used to display digital numbers and it is made up of seven LED segments.
Because of the small size of the LEDs, it is really easy for a number of them to be connected
together to make a unit like seven segment display. A seven segment consists of eight LEDs
which are aligned in a manner so as to display digits from 0 to 9 when proper combination of
LED is switched on. Seven segment uses seven LED’s to display digits from 0 to 9 and the eighth
LED is used for the dot. Segment displays are usually driven by a special type of integrated
circuit (IC) commonly known as a 7- segment decoder/driver.

Components:

 Red LED
 Yellow LED
 Green LED
 Power
 Ground
 Seven Segment
 8051 Microcontroller
Advantages of Traffic light signals:
In recent days, moving by vehicles has expanded around
the world, and many nations are facing various issues at traffic light connection, which have
brought a number of accidents between the vehicles to the emergency. The fast increasing
number of passenger vehicles in urban cities and other urbanization activities have created
huge problems on our transportation systems. Largest cities in the world have the problem with
traffic congestion. Karachi, Islamabad and Lahore are one of the most populated cities in
Pakistan, faces increasing constraints on their resources and traffic congestions. Traffic
congestion in tightly populated urban areas negatively impacts our living standard. A long-time
delays and emergency cases at traffic light intersection are one of basics reasons of traffic
congestion. Traffic congestion occurs while many vehicles creates the greater space than the
street space volume. The scientists state that there are several problems due to traffic
congestion, such as wasting time of vehicles that reduces regional economic health; increasing
air pollution and carbon dioxide emissions by waste fuel; delays; emergency cases; stress of
drivers, which is a reason of increasing roads accidents; wear and tear on vehicles and so on. So,
it is important to develop reliable and easiest traffic control system to solve congestion problem
at intersection road. One of the solutions to decrease traffic congestion is to build a new
infrastructure of roads that should accommodate the increased number of vehicles. Another
way is to improve the usage of existing roads by efficiently controlling of traffic light timings.

Working of Traffic Light Signals:


In the above circuit diagram of traffic light controller, a seven-segment display is used
as a counter display, and three LEDs are used for the purpose of traffic light control. An 8051
Microcontroller is the brain of this whole project and is used to initiate the traffic signal at the
intersections on road. The LEDs are interfaced to the Port zero of the microcontroller and are
powered with power supply. Seven-segment display is connected to the port2 pins of the 8051
microcontroller with a common anode configuration. The LEDs get automatically switched on
and off by making the corresponding port pins of the microcontroller high, based on the 8051
microcontroller and its programming done by using software. At a particular period of time,
only the green light holds ON and the other lights remains OFF, and after sometime, the
changeover traffic light control from green to red takes place by making the succeeding change
for glowing of yellow LED. This process continues as a cycle and the timing for changing the
LEDs can be displayed with the use of a seven-segment LED display in this project.
Circuit Diagram:
Simulation and implementation of traffic light control:
The simulation of PIC based traffic light control system is executed in Proteus Design Suite 8
software. We used Proteus Design Suite to build the model of traffic light control system for different
way and junction intersection and to implement simulation of the system. Microcontroller and
programmer/debugger are utilized to execute in the prototype the control of traffic light. The program
code for microcontroller realized in assembler language code.

Code:
#include <reg51.h> // Include header file for 8051 microcontroller
sbit red_signal = P1^0; // Define red signal pin as P1.0
sbit yellow_signal = P1^1; // Define yellow signal pin as P1.1
sbit green_signal = P1^2; // Define green signal pin as P1.2
void delay(unsigned int); // Declare delay function
void main() {
while(1) { // Loop indefinitely
green_signal = 1; // Turn on green signal
delay(15000); // Delay for 15 seconds
green_signal = 0; // Turn off green signal
yellow_signal = 1; // Turn on yellow
signal delay(3000); // Delay for 3 seconds
yellow_signal = 0; // Turn off yellow signal
red_signal = 1; // Turn on red signal
delay(12000); // Delay for 12 seconds
red_signal = 0; // Turn off red signal
}
}
void delay(unsigned int count) {
unsigned int i, j;
For(i=0; i<count; i++)
for(j=0; j<100; j++);
Conclusion:
The fast increasing number of passenger vehicles in urban cities and other
urbanization activities has created a huge problem on our transportation systems. This is used
to solve the problems of traffic congestion at intersection road. The microcontroller-based
traffic light control system is developed for way and junctions at road intersection with arrowed
signal for each direction. The traffic light control system is designed to provide either normal or
emergency mode cases for vehicles and reduce of traffic congestion at intersection road. The
simulation of based traffic light control system is executed in Proteus Design Suite 8 software.
Proteus Design Suite software applied to develop schematic diagram There are several
advantages of this system: 1. Simplicity, user friendly. Easily programmable. 2. Using of LEDs
provide a longer service life, save a lot of energy and has less impact on the environment 3.
Waiting time of cars at intersection reduces. So, it also reduces traffic congestion. 4. Gives a
quick response to change in traffic, i.e. highly responsive. In our future works we are planning to
develop multi-agent based control of traffic road network including not only vehicles, also
buses, and bicycles in real-time.

THANK YOU

You might also like