Design of a 4-Way Traffic Light System using Flip-Flops

Traffic Control System


States:

Considering only a single set of traffic lights.

   S0 – Red Light

   S1 – Yellow Light

   S2 – Green Light

   S3 – Yellow Light

   S4 – Red Light

 

State Assignment:

   S0 – 000

   S1 – 001

   S2 – 010

   S3 – 011

   S4 – 100

 

Output:

   Red Bulb         – 00

   Yellow Bulb    – 01

   Green Bulb     – 10

   Toggle Signal – 11

 

State Diagram:

Considering only a single set of traffic lights.


State Table:

Table 1: State table for a single set of Traffic Lights

Present State

Input

Next State

T Flip-Flop

Output

A

B

C

x

A

B

C

TA

TB

TC

y0

y1

0

0

0

0

0

0

1

0

0

1

0

0

0

0

0

1

0

0

0

0

0

0

0

0

0

0

1

0

0

1

0

0

1

1

0

1

0

0

1

1

0

0

0

0

0

1

0

1

0

1

0

0

0

1

1

0

0

1

1

0

0

1

0

1

0

1

1

0

0

1

1

0

0

1

1

0

1

0

0

1

1

1

0

1

0

1

1

1

1

0

0

1

1

1

0

1

1

0

0

0

0

0

0

1

0

0

1

1

1

0

0

1

0

0

0

1

0

0

1

1

 

Using K-Map:




 

Circuit Diagram for a Single Set of Traffic Lights:


Figure 1: Circuit Diagram for a Single set of Traffic Lights

This single set of Traffic Light circuit is taken as a single module in the following step to develop the complete system. The module has two inputs for Switch and the Clock with four outputs for the Bulbs and the Toggle Signal. 

(Simulation Software – Logisim Version 2.7.1)

 


Combined Circuit Diagram for the Traffic Light System:

Figure 2: Combined Circuit Diagram for the Traffic Light System


In this complete system, the Traffic Control Module is the above-developed circuit using T flip-flops. Here a single clock pulse is given to each module using a demultiplexer. The demultiplexer outputs the clock signal depending on the Select Line input. Select Line input is obtained by a 2 – Bit Counter, where the counter increments its value depending on the Toggle Signal.

When any one set of Traffic Lights reaches its final state, it outputs a Toggle Signal which results in an increment in the Counter. As a result, the Select Line value changes and therefore the demultiplexer outputs the Clock pulse to the next Traffic Control Module. At the end of the four modules, the counter reaches its maximum value and restarts resulting in a cyclic process. Several inputs can be connected as required using an OR gate.

(Simulation Software – Logisim Version 2.7.1)

Comments