SlideShare a Scribd company logo
1
DEPARTMENT OF ELECTRONICS & COMMUNICATION
ENGINEERING
PONDICHERRY UNIVERSITY
SMART TRAFFIC LIGHT CONTROLLER USING
VERILOG
GUIDED BY
PROF. Dr. P. SAMUNDISWARI
Dept. Of Electronics Engineering
PRESENTED BY
BEULAH .A
VAISHALI .K
M.Tech (ECE)-Ist yr
2
CONTENTS
S. NO. TOPIC PAGE NO.
1 OBJECTIVE 3
2 INTRODUCTION 3
3 BLOCK DIAGRAM 4
4 WORKING PRINCIPLE 5
5 STATE DIAGRAM 6
6 CODE 7
7 TEST BENCH 10
8 SIMULATION OUTPUT 11-15
9 ADVANTAGES AND DISADVANTAGES 15 -16
10 CONCLUSION 16
11 REFERENCES 16
3
OBJECTIVE:
• The main aim of the project is to design a two way traffic light controller
using verilog.
• One with the help of timing mechanism and other by the help of detector or
sensor.
SOFTWARE USED:
• Xilinx 14.7
• Verilog: C like HDL is easier to comprehend and saves design time since the
syntax is more concise that VHDL
INTRODUCTION:
• In general, many traffic lights are operates on a timing mechanism that
changes the light after given time interval.
• The traffic light system consists of three important parts, in that traffic light
controller is first one, because of it represent brain of the traffic system.
• The second part is the signal visualization or in simple words is signal face.
• The third part is the detector or sensor.
TRAFFIC LIGHTS:
• An intelligent traffic light system senses the presence or absence of vehicles
and reacts accordingly.
• The idea behind intelligent traffic systems is that drivers will not spend
unnecessary time waiting for the traffic lights to change.
• In the traffic light control system, the main controller, control circuit,
counter, timer, decoder, clock signal generator, decoder drive circuit and
digital display decoder drive circuit are needed to complete the whole
process of controlling the traffic light.
4
BLOCK DIAGRAM:
EXPANDED RTL VIEW:
5
WORKING PRINCIPLE;
• The main road's lights are always green for the major traffic to pass.
• The main road's lights turn red only when there is a car on either side of the
side road for a period of time.
• When detector detect the vehicles, only then the lights on the side road turn
from red->green while the main road's lights turn from green->yellow->red.
• After the given interval of time, lights on the main road turns to red-
>yellow->green and the side road turns from green->red.
• In the timer part, there are three things one is the short time pulse (TS) and
6
the long time pulse (TL) and the last is a response to start the timer (ST)
signal.
STATE DIAGRAM:
• The main road will be green until no cars are found and it remains in state
S0.
• When long time expires and cars found the transition from S0 to S1 takes
place.
• When the short time interval expires it transit from S1 to S2.
• When the long time interval doesn't expire and cars are detected it will in the
state S2.
• When the long time expires and no more cars detected it transit from S2 to
S3.
• When the short interval expires it transit from S3 to S0 and the cycle
continues.
7
CODE:
MAIN MODULE:
`timescale 1ns / 1ps
module main(
output MR,
output MY,
output MG,
output SR,
output SY,
output SG,
input reset,
input C,
input Clk
);
timer part1(TS, TL, ST, Clk);
fsm part2(MR, MY, MG, SR, SY, SG, ST, TS, TL, C, reset, Clk);
endmodule
TIMER MODULE:
`timescale 1ns / 1ps
module timer(
output TS,
output TL,
input ST,
input Clk
);
integer value;
8
assign TS=(value>=4);
assign TL=(value>=14);
always@(posedge ST or posedge Clk)
begin
if(ST==1)begin
value=0;
end
else begin
value=value+1;
end
end
endmodule
FSM MODULE:
`timescale 1ns / 1ps
module fsm(
output MR,
output MY,
output MG,
output SR,
output SY,
output SG,
output ST,
input TS,
input TL,
input C,
input reset,
9
input Clk
);
reg [6:1] state;
reg ST;
parameter mainroadgreen= 6'b001100;
parameter mainroadyellow= 6'b010100;
parameter sideroadgreen= 6'b100001;
parameter sideroadyellow= 6'b100010;
assign MR = state[6];
assign MY = state[5];
assign MG = state[4];
assign SR = state[3];
assign SY = state[2];
assign SG = state[1];
initial begin state = mainroadgreen; ST = 0; end
always @(posedge Clk)
begin
if (reset)
begin state = mainroadgreen; ST = 1; end
else
begin
ST = 0;
case (state)
mainroadgreen:
if (TL & C) begin state = mainroadyellow; ST = 1; end
mainroadyellow:
10
if (TS) begin state = sideroadgreen; ST = 1; end
sideroadgreen:
if (TL | !C) begin state = sideroadyellow; ST = 1; end
sideroadyellow:
if (TS) begin state = mainroadgreen; ST = 1; end
endcase
end
end
endmodule
TEST BENCH:
`timescale 1ns / 1ps
module fsm_test;
// Inputs
reg TS; reg TL; reg C;reg reset; reg Clk;
// Outputs
wire MR; wire MY; wire MG; wire SR; wire SY; wire SG;
wire ST;
// Instantiate the Unit Under Test (UUT)
fsm uut (
.MR(MR), .MY(MY), .MG(MG), .SR(SR), .SY(SY), .SG(SG), .ST(ST),
.TS(TS), .TL(TL), .C(C),
.reset(reset), .Clk(Clk)
);
initial begin
// Initialize Inputs
TS = 0;TL = 0;C = 0;reset = 1;
11
Clk = 0;
#100; TS=0;TL=1;C=1;reset=0;
#100; TS=0;TL=0;C=0;reset=1;
#100; TS=1;TL=1;C=0;reset=0;
#100;
end
always
begin
#100
Clk=~Clk;
end
endmodule
SIMULATION OUTPUT:
12
13
DEVICE UTILIZATION SUMMARY:
14
HDL SYNTHESIS REPORT:
15
ADVANTAGES:
• Traffic signals help for movement of traffic securely without any collision.
• The drivers will not spend unnecessary time waiting for the traffic lights to
change.
• Traffic control by signals is accurate and economical as compared to traffic
police control.
16
DISADVANTAGES :
• During signals breakdown, there are serious and wide-spread traffic
difficulties during peak hours.
CONCLUSION;
• In this project we introduced detector based technology for traffic control.
• We conclude that it provides powerful solution to improve existing system
with the new smart traffic light controller.
FUTURE SCOPE :
• Blinking of lights according to the traffic level present in the road can be
added.
• Managing traffic when any emergency vehicle come can also be introduced.
For example ambulance.
REFERENCES:
• Ali Qureshi .M, Abdul Aziz, “A Verilog Model of Traffic Control System
using Mealy State Machines” in DOI:10.7763/IJCEE.2012.V4.521
• Swetha Reddy.K, Shabarinath .B.B, “timing and synchronization for explicit
FSM based traffic light controller”, Published 2019
• Owmya .B, ”An Advanced Traffic Light Controller using Verilog HDL”,
Published 2017
Ad

More Related Content

What's hot (20)

Four way traffic light conrol using Verilog
Four way traffic light conrol using VerilogFour way traffic light conrol using Verilog
Four way traffic light conrol using Verilog
Utkarsh De
 
Verilog full adder in dataflow & gate level modelling style.
Verilog full adder in dataflow  & gate level modelling style.Verilog full adder in dataflow  & gate level modelling style.
Verilog full adder in dataflow & gate level modelling style.
Omkar Rane
 
VLSI Lab manual PDF
VLSI Lab manual PDFVLSI Lab manual PDF
VLSI Lab manual PDF
UR11EC098
 
design of FPGA based traffic light controller system
design of FPGA based traffic light controller systemdesign of FPGA based traffic light controller system
design of FPGA based traffic light controller system
Vinny Chweety
 
Verilog VHDL code Parallel adder
Verilog VHDL code Parallel adder Verilog VHDL code Parallel adder
Verilog VHDL code Parallel adder
Bharti Airtel Ltd.
 
Verilog coding of demux 8 x1
Verilog coding of demux  8 x1Verilog coding of demux  8 x1
Verilog coding of demux 8 x1
Rakesh kumar jha
 
Periodic vs. aperiodic signal
Periodic vs. aperiodic signalPeriodic vs. aperiodic signal
Periodic vs. aperiodic signal
Tahsin Abrar
 
M ary psk and m ary qam ppt
M ary psk and m ary qam pptM ary psk and m ary qam ppt
M ary psk and m ary qam ppt
DANISHAMIN950
 
Latches and flip flops
Latches and flip flopsLatches and flip flops
Latches and flip flops
mubashir farooq
 
MULTIPLEXER
MULTIPLEXERMULTIPLEXER
MULTIPLEXER
Siddhi Shrivas
 
Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086
Urvashi Singh
 
verilog code for logic gates
verilog code for logic gatesverilog code for logic gates
verilog code for logic gates
Rakesh kumar jha
 
Traffic light controller with verilog
Traffic light controller with verilogTraffic light controller with verilog
Traffic light controller with verilog
Chetan Dabral
 
Flipflop
FlipflopFlipflop
Flipflop
sohamdodia27
 
Embedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontrollerEmbedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontroller
Gaurav Verma
 
Delays in verilog
Delays in verilogDelays in verilog
Delays in verilog
JITU MISTRY
 
CMOS LOGIC STRUCTURES
CMOS LOGIC STRUCTURESCMOS LOGIC STRUCTURES
CMOS LOGIC STRUCTURES
VaishaliVaishali14
 
Question paper with solution the 8051 microcontroller based embedded systems...
Question paper with solution  the 8051 microcontroller based embedded systems...Question paper with solution  the 8051 microcontroller based embedded systems...
Question paper with solution the 8051 microcontroller based embedded systems...
manishpatel_79
 
T-states in microprocessor 8085
T-states in microprocessor 8085T-states in microprocessor 8085
T-states in microprocessor 8085
yedles
 
Unit 3
Unit 3Unit 3
Unit 3
Bandana Mallick
 
Four way traffic light conrol using Verilog
Four way traffic light conrol using VerilogFour way traffic light conrol using Verilog
Four way traffic light conrol using Verilog
Utkarsh De
 
Verilog full adder in dataflow & gate level modelling style.
Verilog full adder in dataflow  & gate level modelling style.Verilog full adder in dataflow  & gate level modelling style.
Verilog full adder in dataflow & gate level modelling style.
Omkar Rane
 
VLSI Lab manual PDF
VLSI Lab manual PDFVLSI Lab manual PDF
VLSI Lab manual PDF
UR11EC098
 
design of FPGA based traffic light controller system
design of FPGA based traffic light controller systemdesign of FPGA based traffic light controller system
design of FPGA based traffic light controller system
Vinny Chweety
 
Verilog VHDL code Parallel adder
Verilog VHDL code Parallel adder Verilog VHDL code Parallel adder
Verilog VHDL code Parallel adder
Bharti Airtel Ltd.
 
Verilog coding of demux 8 x1
Verilog coding of demux  8 x1Verilog coding of demux  8 x1
Verilog coding of demux 8 x1
Rakesh kumar jha
 
Periodic vs. aperiodic signal
Periodic vs. aperiodic signalPeriodic vs. aperiodic signal
Periodic vs. aperiodic signal
Tahsin Abrar
 
M ary psk and m ary qam ppt
M ary psk and m ary qam pptM ary psk and m ary qam ppt
M ary psk and m ary qam ppt
DANISHAMIN950
 
Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086
Urvashi Singh
 
verilog code for logic gates
verilog code for logic gatesverilog code for logic gates
verilog code for logic gates
Rakesh kumar jha
 
Traffic light controller with verilog
Traffic light controller with verilogTraffic light controller with verilog
Traffic light controller with verilog
Chetan Dabral
 
Embedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontrollerEmbedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontroller
Gaurav Verma
 
Delays in verilog
Delays in verilogDelays in verilog
Delays in verilog
JITU MISTRY
 
Question paper with solution the 8051 microcontroller based embedded systems...
Question paper with solution  the 8051 microcontroller based embedded systems...Question paper with solution  the 8051 microcontroller based embedded systems...
Question paper with solution the 8051 microcontroller based embedded systems...
manishpatel_79
 
T-states in microprocessor 8085
T-states in microprocessor 8085T-states in microprocessor 8085
T-states in microprocessor 8085
yedles
 

Similar to Smart traffic light controller using verilog (20)

MICROCONTROLLER_ VTU_8051 TIMERS AND SERIAL PORTSModule3.pptx
MICROCONTROLLER_ VTU_8051 TIMERS AND SERIAL PORTSModule3.pptxMICROCONTROLLER_ VTU_8051 TIMERS AND SERIAL PORTSModule3.pptx
MICROCONTROLLER_ VTU_8051 TIMERS AND SERIAL PORTSModule3.pptx
Veenask6
 
Digital timer
Digital timerDigital timer
Digital timer
PrasadPurohit1988
 
INTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCK
INTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCKINTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCK
INTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCK
Santanu Chatterjee
 
Timing notes 2006
Timing notes 2006Timing notes 2006
Timing notes 2006
pavan kumar
 
GIC India catalogue
GIC India catalogueGIC India catalogue
GIC India catalogue
General Industrial Controls Pvt. Ltd
 
Lecture 2 timers, pwm, state machine IN PIC
Lecture 2   timers, pwm, state machine IN PIC Lecture 2   timers, pwm, state machine IN PIC
Lecture 2 timers, pwm, state machine IN PIC
أشرف أمجد الشريف
 
Digital Alarm Clock (IC-TMS-8560)
Digital Alarm Clock (IC-TMS-8560)Digital Alarm Clock (IC-TMS-8560)
Digital Alarm Clock (IC-TMS-8560)
Chintan Patel
 
ANALOG AND DIGITAL ELECTRONICS unit 5
ANALOG AND DIGITAL ELECTRONICS unit 5ANALOG AND DIGITAL ELECTRONICS unit 5
ANALOG AND DIGITAL ELECTRONICS unit 5
ACE ENGINEERING COLLEGE
 
DFT Rules, set of rules with illustration
DFT Rules, set of rules with illustrationDFT Rules, set of rules with illustration
DFT Rules, set of rules with illustration
Jason J Pulikkottil
 
Get Programmable digital timer | Programmable timer switch | Cyclic Timer- GI...
Get Programmable digital timer | Programmable timer switch | Cyclic Timer- GI...Get Programmable digital timer | Programmable timer switch | Cyclic Timer- GI...
Get Programmable digital timer | Programmable timer switch | Cyclic Timer- GI...
PrasadPurohit1988
 
432112393-Manual-Injecao-Mercedes-Bens-Detroit.pdf
432112393-Manual-Injecao-Mercedes-Bens-Detroit.pdf432112393-Manual-Injecao-Mercedes-Bens-Detroit.pdf
432112393-Manual-Injecao-Mercedes-Bens-Detroit.pdf
Jeferson872537
 
MODULE TITLE PROGRAMMABLE LOGIC CONTROLLERSTOPIC TITLE.docx
MODULE TITLE    PROGRAMMABLE LOGIC CONTROLLERSTOPIC TITLE.docxMODULE TITLE    PROGRAMMABLE LOGIC CONTROLLERSTOPIC TITLE.docx
MODULE TITLE PROGRAMMABLE LOGIC CONTROLLERSTOPIC TITLE.docx
roushhsiu
 
8051 ch9-950217
8051 ch9-9502178051 ch9-950217
8051 ch9-950217
Gopal Krishna Murthy C R
 
Unit3_all timer interfacing in microcontroller
Unit3_all timer interfacing in microcontrollerUnit3_all timer interfacing in microcontroller
Unit3_all timer interfacing in microcontroller
thahaxaina025
 
Deep Explaination of STA_setupandholdchecks
Deep Explaination of STA_setupandholdchecksDeep Explaination of STA_setupandholdchecks
Deep Explaination of STA_setupandholdchecks
YashwanthPola1
 
ppt of Three phase fault analysis with auto reset for temporary fault and tri...
ppt of Three phase fault analysis with auto reset for temporary fault and tri...ppt of Three phase fault analysis with auto reset for temporary fault and tri...
ppt of Three phase fault analysis with auto reset for temporary fault and tri...
Vikram Rawani
 
Introduction to automation
Introduction to automationIntroduction to automation
Introduction to automation
Valai Ganesh
 
A multi phase decision on reliability growth with latent failure modes
A multi phase decision on reliability growth with latent failure modesA multi phase decision on reliability growth with latent failure modes
A multi phase decision on reliability growth with latent failure modes
ASQ Reliability Division
 
DESIGN AND IMPLEMENTATION OF AREA AND POWER OPTIMISED NOVEL SCANFLOP
DESIGN AND IMPLEMENTATION OF AREA AND POWER OPTIMISED NOVEL SCANFLOPDESIGN AND IMPLEMENTATION OF AREA AND POWER OPTIMISED NOVEL SCANFLOP
DESIGN AND IMPLEMENTATION OF AREA AND POWER OPTIMISED NOVEL SCANFLOP
VLSICS Design
 
29317254-Standard-Single-Purpose-Processors-Peripherals.ppt
29317254-Standard-Single-Purpose-Processors-Peripherals.ppt29317254-Standard-Single-Purpose-Processors-Peripherals.ppt
29317254-Standard-Single-Purpose-Processors-Peripherals.ppt
neethujaaps
 
MICROCONTROLLER_ VTU_8051 TIMERS AND SERIAL PORTSModule3.pptx
MICROCONTROLLER_ VTU_8051 TIMERS AND SERIAL PORTSModule3.pptxMICROCONTROLLER_ VTU_8051 TIMERS AND SERIAL PORTSModule3.pptx
MICROCONTROLLER_ VTU_8051 TIMERS AND SERIAL PORTSModule3.pptx
Veenask6
 
INTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCK
INTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCKINTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCK
INTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCK
Santanu Chatterjee
 
Timing notes 2006
Timing notes 2006Timing notes 2006
Timing notes 2006
pavan kumar
 
Digital Alarm Clock (IC-TMS-8560)
Digital Alarm Clock (IC-TMS-8560)Digital Alarm Clock (IC-TMS-8560)
Digital Alarm Clock (IC-TMS-8560)
Chintan Patel
 
DFT Rules, set of rules with illustration
DFT Rules, set of rules with illustrationDFT Rules, set of rules with illustration
DFT Rules, set of rules with illustration
Jason J Pulikkottil
 
Get Programmable digital timer | Programmable timer switch | Cyclic Timer- GI...
Get Programmable digital timer | Programmable timer switch | Cyclic Timer- GI...Get Programmable digital timer | Programmable timer switch | Cyclic Timer- GI...
Get Programmable digital timer | Programmable timer switch | Cyclic Timer- GI...
PrasadPurohit1988
 
432112393-Manual-Injecao-Mercedes-Bens-Detroit.pdf
432112393-Manual-Injecao-Mercedes-Bens-Detroit.pdf432112393-Manual-Injecao-Mercedes-Bens-Detroit.pdf
432112393-Manual-Injecao-Mercedes-Bens-Detroit.pdf
Jeferson872537
 
MODULE TITLE PROGRAMMABLE LOGIC CONTROLLERSTOPIC TITLE.docx
MODULE TITLE    PROGRAMMABLE LOGIC CONTROLLERSTOPIC TITLE.docxMODULE TITLE    PROGRAMMABLE LOGIC CONTROLLERSTOPIC TITLE.docx
MODULE TITLE PROGRAMMABLE LOGIC CONTROLLERSTOPIC TITLE.docx
roushhsiu
 
Unit3_all timer interfacing in microcontroller
Unit3_all timer interfacing in microcontrollerUnit3_all timer interfacing in microcontroller
Unit3_all timer interfacing in microcontroller
thahaxaina025
 
Deep Explaination of STA_setupandholdchecks
Deep Explaination of STA_setupandholdchecksDeep Explaination of STA_setupandholdchecks
Deep Explaination of STA_setupandholdchecks
YashwanthPola1
 
ppt of Three phase fault analysis with auto reset for temporary fault and tri...
ppt of Three phase fault analysis with auto reset for temporary fault and tri...ppt of Three phase fault analysis with auto reset for temporary fault and tri...
ppt of Three phase fault analysis with auto reset for temporary fault and tri...
Vikram Rawani
 
Introduction to automation
Introduction to automationIntroduction to automation
Introduction to automation
Valai Ganesh
 
A multi phase decision on reliability growth with latent failure modes
A multi phase decision on reliability growth with latent failure modesA multi phase decision on reliability growth with latent failure modes
A multi phase decision on reliability growth with latent failure modes
ASQ Reliability Division
 
DESIGN AND IMPLEMENTATION OF AREA AND POWER OPTIMISED NOVEL SCANFLOP
DESIGN AND IMPLEMENTATION OF AREA AND POWER OPTIMISED NOVEL SCANFLOPDESIGN AND IMPLEMENTATION OF AREA AND POWER OPTIMISED NOVEL SCANFLOP
DESIGN AND IMPLEMENTATION OF AREA AND POWER OPTIMISED NOVEL SCANFLOP
VLSICS Design
 
29317254-Standard-Single-Purpose-Processors-Peripherals.ppt
29317254-Standard-Single-Purpose-Processors-Peripherals.ppt29317254-Standard-Single-Purpose-Processors-Peripherals.ppt
29317254-Standard-Single-Purpose-Processors-Peripherals.ppt
neethujaaps
 
Ad

More from VaishaliVaishali14 (7)

Simulation of speech recognition using correlation method on matlab software
Simulation of speech recognition using correlation method on matlab softwareSimulation of speech recognition using correlation method on matlab software
Simulation of speech recognition using correlation method on matlab software
VaishaliVaishali14
 
SIMULATION OF AN ELECTRONIC DICE CIRCUIT USING LEDs IN PROTEUS SOFTWARE
SIMULATION OF AN ELECTRONIC DICE CIRCUIT USING LEDs IN PROTEUS SOFTWARE SIMULATION OF AN ELECTRONIC DICE CIRCUIT USING LEDs IN PROTEUS SOFTWARE
SIMULATION OF AN ELECTRONIC DICE CIRCUIT USING LEDs IN PROTEUS SOFTWARE
VaishaliVaishali14
 
PERFORMANCE ANALYSIS OF 2*2 MIMO CHANNEL USING ZF EQUALIZER
PERFORMANCE ANALYSIS OF 2*2 MIMO CHANNEL USING ZF EQUALIZER PERFORMANCE ANALYSIS OF 2*2 MIMO CHANNEL USING ZF EQUALIZER
PERFORMANCE ANALYSIS OF 2*2 MIMO CHANNEL USING ZF EQUALIZER
VaishaliVaishali14
 
LINE OF SIGHT PROPAGATION
LINE OF SIGHT PROPAGATIONLINE OF SIGHT PROPAGATION
LINE OF SIGHT PROPAGATION
VaishaliVaishali14
 
Linear equalizations and its variations
Linear equalizations and its variationsLinear equalizations and its variations
Linear equalizations and its variations
VaishaliVaishali14
 
Optical heterodyne detection
Optical heterodyne detectionOptical heterodyne detection
Optical heterodyne detection
VaishaliVaishali14
 
Simulation of handoff performance using matlab
Simulation of handoff performance using matlabSimulation of handoff performance using matlab
Simulation of handoff performance using matlab
VaishaliVaishali14
 
Simulation of speech recognition using correlation method on matlab software
Simulation of speech recognition using correlation method on matlab softwareSimulation of speech recognition using correlation method on matlab software
Simulation of speech recognition using correlation method on matlab software
VaishaliVaishali14
 
SIMULATION OF AN ELECTRONIC DICE CIRCUIT USING LEDs IN PROTEUS SOFTWARE
SIMULATION OF AN ELECTRONIC DICE CIRCUIT USING LEDs IN PROTEUS SOFTWARE SIMULATION OF AN ELECTRONIC DICE CIRCUIT USING LEDs IN PROTEUS SOFTWARE
SIMULATION OF AN ELECTRONIC DICE CIRCUIT USING LEDs IN PROTEUS SOFTWARE
VaishaliVaishali14
 
PERFORMANCE ANALYSIS OF 2*2 MIMO CHANNEL USING ZF EQUALIZER
PERFORMANCE ANALYSIS OF 2*2 MIMO CHANNEL USING ZF EQUALIZER PERFORMANCE ANALYSIS OF 2*2 MIMO CHANNEL USING ZF EQUALIZER
PERFORMANCE ANALYSIS OF 2*2 MIMO CHANNEL USING ZF EQUALIZER
VaishaliVaishali14
 
Linear equalizations and its variations
Linear equalizations and its variationsLinear equalizations and its variations
Linear equalizations and its variations
VaishaliVaishali14
 
Simulation of handoff performance using matlab
Simulation of handoff performance using matlabSimulation of handoff performance using matlab
Simulation of handoff performance using matlab
VaishaliVaishali14
 
Ad

Recently uploaded (20)

Slide share PPT of NOx control technologies.pptx
Slide share PPT of  NOx control technologies.pptxSlide share PPT of  NOx control technologies.pptx
Slide share PPT of NOx control technologies.pptx
vvsasane
 
Generative AI & Large Language Models Agents
Generative AI & Large Language Models AgentsGenerative AI & Large Language Models Agents
Generative AI & Large Language Models Agents
aasgharbee22seecs
 
2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt
rakshaiya16
 
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdfML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
rameshwarchintamani
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
Reflections on Morality, Philosophy, and History
 
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdfLittle Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
gori42199
 
acid base ppt and their specific application in food
acid base ppt and their specific application in foodacid base ppt and their specific application in food
acid base ppt and their specific application in food
Fatehatun Noor
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
Construction-Chemicals-For-Waterproofing.ppt
Construction-Chemicals-For-Waterproofing.pptConstruction-Chemicals-For-Waterproofing.ppt
Construction-Chemicals-For-Waterproofing.ppt
ssuser2ffcbc
 
Physical and Physic-Chemical Based Optimization Methods: A Review
Physical and Physic-Chemical Based Optimization Methods: A ReviewPhysical and Physic-Chemical Based Optimization Methods: A Review
Physical and Physic-Chemical Based Optimization Methods: A Review
Journal of Soft Computing in Civil Engineering
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
Guru Nanak Technical Institutions
 
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdfDavid Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control Monthly May 2025Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
OPTIMIZING DATA INTEROPERABILITY IN AGILE ORGANIZATIONS: INTEGRATING NONAKA’S...
OPTIMIZING DATA INTEROPERABILITY IN AGILE ORGANIZATIONS: INTEGRATING NONAKA’S...OPTIMIZING DATA INTEROPERABILITY IN AGILE ORGANIZATIONS: INTEGRATING NONAKA’S...
OPTIMIZING DATA INTEROPERABILITY IN AGILE ORGANIZATIONS: INTEGRATING NONAKA’S...
ijdmsjournal
 
Slide share PPT of NOx control technologies.pptx
Slide share PPT of  NOx control technologies.pptxSlide share PPT of  NOx control technologies.pptx
Slide share PPT of NOx control technologies.pptx
vvsasane
 
Generative AI & Large Language Models Agents
Generative AI & Large Language Models AgentsGenerative AI & Large Language Models Agents
Generative AI & Large Language Models Agents
aasgharbee22seecs
 
2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt
rakshaiya16
 
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdfML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
rameshwarchintamani
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdfLittle Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
gori42199
 
acid base ppt and their specific application in food
acid base ppt and their specific application in foodacid base ppt and their specific application in food
acid base ppt and their specific application in food
Fatehatun Noor
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
Construction-Chemicals-For-Waterproofing.ppt
Construction-Chemicals-For-Waterproofing.pptConstruction-Chemicals-For-Waterproofing.ppt
Construction-Chemicals-For-Waterproofing.ppt
ssuser2ffcbc
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdfDavid Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
OPTIMIZING DATA INTEROPERABILITY IN AGILE ORGANIZATIONS: INTEGRATING NONAKA’S...
OPTIMIZING DATA INTEROPERABILITY IN AGILE ORGANIZATIONS: INTEGRATING NONAKA’S...OPTIMIZING DATA INTEROPERABILITY IN AGILE ORGANIZATIONS: INTEGRATING NONAKA’S...
OPTIMIZING DATA INTEROPERABILITY IN AGILE ORGANIZATIONS: INTEGRATING NONAKA’S...
ijdmsjournal
 

Smart traffic light controller using verilog

  • 1. 1 DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING PONDICHERRY UNIVERSITY SMART TRAFFIC LIGHT CONTROLLER USING VERILOG GUIDED BY PROF. Dr. P. SAMUNDISWARI Dept. Of Electronics Engineering PRESENTED BY BEULAH .A VAISHALI .K M.Tech (ECE)-Ist yr
  • 2. 2 CONTENTS S. NO. TOPIC PAGE NO. 1 OBJECTIVE 3 2 INTRODUCTION 3 3 BLOCK DIAGRAM 4 4 WORKING PRINCIPLE 5 5 STATE DIAGRAM 6 6 CODE 7 7 TEST BENCH 10 8 SIMULATION OUTPUT 11-15 9 ADVANTAGES AND DISADVANTAGES 15 -16 10 CONCLUSION 16 11 REFERENCES 16
  • 3. 3 OBJECTIVE: • The main aim of the project is to design a two way traffic light controller using verilog. • One with the help of timing mechanism and other by the help of detector or sensor. SOFTWARE USED: • Xilinx 14.7 • Verilog: C like HDL is easier to comprehend and saves design time since the syntax is more concise that VHDL INTRODUCTION: • In general, many traffic lights are operates on a timing mechanism that changes the light after given time interval. • The traffic light system consists of three important parts, in that traffic light controller is first one, because of it represent brain of the traffic system. • The second part is the signal visualization or in simple words is signal face. • The third part is the detector or sensor. TRAFFIC LIGHTS: • An intelligent traffic light system senses the presence or absence of vehicles and reacts accordingly. • The idea behind intelligent traffic systems is that drivers will not spend unnecessary time waiting for the traffic lights to change. • In the traffic light control system, the main controller, control circuit, counter, timer, decoder, clock signal generator, decoder drive circuit and digital display decoder drive circuit are needed to complete the whole process of controlling the traffic light.
  • 5. 5 WORKING PRINCIPLE; • The main road's lights are always green for the major traffic to pass. • The main road's lights turn red only when there is a car on either side of the side road for a period of time. • When detector detect the vehicles, only then the lights on the side road turn from red->green while the main road's lights turn from green->yellow->red. • After the given interval of time, lights on the main road turns to red- >yellow->green and the side road turns from green->red. • In the timer part, there are three things one is the short time pulse (TS) and
  • 6. 6 the long time pulse (TL) and the last is a response to start the timer (ST) signal. STATE DIAGRAM: • The main road will be green until no cars are found and it remains in state S0. • When long time expires and cars found the transition from S0 to S1 takes place. • When the short time interval expires it transit from S1 to S2. • When the long time interval doesn't expire and cars are detected it will in the state S2. • When the long time expires and no more cars detected it transit from S2 to S3. • When the short interval expires it transit from S3 to S0 and the cycle continues.
  • 7. 7 CODE: MAIN MODULE: `timescale 1ns / 1ps module main( output MR, output MY, output MG, output SR, output SY, output SG, input reset, input C, input Clk ); timer part1(TS, TL, ST, Clk); fsm part2(MR, MY, MG, SR, SY, SG, ST, TS, TL, C, reset, Clk); endmodule TIMER MODULE: `timescale 1ns / 1ps module timer( output TS, output TL, input ST, input Clk ); integer value;
  • 8. 8 assign TS=(value>=4); assign TL=(value>=14); always@(posedge ST or posedge Clk) begin if(ST==1)begin value=0; end else begin value=value+1; end end endmodule FSM MODULE: `timescale 1ns / 1ps module fsm( output MR, output MY, output MG, output SR, output SY, output SG, output ST, input TS, input TL, input C, input reset,
  • 9. 9 input Clk ); reg [6:1] state; reg ST; parameter mainroadgreen= 6'b001100; parameter mainroadyellow= 6'b010100; parameter sideroadgreen= 6'b100001; parameter sideroadyellow= 6'b100010; assign MR = state[6]; assign MY = state[5]; assign MG = state[4]; assign SR = state[3]; assign SY = state[2]; assign SG = state[1]; initial begin state = mainroadgreen; ST = 0; end always @(posedge Clk) begin if (reset) begin state = mainroadgreen; ST = 1; end else begin ST = 0; case (state) mainroadgreen: if (TL & C) begin state = mainroadyellow; ST = 1; end mainroadyellow:
  • 10. 10 if (TS) begin state = sideroadgreen; ST = 1; end sideroadgreen: if (TL | !C) begin state = sideroadyellow; ST = 1; end sideroadyellow: if (TS) begin state = mainroadgreen; ST = 1; end endcase end end endmodule TEST BENCH: `timescale 1ns / 1ps module fsm_test; // Inputs reg TS; reg TL; reg C;reg reset; reg Clk; // Outputs wire MR; wire MY; wire MG; wire SR; wire SY; wire SG; wire ST; // Instantiate the Unit Under Test (UUT) fsm uut ( .MR(MR), .MY(MY), .MG(MG), .SR(SR), .SY(SY), .SG(SG), .ST(ST), .TS(TS), .TL(TL), .C(C), .reset(reset), .Clk(Clk) ); initial begin // Initialize Inputs TS = 0;TL = 0;C = 0;reset = 1;
  • 11. 11 Clk = 0; #100; TS=0;TL=1;C=1;reset=0; #100; TS=0;TL=0;C=0;reset=1; #100; TS=1;TL=1;C=0;reset=0; #100; end always begin #100 Clk=~Clk; end endmodule SIMULATION OUTPUT:
  • 12. 12
  • 15. 15 ADVANTAGES: • Traffic signals help for movement of traffic securely without any collision. • The drivers will not spend unnecessary time waiting for the traffic lights to change. • Traffic control by signals is accurate and economical as compared to traffic police control.
  • 16. 16 DISADVANTAGES : • During signals breakdown, there are serious and wide-spread traffic difficulties during peak hours. CONCLUSION; • In this project we introduced detector based technology for traffic control. • We conclude that it provides powerful solution to improve existing system with the new smart traffic light controller. FUTURE SCOPE : • Blinking of lights according to the traffic level present in the road can be added. • Managing traffic when any emergency vehicle come can also be introduced. For example ambulance. REFERENCES: • Ali Qureshi .M, Abdul Aziz, “A Verilog Model of Traffic Control System using Mealy State Machines” in DOI:10.7763/IJCEE.2012.V4.521 • Swetha Reddy.K, Shabarinath .B.B, “timing and synchronization for explicit FSM based traffic light controller”, Published 2019 • Owmya .B, ”An Advanced Traffic Light Controller using Verilog HDL”, Published 2017
  翻译: