SlideShare a Scribd company logo
1 of 8
Download to read offline
TRAFFIC SIGNAL CONTROLLER USING
AT89C52 MICROCONTROLLER
Microcontroller and its Applications
Guide Faculty : Prof Jalpa Shah
Vivek Patel ( 11BCE073 ), Yamini Rathod ( 11BCE078 )
11bce073@nirmauni.ac.in 11bce078@nirmauni.ac.in
Institute of Technology,
Nirma University
Project Details
Project Name : Traffic Signal Controller
Required Hardware :
1. AT89C52 Chip
2. 6 LEDs ( 2 Red, 2 Yellow and 2 Green )
3. 6 Resistors ( 1 kΩ each)
4. Wires
Required Software :
1. Keil uVision3 ( to create hex file for the project )
2. Nvis 5001 ( to dump hex file into hardware )
Objective :
 Synchronize the two different traffic signals
 Change the states of signal lights according to
different timings
Circuit Diagram
Hardware Implementation
Figure 1. Bread Board Signal LEDs Connection Diagram
Figure 2. Project Setup Connection Diagram
Project Description
 The project is based on the synchronization of two traffic signal using
AT89C52 Microcontroller.
 Here, there are two traffic control signals. They will change their states of
signal lights according to the different timings.
Figure 3. Nvis 5001 Circuit Connection Diagram with AT89052
 Assuming that there are two controls P1 and P2. P1 and P2 are synchronize
using the same timer. When one side signal port is on it will starts timer. Two
traffic controls are synchronize for every 30 seconds.
 When one control starts its working, it will starts timer and display red light
till timer reaches to 20 seconds. From 20 to 30 seconds it will display yellow
light. At the same time another control will display green light.
 When first control P1 reaches to timer value 30 seconds, it will stop timer. At
the same time second control P2 will starts timer. It will follow the same
procedure. The two controls work in the synchronous manner.
Program Code
/******************************************************************************
* FileName: Main.c
* Processor: AT89C52
* Complier: Keil IDE
* Project Name: Traffic Controller
* Project Guide: Prof Jalpa Shah
******************************************************************************/
#include<regX52.h>
/******************************************************************************
* Pins for LED for Traffic Signal
******************************************************************************/
#define LED1_RED P1_0
#define LED1_YELLOW P1_1
#define LED1_GREEN P1_2
#define LED2_RED P2_0
#define LED2_YELLOW P2_1
#define LED2_GREEN P2_2
#define ON 1
#define OFF 0
/******************************************************************************
* Delay Function for Timing Control
*
* Timer 0 with MODE 0
* Delay generated with Timer : 10 ms
* Timer Count : 0x0DC00
*
* Perameters:
* NUMBER OF SECONDS
*
* Output:
* NONE
******************************************************************************/
void delay(int time)
{
int i=time*100;
TMOD = 0X00;
while(i)
{
TH0 = 0X0DC;
TL0 = 0X000;
TR0 = 1;
while(TF0 == 0);
TR0 = 0;
TF0 = 0;
i--;
}
}
/******************************************************************************
* Main Loop
******************************************************************************/
void main()
{
while(1)
{
LED1_RED = ON; LED2_GREEN = ON;
delay(20);
LED1_RED = OFF;
LED1_YELLOW = ON;
delay(10);
LED1_YELLOW = OFF; LED2_GREEN = OFF;
LED1_GREEN = ON; LED2_RED = ON;
delay(20);
LED2_RED = OFF;
LED2_YELLOW = ON;
delay(10);
LED1_GREEN = OFF; LED2_YELLOW = OFF;
}
}

More Related Content

Viewers also liked

Rangkaian arus-dan-tegangan-ac
Rangkaian arus-dan-tegangan-acRangkaian arus-dan-tegangan-ac
Rangkaian arus-dan-tegangan-acAndi Risal
 
Rangkaian arus searah
Rangkaian arus searahRangkaian arus searah
Rangkaian arus searaharismanna
 
Mengambar simbokomponen pcb
Mengambar simbokomponen pcbMengambar simbokomponen pcb
Mengambar simbokomponen pcbI-one Goenaone
 
01. Pengantar DRL 2015
01. Pengantar DRL 201501. Pengantar DRL 2015
01. Pengantar DRL 2015Ali Sadiyoko
 
Membuat traffic light dengan avr at mega
Membuat traffic light dengan avr at megaMembuat traffic light dengan avr at mega
Membuat traffic light dengan avr at megaPriyo Harjiyono
 
Komponen komponen kontrol
Komponen komponen kontrolKomponen komponen kontrol
Komponen komponen kontrolarie eric
 
02. analisis rangkaian 2015 ide
02. analisis rangkaian 2015 ide02. analisis rangkaian 2015 ide
02. analisis rangkaian 2015 ideAli Sadiyoko
 
Arus Listrik dan Rangkaian DC ( Anisa Putri Rinjani )
Arus Listrik dan Rangkaian DC ( Anisa Putri Rinjani )Arus Listrik dan Rangkaian DC ( Anisa Putri Rinjani )
Arus Listrik dan Rangkaian DC ( Anisa Putri Rinjani )Anisa Putri Rinjani
 
Pendahuluan plc
Pendahuluan plcPendahuluan plc
Pendahuluan plcarie eric
 
14.1. Rangkaian listrik dan Sakelar
14.1. Rangkaian listrik dan Sakelar14.1. Rangkaian listrik dan Sakelar
14.1. Rangkaian listrik dan Sakelarfx oktaf laudensius
 
Automatic Lamp using Arduino UNO, LDR and RTC DS1307
Automatic Lamp using Arduino UNO, LDR and RTC DS1307Automatic Lamp using Arduino UNO, LDR and RTC DS1307
Automatic Lamp using Arduino UNO, LDR and RTC DS1307fauziahnurm
 
rangkaian resistor by Resty Annisa
rangkaian resistor by Resty Annisarangkaian resistor by Resty Annisa
rangkaian resistor by Resty AnnisaResty annisa
 
05. operational amplifier
05. operational amplifier05. operational amplifier
05. operational amplifierAli Sadiyoko
 
04. thevenin norton (2015) ide
04. thevenin norton (2015) ide04. thevenin norton (2015) ide
04. thevenin norton (2015) ideAli Sadiyoko
 
Tutorial Penggunaan CodeVision AVR dengan Bahasa C
Tutorial Penggunaan CodeVision AVR dengan Bahasa CTutorial Penggunaan CodeVision AVR dengan Bahasa C
Tutorial Penggunaan CodeVision AVR dengan Bahasa CMuhammad Kennedy Ginting
 
Automatic Door Control using LM35 Sensor
Automatic Door Control using LM35 SensorAutomatic Door Control using LM35 Sensor
Automatic Door Control using LM35 SensorAghnia Rusydah
 

Viewers also liked (20)

Rangkaian arus-dan-tegangan-ac
Rangkaian arus-dan-tegangan-acRangkaian arus-dan-tegangan-ac
Rangkaian arus-dan-tegangan-ac
 
Rangkaian arus searah
Rangkaian arus searahRangkaian arus searah
Rangkaian arus searah
 
Mengambar simbokomponen pcb
Mengambar simbokomponen pcbMengambar simbokomponen pcb
Mengambar simbokomponen pcb
 
01. Pengantar DRL 2015
01. Pengantar DRL 201501. Pengantar DRL 2015
01. Pengantar DRL 2015
 
Membuat traffic light dengan avr at mega
Membuat traffic light dengan avr at megaMembuat traffic light dengan avr at mega
Membuat traffic light dengan avr at mega
 
Teorema Norton
Teorema NortonTeorema Norton
Teorema Norton
 
Komponen komponen kontrol
Komponen komponen kontrolKomponen komponen kontrol
Komponen komponen kontrol
 
Teori thevenin
Teori theveninTeori thevenin
Teori thevenin
 
02. analisis rangkaian 2015 ide
02. analisis rangkaian 2015 ide02. analisis rangkaian 2015 ide
02. analisis rangkaian 2015 ide
 
Arus Listrik dan Rangkaian DC ( Anisa Putri Rinjani )
Arus Listrik dan Rangkaian DC ( Anisa Putri Rinjani )Arus Listrik dan Rangkaian DC ( Anisa Putri Rinjani )
Arus Listrik dan Rangkaian DC ( Anisa Putri Rinjani )
 
Pendahuluan plc
Pendahuluan plcPendahuluan plc
Pendahuluan plc
 
14.1. Rangkaian listrik dan Sakelar
14.1. Rangkaian listrik dan Sakelar14.1. Rangkaian listrik dan Sakelar
14.1. Rangkaian listrik dan Sakelar
 
Teorema Thevenin
Teorema TheveninTeorema Thevenin
Teorema Thevenin
 
Automatic Lamp using Arduino UNO, LDR and RTC DS1307
Automatic Lamp using Arduino UNO, LDR and RTC DS1307Automatic Lamp using Arduino UNO, LDR and RTC DS1307
Automatic Lamp using Arduino UNO, LDR and RTC DS1307
 
rangkaian resistor by Resty Annisa
rangkaian resistor by Resty Annisarangkaian resistor by Resty Annisa
rangkaian resistor by Resty Annisa
 
La pobreza
La pobrezaLa pobreza
La pobreza
 
05. operational amplifier
05. operational amplifier05. operational amplifier
05. operational amplifier
 
04. thevenin norton (2015) ide
04. thevenin norton (2015) ide04. thevenin norton (2015) ide
04. thevenin norton (2015) ide
 
Tutorial Penggunaan CodeVision AVR dengan Bahasa C
Tutorial Penggunaan CodeVision AVR dengan Bahasa CTutorial Penggunaan CodeVision AVR dengan Bahasa C
Tutorial Penggunaan CodeVision AVR dengan Bahasa C
 
Automatic Door Control using LM35 Sensor
Automatic Door Control using LM35 SensorAutomatic Door Control using LM35 Sensor
Automatic Door Control using LM35 Sensor
 

Similar to Traffic signal controller using at89 c52 microcontroller

Industrial Mains Power Monitoring and Alert System Over LAN Network
Industrial Mains Power Monitoring and Alert System Over LAN NetworkIndustrial Mains Power Monitoring and Alert System Over LAN Network
Industrial Mains Power Monitoring and Alert System Over LAN NetworkIRJET Journal
 
Design and development of programmable controller for air sampling machine
Design and development of programmable controller for air sampling machineDesign and development of programmable controller for air sampling machine
Design and development of programmable controller for air sampling machineeSAT Journals
 
TRANSFORMER FAULT DETECTION AND MONITORING
TRANSFORMER FAULT DETECTION AND MONITORINGTRANSFORMER FAULT DETECTION AND MONITORING
TRANSFORMER FAULT DETECTION AND MONITORINGIRJET Journal
 
Realtime wether station for monitoring and control of agricultre
Realtime wether station for monitoring and control of agricultreRealtime wether station for monitoring and control of agricultre
Realtime wether station for monitoring and control of agricultreBhushan Deore
 
Bottle Filling Application using Arduino
Bottle Filling Application using ArduinoBottle Filling Application using Arduino
Bottle Filling Application using ArduinoParth Patel
 
subission report
subission reportsubission report
subission reportManoj Kumar
 
Design and control of steam flow in cement production process using neural ne...
Design and control of steam flow in cement production process using neural ne...Design and control of steam flow in cement production process using neural ne...
Design and control of steam flow in cement production process using neural ne...Mustefa Jibril
 
IRJET- Design and Development of IoT based Geiger Muller Counter
IRJET- Design and Development of IoT based Geiger Muller CounterIRJET- Design and Development of IoT based Geiger Muller Counter
IRJET- Design and Development of IoT based Geiger Muller CounterIRJET Journal
 
Induction Motor Protection Using PLC
Induction Motor Protection Using PLCInduction Motor Protection Using PLC
Induction Motor Protection Using PLCvivatechijri
 
HOME AUTOMATION SYSTEM DESIGN USING ROUND ROBIN SCHEDULING ALGORITHM
HOME AUTOMATION SYSTEM DESIGN USING ROUND ROBIN SCHEDULING ALGORITHMHOME AUTOMATION SYSTEM DESIGN USING ROUND ROBIN SCHEDULING ALGORITHM
HOME AUTOMATION SYSTEM DESIGN USING ROUND ROBIN SCHEDULING ALGORITHMIRJET Journal
 
IRJET- Multilevel Object Sorting System using PLC Controller
IRJET-  	  Multilevel Object Sorting System using PLC ControllerIRJET-  	  Multilevel Object Sorting System using PLC Controller
IRJET- Multilevel Object Sorting System using PLC ControllerIRJET Journal
 
Minor_Project_Report
Minor_Project_ReportMinor_Project_Report
Minor_Project_ReportVansh Kumar
 
Report (Electromagnetic Password Door Lock System)
Report (Electromagnetic Password Door Lock System)Report (Electromagnetic Password Door Lock System)
Report (Electromagnetic Password Door Lock System)Siang Wei Lee
 
IRJET - Monitoring Indoor Air Quality in Industries
IRJET - Monitoring Indoor Air Quality in IndustriesIRJET - Monitoring Indoor Air Quality in Industries
IRJET - Monitoring Indoor Air Quality in IndustriesIRJET Journal
 
IRJET- Automatic Bottle Filling and Capping System using PLC
IRJET- Automatic Bottle Filling and Capping System using PLCIRJET- Automatic Bottle Filling and Capping System using PLC
IRJET- Automatic Bottle Filling and Capping System using PLCIRJET Journal
 
IRJET-E-Blood Bank Application using Cloud Computing
IRJET-E-Blood Bank Application using Cloud ComputingIRJET-E-Blood Bank Application using Cloud Computing
IRJET-E-Blood Bank Application using Cloud ComputingIRJET Journal
 
Prediction of PID control model on PLC
Prediction of PID control model on PLCPrediction of PID control model on PLC
Prediction of PID control model on PLCTELKOMNIKA JOURNAL
 
4 realtime wether station for monitoring and control of agricultre
4 realtime wether station for monitoring and control of agricultre4 realtime wether station for monitoring and control of agricultre
4 realtime wether station for monitoring and control of agricultreBhushan Deore
 

Similar to Traffic signal controller using at89 c52 microcontroller (20)

Industrial Mains Power Monitoring and Alert System Over LAN Network
Industrial Mains Power Monitoring and Alert System Over LAN NetworkIndustrial Mains Power Monitoring and Alert System Over LAN Network
Industrial Mains Power Monitoring and Alert System Over LAN Network
 
Smart Monitoring System of DC to DC Converter for Photovoltaic Application
Smart Monitoring System of DC to DC Converter for Photovoltaic ApplicationSmart Monitoring System of DC to DC Converter for Photovoltaic Application
Smart Monitoring System of DC to DC Converter for Photovoltaic Application
 
Design and development of programmable controller for air sampling machine
Design and development of programmable controller for air sampling machineDesign and development of programmable controller for air sampling machine
Design and development of programmable controller for air sampling machine
 
TRANSFORMER FAULT DETECTION AND MONITORING
TRANSFORMER FAULT DETECTION AND MONITORINGTRANSFORMER FAULT DETECTION AND MONITORING
TRANSFORMER FAULT DETECTION AND MONITORING
 
Realtime wether station for monitoring and control of agricultre
Realtime wether station for monitoring and control of agricultreRealtime wether station for monitoring and control of agricultre
Realtime wether station for monitoring and control of agricultre
 
Bottle Filling Application using Arduino
Bottle Filling Application using ArduinoBottle Filling Application using Arduino
Bottle Filling Application using Arduino
 
subission report
subission reportsubission report
subission report
 
DIGITAL ELECTRONICS TRAINER KIT
DIGITAL ELECTRONICS TRAINER KITDIGITAL ELECTRONICS TRAINER KIT
DIGITAL ELECTRONICS TRAINER KIT
 
Design and control of steam flow in cement production process using neural ne...
Design and control of steam flow in cement production process using neural ne...Design and control of steam flow in cement production process using neural ne...
Design and control of steam flow in cement production process using neural ne...
 
IRJET- Design and Development of IoT based Geiger Muller Counter
IRJET- Design and Development of IoT based Geiger Muller CounterIRJET- Design and Development of IoT based Geiger Muller Counter
IRJET- Design and Development of IoT based Geiger Muller Counter
 
Induction Motor Protection Using PLC
Induction Motor Protection Using PLCInduction Motor Protection Using PLC
Induction Motor Protection Using PLC
 
HOME AUTOMATION SYSTEM DESIGN USING ROUND ROBIN SCHEDULING ALGORITHM
HOME AUTOMATION SYSTEM DESIGN USING ROUND ROBIN SCHEDULING ALGORITHMHOME AUTOMATION SYSTEM DESIGN USING ROUND ROBIN SCHEDULING ALGORITHM
HOME AUTOMATION SYSTEM DESIGN USING ROUND ROBIN SCHEDULING ALGORITHM
 
IRJET- Multilevel Object Sorting System using PLC Controller
IRJET-  	  Multilevel Object Sorting System using PLC ControllerIRJET-  	  Multilevel Object Sorting System using PLC Controller
IRJET- Multilevel Object Sorting System using PLC Controller
 
Minor_Project_Report
Minor_Project_ReportMinor_Project_Report
Minor_Project_Report
 
Report (Electromagnetic Password Door Lock System)
Report (Electromagnetic Password Door Lock System)Report (Electromagnetic Password Door Lock System)
Report (Electromagnetic Password Door Lock System)
 
IRJET - Monitoring Indoor Air Quality in Industries
IRJET - Monitoring Indoor Air Quality in IndustriesIRJET - Monitoring Indoor Air Quality in Industries
IRJET - Monitoring Indoor Air Quality in Industries
 
IRJET- Automatic Bottle Filling and Capping System using PLC
IRJET- Automatic Bottle Filling and Capping System using PLCIRJET- Automatic Bottle Filling and Capping System using PLC
IRJET- Automatic Bottle Filling and Capping System using PLC
 
IRJET-E-Blood Bank Application using Cloud Computing
IRJET-E-Blood Bank Application using Cloud ComputingIRJET-E-Blood Bank Application using Cloud Computing
IRJET-E-Blood Bank Application using Cloud Computing
 
Prediction of PID control model on PLC
Prediction of PID control model on PLCPrediction of PID control model on PLC
Prediction of PID control model on PLC
 
4 realtime wether station for monitoring and control of agricultre
4 realtime wether station for monitoring and control of agricultre4 realtime wether station for monitoring and control of agricultre
4 realtime wether station for monitoring and control of agricultre
 

Recently uploaded

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 

Recently uploaded (20)

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

Traffic signal controller using at89 c52 microcontroller

  • 1. TRAFFIC SIGNAL CONTROLLER USING AT89C52 MICROCONTROLLER Microcontroller and its Applications Guide Faculty : Prof Jalpa Shah Vivek Patel ( 11BCE073 ), Yamini Rathod ( 11BCE078 ) 11bce073@nirmauni.ac.in 11bce078@nirmauni.ac.in Institute of Technology, Nirma University
  • 2. Project Details Project Name : Traffic Signal Controller Required Hardware : 1. AT89C52 Chip 2. 6 LEDs ( 2 Red, 2 Yellow and 2 Green ) 3. 6 Resistors ( 1 kΩ each) 4. Wires Required Software : 1. Keil uVision3 ( to create hex file for the project ) 2. Nvis 5001 ( to dump hex file into hardware ) Objective :  Synchronize the two different traffic signals  Change the states of signal lights according to different timings
  • 4. Hardware Implementation Figure 1. Bread Board Signal LEDs Connection Diagram Figure 2. Project Setup Connection Diagram
  • 5. Project Description  The project is based on the synchronization of two traffic signal using AT89C52 Microcontroller.  Here, there are two traffic control signals. They will change their states of signal lights according to the different timings. Figure 3. Nvis 5001 Circuit Connection Diagram with AT89052  Assuming that there are two controls P1 and P2. P1 and P2 are synchronize using the same timer. When one side signal port is on it will starts timer. Two traffic controls are synchronize for every 30 seconds.  When one control starts its working, it will starts timer and display red light till timer reaches to 20 seconds. From 20 to 30 seconds it will display yellow light. At the same time another control will display green light.  When first control P1 reaches to timer value 30 seconds, it will stop timer. At the same time second control P2 will starts timer. It will follow the same procedure. The two controls work in the synchronous manner.
  • 6. Program Code /****************************************************************************** * FileName: Main.c * Processor: AT89C52 * Complier: Keil IDE * Project Name: Traffic Controller * Project Guide: Prof Jalpa Shah ******************************************************************************/ #include<regX52.h> /****************************************************************************** * Pins for LED for Traffic Signal ******************************************************************************/ #define LED1_RED P1_0 #define LED1_YELLOW P1_1 #define LED1_GREEN P1_2 #define LED2_RED P2_0 #define LED2_YELLOW P2_1 #define LED2_GREEN P2_2 #define ON 1 #define OFF 0 /****************************************************************************** * Delay Function for Timing Control * * Timer 0 with MODE 0 * Delay generated with Timer : 10 ms * Timer Count : 0x0DC00 * * Perameters: * NUMBER OF SECONDS * * Output: * NONE ******************************************************************************/
  • 7. void delay(int time) { int i=time*100; TMOD = 0X00; while(i) { TH0 = 0X0DC; TL0 = 0X000; TR0 = 1; while(TF0 == 0); TR0 = 0; TF0 = 0; i--; } } /****************************************************************************** * Main Loop ******************************************************************************/ void main() { while(1) { LED1_RED = ON; LED2_GREEN = ON; delay(20); LED1_RED = OFF; LED1_YELLOW = ON; delay(10); LED1_YELLOW = OFF; LED2_GREEN = OFF; LED1_GREEN = ON; LED2_RED = ON; delay(20);
  • 8. LED2_RED = OFF; LED2_YELLOW = ON; delay(10); LED1_GREEN = OFF; LED2_YELLOW = OFF; } }