0% found this document useful (0 votes)
25 views

4-Way Traffic Control System - IOT Internet of Things

The document describes a 4-way traffic control system project using Arduino. It includes the primary goals, components, software, circuit diagram, logic and code for the traffic light system that controls 4 directions in sequence with green lights lasting for 8 seconds each and yellow lights for 3 seconds between directions.

Uploaded by

Mehak Mubarik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

4-Way Traffic Control System - IOT Internet of Things

The document describes a 4-way traffic control system project using Arduino. It includes the primary goals, components, software, circuit diagram, logic and code for the traffic light system that controls 4 directions in sequence with green lights lasting for 8 seconds each and yellow lights for 3 seconds between directions.

Uploaded by

Mehak Mubarik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

4-WAY TRAFFIC

CONTROL SYSTEM
Ahtisham Hussain
AGENDA

Primary goals

Components

Software

Circuit Diagram

Logic About The Project

Project Demo

PRESENTATION TITLE 2
PRIMARY GOALS
 To Control Traffic
 Simple clock to manage 4-way traffic system
COMPONENTS
 Arduino Uno
 Set of LED’s (Red, Yellow, Green)

SOFTWARE
 Arduino-ide
 Proteus
CIRCUIT DIAGRAM

5
GREEN SIGNAL IN WAY
WAIT SIGNAL SHIFTED
1
(3 SEC)
(8 SEC)

Way​ Green Yellow Red Way​ Green Yellow Red

Way 1 1 0 0​ Way 1 0 1 0​

Way 2 0 0 1 Way 2 0 1 0

Way 3 0 0​ 1​ Way 3 0 0​ 1​

Way 4 0 0 1 Way 4 0 0 1

6
GREEN SIGNAL IN WAY
WAIT SIGNAL SHIFTED
2
(3 SEC)
(8 SEC)

Way​ Green Yellow Red Way​ Green Yellow Red

Way 1 0 0 1 Way 1 0 0 1​

Way 2 0 1 0 Way 2 0 1 0

Way 3 0 0​ 1​ Way 3 0 1 0

Way 4 0 0 1 Way 4 0 0 1

PRESENTATION TITLE 7
GREEN SIGNAL IN WAY
WAIT SIGNAL SHIFTED
3
(3 SEC)
(8 SEC)

Way​ Green Yellow Red Way​ Green Yellow Red

Way 1 0 0 1 Way 1 0 0 1

Way 2 0 0 1 Way 2 0 0 1

Way 3 1 0 0 Way 3 0 1 0

Way 4 0 0 1 Way 4 0 1 0

PRESENTATION TITLE 8
GREEN SIGNAL IN WAY
WAIT SIGNAL SHIFTED
4
(3 SEC)
(8 SEC)

Way​ Green Yellow Red Way​ Green Yellow Red

Way 1 0 0 1 Way 1 0 1 0

Way 2 0 0 1 Way 2 0 0 1

Way 3 0 0 1 Way 3 0 0 1

Way 4 1 0 0 Way 4 0 1 0

PRESENTATION TITLE 9
CODE :

int lane1[]={13,12,11}; // { L1.1, L1.2, L1.3 } ( RED, Yellow, Green )


int lane2[]={10,9,8}; // { L2.1, L2.2, L2.3 } ( RED, Yellow, Green )
int lane3[]={7,6,5}; // { L3.1, L3.2, L3.3 } ( RED, Yellow, Green )
int lane4[]={4,3,2}; // { L4.1, L4.2, L4.3 } ( RED, Yellow, Green )

void setup() {
// put your setup code here, to run once:
for(int i=0;i<3;i++){
pinMode(lane1[i],OUTPUT);
pinMode(lane2[i],OUTPUT);
pinMode(lane3[i],OUTPUT);
pinMode(lane4[i],OUTPUT);
}
for(int i=0;i<3;i++){
digitalWrite(lane1[i],LOW);
digitalWrite(lane2[i],LOW);
digitalWrite(lane3[i],LOW);
digitalWrite(lane4[i],LOW);
}
10
}
GREEN SIGNAL IN WAY
WAIT SIGNAL SHIFTED
1
digitalWrite(lane1[2],HIGH); digitalWrite(lane1[2],LOW);
digitalWrite(lane1[1],LOW); digitalWrite(lane1[1],HIGH);
digitalWrite(lane2[0],HIGH); digitalWrite(lane2[0],LOW);
digitalWrite(lane3[0],HIGH); digitalWrite(lane2[1],HIGH);
digitalWrite(lane4[0],HIGH); delay(2000);
digitalWrite(lane4[1],LOW);
delay(5000);

GREEN SIGNAL IN WAY 2 WAIT SIGNAL SHIFTED

digitalWrite(lane1[0],HIGH); digitalWrite(lane2[2],LOW);
digitalWrite(lane1[1],LOW); digitalWrite(lane2[1],HIGH);
digitalWrite(lane2[1],LOW); digitalWrite(lane3[0],LOW);
digitalWrite(lane2[2],HIGH); digitalWrite(lane3[1],HIGH);
delay(5000); delay(2000);

11
GREEN SIGNAL IN WAY
WAIT SIGNAL SHIFTED
3
digitalWrite(lane2[0],HIGH); digitalWrite(lane3[2],LOW);
digitalWrite(lane2[1],LOW); digitalWrite(lane3[1],HIGH);
digitalWrite(lane3[1],LOW); digitalWrite(lane4[0],LOW);
digitalWrite(lane3[2],HIGH); digitalWrite(lane4[1],HIGH);
delay(5000); delay(2000);

GREEN SIGNAL IN WAY 4 WAIT SIGNAL SHIFTED

digitalWrite(lane3[0],HIGH); digitalWrite(lane1[0],LOW);
digitalWrite(lane3[1],LOW); digitalWrite(lane1[1],HIGH);
digitalWrite(lane4[1],LOW); digitalWrite(lane4[2],LOW);
digitalWrite(lane4[2],HIGH); digitalWrite(lane4[1],HIGH);
delay(5000); delay(2000);

12
DEMO PROJECT

PRESENTATION TITLE 13
THANK YOU

PRESENTATION TITLE 14

You might also like