TRAFFIC SIGNALS GENERATION WITH BICOLOR LEDS USING PIC 18F SERIES MICROCONTROLLER

Similar documents
AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

Chapter 13. PIC Family Microcontroller

An Introduction to MPLAB Integrated Development Environment

Tutorial for MPLAB Starter Kit for PIC18F

Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol

Controlling a Dot Matrix LED Display with a Microcontroller

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Design and Verification of Nine port Network Router

Lab Experiment 1: The LPC 2148 Education Board

TRILOGI 5.3 PLC Ladder Diagram Programmer and Simulator. A tutorial prepared for IE 575 by Dr. T.C. Chang. Use On-Line Help

Serial Communications

CAN bus board. EB018

International Journal of Research in Advent Technology Available Online at:

ET-BASE AVR ATmega64/128

8051 MICROCONTROLLER COURSE

AN-812 APPLICATION NOTE

2.0 Command and Data Handling Subsystem

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

MX PIC24F Educational Module User Manual

PICNet 1. PICNet 1 PIC18 Network & SD/MMC Development Board. Features. Applications. Description

EXPERIMENT 2 TRAFFIC LIGHT CONTROL SYSTEM FOR AN INTERSECTION USING S7-300 PLC

BE635 User Manual. Rev. V Bolymin, Inc. All Rights Reserved.

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

Using Altera MAX Series as Microcontroller I/O Expanders

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Using Xbee in Serial Communication

MICROPROCESSOR AND MICROCOMPUTER BASICS

PART B QUESTIONS AND ANSWERS UNIT I

8-Bit Microcontroller with Flash. Application Note. Using a Personal Computer to Program the AT89C51/C52/LV51/LV52/C1051/C2051

Switch board datasheet EB

Display Message on Notice Board using GSM

4 Character 5x7 LED Matrix Display

Chapter 2 Logic Gates and Introduction to Computer Architecture

Byte code Interpreter for 8051 Microcontroller

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

Design and Implementation of an Accidental Fall Detection System for Elderly

International Journal of Electronics and Computer Science Engineering 1588

RS232 Board datasheet

Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface

I2C PRESSURE MONITORING THROUGH USB PROTOCOL.

Programming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II

AN LPC1700 timer triggered memory to GPIO data transfer. Document information. LPC1700, GPIO, DMA, Timer0, Sleep Mode

Accurate Measurement of the Mains Electricity Frequency

Application Unit, MDRC AB/S 1.1, GH Q R0111

LED board datasheet EB

WIZ-Embedded WebServer User s Manual (Ver. 1.0)

The 104 Duke_ACC Machine

Pre-tested System-on-Chip Design. Accelerates PLD Development

Design And Implementation Of Bank Locker Security System Based On Fingerprint Sensing Circuit And RFID Reader

Software User Guide UG-461

Evo Laser Firmware Developer s Manual

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

Designing VM2 Application Boards

Computer Organization and Components

Open Architecture Design for GPS Applications Yves Théroux, BAE Systems Canada

Palaparthi.Jagadeesh Chand. Associate Professor in ECE Department, Nimra Institute of Science & Technology, Vijayawada, A.P.

Fondamenti su strumenti di sviluppo per microcontrollori PIC

FLYPORT Wi-Fi G

Am186ER/Am188ER AMD Continues 16-bit Innovation

MEMS ACCELEROMETER BASED PASSWORD RECOGNITION SYSTEM USING GSM

FPGA Implementation of an Advanced Traffic Light Controller using Verilog HDL

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

User Manual. AS-Interface Programmer

Location-Aware and Safer Cards: Enhancing RFID Security and Privacy

Microcomputer Based Electronics: Using the C Stamp in Pre- Engineering, Technology, and Engineering Programs

Lecture-3 MEMORY: Development of Memory:

SBC8600B Single Board Computer

K8048 PIC PROGRAMMER BOARD

SPI. Overview and Use of the PICmicro Serial Peripheral Interface. Getting Started: SPI

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

Table 1 below is a complete list of MPTH commands with descriptions. Table 1 : MPTH Commands. Command Name Code Setting Value Description

Android based Secured Vehicle Key Finder System

CHAPTER 11: Flip Flops

LED light control using DMX512 control method

A DESIGN OF DSPIC BASED SIGNAL MONITORING AND PROCESSING SYSTEM

Microprocessor or Microcontroller?

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

Web Site: Forums: forums.parallax.com Sales: Technical:

Lecture N -1- PHYS Microcontrollers

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

CSCA0102 IT & Business Applications. Foundation in Business Information Technology School of Engineering & Computing Sciences FTMS College Global

Microprocessor & Assembly Language

Traffic Light Controller. Digital Systems Design. Dr. Ted Shaneyfelt

Automatic Ration Material Distributions and Payment System Based on GSM and RFID Technology

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

FlowKit in-circuit debug system

Hardware and Logic Implementation of Multiple Alarm System for GSM BTS Rooms

A DIY Hardware Packet Sniffer

POCKET SCOPE 2. The idea 2. Design criteria 3

Software Manual RS232 Laser Merge Module. Document # SU Rev A

PHYS 2P32 Project: MIDI for Arduino/ 8 Note Keyboard

SBC6245 Single Board Computer

Microcontrollers A Brief History of Microprocessors

User s Manual of Board Microcontroller ET-MEGA2560-ADK ET-MEGA2560-ADK

Programming A PLC. Standard Instructions

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual HAW - Arduino 1

ECIO40P ECIO28P ECRM40. Page 1. USB programmable microcontrollers. 0.6 DIP footprint. Supplied with a free version of Flowcode. E-blocks compatible

isppac-powr1220at8 I 2 C Hardware Verification Utility User s Guide

Transcription:

TRAFFIC SIGNALS GENERATION WITH BICOLOR LEDS USING PIC 18F SERIES MICROCONTROLLER Karthick Kumar Reddy, G. Jagadeesh, P. and Venkatramana Reddy, S.* Department of Physics, Sri Venkateswara University, Tirupati-517502, Andhra Pradesh, India. *drsvreddy123@gmail.com ABSTRACT PIC 18F series microcontroller is used for control of signals to a specific time using port lines. In this contest we choose the Bicolor LEDs with Red and Green. The colors of the signals are illuminated by programming in the microcontroller. The aim of this paper is to generate three colors on a single traffic light instead of using three different color traffic signal lights. The purpose of this design is to reduce the manufacture cost of the signal lights and to use a minimum number of ports in a microcontroller and cable lines to transmit the signals to the light source. This paper describes a new design for the traffic signals. KEYWORDS PIC 18F8720 Microcontroller, Bicolor LEDs, Signal generation, 74LS273 Latch, MPLAB IDE Software. 1. INTRODUCTION Traffic lights are signalling 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/yellow - green), using a universal color code. Design of an effective traffic light system in a modern city is a task of traffic engineers, and is an important undertaking. Traffic lights need to be placed judiciously to result in the safest and fastest movement of people and vehicles. In this contest the most important is the timing of traffic signals. In the centers to save energy, lamps are replaced in traffic lights with light emitting diodes (LEDs), which use very little energy. An additional advantage of LEDs is longer service life, save a lot of energy and has less impact on the environment [1]. Instead of using different color LEDs for different colors, we are using single bicolor led (SSL-LX5097IGW). To illuminate traffic signals at a regular interval of time, the lights were interfaced to microcontrollers. A microcontroller contains a simple microprocessor core along with all necessary data and program memory. For this purpose it adds all peripherals that allow it to do interfacing. These may include digital and analog input and output or counting elements. Like any electronic circuits the microcontroller needs to be powered, and needs a clock signal to drive the internal logic circuits [2]. Among all the different type of microcontrollers available in the market, the number of products using 8-bit microcontrollers has experienced explosive growth in DOI : 10.5121/ijesa.2011.1202 11

the last decade, and the number of applications is growing [3]. The focus of this paper is to generate traffic signals using PIC 18F series 8-bit microcontroller. In microcontroller based systems, the latch is used as an Input/Output Interfacing device, and a system designer can assign a binary address to the latch, called Input/output port address. A latch (74LS273) is a storage device that can store one bit. When the latch is enabled, it can receive information from the processor, latch it and display it at output peripherals [4]. In bicolour Red/Green LED we have two anodes A1, A2 and one cathode K. The bicolor LED SSL-LX5097IGW is shown in Figure 1. Figure 1. Bicolor LED (Model: SSL-LX5097IGW) If anode A1 is High and cathode is connected to ground then Red color is emitted, if A2 is High then green color is emitted. If two anodes are connected to High then both colors are emitted so they appear as Yellow/Amber. A natural phenomenon is when Red and Green colors are combined produces Yellow color. Based on this logic the three different colors of the Traffic Signals are generated by choosing a single bicolor Red/Green LED. Also the wave length for Green color at 2.1 V is 565nm and for Red color at 2.1 V is 635nm [5]. So, the mean wavelength for two colors is 600nm and approximate to Yellow color wavelength. 2. EXPERIMENTAL DETAILS 2.1. Hardware for the System A microcontroller is an electronic device that includes three components: Microprocessor, Memory and I/O on a single semiconductor unit called an Integrated Circuit. In addition to these components, the microcontroller includes many supporting devices as shown in Figure 2. In this paper, we use PIC 18F8720 and is available in 80 pin TQFP package and the features are summarized in Table 1 [6]. Figure 2. Block diagram of Microcontroller with support devices 12

The Universal Embedded Trainer supplied by Vi Microcontroller, Chennai, India is for 8, 16, 32- bit microcontroller development system and can be used either as a standalone system or as a system with serial interface to personal computer. We can communicate this trainer to Personal Computer Via serial port. The boot loader program is programmed in microcontroller, so we can access easily [7]. Table 1. PIC18F8720 design features Device PIC 18F8720 Bytes 128K Program Memory # Single-Word Instructions 65536 Data Memory SRAM (bytes) 3840 EEPROM (bytes) 1024 I/O 68 10-bit A/D(ch) 16 CCP (PWM) 5 MSSP SPI Yes Master I2C Yes USART 2 Timers 8-bit/16-bit 2/3 Ext Bus Yes Max FOSC (MHz) 25 PORT D is a bidirectional port in PIC18F8720 and it should be set up by writing instructions as an output port that can transfer binary bits to LEDs. Therefore, logic1 is required to turn on LEDs [2]. The interfacing of Bicolor LEDs to Microcontroller via Latch is shown in figure 3. In the Figure 3. Interfacing Bicolor LEDs to PIC 18F8720 Via Latch for Generation of Traffic Signals in four roads Junction parallel data transfer mode, a complete Byte is transferred simultaneously over the entire data bus. The data transfer from I/O Ports to traffic signals is in the parallel mode. Eight Anodes of 4 Bicolor LEDs are connected to eight I/O pins- RD0 to RD7 of Port D lines through 74LS273 latch. Latch CLK pin is enabled via PORT B.4. Digital data are sent to Port D lines. According to the digital data, bicolor LEDs glow. The connections from Ports of Microcontroller to latch and to bicolor LEDs are shown in Figure 3. 13

2.2 Software for the System The software Program was developed in C language for initializing the Ports, and the Program is written in MPLAB IDE software. MicroProcessor LABoratory is an Integrated Development Environment that can be downloaded free from Microchip website [8]. It contain all the software tools necessary to write a program in Assembler, Assemble it, Simulate it, and then download it to a programmer. Screen image from MPLAB version 8.66 is shown in Figure 4. Figure 4. Screen image of MPLAB IDE version 8.66 MPLAB IDE runs on a Personal Computer and contains all the components needed to design and deploy embedded systems applications. Figure 4 shows MPLAB IDE window. The device should be choose as PIC 18F8720 in the configure menu. From project menu Language Tool suite should be CCS C compiler for PIC12/14/16/18. A new project file is opened, saved then program to Traffic Signals for 4 Junction roads is written and compiled. If the output window is shown BUILD SUCCEDDED then the program is executed on trainer. To execute the program in a microcontroller transfer hex file via serial communication port from personal computer. This transfer of hex file is done by PIC ISP 18Fxxxx serial downloader. Tiny switch is provided in the trainer for programming and execution. During transfer of hex file, switch should be in prog.mode and click download button in PIC ISP 18Fxxxx window. After download is complete the switch position is change to exec.mode and reset the CPU. Code will be executed [7, 9]. The block diagram of PC connected to trainer via RS 232 cable is shown in Figure 5. The bicolor LEDs A, B, C, D are towards R1, R2, R3, R4 roads respectively shown in Figure 5. Figure 5. Block diagram of PC connected to trainer via RS 232 cable and generated Traffic Signal 14

2.2.1. Flow chart The execution of the program in terms of step by step process is explained by the use of flow chart shown in Figure 6. Figure 6. Flow chart for Traffic signals generation with PIC 18F8720 Microcontroller In the program, the value from Table latch are fetched and moved to port D register to make port D as output. For this choosing TRIS D register byte all zeros and increment TBLPTR [3]. Table-2 shows the data byte (Hex values) to be initialize to port D register. The data on port D register is out to interfacing device, when port B.4 pin is enabled 74LS273 latch CLK pin from Low-to- High. The Green color light is emitted by the bicolor LED A to R1 road and Red to remaining roads, and the next data byte is transferred only after delay. The LEDs glow according to the data transferred to port D register. Thus the traffic is controlled in 4 roads Junction by generating Traffic Signals through PIC18F8720 microcontroller. Table 2. Initialize Hex values to Port D register 3. CONCLUSIONS Traffic signals for 4 roads Junction are activated by using the PIC 18F series microcontroller. In the traffic signals we made an adjustment that instead of using three different color LED signals 15

lights, we assembled with a bicolor Red/Green LED signal light which emits three colors (Red- Green-Yellow). Through this design the cost of manufacturing the signal lights is reduced to low because number of LEDs used for signals are less, a minimum number of I/O port lines are used in Microcontroller. We need three port lines for three color signals control for a single road way but by the use of bicolor LEDs only two port lines are sufficient. So, if I/O port lines in microcontroller are used minimum number, then rest may be used for other applications. ACKNOWLEDGEMENTS The authors are thankful to University Grants Commission (UGC), New Delhi for providing the necessary financial assistance under UGC-CAS program. REFERENCES [1] Traffic light - Wikipedia, the free encyclopedia. Available: http://en.wikipedia.org/wiki/traffic_light [2] Ramesh S. Gaonkar (2010) Fundamentals of Microcontrollers and Applications in Embedded systems (with the PIC 18 microcontrollers Family), Penram International Publishers (India) Pvt. Ltd. [3] Muhammad Ali Mazidi, Rolind D. Mckinlay, Danny Causey (2009) PIC Microcontrollers and Embedded Systems Using Assembly and C for PIC 18, 1st ed., Pearson Education. [4] 74LS273 Datasheet pdf - Octal D-type Positive-edge-triggered Flip... Available: http://www.datasheetcatalog.com/datasheets_pdf/7/4/l/.../74ls273.shtml [5] Led 5mm red/green diff bicolor. Available: http://parts.digikey.com/1/parts/681935-led-5mm-redgreen-diff-bicolor-ssl-lx5097igw.html [6] Microchip PIC18F6520/8520/6620/8620/6720/8720 Data Sheet. Available: http:// ww1.microchip.com/downloads/en/devicedoc/39609b.pdf [7] Universal Embedded Trainer Technical Reference Version-1.2, M/S Vi Microsystems Pvt. Ltd. [8] Microchip Technology Website. Available: http:// www.microchip.com. [9] Tim Wilmshurst (2010) Designing embedded systems with PIC Microcontrollers: Principles and Applications, 2nd ed, Elsevier Publishers. Authors Dr. S.Venkatramana Reddy received M.Phil. and Ph.D. degrees in Physics in 1996, 2001 respectively from Sri Venkateswara University, Tirupati, Andhra Pradesh, India. He taught the subjects Semiconductor Devices & Circuits, Analog and Digital Electronics, 8051 Microcontrollers & Applications, Embedded Systems using PIC microcontrollers, Advanced Microprocessors & Microcomputers, Electronic Instrumentation, Industrial Control Electronics, Analog & Digital Communication, Microwave and Satellite communication, Optical Fiber Communications, Advanced Communication Systems, etc. to the students of M.Sc. Electronics/ M.Tech. Energy Management/ M.Sc. Physics since from the academic year 1995-1996. He has been actively involved in designing M.Sc. Electronics Course in the University. He has published more than 24 research papers in internationally reputed Journals and presented several papers at National Conferences/Symposia. He attended Six Electronics oriented Training Courses/Workshops/National Schools. He is Fellow, Institution of Electronics and Telecommunication Engineers, New Delhi and Life member (LM) in many Professional Bodies like the Instrument Society of India, Bangalore, Semiconductor Society (India), New Delhi, Indian Physics Association, BARC, Mumbai, Indian Association of Physics Teachers, Kanpur, Uttar Pradesh. At present he is working as An Assistant Professor in the Department of Physics, S.V. University, Tiruipati. 16

Mr. G. Karthick Kumar Reddy obtained his M.Sc. in Physics with Electronics as specialization from Sri Venkateswara University in the year 2009. He is presently doing Ph.D in the Department of Physics, Sri Venkateswara University. Mr. P. Jagadeesh obtained his M.Sc. degree in Physics from the Andhra University in the Year 2002. He is doing M.Phil degree in the Department of Physics, Sri Venkateswara University. 17