ECE 46 PROJECT The 3 State Traffic Controller Group #3 Anthony Ostrowski Jeffrey Ostrowski Derek Zoldos
Presentation Outline! Background! Hardware Design by Anthony Ostrowski! Software Design by Jeff Ostrowski! Packaging Design! OSHA & Patents! Prototype Demonstration by Derek Zoldos
Traffic Control Lights Primary Street Secondary Cross Street LR R LR2 R2 LY Y LY2 Y2 LG G LG2 G2
2 2-State Diagram of State Diagram of Traffic Control Lights Traffic Control Lights 2 2 B 9 B 8 B 7 6 5 4 B 3 B 2 B R2 R2 Y2 Y2 G2 G2 LR2 LR2 LY2 LY2 LG2 LG2 R R Y Y G G LR LR LY LY LG LG State# State#
Timing of Traffic Controller State # 2 3 4 5 6 7 8 9 2 Rush Hr Duration (seconds) 6 5 2 5 2 3 5 2 5 2 Non-Rush Hr Duration (seconds) 3 5 2 5 2 3 5 2 5 2
24-Hour Operation Rush Hour! 6: a.m. 8: a.m.! 5: p.m. 7: p.m. Non-rush Hour! 8: a.m. 5: p.m.! 7: p.m. 2: a.m. The 3 th State! 2: a.m. 6: a.m.! LY, Y, LR2 & R2 Blink
ADDED FEATURES! Mode Switch that allows traffic controller to run in either automatic mode or manual mode.! Increment State push button (Manual Mode)! Pedestrian Cross Walk push button
Required Hardware! M68HC microcontroller! LCD screen (Real-time clock)! 2 control lights (LEDs) w/ current limiting resistors! Decoder (control lights)! 5 Push buttons (Real-time clock controls, increment state & pedestrian cross walk)! Switch (Manual / Auto mode for traffic controller)
24-Hour Operation Control Real-Time Clock Hardware LED DISPLAY LCD Screen To LCD Port PORT A PA2 PA PA SEC MIN HOUR + 5 V
Traffic Controller Hardware! Need to implement 2 control lights using the available output ports of the M68HC.! Need to implement two push buttons and one switch using the available input ports. (Auto/Manual mode switch, Increment state push button & pedestrian cross-walk push button).
Traffic Controller Hardware Available Ports in Expanded Mode! PORT A: PA3 PA6 (outputs) PA7 (input / output)! PORT D: PA PA5 (input / output)! PORT E: PA - PA7 (inputs)! TOTAL: - output ports - 8 input ports
Traffic Controller Hardware! PORT E is utilized for the two push buttons and switch (PE PE2).! The remaining outputs are utilized for the 2 control lights of the traffic controller.
Traffic Controller Hardware The Problem How do you utilize 2 control lights with only output ports?
Traffic Controller Hardware Solution # PA7 PA6 PA5 PA4 PA3 PD5 PD4 PD3 PD2 PD PD LG LY LR G Y LG2 LY2 LR2 G2 Y2 R2 NOR Gate G Y R
Traffic Controller Hardware Solution #! This design worked in states 2 in both rush hour and non-rush hour mode when tested with the software.! However, R would flash on and off in state 3 due to the flashing nature of Y.
Traffic Controller Hardware PA7 Solution #2 E PD5 PD2 Y PD5 PD2 G LG 2 to-4 DECODER 74HCT39N G LG G2 LG2 G2 LG2
Traffic Controller Hardware Solution #2! Problem: Due to reverse logic, each of the green control lights will be turned OFF when the decoder selects the corresponding light while the other three control lights remain ON.! Solution: Add a logic inverter to each of the four outputs of the decoder to turn on the corresponding light (the other three lights will remain OFF) when it is selected by the decoder.
Traffic Controller Hardware Solution #2 Y G Y LG NOR A B Y Y2 G2 Y3 LG2 GND NOR GATE IC (MC4UBCP)
Traffic Controller Hardware Implementation of Solution #2 PA6 PA5 PA4 PA3 PD4 PD3 PD PD LY LR R Y LY2 LR2 Y2 R2 PA7 PD5 PD2 2 to-4 DECODER 74HCT39N NOR Gate IC G LG G2 LG2
Traffic Controller Hardware Design Alternative GND PD5 PD5 PD4 PD2 Y 3 to - 8 DECODER PD4 PD2 Lights remain off G LG G2 LG2 Y2 LY2 OFF G LG G2 LG2 Y2 LY2 Not Needed
Software Design! The software design portion took a considerable amount of time due to its complexity and changes that were made in hardware design.! Initial algorithms that were used were revised several times to obtain the desired result.
Software Components! Real-Time Clock! Rush/Non-Rush Mode & 3 th State Determination! State Determination Algorithm! Automatic/Manual Mode Determination! Manual Mode Incrementing! Pedestrian Crossing Accommodation
Harnessing the Real-Time Clock! The Real-Time Clock software was harnessed for its timing functionality.! The second and hour memory locations were used to determine code execution every second, as well as for specific time intervals as stated earlier. Algorithm for Second Detection If {Current Second=Last Second} Then {Exit SR} Else {Set Current Second=Last Second & Execute SR}
Test Algorithm for Hour Detection DURR EQU 6 DURNR EQU 3 DUR25 EQU 5 DUR36 EQU 2 DUR4 EQU 3 ORG $ STATE RMB X RMB DURATION RMB DURATION_CNT RMB. STATE ", X ", DURATION_CNT " 2. IF TIME = 6: am THEN { X " IF STATE = 7 THEN STATE " AND CALL STATE_RTN } 3. IF TIME = 8: am then X " 4. IF TIME = 5: pm then X " 5. IF TIME = 7: pm then X " 6. IF TIME = 2: am then X " 2 7. IF X = 2 THEN STATE " 7 ELSE { IF DURATION_CNT = DURATION THEN { STATE " STATE+ IF STATE = 7 THEN STATE " 8. GO TO STEP 2 CALL STATE_RTN } }
Test Algorithm (continued) STATE_RTN DURATION_CNT " IF STATE!= THEN GO TO ST2 STATE_ IF X = THEN DURATION " DURR ELSE DURATION " DURNR TURN ON GA AND RB GO TO DONE ST2 STATE_2 DURATION DURATION " DUR25 TURN ON YA AND RB GO TO DONE ST3 STATE_3 DURATION ST4 DURATION " DUR36 TURN ON RA AND RB GO TO DONE IF STATE!= 2 THEN GO TO ST3 DUR25 IF STATE!= 3 THEN GO TO ST4 DUR36 IF STATE!= 4 THEN GO TO ST5 STATE_4 STATE_5 STATE_6 DONE DURATION " DUR4 TURN ON RA AND GB GO TO DONE ST5 IF STATE!= 5 THEN GO TO ST6 DURATION " DUR25 TURN ON RA AND YB GO TO DONE ST6 IF STATE!= 6 THEN GO TO DONE DURATION " DUR36 TURN ON RA AND RB RETURN FROM STATE_RTN
Harnessing the Real-Time Clock Algorithm for Hour Range Detection If {AM} Then {If Hour=2 Then State 3 Else {If Hour =< 5 Then State 3 Else {If{ Hour =< 7 Then Rush Hour Mode Else Non-Rush Mode}} Else {If Hour=2 Then Non-Rush Mode Else {If{ Hour =< 4 Then Non-Rush Mode Else {If{ Hour =< 6 Then Rush Hour Mode Else Non-Rush Mode}}
State Determination Algorithm If State= Then Execute STATE_ routine Else {If State=2 Then Execute STATE_2 Else {.. If State=2 Then Execute STATE_2 routine AND Set State=}..}
State Routine Code Example STATE_ RUSH_ (3 sec) MAN_DUR LIGHT_ TOGGLE LR INITIAL STATEB CLR BCLR LDAA BEQ BRCLR LDAA ST3_VAR *Clear state 3 variable. TCTL,X $FF *Turn Y off. RNRMODE *Check to see if rush hour mode RUSH_ *If yes, implement rush hour duration PORTE,X $ MAN_DUR #DURNR *If not, implement non-rush hour duration STAA DURATION BRA LIGHT_ BRCLR PORTE,X $ MAN_DUR LDAA #DURR *Implement rush hour duration (6 sec) STAA DURATION JMP LIGHT_ LDAA #2 STAA DURATION LDAA DURATION_CNT *Check to see if ready to blink CMPA # *control light LR. BNE TOGGLE LDAA #$2 *Turn on control lights STAA PORTA,X *LR, G, LDAA #$9 *LR2 & R2. STAA PORTD,X BRA INITIAL LDAA PORTA,X *Start blinking control light EORA #$2 STAA PORTA,X LDAA DURATION_CNT *Check to see if duration has passed CMPA DURATION *If not, continue duration count. BLE STATEB BRCLR PORTE,X $ INC INC STATE *and go to state 2. CLR DURATION_CNT *If yes, clear duration count CLR RNRMODE JMP TRAFDONE *Return from traffic subroutine. INC BRCLR PORTE,X $2 INC STATE JMP STATEB STATEB
Automatic/Manual Mode Determination If Automatic/Manual Mode Switch is Open Then Mode = Manual (Duration = 2 sec., Don t Increment State, etc.) Else Mode = Automatic (Duration = Duration of States during Rush/Non-Rush Mode, Increment States Automatically, Watch for State_3)
Manual Mode Incrementing If Mode=Manual Then {If State Incrementing Button = Closed Then State=State+ Else State=State State} Else Mode=Automatic (and Continue)
Pedestrian Crossing If State= AND Pedestrian Crossing Button is Closed Then Clear DURATION_CNT AND STATE=2 Else {If State=7 AND Pedestrian Crossing Button is Closed Then Clear DURATION_CNT AND STATE=8 ELSE CONTINUE}
Pedestrian Crossing For the time frame, we currently have structured the code to accept a pedestrian crossing request only after five seconds of State or State 7 operation.
Regulatory Bodies! Occupational Safety & Heath Administration (Osha)! Federal Communications Commission (FCC)! United States Patent & Trademarks Office
! 9.268(d)() OSHA Before work is begun in the vicinity of vehicular or pedestrian traffic which may endanger employees, warning signs and/or flags or other traffic control devices shall be placed conspicuously to alert and channel approaching traffic. Where further protection is needed, barriers shall be utilized. At night, warning lights shall be prominently displayed, and excavated areas shall be enclosed with protective barricades.
OSHA! 926.44(c)()(ii) Clearance from ground. Open conductors shall conform to the following minimum clearances:! 926.44(c)()(ii)(A) feet (3.5 m)-above finished grade, sidewalks, or from any platform or projection from which they might be reached.! 926.44(c)()(ii)(B) 2 feet (3.66 m)-over areas subject to vehicular traffic other than truck traffic.
OSHA! 926.44(c)()(ii)(C) 5 feet (4.57 m)-over areas other than those specified in paragraph (c)()(ii)(d) of this section that are subject to truck traffic.! 926.44(c)()(ii)(D) 8 feet (5.49 m)-over public streets, alleys, roads, and driveways.
FCC! FCC allocated 75 megahertz of spectrum for intelligent transportation services to improve highway safety and efficiency as part of the U.S. Department of Transportation's "Intelligent Transportation Systems" (ITS) national program.! FCC decided to use the 5.85-5.925 5.925 GHz band for a variety of Dedicated Short Range Communications (DSRC) uses, such as traffic light control, traffic monitoring, travelers' alerts, traffic congestion detection, emergency vehicle signal preemption of traffic lights,.! http://www.fcc.gov/bureaus/engineering_technology/news_releases/999/nret9 6.html
Patents # Although no identical patents were found for our 3-State Traffic Controller as a whole, we did find patents of similar use and purpose registered with the United States Patent and Trademark Office (USPTO).
USPTO U.S. Patent number 6,268,85: An apparatus for the control of traffic includes a signal assembly with a red stop light, a green passage light, and a yellow caution light. A count-down indicator includes a digital display that displays (i.e., counts down) the remaining time in seconds until the next signal change occurs. The digital display matches the color of the digits being displayed to that of the illumined light of the signal assembly. An optional solar panel economically helps maintain the charge of the backup battery. A microprocessor in the battery backup assembly receives information from the signal assembly, processes that information, and controls the digital display parameters. If the signal assembly relies upon traffic sensors and can abruptly change the remaining time that is being shown by the digital display, the digits of the digital display flash to inform a driver of this potentiality. According to a modification, a flashing caution light is attached to the digital display and it flashes whenever there is potential that the remaining time can suddenly change in a manner that violates the normal count-down sequence.
USPTO U.S. Patent number 6,33,824: A transparent lens for motorist traffic light signals and pedestrian "Don't Walk" signs that displays, in LCD countdown "real-time", how much time remains before the traffic signal command will change. The lens is easily shaped to be adapted over any existing traffic control device or magnified over the existing control device and works in conjunction with existing technology for timing and control settings to provide a quick and economical installation. The covering lens is a traffic light signaling device combination manufactured as one assembly and comprised of known colored liquid crystal (LED), plasma or pixel generators or other imaging generating technology which is quickly affixed to existing signaling traffic devices.
USPTO U.S. Patent number 6,283,63: An LED signal module includes a casing defining a cavity. Within the cavity is an array of LEDs. Individual reflectors are placed around individual LEDs of the array. The individual reflectors are structured to receive direct light from their associated individual LEDs and substantially to prevent direct light from their associated individual LEDs from impinging upon the individual reflectors of other LEDs of the array of LEDs. Also included, and covering the cavity, is a lens shaped to direct the output luminance of the LEDs below a horizontal axis of the module.
Packaging Design! Going to go backwards through the packaging design steps Final product Parts Problems that need to be solved for each part Future packaging
Final Product! Base! Two poles! 6 push buttons! Toggle switch! Three light boxes
Base! Made from a clipboard Sturdy Thin! Easy to install push button, switches, and poles! Problems while soldering poles to base
Poles! Used copper tubing Allows wires to be placed under the base Easy attachment to base! Problems Heats up quickly while soldering Poles are easily bent when heated
Push Buttons and Switch! Problems Buttons and switch heat up quickly while soldering Easily damaged during soldering Melted two push buttons
Three Light Boxes! 2 LED's for each light box! 36 LED's total! 72 wires
What do I do with all these wires? How do I minimize 72 wires to get 2 wires and a ground? Need to get 2 lines to connect to the outputs and one ground line
What do I do with all these wires?! Connect all the ground wires together! Connect identical lights together! 7 wires out of each light box! Connect two identical light boxes together! Left with 2 lines and ground
Light Box Problems! Many parts to place in a small area! LED s were easily damaged by heat Could only touch the soldering iron to the wire for a brief period Melted 4 LED s
Future packaging! Encase the board Encase the wires and evaluation board in plastic or wood to get a professional look! LCD will be placed on base LCD will be placed near the push button used to set the time! Power line Drill hole for the power line in the board enclosure