Traffic Light Control System Design Project
Traffic lights, also known as traffic signals, traffic lamps, traffic semaphore, signal lights, stop lights and robots, and also known technically as traffic control signals are signaling devices positioned at road intersections, pedestrian crossings and other locations tocontrol competing flows of traffic. The first manually operated gas lit traffic light was installed in 1868 in London, though it was short-lived due to explosion. The first safe, automatic electric traffic lights were installed in the United States starting in the late 1890s
Traffic lights alternate the right of way accorded to road users by displaying lights of a standard colour (red, yellow, and green) following a universal colour code. In the typical
sequence of colour phases:
- the green light allows traffic to proceed in the direction denoted,
- the yellow light provides warning that the signal will be changing from green to red.
- a flashing yellow indication is a warning signal
- the red signal prohibits any traffic from proceeding
- a flashing red indication is treated as a stop sign
Traffic signals will go into a flashing mode if the controller detects a problem, such as a program that tries to display green lights to conflicting traffic. The signal may display flashing yellow to the main road and flashing red to the side road, or flashing red in all directions.
Flashing operation can also be used during times of day when traffic is light, such as late at night.
TYPES
Traffic lights can have several additional lights for filter turns or bus lanes.
Single aspects
The simplest traffic light comprises either a single or a pair of colored aspects that warns any
user of the shared right of way of a possible conflict or danger.
- Flashing red: treated as a stop sign. Also can signal the road is closed.
- Flashing yellow: caution, crossing or road hazard ahead.
- Flashing green: varies among jurisdiction; can give permission to go straight as well as make a left turn in front of opposing traffic (which is held by a steady red light), can indicate the end of a green cycle before the light changes to a solid yellow, or indicates the intersection is a pedestrian crosswalk.
Dual aspects
These are often seen at railway crossings, fire stations, and at intersections of streets. They flash yellow when cross traffic is not expected, and turn red to stop traffic when cross traffic occurs. They are also used on ramp metering, where motorists enter a freeway in heavy
traffic. Only one driver per lane goes per green.
Three or more aspects
The standard is the red light above the green, with yellow between.
Other signals are sometimes added for more control, such as for public transportation and permissive turns.
The three-aspect standard is also used at locks on the Upper Mississippi River. Red means that another vessel is passing through. Yellow means that the lock chamber is being emptied
or filled to match the level of the approaching vessel. After the gate opens, green means that the vessel may enter.
PRINCIPLE OF FUNCTIONING OF THE PROJECT
The project work in such a manner that:
-Red light ON stop traffic in the direction indicated
-Yellow light flash indicate that light will be changing from green to red
-Green light ON mean proceed traffic in the direction indicated
MATERIAL TO BE USED
With respect to the expectations from our project, we decided to use the following
materials;
- PIC 16F84A micro controller
- Traffic Light. We need four traffic light consisting of red, yellow, and green light
- Resistors: 10KΩ to protect the microcontroller it is connected to the MCLR port pin.
- Crystal: 4Mhz crystal to provide the clock signal to the microcontroller.
- Capacitor: 120pF used to stabilize the oscillations produced by the crystal.
- Supply: We supply the microcontroller with 5V DC.
- A round about: This is where we need to implement if implementation is required.
ALGORITHM OF THE PROGRAM
- set the direction of pins
- configure the direction of port (all port are clear since they are all output)
- clear the output port
- Update the output
- goto to 4
DIGITAL REPRENSTATION OF THE PROCESS
When green “f” is ON, red “a” is off. After a time delay of 30s, yellow “e” comes on while
green f is still on. After a delay of 10s, green f and yellow e go off and red d and green c come
on. After a delay of 30s, yellow b comes on while green c is still on, after a delay of 10s, the
process restart.
Time at which green stay on equal to the time at which red is on plus yellow on.
FLOW CHART OF PROGRAM
C PROGRAMMING UNDER CCS C
#include "C:\Users\user\Documents\MY FIRT PROJECT IN CCS\CC PROGRAM FOR
CA.h"
void main()
{
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
// TODO: USER CODE!!
SET_TRIS_b(0X00); //setting direction of pinb AS OUTPUT PIN
output_b(0x00); // clearing output port b
for(;;) // infinite loop
{
output_b(0x21); //set output to 0X21
delay_ms(30000); // wait for 3s
output_b(0x30);
delay_ms(10000);
output_b(0x0c);
delay_ms(30000);
output_b(0x06);
delay_ms(10000);
}
}
WIRING DIAGRAM IN PROTEUS