Upcoming SlideShare
×

Density based traffic light controlling (2)

8,096 views

Published on

Published in: Education
5 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total views
8,096
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
348
0
Likes
5
Embeds 0
No embeds

No notes for slide

Density based traffic light controlling (2)

1. 1. DENSITY BASED TRAFFIC LIGHT CONTROLLINGTABLE OF CONTENTS1.ABSTRACT2.SCHEMATIC DIAGRAM3. CIRCUIT DESCRIPTION4.INTRODUCTION4.1. EMBEDDED INTRODUCTION4.2. MICROCONTROLLER INTRODUCTION4.3. INTRODUCTION TO IRPAIRS.4.4. INTRODUCTION TO LCD.4.5 INTRODUCTION TO LEDS.4.5. KEIL INTRODUCTION5.COMPONENT DESCRIPTION5.1 .AT89S525.2. IR PAIRS5.3. LED ‘S5.4 LCD6.CODING7. REFERENCEAim:The aim of the project is to build a Traffic Control System Based onDensity.Scope:densityand by doing this Now a day’s public is facing lot of problems due the traffic controlespeciallywhere the heavy traffic junctions are present. In order to solvethe above problem the governmenthas implemented traffic light system,by which each side/way will be given an appropriate time forthe vehiclesto move on at regular time intervals. This is the scenario what we observeon behalf oftraffic control system.In the above scenario the traffic signal to a particular way will be givenonlyafter a particular time period. i.e., a time period is fixed we haveobserved a case where the densityof the traffic is more on one way whencompared to the other side. At this level the time is beingwasted leavingthe junction cool for some time. Due to this there are many problems. Inorder tosolve the above problem we have designed this project. Wherewe can automatically observe thedensity of the traffic and give thatparticular way priority and exceed the problem.In the presentproject we are using the help of IR Tx and Rx pairs atparticular intervals and taking appropriatecalculation of the density andat the same time giving priority to the way which is having high thetraffic will be automatically controlled based ondensity of the traffic.1)half wave2)Full wave and3)Bridge rectifier Here we short listed to use Bridge rectifier, because halfwave rectifier has we less in efficiency.Even though the efficiency of full wave and bridge rectifierare the same, since there is norequirement for any negative voltage for our application, we gonewith bridge rectifier.Since the output voltage of the rectifier is pulsating DC, in order to convert itinto pure DC we usea high value (1000UF/1500UF) of capacitor in parallel that acts as a filter. The
2. 2. most easy way toregulate this voltage is by using a 7805 voltage regulator, whose output voltage isconstant 5VDC irrespective of any fluctuation in line voltageSELECTION OF MICROCONTROLLER:As we know that there so many types of micro controller families that areavailable in themarket.Those are1) 8051 Family2) AVR microcontroller Family3) PIC microcontroller Family4) ARMFamilyBasic 8051 family is enough for our application; hence we are not concentratingon higher endcontroller families.In order to fulfill our application basic that is AT89C51 controller is enough.Butstill we selected AT89S52 controller because of inbuilt ISP (in system programmer) option.Thereare minimum six requirements for proper operation of microcontroller.Those are:1)power supplysection2)pull-ups for ports (it is must for PORT 0)3)Reset circuit4)Crystal circuit5)ISP circuit (for programdumping)6)EA/VPP pin is connected to VccPORT0 is open collector that’s why we are using pull-up resistor which makes PORT0 as an I/Oport.Reset circuit is used to reset the microcontroller. Crystal circuit is used for themicrocontroller fortiming pluses. In this project we are not using external memory that’s whyEA/VPP pin in themicrocontroller is connected to Vcc that indicates internal memory is used for this application.SELECTION OF IR PAIR:IR PAIRSare available in IR TX & IR RX. Here we are using it only for Detectingand sending information to themicrocontroller.This is wireless applications, these IR TX issending information upto 1 feet & thissignal is received by IR RX .SELECTION OF RELAYS:The relay is an automatic control element whose output variableundergoes a change by leaps andbounds when its input variable (electric, magnetic,sound, light) reaches a set pointSELECTION OF LCD:A liquid crystal display (LCD) is an electronically-modulatedoptical device shaped into a thin, flatpanel made up of any number of color or filled monochrome pixels withliquid crystals and arrayed infront of a light source(backlight) or reflector. In this project l LCD isused to display the GSM status.CONNECTIONS OF LCD
3. 3. :We can connect LCD in 8 bit mode or 4 bit mode, if use 8 bit mode more pins necessaryto interfaceLCD, so we can use 4 bit mode to reduce pins .In this project i used 4 bit mode and itis connected toP0.CIRCUIT OPERATIONIn this application we are using GSM module to receive as well as totransmit the messages.whenever we send the command to GSM module then it can doparticular operation dependingupon the command. Whenever we send a command to GSMmodule it can send the messages as wellas mobile number to controller through serialinterface .The controller read the message from serialinterface of GSM if it is valid messagethen controller can turn the motor to open the door as well ascontroller can display the mobilenumber on lcd. After a particular time the door is automatically willbe closed. Microcontroller can send the result operation to GSM whether door is opened or notopened then GSM modulecan send the message back to mobile.INTRODUCTION TO EMBEDDED SYSTEMSEmbedded systems are electronic devices that incorporate microprocessors with in theirimplementations. The main purposes of the microprocessors are to simplify the system designandprovide flexibility. Having a microprocessor in the device helps in removing the bugs,makingmodifications, or adding new features are only matter of rewriting the software that controlsthedevice. Or in other words embedded computer systems are electronic systems that includeamicrocomputer to perform a specific dedicated application. The computer is hidden insidetheseproducts. Embedded systems are ubiquitous. Every week millions of tiny computer chipscomepouring out of factories finding their way into our everyday products.Embedded systems areself-contained programs that are embedded within a piece of hardware. Whereas a regularcomputer has many different applications and software that can beapplied to various tasks,embedded systems are usually set to a specific task that cannot bealtered without physicallymanipulating the circuitry. Another way to think of an embedded systemis as a computer systemthat is created with optimal efficiency, thereby allowing it to completespecific functions as quickly aspossible.Embedded systems designers usually have a significant grasp of hardwaretechnologies.They use specific programming languages and software to develop embedded systemsandmanipulate the equipment. When searching online, companies offer embeddedsystemsdevelopment kits and other embedded systems tools for use by engineers andbusinesses.Embedded systems technologies are usually fairly expensive due to thenecessarydevelopment time and built in efficiencies, but they are also highly valued in specificindustries.Smaller businesses may wish to hire a consultant to determine what sort of embeddedsystemswill add value to their organization.
4. 4. CHARACTERISTICS:Two major areas of differences are cost and power consumption. Since many embeddedsystems areproduced in tens of thousands to millions of units range, reducing cost is a major concern.Embedded systems often use a (relatively) slow processor and small memory size tominimize costsThe slowness is not just clock speed. The whole architecture of the computer is oftenintentionallysimplified to lower costs. For example, embedded systems often use peripheralscontrolled bysynchronous serial interfaces, which are ten to hundreds of times slower thancomparableperipherals used in PCs. Programs on an embedded system often run with real-timeconstraints withlimited hardware resources: often there is no disk drive, operating system,keyboard or screen. Aflash drive may replace rotating media, and a small keypad and LCDscreen may be used instead of aPCs keyboard and screen.Firmware is the name for software that is embedded in hardware devices,e.g. in one or more ROM/Flash memory IC chips. Embedded systems are routinely expected tomaintain 100%reliability while running continuously for long periods, sometimes measured in years.Firmware isusually developed and tested too much harsher requirements than is general-purposesoftware,which can usually be easily restarted if a problem occurs.PLATFORM:There are many different CPU architectures used in embedded designs. This in contrastto thedesktop computer market which is limited to just a few competing architectures mainlytheIntel/AMD x86 and the Apple/Motorola/IBM Power PC’s which are used in the AppleMacintosh.One common configuration for embedded systems is the system on a chip, anapplication-specific integrated circuit, for which the CPU was purchased as intellectual property toadd to theICs design.TOOLS:Like a typical computer programmer, embedded system designers use compilers,assemblers anddebuggers to develop an embedded system. Those software tools can comefrom severalsources:Software companies that specialize in the embedded market Ported from theGNU softwaredevelopment tools. Sometimes, development tools for a personal computer can beused if theembedded processor is a close relative to a common PC processor. Embeddedsystem designers alsouse a few software tools rarely used by typical computer programmers.Some designers keep a utilityprogram to turn data files into code, so that they can include anykind of data in a program. Mostdesigners also have utility programs to add a checksum or CRCto a program, so it can check itsprogram data before executing it.OPERATING SYSTEM:They often have no operating system, or a specialized embedded operating system(often a real-timeoperating system), or the programmer is assigned to port one of these to thenew system.DEBUGGING:
5. 5. Debugging is usually performed with an in-circuit emulator, or some type of debugger thatcaninterrupt the micro controller’s internal microcode. The microcode interrupt lets the debuggeroperate in hardware in which only the CPU works. The CPU-based debugger can be used to testanddebug the electronics of the computer from the viewpoint of the CPU.Developers should insist ondebugging which shows the high-level language, withbreakpoints and single stepping, because thesefeatures are widely available. Also, developersshould write and use simple logging facilities to debugsequences of real-time events. PC or mainframe programmers first encountering this sort ofprogramming often become confusedabout design priorities and acceptable methods. Mentoring,code-reviews and ego lessprogramming are recommended.DESIGN OF EMBEDDED SYSTEMS:The electronics usually uses either a microprocessor or a microcontroller. Some large or old systemsuse general-purpose mainframes computers or minicomputers.START-UP:All embedded systems have start-up code. Usually it disables interrupts, sets up theelectronics, teststhe computer (RAM, CPU and software), and then starts the application code.Many embeddedsystems recover from short-term power failures by restarting (without recentself-tests). Restarttimes under a tenth of a second are common.Many designers have found one of more hardwareplus software-controlledLED’s useful to indicate errors during development (and in some instances,after product release,to produce troubleshooting diagnostics). A common scheme is to have theelectronics turn off theLED(s) at reset, whereupon the software turns it on at the first opportunity,to prove that thehardware and start-up software have performed their job so far. After that, thesoftware blinks theLED(s) or sets up light patterns during normal operation, to indicate programexecution progressand/or errors. This serves to reassure most technicians/engineers and some usersTHE CONTROL LOOP:In this design, the software has a loop. The loop calls subroutines. Each subroutinemanages a part ofthe hardware or software. Interrupts generally set flags, or update countersthat are read by the restof the software. A simple API disables and enables interrupts. Doneright, it handles nested calls innested subroutines, and restores the preceding interrupt state inthe outermost enable. This is one ofthe simplest methods of creating an exocrine.Typically, theres some sort of subroutine in the loopto manage a list of software timers,using a periodic real time interrupt. When a timer expires, anassociated subroutine is run, or flagis set. Any expected hardware event should be backed-up with asoftware timer. Hardwareevents fail about once in a trillion times.State machines may beimplemented with a function-pointer per state-machine(in C++, C or assembly, anyway). A change ofstate stores a different function into the pointer.The function pointer is executed every time theloop runs.Many designers recommend reading each IO device once per loop, and storing theresultso the logic acts on consistent values. Many designers prefer to design their state machinestocheck only one or two things per state. Usually this is a hardware event, and a softwaretimer.Designers recommend that hierarchical state machines should run the lower-level statemachinesbefore the higher, so the higher run with accurate information.Complex functions like