Download presentation
Presentation is loading. Please wait.
Published byVictor Clarke Modified over 8 years ago
1
Microcontroller based Traffic signal Umer Butt Amna Rashid Izza Rabbani Rozab Naveed Ramesha Akram
2
Contents Introduction Components Micro Controller 8051 Software Used Block Diagram Project Explanation Application Questions
3
Introduction This project aims at designing and implementing, a running model of traffic light controller which is controlled according to the density of vehicle on road.
4
Traditionally, traffic lights have bulbs. These traffic lights consume a lot of energy. They are controlled by microcontrollers. With the invention of light-emitting diodes (LEDs), these traditional traffic lights are being replaced with LED traffic lights.
5
The main advantages of LED traffic lights are they are brighter; they save energy and have a longer life span.
6
They consume 83 percent less energy than incandescent bulbs. Depending on size and color, they consume between 8 and 25 watts of energy. But, in the case of incandescent halogen bulbs, their energy use is between 67 and 150 watts.
7
Components Micro Controller 7-Segment Common Cathode Regulator 7805 Crystal 12 MHz LEDs Capacitors Resistors
8
Micro Controller Microcontroller is a single chip that contains Processor (the CPU) Non-volatile memory for the program (ROM or flash) Volatile memory for input and output (RAM), a clock and an I/O control unit. Also called a “Computer on a chip"
9
Pin Configurations
10
PIN 9 is the reset pin which is used reset the microcontroller’s internal registers and ports upon starting up. For pins 18 & 19 8051 has a built-in oscillator amplifier hence we need to only connect a crystal at these pins to provide clock pulses to the circuit.
11
Pins 40 and 20 are VCC and ground respectively. The 8051 chip needs +5V 500mA to function properly, although there are lower powered versions like the ATMEL 2051 which is a scaled down version of the 8051 which runs on +3V.
12
PINS 29, 30 & 31; this chip contains a built-in flash memory. In order to program this we need to supply a voltage of +12V at pin 31. If external memory is connected then PIN 29 is called PSEN. PIN 31, also called EA/VPP, should be connected to ground to indicate the presence of external memory. In order to use the external memory it is required to provide the low voltage (0) on both PSEN and EA pins.
13
PIN 30 is called ALE (address latch enable), which is used when multiple memory chips are connected to the controller and only one of them needs to be selected.
14
Ports in Micro Controller
15
PORT P1 (Pins 1 to 8): The port P1 is a general purpose input/output port which can be used for a variety of interfacing tasks.
16
PORT P2 (pins 21 to 28): PORT P2 can also be used as a general purpose 8 bit port when no external memory is present
17
Project Explanation
18
Supply 7805 voltage regulator is used to regulate the voltage at positive 5 volt. Two polar capacitors of 1000microfared and 100 micro fared are used to minimize any fluctuation. Output is obtained from third terminal and given at pin 40, 31,9.
19
Piezoelectric Crystal (XTAL) It is connected at pin number 18 and 19 along with two capacitors 33 connected in parallel with the crystal, 12 MHz crystal is used. When voltage is applied the crystal; oscillates which provides pulses and microcontroller works become of it.
20
Reset Key 9th pin of micro controller is used to reset. A resistor of 8.2K ohm and capacitor of 10 micro fared is connected.
21
7 Segment Display Seven segment display is connected at port 1
22
LED Light Three LED’s are connected at port 2
23
Software Used Proteus Keil
24
Block Diagram Regulator Micro Controller Traffic Signal 7- Segment Display
25
Circuit Diagram
26
Code #include void MSDelay(unsigned int); void main(void) { while(1) { P2=0x04; //green light P1=0xFB; MSDelay(250); P1=0xFF; MSDelay(250); P1=0x70; MSDelay(250); P1=0xDF; MSDelay(250); P1=0xDB; MSDelay(250); P1=0xB3; MSDelay(250); P1=0x79; MSDelay(250); P1=0x6D; MSDelay(250); P1=0x30; MSDelay(250); P1=0xFE; MSDelay(250);
27
P2=0x02; //yellow light P1=0x79; MSDelay(250); P1=0x6D; MSDelay(250); P1=0x30; MSDelay(250); P1=0xFE; MSDelay(250); P2=0x01; //red light P1=0xB3; MSDelay(250); P1=0x79; MSDelay(250); P1=0x6D; MSDelay(250); P1=0x30; MSDelay(250); P1=0xFE; MSDelay(250); P2=0x02; //yellow light P1=0x79; MSDelay(250); P1=0x6D; MSDelay(250); P1=0x30; MSDelay(250); P1=0xFE; MSDelay(250); } void MSDelay (unsigned int itime) { unsigned int i,j; for(i=0;i<itime;i++) for(j=0;j<1275;j++); }
28
Typical Applications Robotics as well as in the automotive industry. 8051 family chips make up over 50% of the embedded chip market. Traffic lights have become an integral part of human’s day-to-day life. With the advancement in semiconductor technology and a parallel rise in innovation in embedded technology a sea change in the lighting engineering has resulted.
29
Questions?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.