TRAFFIC-LIGHT CONTROLLER

INTRODUCTION: TRAFFIC LIGHT CONTROLLER

Interface with the CPU, the signal lamps which control a road junction and implement a traffic control sequence. On 10 December 1868, the first traffic lights were installed outside the British Houses of Parliament in London, to control the traffic in Bridge Street, Great George Street and Parliament Street. They were promoted by the railway engineer J. P. Knight and constructed by the railway signal engineers of Saxby  & Farme. Write now  days its became a part of our life.

DESCRIPTION: 

1) MICROPROCESSOR:-

The 8085 Microprocessor is a popular Microprocessor used in Industries for various applications.  Such as traffic light control, temperature control, stepper motor control, etc.  In this project, the traffic lights are interfaced to Microprocessor system through buffer and ports of programmable peripheral Interface 8255.  So the traffic lights can be automatically switched ON/OFF in desired sequence.  The Interface board has been designed to work with parallel port of Microprocessor system.

The hardware of the system consists of two parts.  The first part is Microprocessor based system with 8085.  Microprocessor as CPU and the peripheral devices like EPROM, RAM, Keyboard & Display Controller 8279, Programmable as Peripheral Interface 8255, 26 pin parallel port connector, 21 keys Hexa key pad and six number of seven segment LED’s

2)8255 PPI:-

The 8255 Programmable Peripheral Interface. The 8255 is a widely used programmable, parallel I/O device.
• It can be programmed to transfer data under various conditions, from simple I/O to interrupt I/O.
• It is flexible, versatile and economical and complex.
The 8255 has 24 I/O pins that can be grouped primarily into two 8 bit parallel ports: A and B, with the remaining 8 bits a port C. The 8 bits of port C can be used as individual bits or be grouped in two 4-bit ports: CUPPER (CU) and CLOWER (CL), as shown in the figure. The functions of these ports are defined by writing a control word in the control register.

8255

Figure shows all the functions of 8255; classified according to two modes: the Bit Set/Reset (BSR) mode and I/O mode. The BSR mode is used to set or reset the bits in port C. The I/O mode is further divided into three modes: Mode 0, Mode 1 and Mode 2. In Mode 0, all ports function as simple I/O ports. Mode 1 is a hand shake mode whereby Ports A and/or B use bits from port C as handshake signals. In Mode 2 Port A can be set up for bidirectional data transfer using handshaking signals from Port C, and Port B can be set up either in Mode 0 or Mode 1.

BLOCK DIAGRAM OF 8255

block dia 8255

CONTROL LOGIC:READ (Read): This control signal enables the Read operation. When the signal is low, the MPU reads data fro a selected I/O Port of the 8255.

WRITE(Write): This control signal enables the write operation. When the signal goes low, MPU writes into a selected I/O Port or control register.

RESET (Reset): This is an active high signal; it clears the control register and sets all ports in the input mode.A0 and A1: Theses are device select signals. Chip Select is connected to a decoded address, and A0 and A1 are generally connected to MPU address lines A0 and A1 respectively.

A0 ANS A1

CONTROL WORD

Figure shows a register called the control register. The contents of this register called control word. This register can be accessed to write a control word when A0 and A1 are at logic 1. This control register is not accessible for a read operation.8255 control

Bit D7 of the control register specifies either I/O function or the Bit Set/Reset function. If bit D7=1, bits D6-D0 determines I/O functions in various modes. If bit D7=0, Port C operates in the Bit Set/Reset (BSR) mode. The BSR control word does not affect the functions of Port A and Port B.

3)IC7404 :-

7404 is a NOT gate IC. It consists of six inverters which perform logical invert action. The output of an inverter is the complement of its input logic state, i.e., when input is high its output is low and vice versa.

PIN Diagram: 7404IC 7404 PIN DIA

 

 

 

 

 

INTERNAL 7404 DIAGRAM:7404 INTERNAL DIA

PIN DESCRIPTION:-

 Pin No Function Name
1Input/output of 1st inverterInput1
2Output1
3Input/output of 2nd inverterInput2
4Output2
5Input/output of 3rd inverterInput3
6Output3
7Ground (0V)Ground
8Output/input of 4th inverterOutput4
9Input4
10Output/input of 5th inverterOutput5
11Input5
12Output/input of 6th inverterOutput6
13Input6
14Supply voltage; 5V (4.75 – 5.25 V)Vcc

4)LED: LED

A Light-Emitting Diode (LED) is a semiconductor light source. LEDs are used as indicator lamps in many devices and are increasingly used for other lighting. Appearing as practical electronic components in 1962, early LEDs emitted low-intensity red light, but modern versions are available across the visible, ultraviolet, and infrared wavelengths, with very high brightness.  In this project we use the 14 led.It has mainly use the red and green led.

LED

5)RESISTANCE:

we can use the 390Ω as a resistance.we use it 14 picess carbon resistance.

CIRCUIT DIAGRAM:LIGHT CONTROLLER– 

 

BLOCK DIAGRAM

Description:-

In this circuit used in the 4 road junction in the way.now we got the 4 categories’ as deign as below.

1.Road map:- ROAD MAP

In this road map we can see only north and south side is on but east and west is off .so the green light of position A is on. And  position C green light is on. And  red light is on of position B&D.

Data 1:-

A7A6A5A4A3A2A1A0
RAGASTGALSGARSRBGBLSGBSTGBRS
01001000
B7B6B5B4B3B2B1B0
×RCGCSTGCRSRDGDSTGDLS×
00101000

So we found the deta are:-

Port A- 0100 1000

4       8

Port B- 0010 1000

2     8

2.Road Map:-

In this road map we can see only east and west side is on but north and south is off .so the green light of position B is on. And  position D green light is on. And  red light is on of position A&C.

 

Data 2:-

A7A6A5A4A3A2A1A0
RAGASTGALSGARSRBGBLSGBSTGBRS
10000010
B7B6B5B4B3B2B1B0
×RCGCSTGCRSRDGDSTGDLS×
01000100

So we found the deta are:-

Port  A- 1000 0010

8     2

Port B- 0100 0100

4           4

3.Road Map:-

In this road map we can seeonlyeast northand south side is on but west is off .so the green lights of position ARS, BLS&DLS is on. And  red light is on of position C.

 

Data 3:-

A7A6A5A4A3A2A1A0
RAGASTGALSGARSRBGBLSGBSTGBRS
00010100
B7B6B5B4B3B2B1B0
×RCGCSTGCRSRDGDSTGDLS×
01000010

 

So we found the data are:-

Port  A- 0001 0100

1   4

Port B- 0100 0010

4     2

4.Road Map:- 

In this road map we can seeonlyeast northand south side is on but west is off .so the green lights of position ALS, BRS&CLS is on. And  red light is on of position D.

 

Data 4:-

A7A6A5A4A3A2A1A0
RAGASTGALSGARSRBGBLSGBSTGBRS
00100001
B7B6B5B4B3B2B1B0
×RCGCSTGCRSRDGDSTGDLS×
00011000

 

So we found the data are:-

Port  A- 0010 0001

2            1

Port B- 0001  1000

1             8

**Now we put the data into the programmer.

MVI A,    80H

OUT       23H

Start      LXI H, 802A

MVI B,   04H

Next         MOV A, M

OUT      20H

INX H

MOV A, M

OUT      21H\

Call Delay

INX H

DCR B

JNZ       next

JMP        strt

delay       LXI D, FFFF

Loop            DCX D

MOV A. B

ORA D

JNZ     loop

RET

DETA 1-

48

28

DETA 2-

82

44

DETA 3-

14

42

DETA 4-

21

18

 

 

 

 

Memory

Location

Opcode
80013E
800280
8003D3
800423
800521
80062A
800780
800806
800904
800A7E
800BD3
800C20
800D23
800E7E
800FD3
801021
8011CD
80121C
801380
801432
801505
8016C2
80170A
801880
8019C3
801A05
801B80
801C11
801DFF
801EFF
802F1B
802078
8021B2
8022C2
80231F
802480
8025C9

COSTING:-

Mame of equipmentPrice of equipment
1)ic7404×336.00
2)390Ωregistance×1428.00
3)LED× 1414.00
4)wire20.00
Ttotal cost98.00

CONCLUSION:

Traffic lights are vital to control traffic in a safe and orderly manner.In the wrong location, a traffic signal can contribute to crashes and congestion. The potential for a crash exists every time a vehicle is stopped on the highway. Traffic signals are valuable tools, but they are not a cure at all.“The decision table is a convenient form for expressing any conditional alternatives, where a particular path to be followed is dictated by a combination of a number of conditions”. Decision tables can be a powerful aid in programming, documentation, and in effective man-to-man and man-to-machine communications. The result of these studies illustrates that use of decision tables for traffic lights for roads and especially at intersections where heavy traffic has to obey the rules of traffic lights turn into a very useful tool for decision making based on set rules and according to the traffic rules and regulations. Therefore it is important to know that rules should not be redundant. It could be an effective tool for decision making.

REFERENCE:-

Microprocessor book written by Ramesh Gaonkar.

Internet help from: www.wikipedia.com

3 Replies to “TRAFFIC-LIGHT CONTROLLER”

Leave a Reply

Your email address will not be published. Required fields are marked *