Brian Mehr
Christopher Pechie
Electrical Engineering 447 - VLSI Design
Spring 1999
The objective of this project was to design and implement a traffic light controller. The controller consists of a set of North and South lights. They work in conjunction with each other in order to control traffic in a safe manner. In other words, so there are NO accidents. If the North light is Red, then the South light will be either Green or Yellow and vice versa.
Our traffic controller design is a very simple design taking up minimal space on the final chip layout. The main logic of the circuit is acheived by the use of two counters. These counters calculate how long each set light will be asserted. The length of time for each light is dependant on the input of an outside user either through the use of switches or an IRSIM command file. In the real world, this could be seen as a worker being able to change the time of the lights from the pole which they are attached to. An outside user can choose the length of time by the input of 4 bits into the circuit. These bits are compared using XNOR gates. They are compared with the output of the first counter which is a 4 bit synchronous counter. When the input count is reached, the synchronous counter is reset and a signal is sent to the second counter, a 4 bit ripple counter, in order to increment that by one. The two least significant bit outputs are then sent to two 2-4 decoders which will light the appropriate traffic signal depending on the input.Schematic:
Layout:
IRSIM Results:
As
shown in the timing diagram below, the systerm is a success. The
clock cycle used is 2000 ns. Ideally, the cycle should be 1 second,
because that would allow each LED to be lit the amount of seconds input
to the chip. The AndOut and InvOut signals are the reset to each
of the counters. When the count vector (output of the synch counter)
matches the data vector (inputs), the synch counter is reset and the ripple
counter receives a high clock signal to increment it. Each time the
ripple counter is incremented, its outputs (select vector) are inputs to
two decoders with outputs, Dec1 - Dec8. Each Decx output is
attached to the green, yellow, red LED that corresponds to its spot in
the traffic cycle.
In order to test the circuit, you
will need the following items:
8 LEDs (if possible: 2 Red, 2 Green, 2 Yellow)
Testing Procedure:These LEDs will be used to desginate what lights are on and off. If there are no Yellow and Green LEDs available, just use Red, but be sure to label each one the appropriate direction and color.8 100 OHM resistors
These will be used in order for the LEDs to function properly
1 4-bit switchThis switch will be used to input the 4 bit value, which is desired for the time the lights will be set on and off.
Step 1: Connecting
the Power
Place the chip in the board so as not to bend any pins. Set the power supply to 5 volts for Vdd. Connect the Vdd of the power supply to pin #5 and connect the Ground from the power supply to pin #15.
Step 2:
Connecting the LEDs
Step 3: Connecting the SwitchTake one of the resistors and connect it in series with an LED Pin #(28-34). Refer to the pin assignments if you are using Green and Yellow LEDs. Connect one end of the LED to the resistor and the other end to a Ground. Repeat this procedure for the other 7 LED Pins.
Take the 4 bit switch and place it firmly on the board. Connect each bit to 5 volt Vdd for ON and a Ground for OFF. Then connect the output of each bit to pins #11-14 of the chip.
Step 4:
Connecting the Clock
Connect the function generator to pin #19 on the chip. Set the function generator to 1Hz to simulate the 1 second clock.
Step 5: Testing
values
Power on the power supply and the function generator. Set the switch to the following value from MSB to LSB: 1000. This will count for 8 seconds and you should see the appropriate lights last for that amount. You may change the value by changing the switch value. Have fun with it!!
Simulations of the circuit are
working within the assigned parameters. The correct lights stay on
for the assigned time and so no accidents should occur. This is a
very simple circuit and so simulating on the board should be straight forward.
Some shortcomings of this circuit are that you have to input the count
manually instead of having it be stored within the circuit, there are no
left turn signals as originally planned.