Synthesis of A Traffic Light Sequence Circuit
Synthesis of A Traffic Light Sequence Circuit
Adrian B. Abiera, Dino F. Ligutan, Carl B. Matulac, Daniel G. Navarrete, and Marc C. Serzo
Abstract - In order to fully understand the topics covered in the
course logcist, a project showing the application of said topics
was necessary to make. In creating a traffic light sequence in an
intersection using integrated circuit chips, 7 segment LED
display and other passive elements in the circuit, truth tables,
state tables, state diagrams and Karnaugh maps (topics that were
covered during the term) were then used to analyze the results.
Index Termscombinational circuits; digital circuits; flipflops; logic circuits; logic gates; sequential circuits
Figure 2 - 2 The 555 timer and its pin assignments
I.
INTRODUCTION
A. Boolean algebra
Boolean algebra is mathematics specifically used to
manipulate logic expressions in a more concise form. Logic
expressions can be manipulated with the use of theorems that
create or comprehend optimized switching, digital and
computer circuits.
f=
Figure 2 - 1 Examples
1
ln ( 2) C ( R 1+2 R 2)
C. Multiplexer 74LS153
A multiplexer is a device that selects one of several analog
inputs and outputs the input into a single line. Having an input
of 2n and having select lines n. A multiplexer IC 74LS153 was
used in this project.
E. JK Flip-Flop
A JK flip-flop is said to be a refinement of the SR flip-flop, it
may be due to having similar inputs of an SR flip-flop, where
J (set) and K (reset). It was named after the Texas Instrument
engineer inventor Jack Kilby.
F.
Third flow
Fourth flow
Fig. 3-1. The order of traffic flow sequence. After the fourth flow, the first
flow follows and the sequence repeats.
First flow
Second flow
For each flow, there are three traffic light states: green,
yellow and red states. For convenience, the duration of the
yellow state is considered as the unit length of time in the
design of traffic light sequential circuit since it has the shortest
duration. The duration of green state was decided to be thrice
the duration of yellow state for convenience in circuit design.
The duration of red state follows from the duration of yellow
and green states and will be determined later on. Furthermore,
it was decided that the duration of the yellow state shall be 4
seconds from which follows that the duration of the green
state be 12 seconds again, these values were chosen for
simplicity of circuit design. A pair of 7-segment display for
countdown for each traffic light panel will indicate the number
of seconds left for the current state before the transition to the
next state will occur. It too has its own sequential circuit to
consider that must be synchronized with the sequential circuit
of the traffic light. To make things clear, we will divide the
discussion of synthesis of sequential circuits into two: one for
the traffic light sequence and the other for the 7-segment
display countdown timer. These circuits will be combined later
on.
A. Traffic Light Sequential Circuit
For each flow, there are three traffic light states: green,
yellow and red states. The sequence goes as follows: green
state, followed by yellow state then by the red state. The red
state is followed by the green state and the sequence repeats.
However, since the traffic flow sequence also repeats, we must
consider the sequences of all traffic light panels for all roads
so that we can determine which panels are in green, yellow or
red state at a given moment. Let us first denote the two pairs
of opposite roads as 1 and 2, the straight and leftward flow by
S and L and the green, yellow and red states as G, Y and R
respectively. A sequence of symbols such as GS1 refers to the
green state for straight flow for the first pair of opposite roads.
Similarly, YL2 refers to the yellow state for leftward flow for
the second pair of opposite roads. Now with the notation set
and following the discussion earlier in this chapter, the
succession of traffic light states goes as follows:
G
2
L
S
Y
1
Fig. 3-2. The state diagram for the sequence of traffic light states for all
panels.
Note that the red state was not included in Fig.3-2. What we
are showing in the state diagram is the succession of states by
looking at all panels. If one will look at a panel, the state
diagram goes as follows:
G
R
x
Y
Fig. 3-3. The state diagram for the sequence of traffic light states for one
panel.
The red state for each panel occurs after the yellow state of
that panel until it goes into green state again. Obviously, the
red state has the longest duration of all the states in a panel.
Now, if we denote GS1 as S0, YS1 as S1 and so on, we will
come up with a state table like so:
T A =BCD . The
Fig.
1 3-6.
G
2
L
Y
S
TABLE 3-1
STATE TABLE FOR EACH PANEL
Stat
e
GS1
YS1
RS1
GL1
YL1
RL1
GS2
YS2
RS2
GL2
YL2
RL2
S0
S1
S2
S3
S4
S5
S6
S7
1
0
0
0
0
1
0
0
1
0
0
1
0
1
0
0
0
1
0
0
1
0
0
1
0
0
1
1
0
0
0
0
1
0
0
1
0
0
1
0
1
0
0
0
1
0
0
1
0
0
1
0
0
1
1
0
0
0
0
1
0
0
1
0
0
1
0
1
0
0
0
1
0
0
1
0
0
1
0
0
1
1
0
0
0
0
1
0
0
1
0
0
1
0
1
0
Here, the rows in the first column indicate the state for each
panel. The 1 indicates that the row is the active state for a
given column state and a 0 indicates that the row is not the
active state for a given column state for a panel.
However, employing the state diagram in Fig. 3-2 entails
that the duration of the green state is the same as yellow state.
In order to make the green state longer, there are two options:
(1) design the circuit such that the different states have
Fig. 3-4. The final state diagram as the basis for circuit synthesis.
TABLE 3-2
STATE TRANSITION TABLE USING T FLIP-FLOPS
Stat
e
No.
Present State
A B C D
Next State
A B C D
Flip-Flop Inputs
TA
TB
TC
TD
S0
S1
S2
S3
S4
S5
S6
S7
S8
S9
S10
S11
S12
S13
S14
S15
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
TD
00
01
11
10
TC
00
01
11
10
00
01
11
10
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
00
01
11
10
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
00
01
11
10
TA
00
00
0
0
1
0
01
01
0
0
1
0
11
11
0
0
1
0
10
10
0
0
1
0
Fig. 3-5. Karnaugh maps for T flip-flop inputs.
00
01
11
10
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
TB
S0
S1
S2
S3
S4
S5
S6
S7
S8
S9
S10
S11
S12
S13
S14
S15
A
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
Present State
B
C
0
0
0
0
0
1
0
1
1
0
1
0
1
1
1
1
0
0
0
0
0
1
0
1
1
0
1
0
1
1
1
1
D
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
G
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
S1
Y
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
R
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
G
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
L1
Y
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
R
1
1
1
1
0
0
0
0
1
1
1
1
1
1
1
1
A look at the K-map for GS1 from Fig. 3-7 reveals that its
equation is given by
GS1=A ' B' C' + A ' B ' D ' .
Similarly, YS 1= A ' B ' CD and RS 1= A+ B . For
the
leftward
flow:
GL 1= A' B C ' + A ' BD ' ,
YL1= A ' BCD , and RL1= A+ B ' .
By similar fashion, we will also develop the equations for
the
GS1
00
01
11
10
YS1
00
01
11
10
00
01
11
10
1
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
00
01
11
10
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
RS1
00
01
11
10
GL
1
00
01
11
10
00
01
11
10
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
00
01
11
10
0
1
0
0
0
1
0
0
0
0
0
0
0
1
0
0
YL
1
00
01
11
10
RL1
00
01
11
10
00
00
0
0
0
0
1
1
1
01
01
0
0
1
0
0
0
0
11
11
0
0
0
0
1
1
1
10
10
0
0
0
0
1
1
1
Fig. 3-7. Karnaugh maps for traffic light states for opposite roads 1.
1
0
1
1
TABLE 3-4
TRUTH TABLE FOR TRAFFIC LIGHT STATE FOR OPPOSITE ROADS 2
Stat
e
No.
S0
S1
S2
S3
S4
S5
S6
S7
S8
S9
S10
S11
S12
S13
S14
S15
A
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
Present State
B
C
0
0
0
0
0
1
0
1
1
0
1
0
1
1
1
1
0
0
0
0
0
1
0
1
1
0
1
0
1
1
1
1
D
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
G
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
S2
Y
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
R
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
G
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
L2
Y
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
Fig. 3-8. Karnaugh maps for traffic light states for opposite roads 2.
states,
R
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
A look at the K-map for GS2 from Fig. 3-8 reveals that its
equation is given by
GS 2= A B ' C' + AB' D ' .
Similarly, YS 2= AB ' CD and RS 2= A '+ B . For
'
the
leftward
flow:
GL 2= ABC + ABD ' ,
YL2=ABCD , and RL2= A ' + B ' .
Now that we have completed the set of traffic light state
equations, one may go ahead and implement them directly.
However, these equations can be simplified further by
observing several patterns, thus making the implementation
even simpler.
To begin with, let us factor out the common terms in GS1,
giving
us
Similarly,
GS1=A ' B' (C '+ D ' ) .
00
01
11
10
YS2
00
01
11
10
00
01
11
10
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
1
00
01
11
10
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
RS2
00
01
11
10
GL
2
00
01
11
10
00
01
11
10
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
00
01
11
10
0
0
1
0
0
0
1
0
0
0
0
0
0
0
1
0
YL
2
00
01
11
10
RL2
00
01
11
10
00
01
11
10
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
00
01
11
10
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
we
notice
G xx =xx ( C
'
A
0
0
1
1
B
0
1
0
1
S1
1
0
0
0
L1
0
1
0
0
S2
0
0
1
0
L2
0
0
0
1
Fig. 3-9. Transistorized logic circuit behind each traffic light panel.
SEL
0
0
0
0
1
Y
0
0
1
1
X
G
0
1
0
1
X
Red
0
0
0
0
1
Yellow
0
0
1
1
0
Green
0
1
0
1
0
Fig. 3-10.
sequence.
Fig. 3-11. The physical panel setup for the traffic light LEDs and 7-segment
display
Note that the set of red, yellow and green states on the right
side is for the straight flow while on the left side is for the
leftward flow. Based from the considerations stated earlier,
Table 3-7 shows the sequence of countdown that is loaded to
7-segment display whenever a light state transition occurs.
TABLE 3-7
LOADED COUNTDOWN SEQUENCE FOR A 7-SEGMENT DISPLAY IN OPPOSITE
ROADS 1
State
GS1
YS1
GL1
YL1
Rx1
Fig. 3-12. The 4-state sequential circuit to replace the clock in 74LS93.
State
Rx2
GS2
YS2
GL2
YL2
Fig. 3-13. The modified sequential circuit based from Fig. 3-10.
Stat
e
0
1
L1
P13
P12
P11
P10
P03
P02
P01
P00
1
0
0
X
0
X
0
X
1
X
0
X
0
X
1
X
0
X
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
X
X
X
X
X
X
X
X
X
X
0
X
X
X
0
X
X
X
X
X
X
X
X
X
X
X
0
X
X
X
0
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
0
X
X
X
0
X
X
X
X
X
X
X
X
X
X
X
0
X
X
X
0
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
0
X
X
X
0
X
X
X
X
X
X
X
X
X
X
X
0
X
X
X
1
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
0
X
X
X
1
X
X
X
X
X
X
X
X
X
X
X
0
X
X
X
1
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
0
X
X
X
0
X
X
X
X
X
X
X
X
X
X
X
0
X
X
X
0
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
1
X
X
X
0
X
X
X
X
X
X
X
X
X
X
X
1
X
X
X
0
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
0
X
X
X
1
X
X
X
X
X
X
X
X
X
X
X
0
X
X
X
1
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
0
X
X
X
0
X
X
X
X
X
X
X
X
X
X
X
0
X
X
X
0
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
59
60
61
62
63
0
0
0
0
0
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
L1= A' C ' D' E' F ' + B' C' D ' E' F ' + A ' CDE ' F '
P13=0 , P12=0 , P11= A , P10=C '
P03=0 , P02=D , P01=C ' , P00=0
Similarly, applying the same procedure for the 7-segment
display for opposite roads 2 yields the following truth table:
TABLE 3-10
TRUTH TABLE FOR THE DIGITS OF THE 7-SEGMENT DISPLAY FOR OPPOSITE
ROADS 2
Stat
e
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
L2
P33
P32
P31
P30
P23
P22
P21
P20
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
0
X
X
X
X
X
0
X
X
X
X
X
X
X
X
X
X
X
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X
X
L2=B' C ' D' E ' F' + A C ' D' E' F' + ACDE' F '
P33 =0 , P32=0 , P31=A ' , P30=C '
P23=0 , P22=D , P21=C ' , P20=0
Now that all pertinent logic equations were derived, we may
proceed in the design of the combinational circuit. Shown in
Fig. 3-14 is the logic circuit diagram.
Now, instead of connecting all the outputs of 4 74LS192 ICs
into 4 separate 74LS47 ICs, we have decided to use the
74LS153 multiplexer to reduce the costs of buying 3 more
74LS47 IC and thereby reduce the wires that are necessary for
the 8 7-segment LED displays. Since there are 4 different
74LS192 ICs differing in values, it becomes necessary again
to design a 4-state sequential circuit to switch between the 4
different digit values. Accordingly, the second 2-to-4 decoder
of CD4556 IC will be utilized so that the digit is displayed on
the correct 7-segment LED display. The same circuit as in Fig
3-12 will be used as the sequential circuit, but the clock input
is required to have higher frequency than the clock that is
being used for countdown timer. An additional timer may be
Fig. 3-14. The combinational circuit to load the proper countdown timer at
light state transitions.
Fig 4-7. First four waveforms are the outputs for the ones digit
in the 7-segment display situated for the pair of opposite roads
1. The second four waveforms is for the tens digit of the same
L1=[ E+ F + ( A' C' D' + B' C ' D' + A ' CD ) ' ] '
L2=[ E+ F + ( A C D + B C D + ACD ) ' ] '
'
'
'
'
'
Fig. 4-1. The logic circuit simulation for the traffic light state sequential
circuit.
road pair. In the same manner, the third and fourth four
waveforms belongs to the ones and tens digit in the 7-segment
display situated for the opposite roads 2.
Fig. 4-3. The output of the logic analyzer for the traffic light state transitions.
Fig. 4-2. The output of the logic analyzer for the JK flip-flops and 74LS193
binary counter.
Fig. 4-5. The output of the logic analyzer for the load pin combinational
circuits.
Fig. 4-4. The logic circuit simulation for the combinational circuit used for
loading the proper countdown display at traffic light state transitions.
Fig. 4-6. The logic circuit simulation for the connection between the 74LS192
to 74LS153 ICs into one 74LS47 IC.
Fig. 4-7. The logic circuit simulation for the connection between the 74LS192
to 74LS153 ICs into one 74LS47 IC.
REFERENCES
[1] B. G. Liptak, "Optimized Logic circuit construction," in
Instrument Engineers' Handbook, Fourth Edition, Volume
Two: Process Control and Optimization, CRC Press,
2005, pp. 901-903.
[2] D. B. Pdr, "LECTURE: LOGIC (BOOLEAN)
ALGEBRA AND APPLICATIONS," buda University,
Microelectronics and Technology Institute, 2012-2013.
[3] H. Goyal, "Understanding of IC555 Timer and,"