Traffic Light Priority Control for Emergency Vehicles

March 26, 2018 | Author: Yogesh Asati | Category: Embedded System, Microcontroller, Light Emitting Diode, Rectifier, Personal Computers


Comments



Description

ABSTRACT Title: TRAFFIC LIGHT PRIORITY CONTROL FOR EMERGENCY VEHICLES Aim: The aim of the project is to buildthe traffic light priority control for emergency vehicle. Scope: We have a very high traffic in main cities due to waste increasing of automobiles. When emergency vehicles are not having a possibility to go through this heavy traffic. Due to lagging of this time so many losses are occurred. So, to overcome this problem we need this project. In this project we place a RF receiver for each one of the traffic lights. RF is having the frequency of 434 MHz for transmission and reception. The emergency vehicle having the RF transmitter, which is continuously emitting the signals i.e. in ON state. When the emergency vehicle is reached nearer to the junction means near to the traffic lights, the signals are cached by the receiver presented at the traffic light. Normally in heavy traffic conditions suppose it gives the priority of 5 seconds for each direction to the junction. But, when this signal is reached, at that direction only it will give the priority of 10 seconds. Thus the higher priority is given to the emergency vehicles. The microcontroller is used to control all these operations. By using this project we can save the time and make the actions of the emergency vehicles are to be fast. We use this system for emergency vehicles like fire engine, ambulance etc. BLOCK DIAGRAM Power Supply (5V) Micro Controller R x x R x x R x x Traffic Lights Tx Power Supply (5V) Emergency vehicle Micro Controller SOFTWARE TOOLS USED: 1) Keil Compiler 2) Express PCB/ORCAD HARDWARE TOOLS: 1) Micro controller. 2) RF transmitter, RF Receiver. 3) 4) 5) Power Supply 5V. Decoder, Encoder. LCD. M O M I S C S ) P V 0 9 D 8 D 7 D 6 D 5 D 4 D 3 D 2 D 1 P 0 O C 0 1 2 3 4 5 6 7 G C P G P 0 . 5 X T A L 2 C 1 0 u f / 6 3 V R S T T it le S i z e A a t e X T A L 1 G S m > M e n a y B t . 1 1 K B C 1 0 9 P G 1 3 5 7 9 V C C N D O W 3 3 E p f R S U P P L G NY D ( 5 V V C C D C ) G N D S P 1 1 . K ) PP 01 . 1 A M P ) L E D P 2 . 6 7 / A 3 T P 0 . S O ) P P0 1 5 . t 1 2 0 0 9 o f 1 . 1 . 1 / A3 3 P 0 . 0 3 3 p f 5 9 2 M H z S W IT C H I 2 4 6 8 1 0 P P R P 1 . . 6 1 . 5 2 W R ) P P 3 2 . 0 ( T X D ( R X D ) ) G N D 9 8 7 6 5 4 3 2 1 A T 8 9 S 5 2 1 P 1 0 3 2 1 0 u f / 6 3 4v 5 u f / 6 3 v 6 7 8 1 0 K C R1 R2 R3 R4 R5 R6 R7 R8 P U L L U 1 G S M B R 4 I D G E 1 R V E M O D E M O / P G N D M A X 2 V 3 C 2 C 2 1 2 3 0 V . 1 3 . 7 S T 1 . 2 K A T 8 9 S 5 2 I S AP T 8 9 S 5 2 C R Y S T G AN D L R D o c u < D o c : M o E S E T D n d u a r Sy h 0 e 5e . . 1 . 7 / A3 E A / V P R X D ) P 3 . 2 2 I N T 1 ) P P3 S 3 E 2 N . 0 3 T X D ) A P L 3 E . A N J S u m a n E b D e r A D V A N C R E e v D S E C U R I T Y S Y S T E M G N D 8 . SCHEMATIC DIAGRAM V 1 0 K P U L L U P 1 0 K P U L L U P 4 . 1 N D 0 . 2 / A 2 T A L 1 P 2 . /6 A 3 . 3 / A 2 P 2 . .1. 4 / A . 1/ P R I N T 0 ) P 3 . 0 / A T 2 T 2 1 . 1 /2 A N D P 2 . 2 T A L 2 P 2 . 5 / A 2 R D ) P P3 2 7 . 7 K C V C C G N D C 1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 C C R8 R7 R6 R5 R4 R3 R2 R1 C C R1 R2 R3 R4 R5 R6 R7 R8 V 1 2 3 4 5 6 7 8 9 C ( ( P P P ( ( ( R 0 1) 2 3 4 5 6 ( ( ( ( ( ( ( C 4 1 . 0 V C C3 E X )P P . A 2 - + 7 8 0 5 I N V C T I F O R U I E 3 E G T R U L VA C T C O 2 2 0 o =R 5 V . / 1 A 3 0 2 P 0 . 7 / A T 1 ) P 3 . . 3 R E D D D D S N 4 5 6 7 ( ( ( ( ( L C ( L L L L L C C C C C D D D D D D ) ) ) ) ) ) 5 T R I M K P O T F F F R R R O O O R R M M M S I S I S I S T P P P 2 O U T 2 I N 1 T ( M A X 2 3 12 ( M A X 2 3 2 ) 1 1 1 1 1 1 1 1 2 P P P P 0 0 0 0 . 2 / A3 4 P 0 . /5 A 3 . CT R A N S F O R M E R G N D 2 3 1 0 0 0 u f / 3 5 V 3 p f 1 0 4 p f 3 h m D C M O T O R ( 9 V . 42 . T 0 ) P 3 P . 3 / A3 S I ) P P0 1 4 . . 4 5 6 7 V C C V 0 1 2 3 4 5 V C C 6 G N D 9 8 1 5 7 61 51 41 31 21 4 3 2 1 0 D C M O T O R 1 0 u V C C G N D V G N D L C LCD DISPLAY ( M C P 3 2 0 1 ) D O U T ( M C P 3 2 0 1 ) C S ( M C P 3 2 0 1 ) C L K G V V R R E D D D D D D D D N D C C E E S W N 0 1 2 3 4 5 6 7 9 8 7 6 5 4 3 2 1 1 2 3 4 5 6 7 8 9 C C D X T A X T A L L 2 1 7 8 ( X 9 0 X G 1 0 f / 6 3 v 1 9 8 V C C u f / 6 3 v 1 C 1 + 2 3 V C C 1 6 G N D 1 5 G N D V S + C 1 C 2 + C 2 V S – T 2 O U T R 2 I N T 1 O U T1 4 R 1 I N1 3 R 1 O U T1 2 T 1 I N1 1 T 2 I N1 0 R 2 O U T9 P P 3 .6 6 / A 2 P 2 . 1 0 . .e. RF is having the frequency of 434 MHz for transmission and reception. When the emergency vehicle is reached nearer to the junction means near to the traffic lights. which is continuously emitting the signals i. Normally in heavy traffic conditions suppose it gives the priority of 5 seconds for each direction to the junction. in ON state. In this project we place a RF receiver for each one of the traffic lights. Thus the higher priority is given to the emergency vehicles. The microcontroller is used to control all these operations By using this project we can save the time and make the actions of the emergency vehicles are to be fast. So. CIRCUIT DESCRIPTION We have a very high traffic in main cities due to waste increasing of automobiles.2. ambulance etc. Due to lagging of this time so many losses are occurred. at that direction only it will give the priority of 10 seconds. We use this system for emergency vehicles like fire engine. when this signal is reached. the signals are cached by the receiver presented at the traffic light. The emergency vehicle having the RF transmitter. to overcome this problem we need this project. When emergency vehicles are not having a possibility to go through this heavy traffic. But. Another way to think of an embedded system is as a computer system that is created with optimal efficiency. or adding new features are only matter of rewriting the software that controls the device. operating system. CHARACTERISTICS: Two major areas of differences are cost and power consumption. Embedded systems are self-contained programs that are embedded within a piece of hardware. The whole architecture of the computer is often intentionally simplified to lower costs. Embedded systems are ubiquitous. Embedded systems often use a (relatively) slow processor and small memory size to minimize costs. They use specific programming languages and software to develop embedded systems and manipulate the equipment. Or in other words embedded computer systems are electronic systems that include a microcomputer to perform a specific dedicated application. When searching online. Since many embedded systems are produced in tens of thousands to millions of units range. For example. The main purposes of the microprocessors are to simplify the system design and provide flexibility. Having a microprocessor in the device helps in removing the bugs. Smaller businesses may wish to hire a consultant to determine what sort of embedded systems will add value to their organization. embedded systems are usually set to a specific task that cannot be altered without physically manipulating the circuitry. embedded systems often use peripherals controlled by synchronous serial interfaces. Whereas a regular computer has many different applications and software that can be applied to various tasks.3. Programs on an embedded system often run with real-time constraints with limited hardware resources: often there is no disk drive. Embedded systems technologies are usually fairly expensive due to the necessary development time and built in efficiencies. INTRODUCTION TO EMBEDDED SYSTEMS Embedded systems are electronic devices that incorporate microprocessors with in their implementations. keyboard or screen. A flash drive may replace rotating . companies offer embedded systems development kits and other embedded systems tools for use by engineers and businesses. making modifications. reducing cost is a major concern. The computer is hidden inside these products. Every week millions of tiny computer chips come pouring out of factories finding their way into our everyday products. The slowness is not just clock speed. but they are also highly valued in specific industries. thereby allowing it to complete specific functions as quickly as possible. Embedded systems designers usually have a significant grasp of hardware technologies. which are ten to hundreds of times slower than comparable peripherals used in PCs. This in contrast to the desktop computer market which is limited to just a few competing architectures mainly the Intel/AMD x86 and the Apple/Motorola/IBM Power PC’s which are used in the Apple Macintosh. Sometimes. an application-specific integrated circuit. Those software tools can come from several sources: Software companies that specialize in the embedded market Ported from the GNU software development tools. OPERATING SYSTEM: They often have no operating system. for which the CPU was purchased as intellectual property to add to the IC's design. One common configuration for embedded systems is the system on a chip. TOOLS: Like a typical computer programmer. development tools for a personal computer can be used if the embedded processor is a close relative to a common PC processor. Most designers also have utility programs to add a checksum or CRC to a program. and a small keypad and LCD screen may be used instead of a PC's keyboard and screen. so that they can include any kind of data in a program. or a specialized embedded operating system (often a real-time operating system). in one or more ROM/Flash memory IC chips. e. Some designers keep a utility program to turn data files into code. Firmware is the name for software that is embedded in hardware devices. which can usually be easily restarted if a problem occurs. sometimes measured in years. so it can check its program data before executing it.g. PLATFORM: There are many different CPU architectures used in embedded designs. Embedded system designers also use a few software tools rarely used by typical computer programmers. Firmware is usually developed and tested too much harsher requirements than is general-purpose software. embedded system designers use compilers. Embedded systems are routinely expected to maintain 100% reliability while running continuously for long periods. assemblers and debuggers to develop an embedded system.media. . or the programmer is assigned to port one of these to the new system. The loop calls subroutines. codereviews and ego less programming are recommended. or some type of debugger that can interrupt the micro controller’s internal microcode. A simple API disables and enables interrupts. Each subroutine manages a part of the hardware or software. to produce troubleshooting diagnostics). . A common scheme is to have the electronics turn off the LED(s) at reset. with breakpoints and single stepping.DEBUGGING: Debugging is usually performed with an in-circuit emulator. The CPUbased debugger can be used to test and debug the electronics of the computer from the viewpoint of the CPU. developers should write and use simple logging facilities to debug sequences of real-time events. Many embedded systems recover from short-term power failures by restarting (without recent self-tests). Interrupts generally set flags. and restores the preceding interrupt state in the outermost enable. or update counters that are read by the rest of the software. Many designers have found one of more hardware plus softwarecontrolled LED’s useful to indicate errors during development (and in some instances. DESIGN OF EMBEDDED SYSTEMS: The electronics usually uses either a microprocessor or a microcontroller. PC or mainframe programmers first encountering this sort of programming often become confused about design priorities and acceptable methods. Done right. The microcode interrupt lets the debugger operate in hardware in which only the CPU works. because these features are widely available. CPU and software). the software blinks the LED(s) or sets up light patterns during normal operation. Usually it disables interrupts. This serves to reassure most technicians/engineers and some users. START-UP: All embedded systems have start-up code. Mentoring. and then starts the application code. After that. whereupon the software turns it on at the first opportunity. the software has a loop. tests the computer (RAM. This is one of the simplest methods of creating an exocrine. after product release. it handles nested calls in nested subroutines. THE CONTROL LOOP: In this design. Developers should insist on debugging which shows the high-level language. Some large or old systems use general-purpose mainframes computers or minicomputers. Also. to indicate program execution progress and/or errors. Restart times under a tenth of a second are common. sets up the electronics. to prove that the hardware and start-up software have performed their job so far. Apple Computer. Many designers prefer to design their state machines to check only one or two things per state. using a periodic real time interrupt. Hardware events fail about once in a trillion times. the code looks up the values. Algorithms that take a long time to run must be carefully broken down so only a little piece gets done each time through the main loop. A change of state stores a different function into the pointer. and on small pieces of software the loop is usually so fast that nobody cares that it is not predictable. A touch-screen or screen-edge buttons also minimize the types of user actions. Another basic trick is to minimize and simplify the type of output. Many designers recommend reading each IO device once per loop. A cheap variation is to have two light bars with a printed matrix of errors that they select. Usually this is a hardware event. an associated subroutine is run. This system's strength is its simplicity. there's some sort of subroutine in the loop to manage a list of software timers. Designers recommend that hierarchical state machines should run the lower-level state machines before the higher. One major disadvantage of this system is that it does not guarantee a time to respond to any particular hardware event. one button should be "next menu entry" the other button should be "select this menu entry"). Another major weakness of this system is that it can become complex to add new features. use two buttons (the absolute minimum) to control a menu system (just to be clear. Designs should consider using a status light for each interface plug. . Another advantage is that this system guarantees that the software will run. Any expected hardware event should be backed-up with a software timer. USER INTERFACES: Interface designers at PARC. Thus interrupt code can run at very precise timings. anyway). and storing the result so the logic acts on consistent values. so the higher run with accurate information. C or assembly. to keep the tables small and cheap.Typically. The software can interpolate between entries. to tell what failed. and a software timer. Complex functions like internal combustion controls are often handled with multidimensional tables. Careful coding can easily assure that nothing disables interrupts for long. Instead of complex calculations. There is no mysterious operating system to blame for bad behavior. or failure condition. State machines may be implemented with a function-pointer per statemachine (in C++. or flag is set. When a timer expires. Boeing and HP minimize the number of types of user actions. The function pointer is executed every time the loop runs.the user can glue on the labels for the language that she speaks. For example. there are languages. When there's text. all the lights turn on. Red defines the users can get hurt. they must be reversible in an obvious way. or give progress reports. If the machine is going to do anything. When you press the button. If an interface has modes. Another essential trick is to make any modes absolutely clear on the user's display.For example. Yellow defines something might be wrong. the lights with failures stay on. Boeing's standard test interface is a button and some lights. One of the most successful general-purpose screen-based interfaces is the two menu buttons and a line of text in the user's native language. mediumpriced printers. Designers use colors. Green defines everything's OK. . The default language should be the one most widely understood. When you release the button. It's used in pagers. network switches. The labels are in Basic English. The display should change immediately after a user action.think of blood. it should start within 7 seconds. Most designers prefer the display to respond to the user. and other medium-priced situations that require complex behavior from users. size. manufacturability. such as sensors. For example the remote control you are using probably has microcontrollers inside that do decoding and other controlling functions. microcontroller is designed to be all of that in one. toys . weight. reliability. In short that means that microprocessor is the very heart of the computer. there is only one application software that is typically burned into ROM. On the other hand. video game player Microprocessor . In an embedded system. keyboard. we save the time and space needed to construct devices. cost.A single chip that contains the CPU or most of the computer Microcontroller .. Many interface methods have been developed over the years to solve the complex problem of balancing circuit design criteria such as features. Example: printer. motors. etc. memory and even other micro-controllers.A single chip used to control other devices Microcontroller differs from a microprocessor in many ways. where automation is needed. First and the most important is its functionality. other components such as memory. Thus. They are also used in automobiles. In order for a microprocessor to be used. Many microcontroller designs typically mix multiple interfacing methods. microwave ovens. Embedded system means the processor is embedded into the required application. switches. availability. An embedded product uses a microprocessor or microcontroller to do one task only. performs processing and writes to (controls) outputs.. washing machines. In a very simplistic form. No other external components are needed for its application because all necessary peripherals are already built into it. displays. . power consumption. or components for receiving and sending data must be added to it. a micro-controller system can be viewed as a system that reads from (monitors) inputs. keypads. They are like single chip computers that are often embedded into other systems to function as processing/controlling unit. Micro-controllers are useful to the extent that they communicate with other devices.INTRODUCTION TO MICROCONTROLLER Microcontrollers as the name suggests are small controllers. RAM. I/O and timer are all on a single chip • fix amount of on-chip ROM.000 Write/Erase Cycles Fully Static Operation: 0 Hz to 24 MHz 256 x 8-bit Internal RAM 32 Programmable I/O Lines Three 16-bit Timer/Counters Eight Interrupt Sources Programmable Serial Channel Low-power Idle and Power-down Modes DESCRIPTION: The AT89C52 is a low-power. power and space are critical • single-purpose MICROCONTROLLER 89S52 FEATURES: 8K Bytes of In-System Reprogrammable Flash Memory Endurance: 1. ROM.MICROPROCESSOR VS MICROCONTROLLER: Microprocessor: • CPU is stand-alone. RAM. the Atmel AT89C52 is a powerful microcomputer.AT89S52: . which provides a highly flexible and cost-effective solution to many embedded control applications. • expensive • versatility general-purpose Microcontroller: • CPU. timer are separate • Designer can decide on the amount of ROM. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. I/O ports • for applications in which cost. By combining a versatile 8-bit CPU with Flash on a monolithic chip. PIN DIAGRAM . high-performance CMOS 8-bit microcomputer with 8Kbytes of Flash programmable and erasable read only memory (PEROM). RAM and I/O ports. RAM. I/O. ROM. When 1s are written to port 0 pins. As an output port.Supply voltage.PIN DESCRIPTION: VCC . GND . Port 0 can also be configured to be the multiplexed loworder address/data bus during accesses to external program and data memory. In this mode. the pins can be used as high-impedance inputs.Ground. Port 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification. External pull-ups are required during program verification. P0 has internal pull-ups. Port 0: Port 0 is an 8-bit open drain bi-directional I/O port. Port 1: . each pin can sink eight TTL inputs. they are pulled high by the internal pullups and can be used as inputs. PORT PIN ALTERNATE FUNCTIONS: P3. As inputs.0 T2 (external count input to Timer/Counter 2). Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pullups.0/T2) and the timer/counter 2 trigger input (P1.Port 1 is an 8-bit bi-directional I/O port with internal pull-ups.0 and P1. Port 3 pins that are externally being pulled low will source current (I IL) because of the pullups. Port 3 also receives some control signals for Flash programming and verification. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification.4 T0 (timer 0 external input) P3.1 TXD (serial output port) P3. The Port 1 output buffers can sink/source four TTL inputs. they are pulled high by the internal pull-ups and can be used as inputs. PORT PIN ALTERNATE FUNCTIONS: P1. When 1s are written to Port 1 pins. Port 2 emits the contents of the P2 Special Function Register. The Port 2output buffers can sink/source four TTL inputs.1/T2EX). they are pulled high by the internal pull-ups and can be used as inputs. In this application. respectively. Port 3 also serves the functions of various special features of the AT89C51. Port 3: Port 3 is an 8-bit bi-directional I/O port with internal pullups. Port 2 pins that are externally being pulled low will source current (I IL) because of the internal pullups.6 WR (external data memory write strobe) . As inputs. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that uses 16-bit addresses (MOVX @ DPTR). As inputs. Port 2 uses strong internal pullups when emitting 1s.0 RXD (serial input port) P3.1 T2EX (Timer/Counter 2 capture/reload trigger and direction control Port 2: Port 2 is an 8-bit bi-directional I/O port with internal pull-ups.3 INT1 (external interrupt 1) P3. clock-out P1.5 T1 (timer 1 external input) P3. During accesses to external data memory that uses 8-bit addresses (MOVX @ RI). In addition. When 1s are written to Port 2 pins.1 can be configured to be the timer/counter 2 external count input (P1. When 1s are written to Port 3 pins. The Port 3 output buffers can sink/source four TTL inputs.2 INT0 (external interrupt 0) P3. P1. When the AT89C52 is executing code from external program memory. except that two PSEN activations are skipped during each access to external data memory. XTAL1: input to the inverting oscillator amplifier and input to the internal clock operating circuit. PSEN is activated twice each machine cycle.P3. RST: Reset input. EA will be internally latched on reset. the pin is weakly pulled high. XTAL2: It is an output from the inverting oscillator amplifier . This pin is also the program pulse input (PROG) during flash programming. With the bit set. ALE is active only during a MOVX or MOVC instruction. In normal operation. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. if lock bit 1 is programmed. PSEN: Program Store Enable is the read strobe to external program memory. However. EA/VPP: External Access Enable (EA) must be strapped to GND in order to enable the device to fetch code from external pro-gram memory locations starting at 0000H up to FFFFH. ALE operation can be disabled by setting bit 0 of SFR location 8EH. EA should be strapped to VCC for internal program executions. that one ALE pulse is skipped during each access to external data memory. If desired.7 RD (external data memory read strobe). However. ALE/PROG: Address Latch Enable is an output pulse for latching the low byte of the address during accesses to external memory. Otherwise. This pin also receives the 12V programming enable voltage (VPP) during Flash programming when 12V programming is selected. A high on this pin for two machine cycles while the oscillator is running resets the device. ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used for external timing or clocking purposes. BLOCK DIAGRAM OF 89S52: • EXTERNAL INTERRUPTS ON-CHIP ROM FOR PROGRAM CODE ONCHIP RAM TIMER/CO UNTER INTERRUPT CONTROL TIMER 1 TIMER 0 COUNTER INPUTS CPU BUS CONTROL 4 I/O PORTS SERIAL PORT OSC P0 P1 P2 P3 TX Rx . ARCHITECHTURE OF 8052 MICROCONTROLLER: . Architecture of 89S52 . There are no requirements on the duty cycle of the external clock signal. which can be configured for use as an on-chip oscillator. It should be noted that when idle is terminated by a hardware reset. Either a quartz crystal or ceramic resonator may be used.OSCILLATOR CHARACTERISTICS: XTAL1 and XTAL2 are the input and output. On-chip hardware inhibits access to internal RAM in this event. To drive the device from an external clock source. respectively. The idle mode can be terminated by any enabled interrupt or by a hardware reset. of an inverting amplifier. from where it left off. the device normally resumes program execution. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset. XTAL2 should be left unconnected while XTAL1 is driven. the instruction following the one that invokes Idle should not be one that writes to a port pin or to external memory. The content of the on-chip RAM and all the special functions registers remain unchanged during this mode. The mode is invoked by software. since the input to the internal clocking circuitry is through a divide-by-two flip-flop. IDLE MODE: In idle mode. but access to the port pins is not inhibited. up to two machine cycles before the internal reset algorithm takes control. C2 = 30 pF ± 10 pF for Crystals = 40 pF ± 10 pF for Ceramic Resonators . the CPU puts itself to sleep while all the on-chip peripherals remain active. OSCILLATOR CONNECTIONS: Oscillator Connections Note: C1. but minimum and maximum voltage high and low time specifications must be observed. .External Clock drives Configuration. This effect is a form of electroluminescence. An LED is usually a small area (less than 1 mm2) light source. or ultraviolet. The effect is a form of electroluminescence where incoherent and narrow-spectrum light is emitted from the p-n junction. visible. and as a grow light to enhance photosynthesis in plants.the data is sent to the receiver side correspondingly the LED glows representing the data is being received simultaneously when we send 8 as a data the LED gets off . While sending a message in the form of bits such as 1. LED’s are widely used as indicator lights on electronic devices and increasingly in higher power applications such as flashlights and area lighting. The color of the emitted light depends on the composition and condition of the semi conducting material used. interesting applications include using UV-LED’s for sterilization of water and disinfection of devices. Besides lighting. and can be infrared. as in the common LED circuit. As in the simple LED circuit.LIGHT EMITTING DIODE (LED) A light-emitting diode (LED) is a semiconductor diode that emits incoherent narrow spectrum light when electrically biased in the forward direction of the pn-junction. often with optics added to the chip to shape its radiation pattern and assist in reflection. COLOR CODING: Color Potential Difference . 5 V 3.Infrared Red - 1. • The main advantage is efficiency.0 V to 3.0 V to 3. In conventional incandescent bulbs.8 V to 2. they don't have a laser diodes or IR sources filament that will burn out.1 V 2.6 V 3.2 V 2. For one thing. so they last much longer.5 V 3. the light- production process involves generating a lot of heat (the filament must be warmed). They also fit more easily into modern electronic circuits. As compared to LED’s are conventional incandescent lamps.4 V 2.5V Orange Yellow Green Blue - White Ultraviolet (Close-up of a typical LED in its case showing the internal structure) ADVANTAGES: • • LED’s have many advantages over other technologies like lasers. . Additionally.6 V 1. their small plastic bulb makes them a lot more durable. applications needing a highly collimated beam. which cuts down the electricity demands considerably. But the disadvantages are quite negligible as the negative properties of LED’s do not apply and the advantages far exceed the limitations. A much higher percentage of the electrical power is going directly for generating light. Moreover LED’s have very low power consumption and are easy to maintain. because a huge portion of the available electricity isn't going toward producing visible light. DISADVANTAGES OF LEDS: • • • LED’s performance largely depends on the ambient temperature of the operating LED’s must be supplied with the correct current. • LED’s generate very little heat. . so cannot be used in environment.Unless you're using the lamp as a heater. LED’s do not approximate a "point source" of light. • LED’s offer advantages such as low cost and long service life. 6 Vdc .Operating Voltage : 2 .Modulation ASK .RF TRANSMITTER TRANSMITTER Ult ra Small RT434A .Output : Digital & Linear .12V Pin 1 : GND Pin 2 : Data In Pin 3 : Vcc Pin 4 : Antenna ( RF Output ) RF RECEIVER RECEIVER SAW Based RR434A .Supply Voltage : 3.Modulation ASK .3 . 2) 9V DC power supply. Since 230V AC is too high to reduce it to directly 5V DC. we came to a conclusion to choose a transformer. The output of the transformer is 9V AC. since there is no requirement for any negative voltage for our application. Even though the efficiency of full wave and bridge rectifier are the same.Pin 1 : GND Pin 2 : Digital Data Output Pin 3 : Linear Output Pin 4 : Vcc Pin 5 : Vcc Pin 6 : GND Pin 7 : GND Pin 8 : Antenna (30-35cm) POWER SUPPLY SECTION In-order to work with any components basic requirement is power supply. because half wave rectifier has we less in efficiency. whose secondary voltage is 3 to 4 V higher than the required voltage i. Now the aim is to design the power supply section which converts 230V AC in to 5V DC. In this section there is a requirement of two different voltage levels. For this application 0-9V transformers is used. it feed to rectifier that converts AC to pulsating DC. since it is easily available in the market. Since the output voltage of the rectifier is pulsating DC. The most easy way to regulate this voltage is by using a 7805 voltage regulator. As we all know that there are 3 kind of rectifiers that is 1) half wave 2) Full wave and 3) Bridge rectifier Here we short listed to use Bridge rectifier. Those are 1) 5V DC power supply. we gone with bridge rectifier. 5V. whose output voltage is constant 5V DC irrespective of any fluctuation in line voltage. . therefore we need a stepdown transformer that reduces the line voltage to certain voltage that will help us to convert it in to a 5V DC. Considering the efficiency factor of the bridge rectifier. in order to convert it into pure DC we use a high value (1000UF/1500UF) of capacitor in parallel that acts as a filter.e. . Select Project–Open Project (For example. the size of code for these shareware versions is limited and we have to consider which assembler is suitable for our application.Targets. Select Project . Select Project . CREATING YOUR OWN APPLICATION IN UVISION2: To create a new project in uVision2. Add/Files. Select Project . A make facility . . \C166\EXAMPLES\HELLO\HELLO. you must: .Options and set the tool options. However. . select Source Group1.Select Device and select an 8051. Note when you select the target device from the Device Database all-special options are set automatically. . and Files. and links the files in your project.Rebuild all target files or Build target. you must: . A powerful debugger To get start here are some several example programs BUILDING AN APPLICATION IN UVISION2: To build (compile. Groups. . compile. assembles. Select a directory and enter the name of the project file.UV2) . and add the source files to the project. and debug embedded programs. You . Editor .INTRODUCTION TO KIEL SOFTWARE Many companies provide the 8051 assembler. and link) an application in uVision2. A project manager . assemble. KIEL U VISION2: This is an IDE (Integrated Development Environment) that helps you write. UVision2 compiles. . Tool configuration . or C16x/ST10 device from the Device Database Create source files to add to the project. Select Project .New Project. Kiel is one of them. Select Project . It encapsulates the following components: . We can download them from their Websites. some of them provide shareware version of their product on the Web. 251. or link the startup code generated includes LJMP's and cannot be used in single-chip devices supporting Less than 2 Kbytes of program space like the Philips 750/751/752. RTX-51 Tiny Real-Time Operating System PERIPHERAL SIMULATION: The u vision2 debugger provides complete simulation for the CPU and on chip peripherals of most embedded devices. you must: . . Library Manager. C51 Evaluation Software Limitations: . and so on. assemble. Select Debug . Open the Serial Window using the Serial #1 button on the toolbar. Programs begin at offset 0x0800 and cannot be programmed into single-chip devices.only need to configure the memory map of your target hardware. and debugger are limited to 2 Kbytes of object code but source Code may be any size. No hardware support is available for multiple DPTR registers. . .Start/Stop Debug Session. or C166 tool chains. To discover which peripherals of a device are supported. APPLICATIONS: .Rebuild all target files or Build target. Break. C251. linker. Go. No support is available for user libraries or floating-point arithmetic. Select Project . The compiler. You . . LIMITATIONS OF EVALUATION SOFTWARE: The following limitations apply to the evaluation versions of the C51. . Code-Banking Linker/Locator . Select the Simulated Peripherals item from the Help menu. in u vision2. . Default memory model settings are optimal for most. DEBUGGING AN APPLICATION IN UVISION2: To debug an application created using uVision2. main in the Output Window to execute to the main C function. . EVALUATION SOFTWARE: . You may enter G. Debug your program using standard options like Step. Use the Step toolbar buttons to single-step through your program. . assembler. Programs that generate more than 2 Kbytes of object code will not compile. The debugger supports files that are 2 Kbytes and smaller. CODE: #include<reg52. We are constantly adding new devices and simulation support for on-chip peripherals so be sure to check Device Database often.may also use the web-based device database.h> . .b. sbit r4=P2^2.d. void integer_send(a). sbit g3=P2^6. sbit y2 =P0^5. unsigned int route_2(). unsigned int route_3(). void compare(). sbit g2 =P0^4. sbit r1 =P2^3.c. sbit r2=P0^6. void send(unsigned char c). unsigned char a. sbit y4=P2^1. sbit y1 =P2^4. void display(). sbit g1 =P2^5. void fun_a(). sbit g4=P2^0. unsigned int route_1().#include<intrins. void fun_b(). sbit r3=P0^7.h> void delay_ms(unsigned int i). unsigned int route_4(). void print(char *str). sbit y3=P2^7. /*fun_a(). fun_b(). . void serial_intr(void) interrupt 4 { if(TI == 1) { TI = 0. flag = 1. TH0=0x00. print("TRAFFIC SIGNALS\r\n"). } if(RI==1) { } } void main() { TMOD = 0x20. void fun_d(). TR1 = 1. fun_c(). unsigned int m=0. unsigned int z. IE = 0x90. TH1 = 0xFD. void fun_y() . bit flag=0. TL0=0x00.void fun_c(). SCON = 0x50. r1=1. g1=0. r3=0. r4=0. delay_ms(1000). r1=1. r1=0. y1=0. y2=0. r2=1.fun_d(). y1=1. } . r2=0. g1=1. */ while(1) { display(). g1=1. y1=1. y1=1. delay_ms(1000). } } void fun_d( ) { print("\r\nEAST\r\n"). g2=0. y2=1. delay_ms(1000). delay_ms(1000). g2=1. y2=0. //y3=1. r2=1. r3=0. r2=1. y3=0. r3=1. r4=0. g2=1.void fun_b( ) { print("\r\nWEST\r\n"). r2=0. . r1=0. } void fun_c( ) { print("\r\nNORTH\r\n"). y2=1. y2=1. } void fun_a( ) { print("\r\nSOUTH\r\n"). r4=1. r3=1. r4=0. y3=0. r3=1. r1=0. delay_ms(1000). g3=1. delay_ms(1000). g3=1. y4=0. //y1=1. r3=0. . r2=0. y3=1. y3=1.r1=0. g3=0. r4=1. g4=0. y4=1. y4=1. delay_ms(1000). //y2=1. y3=0. g4=1. . y1=0. r3=0. r4=1. } /*void fun_y() { r1=1. y2=0. delay_ms(1000). delay_ms(1000). r4=0. g4=1. y4=0. r3=1. y1=0. r1=1.r2=0. r2=1. y4=0. r4=1. programming and application by KENNETH JAYALA 3. Hand book for Digital IC’s from Analogic Devices WEBSITES VIEWED: . while(i-->0) { for(j=0. delay_ms(1000). 2. ATMEL 89s52 Data sheets 4. 8051 Microcontroller Architecture.} } } REFERENCE TEXT BOOKS REFERED: 1. y2=1.y1=1. Pearson Education. y3=1. y4=1.j++) {. “The 8051 Microcontroller and Embedded Systems” by Muhammad Ali Mazidi and Janice Gillispie Mazidi.j<250. }*/ void delay_ms(unsigned int i) { unsigned int j. beyondlogic.dallassemiconductors.howstuffworks.atmel.com www.com .com www.org www.com www.maxim-ic.• • • • • • www.com www.alldatasheets.
Copyright © 2024 DOKUMEN.SITE Inc.