Traffic Lights Animated Template

Download Report

Transcript Traffic Lights Animated Template

Traffic Light Controller
By:
Candace Lee
And
Nayeon Kim
Instructors: Rajesh Gupta, Choon Kim, Shirley Miranda,
Bridget Benson, Arash Arafee
Cluster 1: Adventures in Embedded Computer Systems
July 2008
The world's very first traffic lights were invented by J
P Knight installed near London's House of Commons,
which was on the intersection of George and
Bridge Street, in 1868.
In 1914 The American Traffic Signal Company
installed red and green traffic lights on every corner
of the intersection of 105th Street and Euclid
Avenue in Cleveland, Ohio.
First traffic lights were all controlled by either
timing, or manually switched
Page 2
There are a couple of types of controlling systems
used for traffic lights today. They are fixed timed,
dynamic, coordinated, and actuated controls.
Fixed time:
- Now used mainly in heavily traffic places,
like large cities
- Uses a timer that changes the lights at
certain times, unaffected by traffic
Dynamic:
- Uses inductive loops, or sensors, that are
buried in pavement
Computerised traffic control box
- Detects oncoming cars, causing to
change the lights
Page 3
Coordinated
- Long strips of continuous green lights so
that lots of cars can go long distances at a
time
- Only used on one-way streets with fairly
constant levels of traffic
Page 4
Modified Lab #5, added LEDs
Used the capsense wizard to place a
different command for each slider port
touched
Placed wires connecting LEDs and the LCD
to ports that were previously assigned using
the PSoC Designer 5.0
Page 5
CY3214-PSoCEval USB developer kit.
Three LEDs (Light Emitting Diodes)
which represent the 3 traffic lights
Used an LCD screen to caption the
different phases.
CapSense slider, which represents the street
Page 6
1.
2.
3.
4.
5.
6.
7.
8.
Create a new project on chip level (device CY8C24894)
Open the user module and click on the Misc Digital tab then
select LCD and place it in the design.
Set the LCD port to Port_4
Open the user module again and add three LED functions.
Place them in the design. Place them under the following ports
and pins.
1.LED_1- Port_3, Pin_3_0 2.LED_2-Port_3, Pin_3_1 3.LED_3-Port_3,
Pin_3_2
Open the user module again and click on CapSensor, CSD, and
finally CSD with PRS16 as clock source and place it in the design.
Select “properties” on the right-mouse-pull-down-menu of
CSD_1 module and change the following properties
Scanning Speed:
Fast
Resolution:
9
Modulator Capacitor Pin:
P0[5]
Feedback Register Pin:
P1[5]
Select the “CSD Wizard” on right-mouse-pull-down-menu of
CSD_1 module. This located at the bottom.
Enter 2 on N Sensors and double click inside the slot to apply the
new value.
Page 7
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
Enter 1 on N Slider slot and double click inside the sot to apply the
new value.
Click and drag P3[7] and drag it on SW0.
Click and drag P3[0] and drag in on SW1.
Enter 8 on N Sliders of “Slider-0” and double click within the slot.
Enter 100 on Resolution of “Slider-0” and double click within the slot.
Click and drag the following ports:
P5[7] into W0
P5[5] into W1
P5[3] into W2
P5[1] into W3
P5[0] into W4
P5[2] into W5
P5[4] into W6
P5[6] into W7
Then open up the main. c and enter the c codes that are required
Open the tools tab at the top of the page and click options,
followed by build and compiler and select ImageCraft.
Compile and build the project.
Connect a wire between P0[5] and P1[5].
Finally test out the project.
Page 8
The sensor works accordingly:
The capsense slider has different points that respond to the
different places touched.
The first two points on the slider shows that there are no cars are
at the intersection, which is displayed on the LCD screen. LED
number one stays on representing that the light is red.
As you slide your finger down the slider, the LCD screen displays
that cars are approaching and the LED will change to LED 3. This
represents that the light has changed green.
As you slide your finger down further, the LCD screen will change
again and display caution, meaning that cars must slow down.
LED 2 will turn on. This represents that the light is turning yellow.
Finally the LCD displays that there are no more cars passing and
the LED 1 turns back on.
Page 9
Page 10
In conclusion our traffic light sensor is a great
way to speed up traffic and keep streets
running smoothly.
Stay safe on the roads =)
Page 11
Page 12