Vous êtes sur la page 1sur 29

SPEED

DETECTOR

FOR

HIGHWAYS

CONTENTS 1.Figures locations 2.Abstract 3.Introduction 4.Block Diagram 5 .Blo ck Diag ra m Description 6.Schematic 7 .Schema tic Descriptio n 8 .Ha rdw are Co mpo nents Power supply Microcontroller LCD IR TRANSMITTER IR RECEIVER 9.Circuit Description 10.Software components a.About Keil b.Embedded C 11. KEIL procedure description 12.Conclusion (or) Synopsis 13. Future Aspect

ABSTRACT A system designed to record and report on discrete activities within a process iscalled as Tracking System. In the same procedure we have developed a methodology of vehicle speed & direction system for robotics to control and achieve accurate directionspeed for a class of nonlinear systems in the presence of disturbances and parameter variations by using wireless communication technique.In th is meth odo log y we are using a micro con troller, resulting in th e state trajectory 'sliding' along path-varying slides on the surface. This idealized control lawachieves perfect direction & speed however. The method is applied to the control of atwo -link man ipu lato r h and lin g variable loads in a flexible man ufactu rin g systemenvironment.In our project we use IR sensors to detect the presence of a vehicle. According tothis project, 2 IR sensors are placed apart with a fixed known distance. When ever IR rays are interrupted by a vehicle during first sensor the count up timer is started. Whenthe other IR sensor senses the presence of vehicle, the count up timer is stopped. As thedistance and time the IR receiver receives the IR signals is noted by microcontroller andf ro m th at we need to calculate speed . Here speed is calculated f ro m th e well kn own formula of speed which is distance/time.In this circuit we are using LCD display for indicating the speed. It is easy to setu p and su ppo rts the requ ired hardware. To d esign a v eh icle th at supp orts th e newesttechno log y av ailable will b e mo re exp ensiv e th an bo ards th at are alread y clo se to ob solete.

INTRODUCTION BLOCK-DIAGRAM

BLOCK DIAGRAM EXPLANATION: The project SPEED CHECKER FOR HI-WAYS is made to calculate the speed of thevehicle by using the following methodology.In this project we use IR sensors to detect the presence of a vehicle. According tothis project, 2 IR sensors are placed apart with a fixed known distance. When ever IR rays are interrupted by a vehicle during first sensor the count up timer is started. Whenthe other IR sensor senses the presence of vehicle, the count up timer is stopped. As thedistance and time the IR receiver receives the IR signals is noted by microcontroller and f ro m t h at we need to calculate speed . Here sp eed is calculated f ro m th e well kn own formula of speed which is distance/time.The LCD is used to display the speed of the vehicle. The microcontroller is used tomonitor the all control operations needed for the project.

Schematic diagram:SCHEMATIC DESCRIPTION:

Power Supply: Th e main ai m o f th is p ower supp ly is to convert the 23 0V AC into 5 V DC in order to give supply for the TTL or CMOS devices. In this process we are using a step down transformer, a bridge rectifier, a smoothing circuit and the RPS.

At the primary of the transformer we are giving t h e 2 3 0 V A C s u p p l y . T h e secondary is connected to the

opposite terminals of the Bridge rectifier as the input. Fromother set of opposite terminals we are taking the output to the rectifier.T h e b r i d g e r e c t i f i e r c o n v e r t s t h e A C c o m i n g f r o m t h e s e c o n d a r y o f t h e transformer into pulsating DC. The output of this rectifier is further given to the smoother circuit which is capacitor in our project. The smoothing circuit eliminates the ripplesfrom the pulsating DC and gives the pure DC to the RPS to get a constant output DCvoltage. The RPS regulates the voltage as per our requirement. Lcd: The data pins of the LCD(i.e. pin mo 7 to 14 are connected to the port 0 of themicrocontroller. The control pins are connected to the port 2.7 to p2.5 respectively. IR section: The IR LED is u sed as th e IR transmitter, wh ich is conn ected b y using th e resistor logic as shown in the schematic.Th e IR receiver is conn ected b y u sing the tran sisto r log ic whose collector is connected to the base of the transistor. The base of the transistor is connected to the photodiode through the resistor. Hardware Components: Power supply Microcontroller LCD IR TRANSMITTER IR RECEIVER

HARDWARE EXPLANATION:MICRO CONTROLLER (AT89S51) Introduction A Micro controller consists of a powerful CPU tightly coupled with memory,v arious I/O in terf aces such as serial po rt, p arallel po rt timer o r coun ter, interrup t controller, data acquisition interfaces-Analog to Digital converter, Digital to Analogconverter, integrated on to a single silicon chip.If a system is developed with a microprocessor, the designer has to go for externalmemory such as RAM, ROM, EPROM and peripherals. But controller is provided allthese facilities on a single chip. Development of a Micro controller reduces PCB size andcost of design.One of the major differences between a Microprocessor and a Micro controller isthat a controller often deals with bits not bytes as in the real world application.Intel has introduced a family of Micro controllers called the MCS-51. Figure: micro controller

Figure: microcontroller

Block diagram:

Figure: Block diagram Features: Compatible with MCS-51 Products RAm 4K Bytes of In-System Programmable (ISP) Flash Memory Endurance: 1000 Write/Erase Cycles 4.0V to 5.5V Operating Range Fully Static Operation: 0 Hz to 33 MHz Three-level Program Memory Lock 128 x 8-bit Internal RAM 32 Programmable I/O Lines Two 16-bit Timer/Counters Six Interrupt Sources Full Duplex UART Serial Channel

Low-power Idle and Power-down Modes Description: The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes of in-system programmable Flash memory. The device is manufactured us ing Atmels high-density nonvolatile memory technology and is compatible with the industry- standard 80C51instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammedin-system or by a conventional nonvolatile memory programmer. By combining a versatile 8- bit CPU with insystem programmable Flash on a monolithic chip, the Atmel AT89S51 is a powerful microcontroller which provides a highlyflexible and cost-effective solution to manyembedded control applications. Pin diagram:

Figure: pin diagram of microcontroller

Figure: pin diagram of micro controller Pin Description: VCC Supply voltage. GND Ground. Port 0: Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high-impedanceinputs. Port 0 can also be configured to be the multiplexed low-order address/data bus duringaccesses to external program and data memory. In this mode, P0 has internal pull-ups. Port 0also receives the code bytes during Flash programming and outputs the code bytes during program verification. External pull-ups are required during program verification Port 1: Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output bufferscan sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 1 also receives theloworder address bytes during Flash programming and verification. Port 2:

Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output bufferscan sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 also receives thehigh-order address bits and some control signals during Flash programming and verification. Port 3: Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output bufferscan sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 receives some controlsignals for Flash programming and verification. Port 3 also serves the functions of variousspecial features of the AT89S51, as shown in the following table

RST: Reset input. A high on this pin for two machine cycles while the oscillator is runningresets the device. This pin drives

High for 98 oscillator periods after the Watchdog times out.Th e DISRTO bit in SFR AUXR (add ress 8 EH) can b e used to disable th is f eatu re. In th e default state of bit DISRTO, the RESET HIGH out feature is enabled. ALE/PROG: Address Latch Enable (ALE) is an output pulse for latching the low byte of the addressduring accesses to external memory. This pin is also the program pulse input (PROG) duringFlash programming. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used for external timing or clocking purposes. Note, however, that oneALE pulse is skipped during each access to external data memory. If desired, ALE operationcan be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active onlyduring a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting theALE-disable bit has no effect if the microcontroller is in external execution mode. PSEN: Program Store Enable (PSEN) is the read strobe to external program memory. Whenthe AT89S51 is executing code from external program memory, PSEN is activated twice each

machine cycle, except that two PSEN activations are skipped during each access to externaldata memory. EA/VPP: External Access Enable. EA must be strapped to GND in order to enable the device tofetch code from external program memory locations starting at 0000H up to FFFFH. Note,however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should bes t r a p p e d t o V C C for internal program executions. This pin also r e c e i v e s t h e 1 2 - v o l t programming enable voltage (VPP) during Flash programming. XTAL1:

Inpu t to th e in verting oscillator a mp lifier and input to the in tern al clock op erating circuit. XTAL2: Output from the inverting oscillator amplifier. Oscillator Characteristics: XTAL1 an d XTAL2 are the inpu t and output, resp ectively, of an inv erting amplifier which can be configured for use as an on-chip oscillator, as shown in Figs6.2.3. Either a quartz crystal or ceramic resonator may be used. To drive the device froman external clock source, XTAL2 should be left unconnected while XTAL1 is driven asshown in Figure 6.2.4.There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide -by-two flip-f lo p, b ut minimu m an d max imu m v o ltag e h igh and lo w ti me specification s mu st be observed.

Liquid Crystal Display Introduction to LCD: In recent years the LCD is finding widespread use replacing LED s (seven-segment LEDor other multi segment LED s). This is due to the following reasons: 1.The declining prices of LCD s. 2.The ability to display numbers, c h a r a c t e r s a n d g r a p h i c s . T h i s i s i n contract to LED s, which are limited to numbers and a few characters. 3.Incorporation of a refreshing controller into the LCD, there by relieving the CPUof the task of refreshing the LCD. In the contrast, the LED must be refreshed bythe CPU to keep displaying the data. 4 .Ease of p rog ra mmin g fo r characters and g raph ics.

USES: The LCD s used exclusively in watches, calculators and measuring instruments isthe simple seven-segment displays, having a limited amount of numeric data. The recentadvances in technology have resulted in better legibility, more information displayingcap ability and a wider temp eratu re rang e. Th ese h ave resu lted in th e LCD s b ein g extensively used in telecommunications and entertainment electronics. The LCD s has ev en started replacing the cath ode ray tu bes (CRTs) used for th e d isp lay of tex t an d graphics, and also in small TV applications. S p e c i f i c a t i o n s Number of Characters: 16 characters x 2 Lines Character Table: English-European (RS in Datasheet) Module dimension: 80.0mm x 36.0mm x 13.2mm(MAX) View area: 66.0 x 16.0 mm Active area: 56.2 x 11.5 mm Dot size: 0.56 x 0.66 mm

Dot pitch: 0.60 x 0.70 mm Character size: 2.96 x 5.46 mm Character pitch: 3.55 x 5.94 mm LCD type: STN, Positive, Transflective, Yellow/Green Duty: 1/16 View direction: Wide viewing angle Backlight Type: yellow/green LED RoHS Compliant: lead free Operating Temperature: -20C to + 70C

LCD PIN DIAGRAM:

LCD pin description The LCD discussed in this section has 14 pins. The function of each pin is given in table. TABLE 1: Pin description for LCD: Pin 1 2 3 symbol Vss vcc vee i/o ---description grnd +5v power supply power supply to control contrast rs=0 to select Commang register Rs=1 to select Data register r/w=0 for write r/w =1 for read 8-bit data bus

Rs

I/O

7-14

data pins
(0-7) DBO-DB7

I/O

Power supply: The power supplies are designed to convert high voltage ACmain s electricity to a su itab le lo w voltag e su pply fo r electron ics circu its and o ther dev ices. A po wer supply can b y b rok en do wn into a series of blocks, each of which performs a particular function. A d.c power supply which maintains the output voltageconstant

irrespective of a.c mains fluctuations or load variations is known as RegulatedD.C Power Supply For example a 5V regulated power supply system as shown below: IR transmitter: IR LED:

Here the IR transmitter is nothing but the IR LED. It just looks like a normal LED buttransmits the IR signals. Since the IR rays are out of the visible range we cannot observethe rays from the transmitter.These are infrared LEDs; the light output is not visible by our eyes. They can be used asreplacement LEDs for remote controls, night vision for camcorders, invisible beamsensors, etc.Fig 30: IR LED .

Fig: IR led Advantages:

Infrared LEDs are ideal light sources for use with night vision goggles,su rv eillan ce cameras, med ical i mag in g, recogn ition and calib ration systems. Due to their resistance to ambient-light impediments and electro magneticinterference (EMI), Infrared LEDs enhance the performance of wirelessc o m p u t e r - t o PDA links, collision avoidancesystems,automationequipment, biomedicalinstrumentationandtelecommunicat i o n s equipment.

Solid-state design renders Infrared LEDs impervious to electrical andme ch anical shock, v ib ration , f requ en t switch ing and env iron men talex tre mes. With an av erag e lif e span of 100 ,000 -p lus ho u rs (11 years), Infrared LEDs operate reliably year-after-year.

Photo diode: A photodiode is a type of photodetector capable of converting light into either current or voltage, depending upon the mode of operation.Photodiodes are similar to regular semiconductor diodes except that they may beeither exposed (to detect vacuum UV or X-rays) or packaged with a window or opticalfibre connection to allow light to reach the sensitive part of the device. Many diodesdesigned for use specifically as a photodiode will also use a PIN junction rather than thetypical PN junction. Principle of operation: A pho tod iod e is a PN jun ction o r PIN stru cture. When a pho ton of sufficient energy strikes the diode, it excites an electron thereby creating a mobile electron and a p ositiv ely charged electron ho le. If the a bso rp tion o ccu rs in th e jun ction 's d ep letion region, or one diffusion length away from it, these carriers are swept from the junction byth e built-in field of th e d ep letion regio n. Thu s holes mo v e to ward the an ode, and electrons toward the cathode, and a photocurrent is produced. Photovoltaic mode: When used in zero bias or photovoltaic mode, the flow of photocurrent out of thedevice is restricted and a voltage builds up. The diode becomes forward biased and "dark current" begins to flow across the junction in the direction opposite to the photocurrent.This mode is responsible for the photovoltaic effect, which is the basis for solar cellsinfact, a solar cell is just an array of large photodiodes. Photoconductive mode

In this mode the diode is often (but not always) reverse biased. This increases thewidth of the depletion layer, which decreases the junction's capacitance resulting in faster respon se ti mes. Th e reverse b ias indu ces on ly a small a mo un t of cu rren t (kno wn as saturation or back current) along its direction while the photocurrent remains virtually thesame.A l t h o u g h t h i s m o d e is faster, the photovoltaic mode tends to exhibit l e s s electronic noise. (The leakage current of a good PIN diode is so low < 1nA that theJohnsonNyquist noise of the load resistance in a typical circuit often dominates.) Other modes of operation Avalanche photodiodes: have a similar structure to regular photodiodes, but they areoperated with much higher reverse bias. This allows each photo-generated carrier to bemultiplied by avalanche breakdown, resulting in internal gain within the photodiode,which increases the effective responsivity of the device. Phototransistors: also consist of a photodiode with internal gain. A phototransistor is inessence nothing more than a bipolar transistor that is encased in a transparent case so thatlight can reach the base-collector junction. The electrons that are generated by photons inthe base-collector junction are injected into the base, and this current is amplified by thetransistor operation. Note that although phototransistors have a higher responsivity for l i g h t t h e y a r e u n a b l e t o detect low levels of light any better th an p h o t o d i o d e s . Phototransistors also have slower response times. Materials The material used to make a photodiode is critical to defining its properties, because only photons with sufficient energy to

excite electrons across the material's bandgap will produce significant photocurrents. Materials commonly used to produce photodiodes include:

Material Silicon Germanium Indium gallium arsenide Lead sulfide

wavelength range(nm) 190-1100 400-1700 800-2600 <1000-3500

Because of their greater bandgap, silicon -based photodiodes generate less noiseth an g erman iu m-b ased p hotod iod es, bu t g er man iu m ph otod iod es mu st b e use fo r wavelengths longer than approximately 1 m. Since transistors and ICs are made of semiconductors, and contain P-N junctions,almost every active component is potentially a photodiode. Many components, especiallythose sensitive to small currents, will not work correctly if illuminated, due to the induced photocurrents. In most components this is not desired, so they are placed in an opaqueh ousing . Sin ce ho usings are no t co mp letely op aqu e to X -rays o r o th er h igh energ y radiation, these can still cause many ICs malfunction due to induced photo-currents. Features Critical performance parameters of a photodiode include: Responsivity: The ratio of generated photocurrent to incident light power, typically expressed inA / W w h e n u s e d i n p h o t o c o n d u c t i v e m o d e . T h e r e s p o n s i v i t y m a y a l s o b e expressed as

aquantum efficiency or the ratio of the number of photogeneratedcarriers to incident photons and thus a unitless quantity. Dark current: The current through the photodiode in the absence of light, when it is operated in p hotocondu ctiv e mod e. Th e dark cu rrent includ es p hotocu rrent g en erated b y background radiation and the saturation current of the semiconductor junction.Dark current must be accounted for by calibration if a photodiode is used to makean accurate optical power measurement, and it is also a source of noise when a photodiode is used in an optical communication system. Noise-equivalent power: (NEP) The minimum input optical power to generate photocurrent, equalt o t h e r m s n o i s e c u r r e n t i n a 1 h e r t z b a n d w i d t h . T h e r e l a t e d c h a r a c t e r i s t i c detectivity (D) is the inverse of NEP, 1/NEP; and the specific detectivity () is thedetectivity normalized to the area (A) of the photodetector. The NEP is roughlythe minimum detectable input power of a photodiode. When a photodiode is used in an optical communication system, these parameterscontribute to the sensitivity of the optical receiver, which is the minimum input power required for the receiver to achieve a specified bit error ratio. Applications: Photodiode schematic symbol. P-N photodiodes are used in similar applications to other photodetectors, such as photoconductors, charge-coupled devices, and photomultiplier tubes.

Fig 31: Photo Diode Photodiodes are used in consumer electronics devices such as compact disc players,smoke detectors, and the receivers for remote controls in VCRs and televisions.In other consumer items such as camera light meters, clock radios (the ones that dim thed isp lay wh en it's d ark ) and street lig hts, ph oto cond ucto rs are often used rath er th an photodiodes, although in principle either could be used.Photodiodes are often used for accurate measurement of light intensity in science andindustry. They generally have a better, more linear response than photoconductors. They are also widely used in various medical a p p l i c a t i o n s , s u c h a s d e t e c t o r s f o r computed tomography (coupled with scintillates) or instruments to analyze samples(immunoassay). They are also used in blood gas monitors.PIN diodes are much faster and more sensitive than ordinary p-n junction diodes, andhence are often used for optical communications and in lighting regulation.P-N photodiodes are not used to measure extremely low light intensities. Instead, if highsensitivity is needed, avalanche photodiodes, intensified charge-coupled devices or photomultiplier tubes are

used for applications such as astronomy , spectroscopy, nightvision equipment and laser range finding.

Circuit description: In this project we required operating voltage for Microcontroller 89C51 is 5V.Hence the 5V D.C. power supply is needed for the ICs. This regulated 5V is generated b y stepp ing do wn th e vo ltag e fro m 2 30 V to 18 V no w the step do wn ed a.c vo ltag e is being rectified by the Bridge Rectifier using 1N4007 diodes. The rectified a.c voltage isno w filtered using a C filter. Now th e rectif ied , filtered D.C. vo ltag e is f ed to theVo ltag e Regu lato r. Th is vo ltag e regu lato r p rov id es/allo ws us to h av e a Regu lated constant Voltage which is of +5V. The rectified; filtered and regulated voltage is againf iltered fo r rip ples u sing an electro lytic cap acitor 100 F. Now th e ou tput f ro m th issection is fed to 40 th pin of 89C51 micro controller to supply operating voltage. Themicrocontroller 89C51 with Pull up resistors at Port0 and crystal oscillator of 11.0592MHz crystal in conjunction with couple of 30-33pf capacitors is placed at 18th& 19thPins of 89C51 to make it work (execute) properly. In our project we use IR sensors to detectthe presence of a vehicle. According to this project, 2 IR sensors are placed apart with afixed known distance. When ever IR rays are interrupted by a vehicle during first sensor the count up timer is started. When the other IR sensor senses the presence of vehicle, thecount up timer is stopped.

As the distance and time the IR receiver receives the IR signalsis no ted b y microcon troller and fro m th at we n eed to calculate speed. Here sp eed is calculated from the well known formula of speed which is distance/time.

CONCLUSION: The project SPEED CHECKER FOR HI-WAYS has been successfullydesigned and tested.
It has been developed by integrating features of all thehardware components used. Presence of every module has beenreasoned out and placed carefully thus contributing to the bestworking of the unit.Secondly, using highly advanced ICs and with the help of growing technology the project has been successfully implemented. Finally we conclude thatSPEED CHECKER FOR HI-WAYSis anemerging field and there is a huge scope for research and development. FUTURE ENHANCEMENT We can enhance this project by using the technology like RF and increase thedistance to measure. Bibliography: The 8051 Micro controller and Embedded Systems - Janice Gillispie MazidiThe 8051 Micro controller Architecture, Programming & Applications-Kenneth J.AyalaFundamentals Of Micro processors and Micro computers-B.RamMicro processor Architecture,

Programming & Applications-Ramesh S. GaonkarElectronic ComponentsD.V. PrasadWireless Communications- Theodore S. Rappaport

References on the Web: www.national.com www.atmel.com www.microsoftsearch.com www.geocities.com

Vous aimerez peut-être aussi