One-way Road Intersection Traffic Light A Simple Logic Design

Abstract
One of the vital inventions of mankind is the traffic lights which up to the present are continuously still being modified for a more satisfactory result. Traffic lights are used to control competing flows of traffic and serve as road signals to cars for a smooth and convenient travel.  With the aid of the obtained knowledge in logic circuits and digital electronics, a one-way traffic light design was established.
            The design was initiated by a definite goal which is to make a one-way traffic light mounted to the road intersection with sensors used to detect the presence of vehicles leading to light transitions. After which is the execution of logical operations of the design with the used of Moore model showing how and when the network changes state. The now well established design was then tested on a MULTISIM where the obtained result was analyzed. Modifications were done until the desired output, conforming to the design specifications were attained. Armed with sufficient and efficient technical know-how, the Simple Traffic Light Design was accomplished.
Introduction
            During the horse and buggy days, traffic in big cities was often heavy. With the coming of automobiles, the situation got even worse. Precisely, traffic on roads take place when a number of pedestrians, ridden or herded animals, vehicles, streetcars and other conveyances occurs either singly or simultaneously  while using the public way for purposes of travel.
            Traffics are hindrance to those who are in a hurry and may also cause accidents. To avoid such occurrence, traffic lights are adapted for street use. These are signaling devices positioned at road intersections and other locations to control competing flows of traffic. They alternate the right-of-way of road users by displaying lights of a standard color. They make use of three colors, each provides distinct signal that a car must follow. There’s a green light allowing a car to proceed in the direction denoted, a yellow light denoting prepare to stop short of the intersection, and a red light prohibiting it to proceed.
            Time-controlled and sensor-controlled traffic lights have been implemented nowadays on different types of road intersections such as cross intersections, T intersections and Y intersections. The former operates on a timing mechanism that changes the lights after a given interval while the latter senses the presence and absence of vehicles, and reacts accordingly. Sensor-controlled system reacts to motion to trigger light changes. Putting it into operation in a one-way road intersection, sensors are positioned on each lane at the cross-section to detect that a volume of cars has pulled up. These detectors are driven by switches that cause light transitions.
            To govern the actions of the traffic system, algorithms will be used. Specifically, Boolean logic will be employed. It consists of binary variables and a set of logical operations. The said variables will be used to represent state transitions. The logical operations will be executed using a Moore model. Herewith, is a sequential circuit that will be composed of a state register driven by an input combinational logic. It will also consist of an output combinational logic which is a function of state registers.
            Aided with the right concepts and principles with the well-defined design parameters, the researchers eagerly hope to come up with the desired output which on this particular case is the own proposed one-way traffic light design.
Design Specification
Figure 1. Road Layout
The main goal in this project is to design a one-way road intersection as shown in figure 1. That is, a car from road 1 can go straight or turn left but is unable to turn right. Also, a car from road 2 can go straight or turn right but is unable to turn left. Sensors X and Y are placed on each side to determine if a car is present at either road. These are used as inputs to the circuit being designed. Also, traffic lights TL1 and TL2 are positioned as shown. Individual colors of the traffic lights are designated with certain letter-number combination as shown. A third input to the circuit is a fifteen-second timer which goes high if 15-seconds had passed and resets after such.
For a clear understanding of its behavior, refer to the diagram of Figure 2. As shown, there can only be four states for which transitions occur. It follows a cyclical path and is unidirectional. Considering G1R2 as the initial state, shifting to the next state Y1R2 is possible as long as the timer is high regardless of the presence or absence of cars on road 1 and 2. Another case is when a car is present on road 2 and not on road 1, transition happens. Otherwise, it will remain on this state.
Figure 2. State diagram
For the Y1R2 state, all conditions lead to the next state R1G2 after a certain time. Again, transition from state R1G2 into R1Y2 occurs when the timer is high or when a car is present in road 1 and not in road 2. After which, the state R1Y2 goes back to G1R2 state. These four states continue transitioning for as long as the circuit runs.
Design Procedure
          The design was started by designating a representation of each state as shown in Table 1. It is comprised of four states. In the first state, green light of TL1 is ON together with the red light of TL2. For the second state, green light of TL1 switches yellow and TL2 holds on to red. Next, for the third state, the conditions of state 1 are reversed. Now R1 and G2 are ON. R1 Then holds on while G2 switches to Y2 for the fourth state. After which, it will go back to state 1. Binary representation of the said states with corresponding outputs is shown in Table 2.


Click Image to enlarge.

Click Image to enlarge.



          The circuit has three inputs: X, Y, and t. These represent the road1 sensor, road2 sensor, and the fifteen seconds timer, respectively. It was driven by a clock source with an interval of 3 seconds. This clock source also drives a network in the circuit that performs 15 seconds time count which will control the time interval of a green light in the ON state. Such network is a Negative Edge Triggered Four Bit Binary Counter (sn74ls93). The binary counter was configured to count from binary 000 to 111. This was done by using only the outputs Qb, Qc, and Qb with Qb the least significant bit. It is desired to have t, the 15 seconds timer, be high (one) for binary counter value of 101. Truth table of which is shown in Table 3. It is seen in the table that there are don’t care conditions for 110 and 111. It is because these values are not needed in the timer. The timer will count from 000 to 101 and then go back to 000 by resetting the counter. How will the counter reset will be discussed shortly.


Click Image to enlarge.

The truth table of table 3 was mapped in a three-variable map shown in Table 4 and the corresponding Boolean function was obtained.


Click Image to enlarge.

The Boolean function for t is:
t=QbQd
Eq. 1
Block diagram of the 15 seconds timer connected to the clock output is shown in Figure 2. Design procedure for the LM555 and its operation are discussed in Appendix A. The output of the LM555 was set as input B to the counter. This was necessary to generate an 8-bit count. Here, the reset inputs of the counter were grounded for the circuit to be operational. The outputs B and D of the counter were ANDed as based on Boolean function obtained in Eq. 1. The output of this AND is the input t.
Figure 3. Clock and Fifteen-second Timer Diagram


The traffic light was designed using Moore model. Positive Edge Triggered D Flip-flops (sn74ls74) were chosen as state registers. Figure 4 shows the Moore model design.
Figure 4. Moore model design

The design for the next state combinational logic that will drive the state registers was then made. Taking into account the transition conditions discussed in the Design Specification, a state table is obtained as shown in Table 5. Present states A and B and inputs X, Y and t were mapped on a five variable map and corresponding Boolean functions for A’ and B’ were obtained. Since D Flip-flops were used, the inputs to the flip-flops are A’ and B’ themselves. Boolean function for A’ was simplified to a single XOR operation while B’ was simplified so as to be implemented with all NAND.


Click Image to enlarge.
     Map of A’ and B’ are shown in the figure below.

Click Image to enlarge.

Obtained Boolean functions for A’ and B’ are:
A'=A'B'+AB'=A XOR B
Eq. 2
B'=B't+A'B'X'Y+AB'XY'

B'={(B't)'{B'[(A'X'Y)'(AXY')']'}'}'
Eq. 3

            Next is the design for the Output Combinational Logic. It was done by mapping truth tables of R1, O1, G1, R2, O2, and G2 from Table 2 on two-variable maps as shown in Table 7.


Click Image to enlarge.

The outputs are functions of only the present states A and B. Output Boolean functions are:
R1=A
Eq. 5
O1=A'B'
Eq. 6
G1=A'B'
Eq. 7
R2=A'
Eq. 8
O2=AB
Eq. 9
G2=AB'
Eq. 10

Now that each networks for the individual part of the design are established, putting them into a single diagram follows. Figure 5 shows the interconnection of the clock, fifteen seconds timer, next state combinational logic circuit, state registers and finally, the output circuit. In addition to the afore-mentioned task of each part, note that the outputs of the flip-flops A and B were set as inputs to the input combinational logic. X and Y inputs are connected into switches 1 and 2. Here, X and Y are high if individual switches are closed, that is a car is present on the road.  The output of the fifteen seconds timer was connected to the  input. It was desired that the Four Bit Binary Counter will reset if either Y1 or Y2 is high which was achieved by ORing them and connecting the output to the reset input of the counter.




Click Image to enlarge.
Figure 4. Final Circuit (One-way Road Intersection Traffic Light)

15 Comments

  • March 5, 2014 at 8:21 AM | Permalink

    where did you make your circuit? in multisim?

  • March 8, 2014 at 2:16 AM | Permalink

    Yes.

  • March 30, 2014 at 3:34 PM | Permalink

    Is there any way to put a left turn signal into the circuit? I have not been able too. Any thoughts? Thank you.

  • April 3, 2014 at 1:01 PM | Permalink

    Could a left turn arrow be incorporated in this schematic?

  • Anonymous
    May 1, 2014 at 9:10 AM | Permalink

    What is the other chip used

  • May 4, 2014 at 6:23 AM | Permalink

    Only Logic Gates and a 555 timer were used in the project. Nothing else.

  • May 4, 2014 at 6:38 AM | Permalink

    This project was made for a college subject which only Logic Gates could be used. If you will design a traffic light with advance and complicated functionality, I encourage you to use microcontrollers.

  • Anonymous
    September 25, 2014 at 5:00 PM | Permalink

    can you please provide me the simulation file for this project.!!

  • September 25, 2014 at 5:23 PM | Permalink

    Send me an email at mojahidAM@gmail.com

  • Anonymous
    November 22, 2014 at 5:36 AM | Permalink

    Hi! Do I need to ground the PIn2 and 3 of the 7493? or not? I tried this circuit but the traffic lights doesn't change, always at the Red-Green combination. Thanks!

  • November 22, 2014 at 9:52 AM | Permalink

    Yes you should to keep them out from being in hanging states. Take note that the 7493 is responsible only for giving a 3 second count. It's behavior is that it will stay in the low state for 1 sec and then switch to high for another 2 sec. You may test its output by connecting an LED in it and then observing its behavior. If it performs exactly the same behavior that I've discussed, then this part of the circuit is perfectly fine.
    Just a tip: make the circuit by block and test the behavior of each separately.

  • January 20, 2016 at 12:36 AM | Permalink

    hi
    can i know the name of traffic light in multism
    i search about it but i d not know the exactly name

  • January 20, 2016 at 1:08 AM | Permalink

    Hi. Please send me email instead @ mojahidam@gmail.com. Thanks.

  • Anonymous
    October 9, 2016 at 10:52 AM | Permalink

    Nice Tutorial. Thanks. Very Helpful

  • March 12, 2017 at 6:07 AM | Permalink

    currently studying digital elex

  • Leave a Reply