ROBUST TRAFFIC LIGHT CONTROLLER
ROBUST TRAFFIC LIGHT
          CONTROLLER
UNDER THE GUIDANCE OF


ER.A.K.SINGH

BY:
DEBASIS MISHRA
HISTORICAL PERSPECTIVE

• On 10 December 1868, the first traffic lights were
  installed outside the British Houses of Parliament
  in London, by the railway engineer J. P. Knight.
  They resembled railway signals of the time, with
  semaphore arms and red and green gas lamps for
  night use.
• The modern electric traffic light is an American
  invention. As early as 1912 in Salt Lake City, Utah,
  policeman Lester Wire invented the first red-
  green electric traffic lights.
TRAFFIC LIGHTS

• Traffic lights are also known as stop lights, traffic
  lamps, stop-and-go lights, robots or semaphore.
• These are signaling devices positioned at road
  intersections, pedestrian crossings and other
  locations to control competing flows of traffic.
  They assign the right of way to road users by the
  use of lights in standard colors (Red - Amber -
  Green), using a universal color code (and a precise
  sequence, for those who are color blind).
OBSTACLES

• Redundancy is not present
• Immune to failure due flow of large current
•  Voltage regulation is not proper
• No augmented circuit is present when main
  controller fails
• Improper performance at different
  temperature points
OBJECTIVEs                               Robust
                              Traffic

To make a robust traffic
                                        Light
 light controller

 Redundancy
 Voltage regulation        MICROCONROLLER
                                Controller
 Current protection
 Immune to Temperature
  fluctuations
THE BASIC 4 LANE TRAFFIC SIGNAL
STATE DIAGRAM
STATES OF LIGHTS OF LANES
           AFTER
           50 SEC




        CYCLIC            AFTER
AFTER   ROTATION          4 SEC
4 SEC




               AFTER
               50 SEC
Basic modules
• Four modules
1. Power supply modules and Battery
   backup module
2. Microcontroller module
3. Temperature regulated protection
   module
4. Overvoltage and overcurrent
   protection module
Module-1
BASIC POWER SUPPLY CIRCUIT




                              =6V
                     LM7806
Module-1
      BASIC ZENER REGULATOR CIRCUIT


• Voltage regulation or
  stabilisation circuit
• Achieved through a
  ZENER DIODE
• ZENER break down
  occurs on applying
  reverse bias voltage
Module-1
6V BATTERY BACKUP SUPPLY



           LM7806
Module-2
     ATMEGA 16 SPECIFICATIONS
• 131 Instructions
• 32 8-bit GP registers
• Throughput up to 16 MIPS
• 16K programmable flash
  (instructions)
• 512Bytes EEPROM
• 1K internal SRAM
• Timers, serial and parallel
  I/O, ADC
Module-2
PIN DIAGRAM
Module-2
Module-2
        PROGRAMMING PORTS
•   DDRA=0X00; (PORTA AS INPUT)
•   DDRA=0XFF; (PORTA AS OUTPUT)
•   PORTA=0XFF; (PORTA AS HIGH)
•   DELAY_MS(50); (USER DEFINED FUNCTION)
•   PORTA=0X00; (PORTA AS LOW)
•   DELAY_MS(50);

• Unsigned char read_portA;
• read_portA=PINA;
Module-2
     ADVANTAGE OF ATMEGA

•   Less hardware complexity
•   Less power consumption
•   Faster operation
•   Cheap Programmer
Module-2
   BASIC COMMANDS FOR PROGRAMING
   THE PORTS OF AVR MICROCONTROLLER
HEADER FILE THAT WE USED = AVR/IO.H

4 PORTS ARE = A,B,C,D

3 BASIC COMMANDS TO PROGRAM THE PORTS ARE

DDR<PORT NAME>=<hex decimal or binary number>
Used to declare ports as input or output port if 1=>output port,
0=>input port
DDRA=0b01011100

PORT<PORT NAME>=<hex decimal or binary number>
Used to assign output values through port
PORTA=0b01011100

PIN<PORT NAME>=<hex decimal or binary number>
Used to assign input values through port
Eg: PINA=0b01011100
Module-2
SIMULATED CIRCUIT DIAGRAM FOR 4 LANE
TRAFFIC LIGHT CONTROLLER
Module-2
              ‘C’ CODE FOR 4 LANE
#include <AVR/IO.h>
void Delay1s(int i)
{
int j;                                      Program
volatile unsigned int cnt;                  for
for (j=0; j<i; j++)                         1sec delay
for (cnt = 0; cnt < 55555; cnt++);
}
void main()
{
 DDRA=0XFF;
 DDRB=0XFF;                                  Assigning all
 DDRC=0XFF;                                  ports as
 DDRD=0XFF;                                  output ports
 PORTA=0x01;
 PORTB=0x01;                                 Initializing values
 PORTC=0x01;                                 to ports
 PORTD=0x01;
Module-2

while(1)                  east
{
PORTA=0x02;
Delay1s(4);
PORTA=0x04;
Delay1s(20);
PORTA=0x02;
Delay1s(4);
PORTA=0x01;               south

PORTB=0x02;
Delay1s(4);
PORTB=0x04;
Delay1s(20);
PORTB=0x02;
Delay1s(2);
PORTB=0x01;
Module-2
                          north


PORTC=0x02;
Delay1s(4);
PORTC=0x04;
Delay1s(20);
PORTC=0x02;
Delay1s(4);
PORTC=0x01;                west

PORTD=0x02;
Delay1s(4);
PORTD=0x04;
Delay1s(20);
PORTD=0x02;
Delay1s(4);
PORTD=0x01;
}                             Loop continues infinite times
}
Module-2
PROBLEM STATEMENT OF 8 LANE TRAFFIC
         LIGHT CONTROLLER


                 •    QUESTION
                 •    A vehicle coming from 1 can go in any
                      direction except 2 and 8 which are adjacent
                      to the active lane.
                 •    This is same for other lanes too.




                     SOLUTION
                     We will take 2 lanes are active at a
                     time i.e. let take 1 and 5.
Module-2

SIMULATION FOR 8 LANE
Module-2
  C CODE FOR 8 LANE TRAFFIC SIGNAL CONTROLLER

#include <AVR/IO.h>
void Delay1s(int i)
{
int j;
volatile unsigned int cnt;
for (j=0; j<i; j++);
for (cnt = 0; cnt < 55555; cnt++);
}
void main()
{
 DDRA=0xFF;
 DDRB=0xFF;
 DDRC=0xFF;
 DDRD=0xFF;
 PORTA=0x01;
 PORTB=0x01;
 PORTC=0x01;
 PORTD=0x01;
 PORTA=0x02;
 Delay1s(4);
Module-2
 while(1)
•    {PORTA=0x04;
• Delay1s(20);
• PORTA=0x02;
• Delay1s(4);
• PORTA=0x08;
• Delay1s(20);
• PORTA=0x02;
• PORTB=0x02;
• Delay1s(4);
• PORTA=0x01;
• PORTB=0x04;
• Delay1s(20);
• PORTB=0x02;
• Delay1s(4);
• PORTB=0x08;
• Delay1s(20);
• PORTB=0x02;
• PORTC=0x02;
• Delay1s(4);
• PORTB=0x01;
Module-2

PORTC=0x04;
Delay1s(20);
PORTC=0x02;
Delay1s(4);
PORTC=0x08;
Delay1s(20);
PORTC=0x02;
PORTD=0x02;
Delay1s(4);
PORTC=0x01;
PORTD=0x04;
Delay1s(20);
PORTD=0x02;
Delay1s(4);
PORTD=0x08;
Delay1s(20);
PORTD=0x02;
PORTA=0x02;
Delay1s(4);
PORTD=0x01;}
}
Module-2

CIRCUIT DIAGRAM FOR MICROCONTROLLER BACK UP /
 MASTER SLAVE OPERATION OF MICROCONTROLLER
Module- 3
     TEMPERATURE REGULATION
        PROTECTION MODULE

THERMISTORS :
Thermistor is a temperature-
  sensing element
Negative temperature
  coefficients
Chemically stable and not
  affected by aging
Module- 3
      TEMPERATURE REGULATION
         PROTECTION MODULE
DC FANS :
 Automatic cooling fans to liberate heat out of the
  circuits
 Operation controlled by thermistors
 Fan Motor 12V 700mA max.
 Use to cool down heat sinks
Module- 3
     TEMPERATURE REGULATION
        PROTECTION MODULE
CIRCUIT DIAGRAM :
Module- 4
   POLARITY PROTECTION MODULE

CIRCUIT DIAGRAM :
Module- 4
 OVER VOLTAGE PROTECTION MODULE
CIRCUIT DIAGRAM :
Module- 4
   Current Limiting Circuits(1A-2A)

CIRCUIT DIAGRAM :

                    • Normal operation
                    • Output shorted, and no
                      limiting
                    • Output shorted, with limiting
                      at 2A
                    • Rsense=0.7/(Ilim)
CONCLUSION

• Major causes of failure are being countered
• Microcontroller backup provides redundancy
• High current and voltage values are made
  limiting
• Use of thermistors eliminate the dependency
  of semiconductors on temperature
• Sophisticated automatic traffic management is
  the future aspect of this project
<<<***>>>
  [***Thank u***]
<<<***>>>

Ppt (1)

  • 1.
  • 2.
    ROBUST TRAFFIC LIGHT CONTROLLER UNDER THE GUIDANCE OF ER.A.K.SINGH BY: DEBASIS MISHRA
  • 3.
    HISTORICAL PERSPECTIVE • On10 December 1868, the first traffic lights were installed outside the British Houses of Parliament in London, by the railway engineer J. P. Knight. They resembled railway signals of the time, with semaphore arms and red and green gas lamps for night use. • The modern electric traffic light is an American invention. As early as 1912 in Salt Lake City, Utah, policeman Lester Wire invented the first red- green electric traffic lights.
  • 4.
    TRAFFIC LIGHTS • Trafficlights are also known as stop lights, traffic lamps, stop-and-go lights, robots or semaphore. • These are signaling devices positioned at road intersections, pedestrian crossings and other locations to control competing flows of traffic. They assign the right of way to road users by the use of lights in standard colors (Red - Amber - Green), using a universal color code (and a precise sequence, for those who are color blind).
  • 5.
    OBSTACLES • Redundancy isnot present • Immune to failure due flow of large current • Voltage regulation is not proper • No augmented circuit is present when main controller fails • Improper performance at different temperature points
  • 6.
    OBJECTIVEs Robust Traffic To make a robust traffic Light light controller Redundancy Voltage regulation MICROCONROLLER Controller Current protection Immune to Temperature fluctuations
  • 7.
    THE BASIC 4LANE TRAFFIC SIGNAL
  • 8.
  • 9.
    STATES OF LIGHTSOF LANES AFTER 50 SEC CYCLIC AFTER AFTER ROTATION 4 SEC 4 SEC AFTER 50 SEC
  • 10.
    Basic modules • Fourmodules 1. Power supply modules and Battery backup module 2. Microcontroller module 3. Temperature regulated protection module 4. Overvoltage and overcurrent protection module
  • 11.
    Module-1 BASIC POWER SUPPLYCIRCUIT =6V LM7806
  • 12.
    Module-1 BASIC ZENER REGULATOR CIRCUIT • Voltage regulation or stabilisation circuit • Achieved through a ZENER DIODE • ZENER break down occurs on applying reverse bias voltage
  • 13.
  • 14.
    Module-2 ATMEGA 16 SPECIFICATIONS • 131 Instructions • 32 8-bit GP registers • Throughput up to 16 MIPS • 16K programmable flash (instructions) • 512Bytes EEPROM • 1K internal SRAM • Timers, serial and parallel I/O, ADC
  • 15.
  • 16.
  • 17.
    Module-2 PROGRAMMING PORTS • DDRA=0X00; (PORTA AS INPUT) • DDRA=0XFF; (PORTA AS OUTPUT) • PORTA=0XFF; (PORTA AS HIGH) • DELAY_MS(50); (USER DEFINED FUNCTION) • PORTA=0X00; (PORTA AS LOW) • DELAY_MS(50); • Unsigned char read_portA; • read_portA=PINA;
  • 18.
    Module-2 ADVANTAGE OF ATMEGA • Less hardware complexity • Less power consumption • Faster operation • Cheap Programmer
  • 19.
    Module-2 BASIC COMMANDS FOR PROGRAMING THE PORTS OF AVR MICROCONTROLLER HEADER FILE THAT WE USED = AVR/IO.H 4 PORTS ARE = A,B,C,D 3 BASIC COMMANDS TO PROGRAM THE PORTS ARE DDR<PORT NAME>=<hex decimal or binary number> Used to declare ports as input or output port if 1=>output port, 0=>input port DDRA=0b01011100 PORT<PORT NAME>=<hex decimal or binary number> Used to assign output values through port PORTA=0b01011100 PIN<PORT NAME>=<hex decimal or binary number> Used to assign input values through port Eg: PINA=0b01011100
  • 20.
    Module-2 SIMULATED CIRCUIT DIAGRAMFOR 4 LANE TRAFFIC LIGHT CONTROLLER
  • 21.
    Module-2 ‘C’ CODE FOR 4 LANE #include <AVR/IO.h> void Delay1s(int i) { int j; Program volatile unsigned int cnt; for for (j=0; j<i; j++) 1sec delay for (cnt = 0; cnt < 55555; cnt++); } void main() { DDRA=0XFF; DDRB=0XFF; Assigning all DDRC=0XFF; ports as DDRD=0XFF; output ports PORTA=0x01; PORTB=0x01; Initializing values PORTC=0x01; to ports PORTD=0x01;
  • 22.
    Module-2 while(1) east { PORTA=0x02; Delay1s(4); PORTA=0x04; Delay1s(20); PORTA=0x02; Delay1s(4); PORTA=0x01; south PORTB=0x02; Delay1s(4); PORTB=0x04; Delay1s(20); PORTB=0x02; Delay1s(2); PORTB=0x01;
  • 23.
    Module-2 north PORTC=0x02; Delay1s(4); PORTC=0x04; Delay1s(20); PORTC=0x02; Delay1s(4); PORTC=0x01; west PORTD=0x02; Delay1s(4); PORTD=0x04; Delay1s(20); PORTD=0x02; Delay1s(4); PORTD=0x01; } Loop continues infinite times }
  • 24.
    Module-2 PROBLEM STATEMENT OF8 LANE TRAFFIC LIGHT CONTROLLER • QUESTION • A vehicle coming from 1 can go in any direction except 2 and 8 which are adjacent to the active lane. • This is same for other lanes too. SOLUTION We will take 2 lanes are active at a time i.e. let take 1 and 5.
  • 25.
  • 26.
    Module-2 CCODE FOR 8 LANE TRAFFIC SIGNAL CONTROLLER #include <AVR/IO.h> void Delay1s(int i) { int j; volatile unsigned int cnt; for (j=0; j<i; j++); for (cnt = 0; cnt < 55555; cnt++); } void main() { DDRA=0xFF; DDRB=0xFF; DDRC=0xFF; DDRD=0xFF; PORTA=0x01; PORTB=0x01; PORTC=0x01; PORTD=0x01; PORTA=0x02; Delay1s(4);
  • 27.
    Module-2 while(1) • {PORTA=0x04; • Delay1s(20); • PORTA=0x02; • Delay1s(4); • PORTA=0x08; • Delay1s(20); • PORTA=0x02; • PORTB=0x02; • Delay1s(4); • PORTA=0x01; • PORTB=0x04; • Delay1s(20); • PORTB=0x02; • Delay1s(4); • PORTB=0x08; • Delay1s(20); • PORTB=0x02; • PORTC=0x02; • Delay1s(4); • PORTB=0x01;
  • 28.
  • 29.
    Module-2 CIRCUIT DIAGRAM FORMICROCONTROLLER BACK UP / MASTER SLAVE OPERATION OF MICROCONTROLLER
  • 30.
    Module- 3 TEMPERATURE REGULATION PROTECTION MODULE THERMISTORS : Thermistor is a temperature- sensing element Negative temperature coefficients Chemically stable and not affected by aging
  • 31.
    Module- 3 TEMPERATURE REGULATION PROTECTION MODULE DC FANS :  Automatic cooling fans to liberate heat out of the circuits  Operation controlled by thermistors  Fan Motor 12V 700mA max.  Use to cool down heat sinks
  • 32.
    Module- 3 TEMPERATURE REGULATION PROTECTION MODULE CIRCUIT DIAGRAM :
  • 33.
    Module- 4 POLARITY PROTECTION MODULE CIRCUIT DIAGRAM :
  • 34.
    Module- 4 OVERVOLTAGE PROTECTION MODULE CIRCUIT DIAGRAM :
  • 35.
    Module- 4 Current Limiting Circuits(1A-2A) CIRCUIT DIAGRAM : • Normal operation • Output shorted, and no limiting • Output shorted, with limiting at 2A • Rsense=0.7/(Ilim)
  • 36.
    CONCLUSION • Major causesof failure are being countered • Microcontroller backup provides redundancy • High current and voltage values are made limiting • Use of thermistors eliminate the dependency of semiconductors on temperature • Sophisticated automatic traffic management is the future aspect of this project
  • 37.
    <<<***>>> [***Thanku***] <<<***>>>