You are on page 1of 63

1.

1INTRODUCTION
Are you afraid that your brand new Hummer is going to get scratched while parking it in a tight space? Do you have trouble backing your large Mercedez S-class into your small garage? Fear no more! Our ultrasonic ParKontroller can sense how far you are away from the wall or a hidden object behind your car and warn you visually and audibly using LEDs and speaker respectively. Ultrasonic distance meter embedded system project explains about developing new application using microcontroller for calculating distance between two objects accurately using ultrasonic sound. This system uses ultrasonic sound pulses to calculate distance between objects. From source point user will send ultrasonic pulses to other end using transmitter and then receiver will catch reflected pulses and time is calculated for transmitting and receiving of pluses based on this time distance is calculated and displayed on LED. Output is displayed in digital format which can be easily understood by any one.
The ultrasonic range finder is designed to measure the distance between two objects. In early days distance between the objects is measured by physically or by using tape. But this is not possible for long distance. This limited only for short distance. Because the cost will expensive or difficult find the end position. The long distance objects like Radar and any other place where person cannot go physically this project is very effective. It takes less time to measure distance of the objects. Measured distance displays in LCD. The displayed values is in digital which can everybody understand. This is cost effective compare to other methods. Ultrasonic distance meter embedded system project explains about developing new application using microcontroller for calculating distance between two objects accurately using ultrasonic sound. This system uses ultrasonic sound pulses to calculate distance between objects. From source point user will send ultrasonic pulses to other end using transmitter and then receiver will catch reflected pulses and time is calculated for transmitting and receiving of pluses based on this time distance is calculated and displayed on LED. Output is displayed in digital format which can be easily understood by any one. In existing system it is hard to calculate distance between objects, present system uses manual method where tape is used to calculate distance but this procedure is not possible in calculating long distance. In this cases ultrasonic distance meter can be used. Using this application can save time and cost and usage of man power. This paper covers introduction to new concept, block diagram description and working principle with components required for implementing this project

1.2What does it do?


Measure distance with an accuracy of a few centimetres, over a range of a few metres, at a speed of milliseconds to several seconds per sample.

1.3Why use this technique?


Ultrasonic sensors can offer a number of advantages over optical methods. Most notably, they can be used for measuring distance to any surface, including glass and liquids. Ranges vary from a few millimetres to around ten metres, without increasing the size of the device. Typical objects measured:

liquid level measurement counting objects on a production line thread or wire break detection robotic sensing for navigation or obstacle avoidance wall-to-wall distance measurement

1.4How do ultrasonic rangefinders work?


Typically, an ultrasonic rangefinder sends a 'ping' and waits to hear an echo. Sound waves propagate from the transmitter and bounce off objects, returning an echo to the receiver (below left). If the speed of sound is known, the distance to an object can be calculated from the time delay between the emitted and reflected sounds.

Fig. No. 1 1.5Operation of an ultrasonic transducer


While the principle of calculating distance from the time of travel is simple, there are many limiting factors to consider. Sound diverges very rapidly, so transducers are carefully designed to produce as small a beam as possible. While some applications require a wide beam, a narrow beam improves the range and reduces background interference. There is a direct relationship between beam width and target surface angle: the wider the beam, the greater the possible angle between the transducer and the surface. When the angle is too great (>12 degrees), the reflected beam misses the transducer (above right). While some surfaces may produce scattered diffuse reflections, these are much weaker and are not used for distance measuring purposes. The speed of sound varies with temperature: as air gets warmer, sound travels faster. Hence ultrasonic systems must incorporate a thermometer to estimate the current speed of sound. While the ambient air temperature can be measured, other warming effects, such as convection and turbulence, can cause errors in the calculated distance. Humidity alters the attenuation of sound in air, which determines the maximum range of an ultrasonic device. Attenuation is also related to the frequency of the emitted sound: higher frequencies improve the sampling resolution, but attenuate more thus reducing the range.

1.6What are the benefits of this system?


long distance, up to 10 metres works with almost any surface type resistant to vibration, radiation, background light and noise unaffected by dust, dirt or high humidity low cost

1.7What are the limitations of this measuring technique?


moderate accuracy: 0.1 to 2% of the range large beam hence poor object resolution 3

limited speed restricted target angle: requires near-perpendicular surface

1.8 WORKING PRINCIPLE:


During the transmission micro controller encodes the signal and transmits through the Ultrasonic transmitter. The Ultrasonic transmitter converts the electrical signal to pulse. During this time the time set is zero. Ultrasonic transducer emits a burst of 12 pulses at a frequency, which is roughly identical with resonance frequency of the two transducers. After the burst has been emitted the unit is switched to reception. The sensitivity of the receiver is a function of time. When these pulses hits any object they are reflected back and are received by ultrasonic receiver. The number of clock pulses counted between onsets of the emission the burst and the sensing of echo is equal to distance between two objects. The microcontroller calculates distance by using time. The time taken to detect the target is helpful for finding the distance of the objects. The measured distance or height is displayed on LCD. The senility of the receiver is a function of time. When these pulses hits any object they are reflected back and are received by ultrasonic receiver. The number of clock pulses counted between onsets of the emission the burst and the sensing of echo is equal to distance between two objects.

1.9 High Level Design


Rationale of our project A significant portion of the people around the world owns car or are daily drivers. In fact, United States alone has the largest passenger vehicle market in the world and there were over 243 million registered vehicles in the U.S. in 2004. Among these drivers, its not entirely untrue to assume that parallel parking or rearward parking is one of the most cumbersome parts of their driving experience. It takes years of driving experience and rigorous practices to avoid a fender bender or an ugly scratch across the bumper. Some old school auto-enthusiasts may like to do everything manually, but most of us like to take advantage of the advanced car electronics and technologies to make our life a little bit easier and also to avoid common accidents during parking. Hence, we decided to design and build an ultrasonic parking assistant system that will help the driver get a sense of how far his or her car is away from a wall or an object behind the car.

Logical Structure The basic theory behind the ParKontroller is the Sound Navigation and Ranging (SONAR) technique that is used for finding the distance and direction of a remote object underwater by transmitting sound waves and detecting reflections from it. First, a series of short ultrasonic pulses are transmitted using a transducer that changes voltage into sound waves. The transmitted pulse is reflected off an object, and the reflected wave is then received by another transducer that converts sound waves into voltage. The transmitted signal is also known as the ping and the received signal is known as the pong. By counting the elapsed time between the ping and the pong, the distance between the device and an object can be easily calculated by multiplying the elapsed time with the speed of sound. Note that the time measured represents the time it takes a pulse to travel to an object plus the time it takes to travel back to the receiver. Hence, the measured time is halved in calculating the appropriate distance.Distance = (Time elapsed / 2) * 340.29 m/s

2.1 LITERATURE SURVEY


Reviews of available literature of this project have been performed to ensure more understanding to construct ultrasonic distance meter. The areas that were focused are on behavior of ultrasound through journals, books, and internet. Progressive wave fields
The ultrasonic field produced by a transducer obeys all the physical laws of wave phenomena. It can be thought of as being produced by many small point sources making up the transducer face and thus producing a characteristic interference pattern at any point in the field. As ultrasound is 5

propagated fi-om the transducer, there is a zone where the overall beam size remains relatively constant (the near field), though there are many variations of intensity within the zone itself, both across and along the beam axis. This zone is followed by a zone where the beam diverges and becomes more uniform the far field. For a circular piston source of diameter D radiating sound of wavelength lambda, the Fresne zone extends from the transducer to a distance equal to D2/4 lambda (when D is much greater than lambda); beyond this distance is the Fraunhofer zone of the transducer [I]. For a given radius of the transducer, the near field becomes more complex (exhibiting more maxima and minima) as the wavelength of the ultrasound becomes shorter. Speed of Sound The speed, c at which ultrasonic vibrations are transmitted through a medium is inversely proportional to the square root of the product of the density, o and the adiabatic compressibility, B of the material, such that in equation 2.1. The speeds together with the frequency, f of the ultrasound determine the wavelength lambda,A of the waves that are propagated as in equation 2.2.

Measurement of ultraslow dynamic Ultrasonic sensors are commonly used for a wide variety of noncontact 0presence, proximity, or distance measuring applications. These devices typically transmit a short burst of ultrasonic sound toward a target, which reflects the sound back to the sensor. The system then measures the time for the echo to return to the sensor and computes the distance to the target using the speed of sound in the medium .The wide variety of sensors currently on the market differ from oneanother in their mounting configurations, environmental sealing, and electronic features. Acoustically3 they operate at different frequencies and have different radiation pattern. Variation in the speed of sound Variation in the wavelength of sound Variation in the attenuation of sound Variation of the amplitude
6

3.1 EMBEDDED SYSTEM


Embedded system employs a combination of software and hardware to perform a specific function. It is a part of a larger system which may not be a computer. It works in a reactive and time constrained environment.

3.1.1 Introduction to Embedded System

In general, "embedded system" is not a strictly definable term, as most systems have some element of extensibility or programmability. For example, handheld computers share some elements with embedded systems such as the operating systems and
7

microprocessors which power them, but they allow different applications to be loaded and peripherals to be connected. Moreover, even systems which don't expose programmability as a primary feature generally need to support software updates. On a continuum from "general purpose" to "embedded", large application systems will have subcomponents at most points even if the system as a whole is "designed to perform one or a few dedicated. Any electronic system that uses a CPU chip, but that is not a general-purpose workstation, desktop or laptop computer is known as embedded system. Such systems generally use microprocessors or microcontroller or they may use customdesigned chips or both. They are used in automobiles, planes, trains, space vehicles, machine tools, cameras, consumer and office appliances, cell phones, and billions of microprocessors are shipped every year for a myriad of applications. In embedded systems, the software is permanently set into a read-only memory such as a ROM or flash memory chip, in contrast to a general-purpose computer that loads its programs into RAM each time. Sometimes, single board and rack mounted generalpurpose computers are called embedded computers if used to control. We are leaving in the Embedded World. Embedded systems are controlled by one or more main processing cores that are typically microcontrollers. The key characteristic, however, is being dedicated to handle a particular task, which may require very powerful processors. For example, air traffic control systems may usefully be viewed as embedded, even though they involve mainframe computers and dedicated regional and national networks between airports and radar sites. Each radar probably includes one or more embedded systems of its own. Since the embedded system is dedicated to specific tasks, design engineers can optimize it to reduce the size and cost of the product and increase the reliability and performance. Some embedded systems are mass-produced, benefiting from economies of scale. Physically, embedded systems range from portable devices such as digital watches and music players, to large stationary installations like traffic lights, factory controllers, or the systems controlling nuclear power plants. Complexity varies from low, with a single microcontroller chip, to very high with multiple units, peripherals and networks mounted inside a large chassis or enclosure. These days designers have many choices in microprocessors/ microcontrollers. Especially, in 8- bit and 32 bit, the available variety really may overwhelm even an experienced designer. Selecting a right microprocessor
8

may turn out as a most difficult first step and it is getting complicated as new devices continue to pop-up very often.

3.1.2 Applications of Embedded System

Embedded systems, finds many applications in real life. As its definition states, it is a combination of software and hardware. Some applications are stated as below:

Telecommunications systems employ numerous embedded systems from telephone switches for the network to mobile phones at the end-user. Computer networking uses dedicated routers and network bridges to route data.

Many household appliances, such as microwave ovens, washing machines and dishwashers, are including embedded systems to provide flexibility, efficiency and features.

Transportation systems from flight to automobiles increasingly use embedded systems. Automobiles, electric vehicles, and hybrid vehicles are increasingly using embedded systems to maximize efficiency and reduce pollution. Other automotive safety systems include anti-lock braking system (ABS) and Electronic Stability Control (ESC).

Medical equipment is continuing to advance with more embedded systems for vital signs monitoring, electronic stethoscopes for amplifying sounds, and various medical imaging for non-invasive internal inspections.

In addition to commonly described embedded systems based on small computers, a new class of miniature wireless devices called motes are quickly gaining popularity as the field of wireless sensor networking rises.

3.2 MICROCONTROLLER
Microcontroller, as the name suggests, are small controllers. They are like single chip computers that are often embedded into other systems to function as processing/ controlling unit[7]. For example, the remote control you are using probably has microcontrollers inside that do decoding and other controlling functions. They are also
9

used in automobiles, washing machines, microwave ovens, toys etc. where automation is needed.

3.2.1

Introduction

A microcontroller is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Program memory in the form of NOR flash or OTP ROM is also often included on chip, as well as a typically small amount of RAM. Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in personal computers or other general purpose applications. The Intel MCS-51 is a Harvard architecture, single chip microcontroller (C) series which was developed by Intel in 1980 for use in embedded systems. Intel's original versions were popular in the 1980s and early 1990s. While Intel no longer manufactures the MCS-51, binary compatible derivatives remain popular today. In addition to these physical devices, several companies also offer MCS-51 derivatives as cores for use in FPGAs or ASICs designs. Intel's original MCS-51 family was developed using NMOS technology, but later versions, identified by a letter C in their name (e.g., 80C51) used CMOS technology and consumed less power than their NMOS predecessors. This made them more suitable for battery-powered devices. The AT89C2051 is a low-voltage, high-performance CMOS 8-bit microcomputer with 2K bytes of Flash programmable and erasable read-only memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C2051 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications. The AT89C2051 provides the following standard features: 2K bytes of Flash, 128 bytes of RAM, 15 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, a precision analog comparator, on-chip oscillator and clock circuitry. In addition, the AT89C2051 is designed with static logic for operation down to zero frequency and supports two software selectable power saving
10

modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The power-down mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.

3.2.2.PIN DIAGRAM OF 89c51

11

Fig. No. 2 AT89C51 is an 8-bit microcontroller and belongs to Atmel's 8051 family. ATMEL 89C51 has 4KB of Flash programmable and erasable read only memory (PEROM) and 128 bytes of RAM. It can be erased and program to a maximum of 1000 times.

In 40 pin AT89C51, there are four ports designated as P1, P2, P3 and P0. All these ports are 8-bit bi-directional ports, i.e., they can be used as both input and output ports. Except P 0 which needs external pull-ups, rest of the ports have internal pull-ups. When 1s are written to these port pins, they are pulled high by the internal pull-ups and can be used as inputs. These ports are also bit addressable and so their bits can also be accessed individually.

12

Port P0 and P2 are also used to provide low byte and high byte addresses, respectively, when connected to an external memory. Port 3 has multiplexed pins for special functions like serial communication, hardware interrupts, timer inputs and read/write operation from external memory. AT89C51 has an inbuilt UART for serial communication. It can be programmed to operate at different baud rates. Including two timers & hardware interrupts, it has a total of six interrupts.

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 highimpedance inputs. Port 0 may also be configured to be the multiplexed loworder address/data bus during accesses to external program and data memory. In this mode P0 has internal pullups. Port 0 also receives the code bytes during Flash programming, and

13

outputs the code bytes during program verification. External pullups are required during program verification.

Port 1

Port 1 is an 8-bit bidirectional I/O port with internal pullups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal pullups 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 pullups.Port 1 also receives the low-order address bytes during Flash programming and program verification.

Port 2

Port 2 is an 8-bit bidirectional I/O port with internal pullups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the internal pullups 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 pullups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses (MOVX @ DPTR). In this application it uses strong internal pull-ups when emitting 1s. During accesses to external data memory that use 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification.
14

Port 3

Port 3 is an 8-bit bidirectional I/O port with internal pullups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the internal pullups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups. Port 3 also serves the functions of various special features of the AT89C51 as listed below:

Port 3 also receives some control signals for Flash programming and Programming verification.

RST

15

Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device.

ALE/PROG

Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash 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 one ALE pulse is skipped during each access to external Data Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcrontroller is in external execution mode.

PSEN

Program Store Enable is the read strobe to external program memory. When the AT89C51 is executing code from external program memory, PSEN is ctivated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory.

16

EA/VPP

External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will beinternally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP.

XTAL1

Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2 Output from the inverting oscillator amplifier.

4.1 Ultrasonic Distance Sensor


This "ECHO" Ultrasonic Distance Sensor from Rhydolabz is an amazing product that
17

Fig.No. 3 provides very short (2CM) to long-range (4M) detection and ranging. The sensor provides precise, stable noncontact distance measurements from 2cm to 4 meters with very high accuracy. Its compact size, higher range and easy usability make it a handy sensor for distance measurement and mapping. The board can easily be interfaced to microcontrollers where the triggering and measurement can be done using one I/O pin. The sensor transmits an ultrasonic wave and produces an output pulse that corresponds to the time required for the burst echo to return to the sensor. By measuring the echo pulse width, the distance to target can easily be calculated.
Are you afraid that your brand new Hummer is going to get scratched while parking it in a tight space? Do you have trouble backing your large Mercedez S-class into your small garage? Fear no more! Our ultrasonic ParKontroller can sense how far you are away from the wall or a hidden object behind your car and warn you visually and audibly using LEDs and speaker respectively. 18

It works on the sonar principle, sending an ultrasound burst and listening for first echo. The burst generated by the oscillator built around U4D (you must set the frequency using TR2 to have 40 kHz or the maximum sensitivity), U4E buffers the output and U4F boost the signal doubling the voltage span across the TX piezo transducer . A new burst is generated each time the decade counter (4017 in the circuit diagram) is in its reset state, that is output 0 is selected. The other outputs (1 to 9) are scanned sequentially following burst generation, until an echo strikes back the RX receiver. It is then amplified by the transistor input stage, triggering the monostable built around U4A U4B. The monostable stops temporarly the scanning, and a led corresponding to the obstacle distance appears as continuously lit. The buzzer bleeps when the first led (minimum distance) This was one of my first designs: it is an ultrasonic parking sonar. Based on an ultrasonic amplifier from an article seen on a 1982 magazine, it was once installed on the rear bumper of my Volvo Station Wagon. It served very well for many years. Connecting it to the reverse gear lights, it switches on automatically and shows you the distance to the nearest obstacle (according to his beam) on a led scale. When the last led lights, a buzzer is also activated telling you to stop immediately. It works on the sonar principle, sending an ultrasound burst and listening for first echo. The burst generated by the oscillator built around U4D (you must set the frequency using TR2 to have 40 kHz or the maximum sensitivity), U4E buffers the output and U4F boost the signal doubling the voltage span across the TX piezo transducer .

DIMENSIONS (mm)

19

Fig.No.4

Object Positioning
The ECHO sensor cannot accurately measure the distance to an object that: Is more than 4 meters away, Fig 1 That has its reflective surface at a shallow angle so that sound will not be reflected back towards the sensor (Angle < 90), Fig 2. or Is too small to reflect enough sound back to the sensor. In addition, if your ECHO sensor is mounted low on your device, you may detect sound reflecting off the floor.

Ideal Case Of Positioning

Error Case

20

Fig.No. 5

TARGET OBJECT MATERIAL


In addition, objects that absorb sound or have a soft or irregular surface, such as a stuffed animal, may not reflect enough sound to be detected accurately. The ECHO sensor will detect the surface of water; however it is not rated for outdoor use or continual use in a wet environment. Condensation on its transducers may affect performance and lifespan of the DEVICE.
BOARD SPECIFICATION

VCC -- Power supply input marked A 5V supply has to be provided for its reliable performance SIG -- Signal pin marked B This pin is used for output PWM to the host controller GND -- Ground level of Power supply marked C The marking D points to the Burst LED Indicator that shows measurement in progress

21

Fig.No. 6

Calculations to be performed by your HOST microcontroller


Speed of ultrasonic wave is 347 m/s equivalent to 0 .0347cm/sec ( Temperature dependent) Timer count multiplied with 200nsec (0.2sec ), internal clock period gives the echo time (say, Et). As per the eqn: Speed = distance/time => echo distance (Ed) = echo speed(Ev) *echo time(Et) ie, distance (Ed) = 0.0347cm per sec (Ev) * Et sec The obtained distance will be twice the actual distance since it gives the to and fro distance of the object as per the to and fro time equated to the equation: (ie, Et stands for 2Et). Thus the obtained distance divided by 2 gives actual distance of the obstacle. ie, Actual distance = Ed/2 As per the above illustration your equation is, Ed = Ev * (Et/2) implies Et = 2 * Ed /Ev equivalent to Et = (2/0.0347) * Ed Implies Et = 58 * Ed equivalent to Ed (in cm)= Et(in sec)/58.

3.2.2 ECHO SENSOR

FEATURES
Professional EMI/RFI Complaint PCB Layout Design for Noise Reduction
22

Range : 2 cm to 4 m Accurate and Stable range data Data loss in Error zone eliminated Modulation at 40 KHz Mounting holes provided on the circuit board Triggered externally by supplying a pulse to the signal pin 5V DC Supply voltage Current - < 20mA Bidirectional TTL pulse interface on a single I/O pin can communicate with 5 V TTL or 3.3V CMOS microcontrollers Echo pulse: positive TTL pulse, 87 s minimum to 30 ms maximum(PWM) On Board Burst LED Indicator shows measurement in progress 3-pin header makes it easy to connect using a servo extension cable, no soldering required

3.2.3 EXAMPLE OF AN ULTRASONIC DISTANCE METER


23

Leica Disto D2 Low Cost Laser Distance Meter


The small partner - for indoor applications Measuring distances and calculating results with the smallest laser distance meter of the world. The Leica DISTO D2 Laser Distance Meter is a compact and handy base model was specifically designed for indoor applications. Shortcut keys for addition, subtraction, area and volume calculation make measuring fast and very reliable. The last 10 measurements are also stored. As with all Leica laser distance meters, the laser dot is clearly visible. You can always see your targeting point, even if the target object is in a hard to access area. Leica DISTO D2 Laser Distance Meter you will never use a measuring tape again! Measuring made easy your versatile partner with a modern look!

Fig.No. 7

Features : Leica DISTO D2 Laser Distance Meter

24

Features

Your advantages

Measuring range 0.05 up to 60 m; typical Precise, fast and reliable indoor measurements accuracy 1.0 mm Shortcut keys Easy-to-use and rapid access to frequently used functions Illuminated 3-line display Flip-out end-piece Stake out function Time delay release Simple Pythagorean functions Measured values can be read even in the dark Measure from edges or corners Stake-out equal distances Measure without shake Indirect height and width measurements for inaccessible positions IP 54 Splash and dust proof

1. Quick and easy


Measure distances at the touch of a button and calculate areas or volumes.

2. Measure from edges or corners


With the flip-out end-piece you are equipped for any measuring situation.

3. Small and handy


Thanks to its ergonomic and compact design with soft grip, the Leica DISTO D2 sits securely in your hand and fits into any pocket .

25

4. Clear display
The results are shown on a 3-line display. The illuminated display is easily readable, even in the dark .

5. Simply clever
Minimum / maximum measurements, tracking and storage of results makes your work much easier.

4.2 MAIN MODULES


Some of the main modules of the project entitled design and implementation of echo ultrasonic distance meter are discussed in details with circuit diagram as below.

4.2.1. LCD
A liquid crystal display (LCD) is a flat panel display, electronic visual display, or video display that uses the light modulating properties of liquid crystals. Liquid crystals do not emit light directly. LCDs are available to display arbitrary images (as in a general-purpose computer display) or fixed images which can be displayed or hidden, such as preset words, digits, and 7segment displays as in a digital clock. They use the same basic technology, except that arbitrary images are made up of a large number of small pixels, while other displays have larger elements. LCDs are used in a wide range of applications including computer monitors, televisions, instrument panels, aircraft cockpit displays, and signage. They are common in consumer devices such as video players, gaming devices, clocks, watches, calculators, and telephones, and have replaced cathode ray tube (CRT) displays in most applications. They are available in a wider range of screen sizes than CRT and plasma displays, and

26

since they do not use phosphors, they do not suffer image burn-in. LCDs are, however, susceptible to image persistence.[1] The LCD screen is more energy efficient and can be disposed of more safely than a CRT. Its low electrical power consumption enables it to be used in battery-powered electronic equipment. It is an electronically modulated optical device made up of any number of segments filled with liquid crystals and arrayed in front of a light source (backlight) or reflector to produce images in color or monochrome. Liquid crystals were first discovered in 1888.[2] By 2008, worldwide sales of televisions with LCD screens exceeded annual sales of CRT units; the CRT became obsolete for most purposes.

4.2.2.CRYSTAL OSCILLATOR
crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters and receivers. The most common type of piezoelectric resonator used is the quartz crystal, but other piezoelectric materials including polycrystaline ceramics are used in similar circuits. Quartz crystals are manufactured for frequencies from a few tens of kilohertz to tens of megahertz. More than two billion crystals are manufactured annually. Most are used for consumer devices such as wristwatches, clocks, radios, computers, and cellphones. Quartz crystals are also found inside test and measurement equipment, such as counters, signal generators, and oscilloscopes.

27

Fig.No. 8 What Are Crystal Oscillators Crystal oscillators are oscillators where the primary frequency determining element is a quartz crystal. Because of the inherent characteristics of the quartz crystal the crystal oscillator may be held to extreme accuracy of frequency stability. Temperature compensation may be applied to crystal oscillators to improve thermal stability of the crystal oscillator. Crystal oscillators are usually, fixed frequency oscillators where stability and accuracy are the primary considerations. For example it is almost impossible to design a stable and accurate LC oscillator for the upper HF and higher frequencies without resorting to some sort of crystal control. Hence the reason for crystal oscillators. The frequency of older FT-243 crystals can be moved upward by crystal grinding. A practical example of a Crystal Oscillator This is a typical example of the type of crystal oscillators which may be used for say converters. Some points of interest on crystal oscillators in relation to figure 1.

28

Fig.No.9 The transistor could be a general purpose type with an Ft of at least 150 Mhz for HF use. A typical example would be a 2N2222A. The turns ratio on the tuned circuit depicts an anticipated nominal load of 50 ohms. This allows a theoretical 2K5 ohms on the collector. If it is followed by a buffer amplifier (highly recommended) I would simply maintain the typical 7:1 turns ratio. I have included a formula for determining L and C in the tuned circuits of crystal oscillators in case you have forgotten earlier tutorials. Personally I would make L a reactance of around 250 ohms. In this case I'd make C a smaller trimmer in parallel with a standard fixed value. We can use an overtone crystal for the crystal and set L * C for the odd particular multiple of overtone wanted in your crystal oscillators

29

4.2.3. BRIDGE RECTIFIER

Fig.No. 10 A diode bridge is an arrangement of four (or more) diodes in a bridge circuit configuration that provides the same polarity of output for either polarity of input. When used in its most common application, for conversion of an alternating current (AC) input into a direct current (DC) output, it is known as a bridge rectifier. A bridge rectifier provides full-wave rectification from a two-wire AC input, resulting in lower cost and weight as compared to a rectifier with a 3-wire input from a transformer with a centertapped secondary winding.[1] The essential feature of a diode bridge is that the polarity of the output is the same regardless of the polarity at the input. The diode bridge circuit is also known as the Graetz circuit after its inventor, physicist Leo Graetz, and the single-phase version, with four diodes, may also be referred to as an H bridge. Basic operation According to the conventional model of current flow (originally established by Benjamin Franklin and still followed by most engineers today[2]), current is assumed to flow through electrical conductors from the positive to the negative pole. In actuality, free electrons in a conductor nearly always flow from the negative to the positive pole. In the
30

vast majority of applications, however, the actual direction of current flow is irrelevant. Therefore, in the discussion below the conventional model is retained. In the diagrams below, when the input connected to the left corner of the diamond is positive, and the input connected to the right corner is negative, current flows from the upper supply terminal to the right along the red (positive) path to the output, and returns to the lower supply terminal via the blue (negative) path.

4.2.4.RESET SWITCH

Fig.No. 11 In electronics and technology, a reset button is a button that can reset a device. On video game consoles, the reset button restarts the game, losing the player's unsaved progress. On personal computers,[NB 1] the reset button clears the memory and reboots the machine forcibly. Reset buttons are found on circuit breakers to reset the circuit. This button can cause data corruption so this button often doesn't exist on many machines. Usually, in
31

computers and other electronic devices, it is present as a small button, possibly recessed into the case or only accessible by a pin or similar thin object, to prevent it being pressed accidentally . 4.2.5 Resistors Resistance may be defined as the property of a substance which opposes (or restrict) the flow of an electric current through it. Resistors are truly ubiquitous. There are almost as many types as there are applications. Resistors are employed in amplifiers as loads for active devices, in bias networks, and as feedback elements. In combination with capacitors they establish time constants and act as filters. They are employed for setting operating currents and signal levels.Resistors are the most commonly used component in electronics and their purpose is to create specified values of current and voltage in a circuit. The symbol for a resistor is shown in the following diagram (upper: American symbol, lower: European symbol.)

Fig.No. 12 The unit for measuring resistance is the OHM. (The Greek letter - called Omega). Higher resistance values are represented by "k" (kilo-ohms) and M (mega ohms). For example, 120 000 is represented as 120k, while 1 200 000 is represented as 1M2. The dot is generally omitted as it can easily be lost in the printing process. In some circuit diagrams, a value such as 8 or 120 represents a resistance in ohms. Another common practice is to use the letter E for resistance in ohms. The letter R can also be used. For example, 120E (120R) stands for 120 , 1E2 stands for 1R2 etc.
32

Different types of resistors:

Linear: Resistance values remains constant and do not change if the voltage or current-flow alters. Carbon Resistance/ Colour Code Resistance This is the most common type of low wattage resistor. The resistive material is of carbon clay comosition and the leads are made of tinned copper. The resistor is enclosed in a plastic case to prevent the entry of moisture and other harmful elements from outside.
Resistor Marking

Resistance value is marked on the resistor body. Most resistors have 4 bands. The first two resistance value is marked on the resistor body. Most resistors have 4 bands. The first two bands provide the number for the resistance and the third band provides the number of zeros. The fourth band indicates he tolerance. Tolerance values of 5%, 2%, and 1% are most commonly available. Following drawn table shows the colour coding chart for general purpose resistors, used in most of electronics circuits. Table: 5.2 Colour Coding Chart Colour Silver Gold Black Brown Red Orange Yellow 0 1 2 3 4 Digit Multiplier x 0.01 x 0.1 x1 x 10 x 100 x1k x 10 k 1% 2% 100*10-6/K 50*10-6/K 15*10-6/K 25*10-6/K Tolerence 10% 5% TC Silver

33

Green Blue Violet Grey White

5 6 7 8 9

x 100 k x1M x 10 M x 100 M x1G

0.5% 0.25% 0.1% 10*10-6/K 5*10-6/K

1*10-6/K

Potentiometer (POT):

Fig.No.13 Potentiometers (also called pots) are variable resistors, used as voltage or current regulators in electronic circuits. By means of construction, they can be divided into 2 groups: coated and wire-wound. With coated potentiometers, insulator body is coated with a resistive material. There is a conductive slider moving across the resistive layer, increasing the resistance between slider and one end of pot, while decreasing the resistance between slider and the other end of pot. Potentiometers come in many different shapes and sizes, with wattage ranging from 1/4W (coated pots for volume control in amps, etc) to tens of watts (for regulating high currents). Several different pots are shown in the photo , along with the symbol for a potentiometer.

34

Fig.No. 14 Resistance adjustments are made via a screwdriver. Exception is the trim pot on the lower right, which can be adjusted via a plastic shaft. Particularly fine adjusting can be achieved with the trim pot in the plastic rectangular casing (lower middle). Its slider is moved via a screw, so that several full turns is required to move the slider from one end to the other.
Surface mount resistors:

Surface Mount resistors are manufactured in many standard sizes. Our trainer kits use the common sizes that teach the beginner to handle them comfortably. The size code describes the dimensions of the resistor. A 1206 resistor is 0.12 inch long and 0.06 inch wide. Surface Mount resistors are marked with a three digit code for 5% tolerance devices and a four digit code for 1% or 2% devices. In the case of three digit codes the first two digits specify the first two digits of the resistance and the third digit is a multiplier (number of zeroes). In the case of four digit codes the first three digits specify the first three digits of the resistance and the fourth digit is a multiplier (number of zeroes). The figure arrived at is the resistance in Ohms. Resistors of less than 10W are marked with an R in place of the decimal point e.g. 6.8W is marked 6R8. A commonly used devices in Surface Mount circuits is the 0W jumper which is identical, in shape and size, to the usual Surface Mount resistor. This device is marked 000 and has no resistance. It is used to bridge one track over another on the PCB.
35

Fig.No. 15
Non linear

But there are circuits that require resistors to change value with a change in temperate or light. This function may not be linear, hence the name Non-linear Resistors. There are several types of nonlinear resistors, but the most commonly used include: 1. NTC resistors (Negative Temperature Co-efficient) - their resistance lowers with temperature rise. 2. PTC resistors (Positive Temperature Co-efficient) - their resistance increases with the temperature rise. 3. LDR resistors (Light Dependent Resistors) - their resistance lowers with the increase in light. 4. VDR resistors (Voltage dependent Resistors) - their resistance critically lowers as the voltage exceeds a certain value.

36

Fig.No. 16

4.2.6 Transformers
For electronic devices to function it is necessary to have a DC power supply. Batteries and rechargeable cells can fulfill the role, but a much more efficient way is to use a POWER SUPPLY. The basic component of a power supply is a transformer to transform the 220V "mains" to a lower value, say 12V. A common type of transformer has one primary winding which connects to the 220V and one (or several) secondary windings for the lower voltages. Most commonly, cores are made of E and I laminations, but some are made of ferromagnetic material.

37

Fig No 17

Fig.No. 18 With the transformer, manufacturers usually supply a diagram containing information about the primary and secondary windings, the voltages and maximal currents. In the case where the diagram is missing, there is a simple method for determining which winding is the primary and which is the secondary: a primary winding consists of thinner wire and more turns than the secondary. It has a higher resistance - and can be easily be tested by ohmmeter. Figure 3.6d shows the symbol for a transformer with two independent secondary windings, one of them has three tappings, giving a total of 4 different output voltages. The 5v secondary is made of thinner wire with a maximal current of 0.3A, while the other winding is made of thicker wire with a maximal current of 1.5A. Maximum voltage on the larger secondary is 48V, as shown on the figure. Note that voltages other than those marked on the diagram can be produced - for example, a voltage between tappings marked 27V and 36V equals 9V, voltage between tappings marked 27V and 42V equals 15V, etc.

38

Fig.No. 19

4.2.7 Power supply


The electrical power is almost exclusively generated, transmitted and distributed in the form of ac because of economical consideration but for operation of most if the electronic devices and circuits, dc supply is required. Dry cells and batteries can be used for this purpose. They have the advantages of being portable and ripple free but their voltages are low, they need frequent replacement and are expensive in comparison to conventional dc power supplies. Now-a-days, almost all electronic equipment include a circuit that converts ac supply into dc supply. The part of equipment that converts ac into dc is called the dc power supply. Parts of a power supply Transformer Rectifier Filter Voltage regulator

Block Diagram of Power Supply

Fig.No.20
39

Transformer Transformer is used to step-up or step-down (usually to step down) the supply voltage as per need of the solid-state electronic devices and circuits to be supplied by the dc power supply. It can provide isolation from the supply line-an important safety consideration. It may also include internal shielding to prevent unwanted electrical noise signal on the power line from getting into the power supply and possibly disturbing the load. Rectifier Rectifier is a device which converts the sinusoidal ac voltage into either positive or negative pulsating dc. P-N junction diode, which conducts when forward biased and practically does not conduct when reverse biased, can be used for rectification i.e. for conversion of ac into dc. The rectifier typically needs one, two or four diodes. Rectifiers may be either half-wave or full-wave (Centre-tap or bridge) type. In electronic circuits, mostly Centre-tap rectifier is used. Filter The output voltage from a rectifier circuit has a pulsating character i.e. it contains unwanted ac components (components of supply frequency f and its harmonics) along with dc component. For most supply purposes, constant direct voltage is required than that furnished by a rectifier. To reduce ac components from the rectifier output voltage a filter circuit is required. Thus filter is a device which passes dc component to the load and blocks ac components of the rectifier output. Filter is typically constructed from reactive circuit elements such as capacitors and/or inductors and resistors. Voltage regulator The magnitude of output dc voltage may vary with the variation of either the input ac voltage or the magnitude of load current. So at the output of a rectifier filter combination of a voltage regulator is required to provide an almost constant dc voltage at the output of the regulator. The voltage regulator may be constructed from a Zener diode, and/or discrete transistors, and/or integrated circuits (ICs). Its main function is to maintain a constant dc output voltage. To obtain +5V dc output voltage, 7805 voltage regulator is used[5]. A fixed voltage power supply producing constant +5V consists of step down transformer, a bridge rectifier, filter capacitors C1 and 3 terminal regulator IC LM7805.
40

A step down transformer is selected in such a way that it produces 9V at the input of IC. This power supply is capable of supplying +5v and load current up to 500m A. The capacitor C2 connected between output terminal and ground cancels out any inductive effect due to long distribution leads. Input capacitor C1 is used to improve transient response of the regulator IC, i.e. response of regulator to sudden changes in load. It is also helpful in reducing the noise present in the output. Dropout voltage (VinVout) needs to be at least 2V under all operating conditions for proper operation of regulator.

Fig.No.21

4.2.8

PCB (Printed Circuit Board)

A printed circuit board, or PCB, is used to mechanically support and electrically connect electronic using conductive pathways, tracks or signal traces etched from copper sheets laminated onto a non-conductive substrate. It is also referred to as printed wiring board (PWB) or etched wiring board. A PCB populated with electronic components is a printed circuit assembly (PCA), also known as a printed circuit board assembly (PCBA). PCBs are inexpensive, and can be highly reliable. They require much more layout effort and higher initial cost than either wire-wrapped or point-to-point constructed circuits, but are much cheaper and faster for high-volume production. Much of the electronics
41

industry's PCB design, assembly, and quality control needs are set by standards that are published by the IPC organization History The inventor of the printed circuit was the Austrian engineer Paul Eisler (19071995) who, while working in England, made one circa 1936 as part of a radio set. Around 1943 the USA began to use the technology on a large scale to make rugged radios for use in World War II. After the war, in 1948, the USA released the invention for commercial use. Printed circuits did not become commonplace in consumer electronics until the mid-1950s, after the Auto-Sembly process was developed by the United States Army. Before printed circuits (and for a while after their invention), point-to-point construction was used. For prototypes, or small production runs, wire wrap or turret board can be more efficient. Predating the printed circuit invention, and similar in spirit, was John Sargrove's 1936-1947 Electronic Circuit Making Equipment (ECME) which sprayed metal onto a Bakelite plastic board. The ECME could produce 3 radios per minute. During World War II, the development of the anti-aircraft proximity fuse required an electronic circuit that could withstand being fired from a gun, and could be produced in quantity. The Centralab Division of Globe Union submitted a proposal which met the requirements: a ceramic plate would be screenprinted with metallic paint for conductors and carbon material for resistors, with ceramic disc capacitors and subminiature vacuum tubes soldered in place. Materials Conducting layers are typically made of thin copper foil. Insulating layers dielectric are typically laminated together with epoxy resin prepreg. The board is typically coated with a solder mask that is green in color. Other colors that are normally available are blue and red. There are quite a few different dielectrics that can be chosen to provide different insulating values depending on the requirements of the circuit. Some of these dielectrics
42

are polytetrafluoroethylene (Teflon), FR-4, FR-1, CEM-1 or CEM-3. Well known prepreg materials used in the PCB industry are FR-2 (Phenolic cotton paper), FR-3 (Cotton paper and epoxy), FR-4 (Woven glass and epoxy), FR-5 (Woven glass and epoxy), FR-6 (Matte glass and polyester), G-10 (Woven glass and epoxy), CEM-1 (Cotton paper and epoxy), CEM-2 (Cotton paper and epoxy), CEM-3 (Woven glass and epoxy), CEM-4 (Woven glass and epoxy), CEM-5 (Woven glass and polyester). Thermal expansion is an important consideration especially with BGA and naked die technologies, and glass fiber offers the best dimensional stability.FR-4 is by far the most common material used today. The board with copper on it is called "copper-clad laminate". In the US, copper foil thickness can be specified in non-metric or in metric units. The non-metric units are usually ounces per square foot. One ounce per square foot is 0.001344 inches (34 micrometres) (etching) The vast majority of printed circuit boards are made by bonding a layer of copper over the entire substrate, sometimes on both sides, (creating a "blank PCB") then removing unwanted copper after applying a temporary mask (e.g. by etching), leaving only the desired copper traces. A few PCBs are made by adding traces to the bare substrate (or a substrate with a very thin layer of copper) usually by a complex process of multiple electroplating steps. The PCB manufacturing method primarily depends on whether it is for production volume or sample/prototype quantities. Commercial (production quantities, usually PTH)

Silk screen printing -the main commercial method. Photographic methods. Used when fine linewidths are required. Hobbyist/prototype (small quantities, usually not PTH)

Laser-printed resist: Laser-print onto paper (or wax paper), heat-transfer with

an iron or modified laminator onto bare laminate, then etch.

Print onto transparent film and use as photomask along with photo-sensitized
43

boards. (i.e. pre-sensitized boards), Then etch. (Alternatively, use a film photoplotter).

Laser resist ablation: Spray black paint onto copper clad laminate, place into CNC laser plotter. The laser raster-scans the PCB and ablates (vaporizes) the paint where no resist is wanted. Etch. (Note: laser copper ablation is rarely used and is

considered experimental.

Use a CNC-mill with a spade-shaped (i.e. 45-degree) cutter or miniature end-mill

to route away the undesired copper, leaving only the traces. There are three common "subtractive" methods (methods that remove copper) used for the production of printed circuit boards:
1. Silk screen printing uses etch-resistant inks to protect the copper foil.

Subsequent etching removes the unwanted copper. Alternatively, the ink may be conductive, printed on a blank (non-conductive) board. The latter technique is also used in the manufacture of hybrid circuits.
2. Photoengraving uses a photomask and developer to selectively remove

a photoresist coating. The remaining photoresist protects the copper foil. Subsequent etching removes the unwanted copper. The photomask is usually prepared with a photoplotter from data produced by a technician using CAM, or computer-aided manufacturing software. Laser-printed transparencies are typically employed for phototools; however, direct laser imaging techniques are being employed to replace phototools for high-resolution requirements.
3. PCB milling uses a two or three-axis mechanical milling system to mill away

the copper foil from the substrate. A PCB milling machine (referred to as a 'PCB Prototyper') operates in a similar way to a plotter, receiving commands from the host software that control the position of the milling head in the x, y, and (if relevant) z axis. Data to drive the Prototyper is extracted from files generated in PCB design software and stored in HPGL or Gerber file format.
44

"Additive" processes also exist. The most common is the "semi-additive" process. In this version, the unpatterned board has a thin layer of copper already on it. A reverse mask is then applied. (Unlike a subtractive process mask, this mask exposes those parts of the substrate that will eventually become the traces.) Additional copper is then plated onto the board in the unmasked areas; copper may be plated to any desired weight. Tin-lead or other surface platings are then applied. So a Silk screen printing uses etch-resistant inks to protect the copper foil. Photoengraving uses a photomask and developer to selectively remove a photoresist coating. The remaining photoresist protects the copper foil. PCB milling uses a two or three-axis mechanical milling system to mill away the copper foil from the substrate. These are the three main parts of patterning the pcb by using photomask . Etching Chemical etching is done with ferric chloride, ammonium persulfate, or sometimes hydrochloric acid. For PTH (plated-through holes), additional steps of electroless deposition are done after the holes are drilled, then copper is electroplated to build up the thickness, the boards are screened, and plated with tin/lead. The tin/lead becomes the resist leaving the bare copper to be etched away. Lamination Some PCBs have trace layers inside the PCB and are called multi-layer PCBs. These are formed by bonding together separately etched thin boards. Drilling Holes through a PCB are typically drilled with tiny drill bits made of solid tungsten carbide. The drilling is performed by automated drilling machines with placement controlled by a drill tape or drill file. These computer-generated files are also called numerically controlled drill(NCD) files or "Excellon files". The drill file describes the location and size of each drilled hole. These holes are often filled with annular rings
45

(hollow rivets) to create vias. Vias allow the electrical and thermal connection of conductors on opposite sides of the PCB. Most common laminate is epoxy filled fiberglass. Drill bit wear is partly due to embedded glass, which is harder than steel. High drill speed necessary for cost effective drilling of hundreds of holes per board causes very high temperatures at the drill bit tip, and high temperatures (400-700 degrees) soften steel and decompose (oxidize) laminate filler. Copper is softer than epoxy and interior conductors may suffer damage during drilling. When very small vias are required, drilling with mechanical bits is costly because of high rates of wear and breakage. In this case, the vias may be evaporated by lasers. Laserdrilled vias typically have an inferior surface finish inside the hole. These holes are called micro vias. It is also possible with controlled-depth drilling, laser drilling, or by pre-drilling the individual sheets of the PCB before lamination, to produce holes that connect only some of the copper layers, rather than passing through the entire board. These holes are called blind vias when they connect an internal copper layer to an outer layer, or buried vias when they connect two or more internal copper layers and no outer layers. The walls of the holes, for boards with 2 or more layers, are made conductive then plated with copper to form plated-through holes that electrically connect the conducting layers of the PCB. For multilayer boards, those with 4 layers or more, drilling typically produces a smearof the high temperature decomposition products of bonding agent in the laminate system. Before the holes can be plated through, this smearmust be removed by a chemical de-smear process, or by plasma-etch. Removing (etching back) the smear also reveals the interior conductors as well. Exposed conductor plating and coating Electrochemical migration (ECM) is the growth of conductive PCBsare plated with solder, tin, or gold over nickel as a resist for etching away the unneeded underlying copper. After PCBs are etched and then rinsed with water, the soldermask is applied, and
46

then any exposed copper is coated with solder, nickel/gold, or some other anti-corrosion coating. Matte solder is usually fused to provide a better bonding surface or stripped to bare copper. Treatments, such as benzimidazolethiol, prevent surface oxidation of bare copper. The places to which components will be mounted are typically plated, because untreated bare copper oxidizes quickly, and therefore is not readily solderable. Traditionally, any exposed copper was coated with solder by hot air solder levelling (HASL). This solder was a tin-lead alloy, however new solder compounds are now used to achieve compliance with the RoHS directive in theEU and US, which restricts the use of lead. One of these lead-free compounds is SN100CL, made up of 99.3% tin, 0.7% copper, 0.05% nickel, and a nominal of 60ppm germanium. It is important to use solder compatible with both the PCB and the parts used. An example is Ball Grid Array (BGA) using tin-lead solder balls for connections losing their balls on bare copper traces or using lead-free solder paste. Other platings used are OSP (organic surface protectant), immersion silver (IAg), immersion tin, electroless nickel with immersion gold coating (ENIG), and direct gold plating (over nickel). Edge connectors, placed along one edge of some boards, are often nickel plated thengold plated. Another coating consideration is rapid diffusion of coating metal into Tin solder. Tin forms intermetallics such as Cu5Sn6 and Ag3Cu that dissolve into the Tin liquidus metal filaments on or in a printed circuit board (PCB) under the influence of a DC voltage bias. Silver, zinc, and aluminum are known to grow whiskers under the influence of an electric field. Silver also grows conducting surface paths in the presence of halide and other ions, making it a poor choice for electronics use. Tin will grow "whiskers" due to tension in the plated surface. Tin-Lead or Solder plating also grows whiskers, only reduced by the percentage Tin replaced. Reflow to melt solder or tin plate to relieve surface stress lowers whisker incidence.

47

Solder resist Areas that should not be soldered may be covered with a polymer solder resist (solder mask) coating. The solder resist prevents solder from bridging between conductors and creating short circuits. Solder resist also provides some protection from the environment. Solder resist is typically 20-30 micrometres thick. Screen printing Line art and text may be printed onto the outer surfaces of a PCB by screen printing. When space permits, the screen print text can indicate component designators, switch setting requirements, test points, and other features helpful in assembling, testing, and servicing the circuit board. Screen print is also known as the silk screen, or, in one sided PCBs, the red print. Lately some digital printing solutions have been developed to substitute the traditional screen printing process. This technology allows printing variable data onto the PCB, including serialization and barcode information for traceability purposes.Other features helpful in assembling,testing and servicing the circuit board .reflow to melt solder or tin plate to relieve surface stress lowers whisker incidence. Screen printing will take 1 hour minimum in order it exposed in sunlight so that we got the desired print on the red screen. And after that we check it for the exact design we need for assembling,testing and servicing the circuit board. Afterthat print is ready for pcb. Test Unpopulated boards may be subjected to a bare-board test where each circuit connection (as defined in a netlist) is verified as correct on the finished board. For high-volume production, a Bed of nails tester, a fixture or a Rigid needle adapter is used to make contact with copper lands or holes on one or both sides of the board to facilitate testing. A
48

computer will instruct the electrical test unit to apply a small voltage to each contact point on the bed-of-nails as required, and verify that such voltage appears at other appropriate contact points. A "short" on a board would be a connection where there should not be one; an "open" is between two points that should be connected but are not. Printed circuit assembly After the printed circuit board (PCB) is completed, electronic components must be attached to form a functional printed circuit assembly, or PCA (sometimes called a "printed circuit board assembly" PCBA). In through-hole construction, component leads are inserted in holes. In surface-mount construction, the components are placed on pads or lands on the outer surfaces of the PCB. In both kinds of construction, component leads are electrically and mechanically fixed to the board with a molten metal solder. There are a variety of soldering techniques used to attach components to a PCB. High volume production is usually done with machine placement and bulk wave soldering or reflow ovens, but skilled technicians are able to solder very tiny parts (for instance 0201 packages which are 0.02 in. by 0.01 in.) by hand under a microscope, using tweezers and a fine tip soldering iron for small volume prototypes. Some parts are impossible to solder by hand, such as ball grid array (BGA) packages. Often, through-hole and surface-mount construction must be combined in a single assembly because some required components are available only in surface-mount packages, while others are available only in through-hole packages. Another reason to use both methods is that through-hole mounting can provide needed strength for components likely to endure physical stress, while components that are expected to go untouched will take up less space using surface-mount techniques. After the board has been populated it may be tested in a variety of ways:

To

facilitate

these

tests,

PCBs

While

the

power

is

off, visual

inspection, automated optical inspection.


49

JEDEC guidelines for PCB component placement, soldering, and inspection are commonly used to maintain quality control in this stage of PCB manufacturing.

While the power is off, analog signature analysis, power-off testing. While the power is on, in-circuit test, where physical measurements (i.e. voltage, While the power is on, functional test, just checking if the PCB does what it had

frequency) can be done.

been designed for. May be designed with extra pads to make temporary connections. Sometimes these pads must be isolated with resistors. The in-circuit test may also exercise boundary scan test features of some components. In-circuit test systems may also be used to program nonvolatile memory components on the board. In boundary scan testing, test circuits integrated into various ICs on the board form temporary connections between the PCB traces to test that the ICs are mounted correctly. Boundary scan testing requires that all the ICs to be tested use a standard test configuration procedure, the most common one being the Joint Test Action Group (JTAG) standard. Protection and packaging PCBs intended for extreme environments often have a conformal coating, which is applied by dipping or spraying after the components have been soldered. The coat prevents corrosion and leakage currents or shorting due to condensation. The earliest conformal coats were wax; modern conformal coats are usually dips of dilute solutions of silicone rubber, polyurethane, acrylic, or epoxy. Another technique for applying a conformal coating is for plastic to be sputtered onto the PCB in a vacuum chamber. Many assembled PCBs are static sensitive, and therefore must be placed in antistatic bags during transport. When handling these boards, the user must be grounded (earthed) Improper handling techniques might transmit an accumulated static charge through the board, damaging or destroying components. Even bare boards are sometimes static

50

sensitive. Traces have become so fine that it's quite possible to blow an etch off the board (or change its characteristics) with a static charge. Design

Schematic capture or schematic entry is done through an EDA tool. Card dimensions and template are decided based on required circuitry and case of Deciding stack layers of the PCB. 4 to 12 layers or more depending on design complexity. Ground plane and Power plane are decided. Signal planes where signals are routed are in top layer as well as internal layers.

the PCB. Determine the fixed components and heat sinks if required.

Line impedance determination using dielectric layer thickness, routing copper thickness and trace-width. Trace separation also taken into account in case of differential signals. Microstrip, stripline or dual stripline can be used to route signals.

Placement of the components. Thermal considerations and geometry are taken into account. Vias and lands are marked.

Soldering How to solder First a few safety precautions: Never touch the element or tip of the soldering iron They are very hot (about 400C) and will give you a nasty burn. Take great care to avoid touching the mains flex with the tip of the iron. The iron should have a heatproof flex for extra protection. An ordinary plastic flex will melt immediately if touched by a hot iron and there is a serious risk of burns and electric shock.

51

Always return the soldering iron to its stand when not in use. Never put it down on your workbench, even for a moment!

Work in a well-ventilated area. The smoke formed as you melt solder is mostly from the flux and quite irritating. Avoid breathing it by keeping you head to the side of,not above your work.

Fig.No. 22 Wash your hands after using solder Solder contain lead which is poisonous metal.preparing the soldering iron Place the soldering iron in its stand and plug in. The iron will take a few minutes to reach its operating temperature of about 400C. Dampen the sponge in the stand The best way to do this is to lift it out the stand and hold it under a cold tap for a moment, then squeeze to remove excess water. It should be damp, not dripping wet.This is called 'tinning' and it will help the heat to flow from the iron's tip to the joint. It only needs to be done when you plug in the iron, and occasionally while soldering if you need to wipe the tip clean on the sponge.

52

Fig.No. 23 You are ready to start soldering Hold the soldering iron like a pen, near the base of the handle. Imagine you are going to write your name! Remember to never touch the hot element or tip. Touch the soldering iron onto the joint to be made. make sure it touches both the component lead and the track. Hold the tip there for a seconds and Using a heat sink. Some components, such as transistors, can be damaged by heat when soldering so if you are not an expert it is wise to use a heat sink clipped to the lead between the joint and the component body. You can buy a special tool, but a standard crocodile clip works just as well and is cheaper. What is solder? Solder is an alloy (mixture) of tin and lead, typically 60% tin and 40% lead. It melts at a temperature of about 200C. Coating a surface with solder is called 'tinning' because of the tin content of solder. Lead is poisonous and you should

53

Fig.No. 24 always wash your hands after using solder. Solder for electronics use contains tiny cores of flux, like the wires inside a mains flex. The flux is corrosive, like an acid, and it cleans the metal surfaces as the solder melts. This is why you must melt the solder actually on the joint, not on the iron tip. Without flux most joints would fail because metals quickly oxidise and the solder itself will not flow properl

4.2.9 VOLTAGE REGULATOR

54

Fig No.25

OUTPUT CURRENT UP TO 1.5A THERMAL OVERLOAD PROTECTION SHORT CIRCUIT PROTECTION OUTPUT TRANSISTOR SOA PROTECTION
FEATURES OF ULTRASONIC DISTANCE METER Fast & easy access. Long distance communication. Wireless communication

55

APPLICATIONS: For scientists. For colleges. For radar.

y onto a dirty, oxidised, metal surface.

4.3 CIRCUIT DIAGRAM

56

Fig No. 26

4.4 Automatic Ranging with the TX Output

57

Transistor Q1 in Schematic 2 is acting as an inverter. If we are to make any sense of the TX ASCII output, we must invert the TX serial data before presenting it to the PIC18F2620 RX input. The PIC18F2620 doesnt have a native method of inverting the data that is coming into its EUSART. So, Q1 acting as a logic inverter is a necessary hardware addition. From the looks of Screenshot 4, it appears 64 inches is the consensus distance determination.

Fig No. 27

5.1Results

58

The resulting signal is shown below. Channel 2 (bottom) shows the transmitted pulse that has amplitude of 12V. A single pulse in the picture is actually a set of five short pulses. Channel 1 (top) shows the received signal that has amplitude of 5V. A ghost signal caused by the receiver directly picking up the transmitted signal is also present on Channel 1. Since the ghost signal is gated out when calculating the effective distance, its of no significance in terms of our result. The picture below shows the same signal on a smaller time scale The receive signal will be closer to the transmitted signal if the object is closer to the device and vice versa. Throughout our circuit-testing phase we encountered countless noise issues and random behaviors that compromised our result. For instance, running a wire near the MCU caused spikes and flickers in both the transmitted and received signal. Orienting the whiteboard in certain direction sometimes caused random noise and even gently squeezing a wire would throw off the signal. Since we are dealing with ultrasound, it was imperative to reduce noise as much as possible to get a clean signal out from the circuit and the MCU. On the contrary to our prediction that the fan in the lab or other groups radio-frequency device would interfere with our circuit, they had no effect on our circuit as far as the noise was concerned. We tried turning on and off the fan and even asked couple neighboring group to turn off their motors or transmitters, but that didnt affect the quality of our output. receiver. The range of our device was approximately 40cm. As mentioned before, the effective range is proportional to the power of the transmitted pulses. With 9V transmitting pulses we got a range of about 34cm; 12V pulses gave us 40cm range and increasing the voltage gave us slightly greater range. We had to keep in mind that further amplification would result in more noise and that we put more emphasis on accuracy than the range for our application.
59

The source of some of the random circuit behaviors we

encountered is still in question. Nonetheless, we managed to get a clean signal from the

To test the accuracy of the device we measured the actual distance between the sensors and the object with a ruler and compared that to the distance reading we got from the LCD. As you can see from Figure 8, Park Controllers distance reading is very close to the actual distance measured by the ruler. Further testing showed that Park Controller has an accuracy of 1cm with one exception. Readings done in the first distance interval (0 15cm) gave some misreading. For instance, an actual distance of 5cm was read as 10cm and actual distance of 10cm was read as 14cm. We believe that placing an object too close to the ultrasonic transducers causes the receiver to be unable to pick up the transmitted wave properly like in subsequent distance intervals. Park Controller emits ultrasounds at 40kHz, which is beyond what human ears can hear, so it causes no harm to the public. Furthermore, it can be used by anyone who can power on the device, watch the LED indicators, or hear the warning beeps from the piezo speaker.

6.1Conclusion
Park Controller can detect an object within a range of 40cm with accuracy of 1cm in the distance interval of 15 to 40cm. If we were to do this project again, we would try to
60

increase the effective range and enhance the accuracy by implementing some kind of noise reduction circuit. Furthermore, we would like to implement an array of ultrasonic receiver so that we can determine the location of the object with respect to the ultrasonic transmitter. Finally, usability of the Park Controller can be improved by making it completely portable and attachable to the bumper of any commercial vehicles.

6.2 Intellectual Property Considerations


As discussed in the High Level Design section, Park Controller is a standalone device that is designed using off-the-shelf parts and basic circuit design principles; hence none of the copyright, patents, or intellectual property is violated.

6.3 Ethical Considerations

1. To accept responsibility in making decisions consistent with the safety, health and welfare of the public, and to disclose promptly factors that might endanger the public or the environment 2. Our initial goal of this project was to create a parking sensor system with a range of up to 1m with accuracy of 1cm. However, our resulting range was shorter with less accuracy. Had this been used by a daily driver it may cause safety issues, but since our Park Controller will not be commercialized and distributed to public for use, it will not endanger the public or the environment. 3. To be honest and realistic in stating claims or estimates based on available data 4. All results and data listed are shown and verified through multiple sets of tests done in lab. It will also be thoroughly demonstrated in lab during check out session.
61

5. To improve the understanding of technology, its appropriate application, and potential consequences 6. We took a simple concept of SONAR technology and used our hardware and software skills and intuition to create a useful application. Throughout the process of delivering the final product, we gained much more than just understanding the technology and its application. This hands-on experience made us realize how other variables such as random noise, wire capacitance, and temperature can affect the circuit and compromise the result. These factors are often ignored in theory-based classes where mostly ideal situation is considered. We believe that its important to learn and experience them to appreciate real-life engineering.

7. To seek, accept, and offer honest criticism of technical work, to acknowledge and correct errors, and to credit properly the contributions of others We tried to seek advice and help from Professor Land and all TAs available in the lab whenever no definite solution was readily seen by both members of the group. They even took their own time to help us go through the problem during busy times and we are very appreciated by their support.

8. To treat fairly all persons regardless of such factors as race, religion, gender, disability, age, or national origin The Park Controller can be used by persons of all race, religion, gender, age, and origin. We also tried to accommodate people with disabilities. For instance, we designed an array of LEDs to indicate the proximity of the object for people with hearing problems. We also implemented a speaker to emit warning beeps for people with poor sights. Regardless of these implementations, a small portion of the people around the world would not necessarily be using this device if they are unable to drive for various reasons.
62

10. To assist colleagues and co-workers in their professional development and to support them in following this code of ethics. Ethics is taken seriously at this institution and is repeatedly mentioned and encouraged at the beginning of each semester by many professors. As students, we follow this code of ethics and try to remind it to friends and classmates whenever we see fit.

63

You might also like