Upload
david-katz
View
222
Download
0
Embed Size (px)
Citation preview
7/29/2019 Traffic Light Documentation
1/2
Traffic Light Documentation
Abstract:
Approach:
My approach consisted of one 555 timer with a frequency of 1 Hz triggering the clock on a 5 bit counter.
In order to ensure that the timer was as close to one second as possible, I used a potentiometer for one
of the resistors when setting wiring the timer in its astable state allowing me to finely tune the
frequency.
The 5 bit counter was constructed using a 4520 (two synchronous 4 bit counters). By using the 4th
bit as
a clock for the second counter as the 4th
bit changed from high to low, the 5th
bit was changed. This
method resulted in an asynchronous 5th
bit. For this project, since the output of the timers was going
only to LEDs the presence of glitch states is unimportant. From there I inverted each bit in order to
make the timer a countdown timer. Additionally, I wired a dipswitch up to the reset of the counter.
When the switch is hit, voltage is sent to the reset and the timer automatically returns to and stays at
0000 (red red red red) state allowing for a fireman button. If the switch is not on however, ground is
delivered to the reset and the timer functions normally.
From there, I devised logic to determine the state of each traffic light at each possible state of the
counter from 00000 to 11111. When doing so, I noticed that there was symmetry in the logic by the 5th
bit. Thus, by using either an and or or operation with the 5th
bit (or its inverse) I was able to create a
function taking the logical result from the first 4 bits and yielded the state of each light. For some of the
lights I opted to use the same resistor after checking that none of them would be on at the same time.
By doing so I saved space on my breadboard without any form of voltage drop with multiple lights on.
For my pedestrian timer I took the inverted bits from my counter and attached them to a 4 bit full
adder. By doing so I was able to adjust the counter BCD to what it needed to be in order to count down
properly hitting 0 the instant the light turned yellow. I found I needed to add 1111 in order to subtract 1
and properly adjust the BCD. The result from the adder was sent to 7 segment display drivers. The
driver used had the feature that it displayed a blank display when any number higher than 9 were to be
displayed. Thus I did not need to control the output enable on the 7 segment display. From the drivers
the outputs were wired to the corresponding 7 segment display pin with proper use of resistors.
THINGS I NEED:
What was the assignments? List the numbers for each stae.
Truth table, logic simps, 555 timer calculations, adder calculations.
7/29/2019 Traffic Light Documentation
2/2
Things that went wrong: chris take my chip. Inaccuracy preceiision 555, wrong logic turn signal