Traffic Light Simulation - Northwestern...

20
Traffic Light Simulation Kenda Branch Chanda Davis

Transcript of Traffic Light Simulation - Northwestern...

Page 1: Traffic Light Simulation - Northwestern Universityclifton.mech.northwestern.edu/~me224/FinalProjects_Fall... · Web viewNow we are moving away from the use of incandescent lights

Traffic Light Simulation

Kenda BranchChanda Davis

Page 2: Traffic Light Simulation - Northwestern Universityclifton.mech.northwestern.edu/~me224/FinalProjects_Fall... · Web viewNow we are moving away from the use of incandescent lights

TABLE OF CONTENTS

SUMMARY………………………………………………….... 3INTRODUCTION……………………………………….…….4

History………………………………………………….4LED Technology……………………………………….4Figure 1: Light Emitting Diode..…………………….. 5

PROJECT DESCRIPTION…………………………….……..6Theory…………………………………………………. 6Experimental Setup……………………………………6Figure 2: Schematic Design of Experiment..…………6Circuitry………………………………………………..7

Powering the LED’s…………………….……..7Figure 3: Completed Circuitry………………..7Controlling the LED’s…………………..……..7Figure 4: n-Type Transistor..…………………7

Data Acquisition Card…………………………………7Connecting the circuit to the DAQ……………8Figure 5: Ground and Signal wired to DAQ…8

LabVIEW……………………………………………….8RESULTS……………………………………………………….9

Table 1…………………………………………………..9ANALYSIS……………………………………………………..10

Circuitry………………………………………………..10LabVIEW………………………………………………10Data Acquisition Card………………………………...10

BIOGRAPHICAL SKETCH…………………………………11BIBLIOGRAPHY……………………………………………..12APPENDICES

APPENDIX ATable 2: DAQ Reference Guide

APPENDIX BTable 3: Bill of Materials

APPENDIX C: LabVIEW Program

Page 3: Traffic Light Simulation - Northwestern Universityclifton.mech.northwestern.edu/~me224/FinalProjects_Fall... · Web viewNow we are moving away from the use of incandescent lights

I. SUMMARY

Traffic lights are something that people see everyday, yet never grasp the full understanding of their operation. How do they work? What causes them to change? Can they detect the presence of approaching vehicles? No one ever takes the time to honestly discover these answers. Like most things, people make their own assumptions, yet still wonder why.

There are approximately 3 to 4.5 million traffic signals presently operating in the United States. Each contains three signal heads (approximately 200-300 mm in diameter), consisting of one red, yellow and green. For the most part, each signal head contains an incandescent bulb of wattage between 67 W and 150 W. The wattage requirement for each bulb varies with the color: red signals require the highest wattage; yellow and green signals require lower wattages. However, to save energy, an increasing number of light-emitting diode (LED) light sources are replacing incandescent bulbs for red signal lights. Instead of requiring 67 W to 150 W for operation, the LED’s only require 10 W to 15 W, approximately 90% less than incandescent bulbs they replace.

Despite common beliefs, these traffic lights are not randomly operated. They are a part of a large, intricate network, which functions based on the time and its location. For some cities, each intersection may have different timing plans (i.e. Morning, Afternoon, Night, etc.) based on the traffic behavior throughout the day. This explains why at a specific time during the day, one light may last longer than the other lights at the intersection. In addition to this network, some intersections are equipped with motion detectors. In extreme cases (i.e., times between midnight and dawn), these motion detectors may be the only factor determining the time interval of each signal (how long they last).

It is our goal to simulate the behavior of traffic lights relative to the time of day. We plan to achieve this goal by designing a code that will respond to four separate timing plans.

Morning Rush Hour (7 am – 9 am) Mid-day (9 am – 3 pm) Afternoon Rush Hour (4 pm – 6 pm) Evening (6 pm – 8 pm)

These timing plans will determine how long each light signal will last.

Page 4: Traffic Light Simulation - Northwestern Universityclifton.mech.northwestern.edu/~me224/FinalProjects_Fall... · Web viewNow we are moving away from the use of incandescent lights

II. INTRODUCTION

History

The first traffic light was invented before automobiles were introduced to the world. They were used to regulate traffic, but traffic consisting of pedestrians and horse drawn buggies and carriages. At the time, this was considered good news for police officers who were in charge of regulating traffic all day. In 1868, the first traffic light was installed at an intersection in London. The light was a revolving lantern consisting of two lights: red and green (green for caution and red for stop). The lanterns were controlled manually and illuminated with gas. However, in 1869, these earlier models proved to have a major design flaw. They were explosive, in most cases, exploding and injuring the operator. With the age of automobiles approaching, it is easily seen how this system of traffic control could result in more disastrous events. Thankfully, there were more modifications to the existing traffic control model.

It was not until the lat 1890’s did inventors turn to existing models of light signaling to improve traffic lights found on street crossings. Railroads for example, were using automated light systems to alert people when a train was approaching. The only thing was that for railroads, detection was only needed for two directions. In the case of a street intersection, traffic came from four directions. Nevertheless, in 1920, William Potts, a Detroit police officer, utilized the same technology developed for these crossings and successfully adapted them to street crossings. Using $37 dollars worth of wire and electrical equipment as well as green, amber, and yellow lights, Potts invented a manually controlled traffic light. Later that year, Garret Morgan invented the first automatic traffic light, which followed the idea of regulating traffic on common four-way intersections.

Technology has come a long way since the revolving gas illuminated traffic light. Now we are moving away from the use of incandescent lights and moving towards the use of LED’s in traffic lights.

LED Technology

LED (Light Emitting Diode) light sources, known as p-n semiconductor devices, have only recently found their part in traffic signal technology. How they produce light occurs in a few steps, but the first step is accomplished by doping a substrate material with other different materials, thus forming a p-n junction within the material, a semiconductor crystal. A dopant in the n-region of the junction provides negative charge carriers (electrons), and a dopant in the p-region of the junction provides positive charge carriers (holes). The LED emits light as excess energy from combined charge carriers after a voltage is applied to the junction from the p-region to the n-region. All of this is covered by a clear or epoxy lens.

Figure 1: Light Emitting Diode

Page 5: Traffic Light Simulation - Northwestern Universityclifton.mech.northwestern.edu/~me224/FinalProjects_Fall... · Web viewNow we are moving away from the use of incandescent lights

The wavelengths of the light depend on the materials used during the doping process. They consist of SiC (deep blue), GaN (blue), GaP (green, yellow, amber, orange, red, deep red), GaN (blue, green, yellow, orange), GaAs (yellow, amber, orange, red, bright red), and GaZ (deep red). Other materials that produce long visible wavelengths have now recently been discovered: Aluminum Indium Gallium Phosphide, AlGInGaP (red, yellow, amber); and Indium Gallium Nitride, InGaN (green and blue). These are mostly likely used in the implementation of LED’s into traffic signals. LED’s require less voltage and produce very little current, which is why they are preferred to incandescent lights. However, this is all based on a tiny device about the size of a small pencil eraser. Therefore, the LED’s must be packed together by the hundreds with reflectors or lenses in order to create the magnitude of light required by the Institute for Transportation Engineers. Those lights that are smaller (i.e. traffic signal arrows) require fewer LED’s and are usually incandescent traffic signals.

Page 6: Traffic Light Simulation - Northwestern Universityclifton.mech.northwestern.edu/~me224/FinalProjects_Fall... · Web viewNow we are moving away from the use of incandescent lights

III. Project Description

Theory

The concept behind this experiment is based on the fact that most traffic lights at any given intersection are a part of a large network of electric circuitry that is controlled by various timing plans. A timing plan basically indicates how long each light will remain on in the green-yellow-red sequence. Timing plans change throughout the day; the timing plan for morning rush hour differs from the timing plan for the afternoon rush hour, and both timing plans may differ from the timing plans during the period between midnight and dawn. Each timing plan is modeled to regulate traffic according to the congestion expected at that time. The following arbitrary timing plans were used for this experiment:

Morning Rush Hour (7 am – 9 am) Mid-day (9 am – 3 pm) Afternoon Rush Hour (4 pm – 6 pm) Evening (6 pm – 8 pm)

The purpose of this experiment is to model the behavior of one traffic signal and program the lights to model the specific behaviors of the timing plans when imputed to do so.

Experimental Setup

Based on the research material collected, the idea for this experiment is to simulate a traffic light. The setup consists of three LED’s (red, yellow, green), circuitry, Data Acquisition Card, and a LabVIEW Program. A simple schematic of the entire set-up is shown below.

Figure 2: Schematic Design of Experiment

A- Red LED (simulating traffic light)B- Yellow LED (if attainable)C- Green LEDD- Circuit board (no larger than 1’x1’)E- Data Acquisition CardF- Computer Terminal/ Operation of LabVIEW

CIRCUITRY

A B C

D

E

F

DAQLabVIEW

Page 7: Traffic Light Simulation - Northwestern Universityclifton.mech.northwestern.edu/~me224/FinalProjects_Fall... · Web viewNow we are moving away from the use of incandescent lights

Circuitry

Powering the LED’s

The three LED’s are powered by one circuit board, which delivers 5V to each individual LED.

Figure 3: Completed circuitry

A typical LED can achieve a maximum current of 0.01A and a voltage drop of 1.7 V. If supplied more than 1.7 V, the LED will not light when the circuit is complete. Remember an LED is a light emitting diode and is constrained to the same rules as an ordinary diode. As a result, it is necessary to dissipate the voltage and limit the current supplied to the LED’s by using a resistor. For the purpose of this experiment, we use 330 resistors for each LED.

Controlling the LED’s

In order to control the LED’s automatically with out any physical input, it is necessary to use a transistor. A transistor is like a light switch; it has two operations. It can be turned “on” and turned “off.” Transistors consist of three terminals: source, drain, and gate. In this experiment, we need to be able to turn our LED’s off and on with out manually turning off the voltage source. For that reason, we use three transistors to operate each LED separately. The drain is connected to the LED, the source to ground, and the gate is connected to the P3 breakout board on the DAQ (Data Acquisition Card). The gate is also connected to the source using a 47k resistor.

Data Acquisition Card

The Data Acquisition Card (DAQ) allows us to “convert electronic signals produced by transducers into digital numbers which can then be stored and analyzed at our convenience or be used to control some system.” We will be using the DAQ for the purpose of controlling our LED’s.

Figure 4: n-Type Transistor

Page 8: Traffic Light Simulation - Northwestern Universityclifton.mech.northwestern.edu/~me224/FinalProjects_Fall... · Web viewNow we are moving away from the use of incandescent lights

Connecting the circuit to the DAQ

There are two breakout boards labeled P2 and P3. We use P2 when we want to read a signal from the physical experimental set-up. For example, if we were reading the times at which an object crossed a photo sensor. We use P3 when we want to control our circuitry by other means. In this experiment, we want to use P3, because we want to control the behavior of our LED’s through the use of LabVIEW. Connect the gate of each transistor to the P3 port, be sure to ground each channel used on the DAQ.

Figure 5: Ground and signal wired to DAQ.

LabVIEW

As mentioned earlier, LabVIEW was used to specifically control the system, namely how long the LED’s remained illuminated, as well as in what order and for how long. The program mainly consisted of sequence structures and case structures that controlled the previously mentioned parameters. The structures had frames, in which certain steps were implemented. For example, one frame might have the configurations to turn on the green light, and the next frame would have a wait function with a specified amount of the time for that light to remain on, and the following frame would have the configurations to turn off the light. The configurations mentioned above mainly consisted of constants and a sub-VI’s.

Page 9: Traffic Light Simulation - Northwestern Universityclifton.mech.northwestern.edu/~me224/FinalProjects_Fall... · Web viewNow we are moving away from the use of incandescent lights

IV. RESULTS

Each timing plan was given a number (0 to 3). Once prompted by the program to input a number, the user must select one of the four numbers to control the behavior of the LED’s. Depending on which timing plan chosen, the LED’s will illuminate according to the programmed behaviors shown below.

Programmed ID Number

Light BehaviorGreen Yellow Red

Morning Rush Hour(7am-9am) 3 8 3 11

Mid-Day(9am-3pm) 2 4 2 6

Afternoon Rush Hour

(4pm-6pm)1 6 2 8

Evening(6pm-8pm) 0 4 1 5

Table 1: Program Input Chart

Notice that during Morning Rush Hour, the lights hold for long time intervals. And for the Evening Timing Plan, the lights hold for shorter time period. Although these numbers were chosen arbitrarily, they hold some logical truth. During Rush hour, when the congestion at the intersections is heaviest, people are less willing to persist in their daily commute in “stop and go” traffic. They prefer to wait in long intervals providing they get to move at long intervals. During the evening and Mid-day times, when there is little or no congestion, individuals prefer shorter time delays at the traffic lights.

Page 10: Traffic Light Simulation - Northwestern Universityclifton.mech.northwestern.edu/~me224/FinalProjects_Fall... · Web viewNow we are moving away from the use of incandescent lights

V. ANALYSIS

The simulation of basic traffic signals proved to be overall successful. However, many complications arose throughout the duration of the experiment. There were many mistakes made during the construction of the circuitry, the LabVIEW program, and the DAQ connections.

Circuitry

The initial circuit had no transistors, but instead the three LED’s hooked up in parallel. There was confusion about how to turn the lights on and off and what electric element to use. Initially, it was concluded that the circuitry could be constructed using capacitors. The experimenters believed that by having different size capacitors, it would take longer for one capacitor to charge up and illuminate the LED. The problem was then how to use this set-up in conjunction with the initial plan to change the time each light remained on using the program. It was then discovered that the basic transistor could turn each individual circuit on and off.

LabVIEW

The LabVIEW programming proved difficult at times. There were many ways to illustrate the desired task in the programming, so key was to find one way and to stick with it. Originally, the program contained Boolean LED’s and indicators displaying the time lapse for each light. On the control panel, three lights were displayed turning on and off, matching the behavior of the physical model of the LED’s on the circuit board. There was also the idea of using For Loops that would control how many times the signal would run a sequence before stopping the program and turning off all transistors. However, in the interest of time and detail of reality for this simulation, the final design worked best.

Data Acquisition Card

It is always important to check and make sure the DAQ at the workstation is functioning properly. This is said because majority of the complications resulted from the misunderstanding that the DAQ was working. If it is not determined that the DAQ is the problem early on before everything is complete, then there are hours and hours of endless troubleshooting that will result. It is also important that each signal reading wire is placed in the appropriate channel and that the LabVIEW program is reading from that channel.

Page 11: Traffic Light Simulation - Northwestern Universityclifton.mech.northwestern.edu/~me224/FinalProjects_Fall... · Web viewNow we are moving away from the use of incandescent lights

BIOGRAPHICAL SKETCH

Chanda J. Davis:

Northwestern University, 2003. B.S. Mechanical Engineering

Saturn Corporation: Spring Hill, TN, summers 1999- 2000

Chanda Davis, a native Alabamian, was raised in Middle Tennessee. She is currently a junior in the McCormick School of Engineering, majoring in Mechanical Engineering. “The best part about engineering,” she says, “is that you can do anything with it.” This southern girl is no pushover, she is currently Vice-Chairperson on the Chapter level for the National Society of Black Engineers and is an active member in the following organizations: NAYO: African American Dance Ensemble, Society of Hispanic Professional Engineers, and Dean’s Scholars. Ms. Davis is active in her community. She currently volunteers at the NorthShore Retirement Home and mentors young children. Her current dreams and aspirations include furthering her studies in Law and becoming a more experienced dancer and artist. She is living proof that engineers can make a difference in the performance and visual arts as well as impact the scientific world.

Kenda K. Branch:

Northwestern University, 2003. B.S. Mechanical Engineering

S & C Electric Company: Chicago, IL, summer 2000

Kenda Branch was born in Fayetteville, Arkansas, but has found her permanent home in Mundelein, Illinois. She is a junior in the McCormick School of Engineering and a Mechanical Engineering major. She is currently a member of the National Society of Black Engineers. Although she has had the passion to design and build structures since her first Lego set, she enjoys many unrelated activities. She has played in the Northwestern University Marching Band for three years, two years on the school drumline. She is the Recording Secretary for Sigma Alpha Iota, an International Music Fraternity for Women, where she sings in the SAI choir, as well as an acapella group Ladies in Red. She also plays saxophone and percussion in her church band in Evanston. Finally, she is a blue belt in Tae Kwon Do, a Korean martial art. She serves on the executive board for the school’s Tae Kwon Do club as the Secretary and Publicity Chair. She plans on becoming a black belt by the end of the school year. “I am my own proof that anything can be done once you put your mind to it. I apply that to school, music, and Tae Kwon Do. It is one of the many lessons I have learned in my three years here at Northwestern.”

Page 12: Traffic Light Simulation - Northwestern Universityclifton.mech.northwestern.edu/~me224/FinalProjects_Fall... · Web viewNow we are moving away from the use of incandescent lights

BIBLIOGRAPHY

Bullough, John, Kun Michelle Huang, and Kathryn Conway. “Optimizing the Design and Use of Light Emitting Diodes for Visually Critical Applications in Transportation and Architecture: Research Issues and Options.” Light Research Center, 2000. http://www.lrc.rpi.edu/Ltgtrans/led/main-comparison01.html

“Traffic Light.” The Great Idea Finder. http://www.ideafinder.com/history/inventions/story010.htm

Other sites:

http://www.intel.com/education

http://www.jameco.com

http://www.semi-tech-inc.com

Page 13: Traffic Light Simulation - Northwestern Universityclifton.mech.northwestern.edu/~me224/FinalProjects_Fall... · Web viewNow we are moving away from the use of incandescent lights

APPENDIX A

Connector P3, Motion I/O Axis 0-3Pin Name Pin Name1 Analog Gnd 2 DAC 03 Analog Gnd 4 Analog Gnd5 DAC 2 6 Analog Gnd7 Analog Gnd 8 DAC 19 Analog Gnd 10 Analog Gnd

       

referenced ISA Servo Hardware Manualhttp://clifton.mech.nwu.edu/~me224/Documents_HARDMAN1.PDF

Table 2: P3 Connector Reference Guide

Page 14: Traffic Light Simulation - Northwestern Universityclifton.mech.northwestern.edu/~me224/FinalProjects_Fall... · Web viewNow we are moving away from the use of incandescent lights

APPENDIX B

Bill of MaterialsQty Part Name Description

3 Light Emitting DiodesLED size: 2x5

Lens/ feature description: white diffused bi-color rectangle

1   Yellow1   Green1   Red3 330 ohms () Each resistor is 330 ohms (3 Resistors Each resistor is 47 kilo-ohms (k3 Transitors: IRF520 High Voltage MOS Power FET (N-Channel)

1 Prot-Board203A Circuit board: 3 Voltage Supply Sources (+5,+15, -15) and Ground Source

Table 3: Part List (Bill of Materials)

LabView Program:

Page 15: Traffic Light Simulation - Northwestern Universityclifton.mech.northwestern.edu/~me224/FinalProjects_Fall... · Web viewNow we are moving away from the use of incandescent lights

0G reen L ight

0Y ellow L ight

0R ed L ight

0Input T iming P lan

E vening (Input 0)

0G reen L ight 2 0G reen L ight 3 0G reen L ight 4

A fternoon R ush H our (Input 1)

0Y ellow L ight 2 0Y ellow L ight 3 0Y ellow L ight 4

0R ed L ight 2 0R ed L ight 3 0R ed L ight 4

M id-D ay (Input 2) M orning R ush H our (Input 3)

2024

0

0 [0..8]

0

0 [0..3]

Input T iming P lan