ultrasonic object detection

30
DEVICE CONTROL USING ULTRASONIC Bachelor of Technology

Upload: amalesh-ravi

Post on 03-Apr-2015

1.321 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: ultrasonic object detection

DEVICE CONTROL USING ULTRASONIC

A Mini-Project Report

Submitted in partial fulfilment of the

requirements for the Degree of

Bachelor of Technology

in

Electronics and Communication Engineering

by

AMALESH RAVI, ASWATHI V P

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

GOVERNMENT ENGINEERING COLLEGE, WAYANAD

DECEMBER 2010

Page 2: ultrasonic object detection

GOVERNMENT ENGINEERING COLLEGE

WAYANAD

CERTIFICATE

This is to certify thatAMALESH RAVI, ASWATHI V P has successfully completed

the mini-project titled DEVICE CONTROL USING ULTRASONIC towards the

partial full�llment for the award of the degree of Bachelor of Technology in Electronics

and Communication Engineering.

Project Guide Head of Department

O�ce Seal

Page 3: ultrasonic object detection

TO

to our parents,teachers and friends....

Page 4: ultrasonic object detection

Acknowledgements

Primarily we thank the lord almighty for his external support for this project. We extend

sincere thanks to our Principal Prof.Vidyasagar for his wholehearted cooperation.

We express our sincere thanks to Dr.Abdul Hameed, Head of the Department ,Elec-

tronics and communication Engineering for his encouragement and constant support is

making this project successful. We would like to thank Dr.Thajudeen Ahammed, our

project co-ordinator for giving us technical advice and timely instruction, without which

we could never have been able to complete the work in time.

We also wish to thank Ms.Bindima T our project guide, for providing valuable guid-

ance. An excellent group teaching and non-teaching sta� had helped us with this project.

We owe much, to the assistance they give us while doing this project.

Last, but not the least we would like to thank our parents and friends for all the

moral support and help that they given us.

i

Page 5: ultrasonic object detection

Abstract

This project details the implementation of object detection which can be succesfully de-

scribes a new economical solution for device switching control systems. The presented

device control system can be used for di�erent sophisticated switching applications. The

intelligent control software, which has been developed using, embedded C. This equip-

ment is used to control applications like Automatic water tap, Obstacle detection for

blinds, advanced burglar alarm, parking aid etc. The equipment is controlled by a mi-

crocontroller. An LCD display is used to show the state of devices

ii

Page 6: ultrasonic object detection

Contents

Acknowledgements i

Abstract ii

1 Introduction 1

2 BLOCK DIAGRAM 2

3 BLOCK DIAGRAM DESCRIPTION 4

3.1 Power supply: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43.1.1 7805 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43.1.2 Ultrasonic unit: . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

4 CIRCUIT DIAGRAM 6

5 CIRCUIT DIAGRAM DESCRIPTION 8

5.1 Power supply: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85.2 Microcontroller: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85.3 Ultrasonic device: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85.4 Devices: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

6 WORKING 10

7 PCB LAYOUT 11

7.1 PCB Layout: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117.2 PCB Silkscreen: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

8 PCB PREPARATION TECHNIQUES 14

8.1 PCB Preparation: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148.2 Etching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158.3 Drilling: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168.4 Soldering: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

9 SOFTWARE SECTION 19

iii

Page 7: ultrasonic object detection

CONTENTS iv

10 CONCLUSION 20

Page 8: ultrasonic object detection

List of Figures

2.1 BLOCK DIAGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

4.1 Ultrasonic object detection . . . . . . . . . . . . . . . . . . . . . . . . . . 7

7.1 PCB LAYOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127.2 PCB SILKSCREEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

v

Page 9: ultrasonic object detection

LIST OF FIGURES vi

Page 10: ultrasonic object detection

Chapter 1

Introduction

The project details the implementation of object detection using the ultrasonic waves.

As the human ear has an audible perception range of 20 Hz to 20 kHz, it is insensitive

to ultrasonic waves, and hence the ultrasound waves can be used for applications in

industries/vehicles without hindering human activity. In our project we are ultrasonic

transmitter and receiver of 40 Khz. Here we are using pulse echo method for object

detection.

1

Page 11: ultrasonic object detection

Chapter 2

BLOCK DIAGRAM

2

Page 12: ultrasonic object detection

Chapter 2. BLOCK DIAGRAM 3

DIAGRAM.png

Figure 2.1: BLOCK DIAGRAM

Page 13: ultrasonic object detection

Chapter 3

BLOCK DIAGRAM DESCRIPTION

3.1 Power supply:

AC power should be recti�ed to DC, �ltered and must be regulated in this section. Diode

recti�ers are mainly used. Capacitor �lters and regulator ICs like 78XX can be used for

regulation.

3.1.1 7805

The Lm 7805C is a 3 terminal positive regulator which has a �xed output voltage of 5

volts. The regulator can provide local on-card regulation, eliminating the distribution

problem associated with single point distribution. It employs internal current limiting,

thermal shut down and safe area protection making it essentially in destructible.

3.1.2 Ultrasonic unit:

This consists of a pair of ultrasonic transducers. This is capable of transmitting and

receiving high frequency sine wave. As the human ears audible perception range is 20

Hz to 20 kHz, it is insensitive to ultrasonic waves, and hence the ultrasound waves can

be used for applications in industries/vehicles without hindering human activity.

4

Page 14: ultrasonic object detection

Chapter 3. BLOCK DIAGRAM DESCRIPTION 5

Speci�cation:

Voltage: 6-12V(DC)

Current: max 2mA

Output Signal: 0-5V (Output high when obstacle in range)

Sentry Angle: max 15 degree

Sentry Distance: 2 8000mm

Pin: 3pin

Usage:

Supply module with 6-12V, the output will be 5V while obstacle in range, or 0V if not.

The out pin of this module is used as a switching output when anti-theft module, and

without the feet when ranging modules.

Note : the module should be inserted in the circuit before been power, which avoid

producing high level of misoperation. If not, then power again.

Module Working Principle:

Adopt IO trigger through supplying at least 10us sequence of high level signal. The mod-

ule automatically send eight 40khz square wave and automatically detect whether receive

the returning pulse signal. If there is signals returning, through outputting high level

and the time of high level continuing is the time of that from the ultrasonic transmitting

to receiving.

Advantage:

Simple, easy to adopt in system

Beam angle to avoid disruptions

Endurable

Page 15: ultrasonic object detection

Chapter 4

CIRCUIT DIAGRAM

6

Page 16: ultrasonic object detection

Chapter 4. CIRCUIT DIAGRAM 7

DIAGRAM.png

Figure 4.1: Ultrasonic object detection

Page 17: ultrasonic object detection

Chapter 5

CIRCUIT DIAGRAM DESCRIPTION

5.1 Power supply:

In our project we are using a 5V regulated power supply. The 230V AC supply is recti�ed

using bridge recti�er which uses 1N4001 diodes as their component. The recti�ed output

is �ltered using a high value capacitors (usually 100or 1000mf). Finally the �ltered

output is regulated using 7805 regulator IC so that we will get 5V regulated DC.

5.2 Microcontroller:

Here we are using the AT89S52 microcontroller for the control applications. It is an 8

bit microcontroller with 8kb of programmable memory. This is programmed to drive a

transistor and to make the ultrasonic device to work through a relay. It can also take

the output from the ultrasonic device and produce a corresponding output which in turn

can run a device.

5.3 Ultrasonic device:

It has 3 pins. Pin1 will be Vcc, pin2 is output and pin3 is ground. It consists of a low

cost microcontroller HT48R05A which can generate a 40Khz sine wave and it can also

8

Page 18: ultrasonic object detection

Chapter 5. CIRCUIT DIAGRAM DESCRIPTION 9

detect whether any wave is received or not. If any part of the transmitted sine wave is

detected then a HIGH output is produced at the out pin. If there is no received wave

then a LOW will be the result in the out pin.

5.4 Devices:

Microcontroller can drive a transistor and it is made to drive a relay through which we

can control any application circuit of this circuit such as automatic water tap, walking

aid for the blind, burglar alarm and any other devices.

Page 19: ultrasonic object detection

Chapter 6

WORKING

The circuit consists of an Ultrasonic device. It has three pins, one is vcc, second output

and third ground. The ultrasonic device gives a high output when an obstacle comes in

range of it. This output is fed to the base of a trasnsistor. Thus the transistor(BC557).

The transistor becomes on and this will cause the ground to shorted to the int0 pin of

the microcontroller. The microcontroller is programmed to get two high outputs at pin

1 and 2(i.e P1.0,P1.1). This is fed to the base of two transistors through an external pull

up since the output of the microcontroller is not su�cient for driving a transistor.

The emitter of the two transistors are coinnected to gnd and collector to one point

of the coil of the relay. The second point of the coil of the relay is connected directly to

Vcc,so that when a high output comes at �rst and second pin relays will be driven and

the connected devices will work,whatever it may be.

This circuit has vast application mainly on walking sticks of blind,Automatic water

tap,Advanced burglar alarm etc.

The circuit has a 12V supply from which we make a power supply of regulated 5V

with the help of 7805 regulator ic and capacitors.

10

Page 20: ultrasonic object detection

Chapter 7

PCB LAYOUT

7.1 PCB Layout:

7.2 PCB Silkscreen:

11

Page 21: ultrasonic object detection

Chapter 7. PCB LAYOUT 12

LAYOUT.png

Figure 7.1: PCB LAYOUT

Page 22: ultrasonic object detection

Chapter 7. PCB LAYOUT 13

Figure 7.2: PCB SILKSCREEN

Page 23: ultrasonic object detection

Chapter 8

PCB PREPARATION TECHNIQUES

8.1 PCB Preparation:

We need to generate a positive (copper black) UV translucent art work �lm. You will

never get a good board without good art work, so it is important to get the best possible

quality at this stage. The most important thing is to get a clear sharp image with a very

solid opaque black. Art work is done using ORCAD software. It is absolutely essential

that your PCB software prints holes in the middle of pads, which will act as centre

marks when drilling. It is virtually impossible to accurately hand-drill boards without

these holes. If you are looking to buy PCB software at any cost level and want to do

hand-protyping of boards before production, check that this facility is available when

de�ning pad and line shapes, the minimum size recommended (through-linking holes)

for reliable result is 50 mil, assuming 0.8mm drill size; 1 mil=(1/1000)th of an inch. You

can go smaller drill sizes, but through linking will be harder. 65 mil round or square

pads for normal components.

ICs, with 0.8 mm hole, will allow a 12.5mil, down to 10mil if you really need to.

Center-to-centre spacing of 12.5 mil tracks should be 25 mil-slightly less may b possible

if your printer can manage it. Take care to preserve the correct diagonal track-track

spacing on mitered corners; grid is 25 mil and track width 12.5mil. The art work must

be printed such that the printed side is in contact with PCB surface when exposing, to

14

Page 24: ultrasonic object detection

Chapter 8. PCB PREPARATION TECHNIQUES 15

avoid blurred edges. In practice, this means that if you design the board as seen from

the component side, the bottom (solder side) layer should be printed the �correct�

way round, and top side of the double-sided board must be printed mirrored.

8.2 Etching

Ferric chloride etchant is a messy stu�, but easily available and cheaper than most

alternatives. It attacks any metal including stainless steel. So when setting up a PCB

etching area, use a plastic or ceramic sink, with plastic �tting and screws wherever

possible, and seal any metal screws with silicon. Copper water pipes may be splashed

or dripped-on, so sleeve or cover them in plastic; heat-shrink sleeving is great if you are

installing new pipes. Fume extraction is not normally required, although a cover over

the tank or tray when not in use is a good idea. You should always use the hex hydrate

type of ferric chloride, which should be dissolved in warm water until saturation. Adding

a teaspoon of table salt helps to make the etchant clearer for easier inspection. Avoid

anhydrous ferric chloride. It creates a lot of heat when dissolved. So always add the

powder very slowly to water; do not add water to the powder, and use gloves and safety

glasses. The solution made from anhydrous ferric chloride doesn�t etch at all, so you

need to add a small amount of hydrochloric acid and leave it for a day or two. Always

take extreme care to avoid splashing when dissolving either type of ferric chloride, acid

tends to clump together and you often get big chunks coming out of the container and

splashing into the solution. It can damage eyes and permanently stain clothing. If you

are making PCBs in a professional environment where time is money you should get a

heated bubble-etch tank. With fresh hot ferric chloride, the PCB will etch in well under

5 mins. Fast etching produces better edge-quality and consistent line widths. If you

aren�t using a bubble tank, you need to agitate frequently to ensure even etching.

Warm the etchant by putting the etching tray inside a larger tray �lled with boiling

water.

Page 25: ultrasonic object detection

Chapter 8. PCB PREPARATION TECHNIQUES 16

8.3 Drilling:

If you have �ber glass (FR4) board, you must use tungsten carbide drill bits. Fiber glass

eats normal high-speed steel (HSS) bits very rapidly, although HSS drills are alright for

older larger sizes (> 2mm). Carbide drill bits are available as straight-shank or thick-

shank. In straight shank, the hole bit is the diameter of the hole, and in thick shank, a

standard size (typically about 3.5 mm) shank tapers down to the hole size. The straight-

shank drills are usually preferred because they break less easily and are usually cheaper.

The longer thin section provides more �exibility. Small drills for PCB use usually come

with either a set of collets of various sizes or a three-jaw chuck. Sometimes the 3-jaw

chuck is an optional extra and is worth getting for the time it saves on changing collets.

For accuracy, however, 3-jaw chucks are not brilliant, and small drill sizes below 1 mm

quickly formed grooves in the jaws, preventing good grip. Below 1 mm, you should use

collets, and buy a few extra of the smallest ones; keeping one collet per drill size as using

a larger drill in a collet will open it out and it no longer grips smaller drills well. You

need a good strong light on the board when drilling, to ensure accuracy. A dichroic

halogen lamp, under run at 9V to reduce brightness, can be mounted on a microphone

gooseneck for easy positioning. It can be useful to raise the working surface above 15

cm above the normal desk height for more comfortable viewing. Dust extraction is nice,

but not essential and occasional blow does the trick! A foot-pedal control to switch the

drill �o�� and �on� is very convenient, especially when frequently changing

bits. Avoid hole sizes less than 0.8 mm unless you really need them. When making two

identical boards, drill them both together to save time. To do this, carefully drill a 0.8

mm whole in the pad near each corner of each of the two boards, getting the center

as accurately as possible. For larger boards, drill a hole near the centre of each side

as well. Lay the boards on the top of each other and insert a 0.8 mm track pin in two

opposite corners, using the pins as pegs to line the PCBs up. Squeeze or hammer the pins

into boards, and then into the remaining holes. The two PCBs are now �nailed�

together accurately and can be drilled together.

Page 26: ultrasonic object detection

Chapter 8. PCB PREPARATION TECHNIQUES 17

8.4 Soldering:

Soldering is the joining together of two metals to give physical bonding and good elec-

trical conductivity. It is used primarily in electrical and electronic circuitry. Solder is a

combination of metals, which are solid at normal room temperatures and become liquid

between 180 and 200 degree Celsius. Solder bonds well to various metals, and extremely

well to copper. Soldering is a necessary skill you need to learn to successfully build elec-

tronics circuits. To solder you need a soldering iron. A modern basic electrical soldering

iron consists of a heating element, a soldering bit (often called a tip), a handle and a

power cord. The heating element can be either a resistance wire wound around a ceramic

tube, or a thick �lm resistance element printed on to a ceramic base. The element is then

insulated and placed into a metal tube for strength and protection. This is then ther-

mally insulated from the handle. The heating element of soldering iron usually reaches

temperatures of around 370 to 400 degree Celsius (higher than need to melt the solder).

The strength or power of a soldering iron is usually expressed in watts. Irons generally

used in electronics are typically in the range of 12 to 25 watts. Higher powered iron will

not run hotter. Most irons are available in a variety of voltages; 12V, 24V, 115V and

230V are most popular. Today most laboratories and repair shops use soldering irons,

which operate at 24V. You should always use this low voltage where possible, as it is

much safer. For advanced soldering work, you will need a soldering iron with tempera-

ture control. In this type of soldering irons, the temperature may be usually set between

200 and 450 degree Celsius.

Many temperature control soldering iron designed for electronics have a power rating

of around 40 to 50 watt. They will heat fast and give enough power for operation, but

are mechanically small.

You will occasionally see gas-powered soldering irons which use butane rather than

the main electrical supply to operate. They have a catalytic element which once warmed

up, continues to glow hot when gas passes over them. Gas powered soldering irons are

designed for occasional �on the spot� used for quick repairs, rather than for main

stream construction or for assembly work.

Page 27: ultrasonic object detection

Chapter 8. PCB PREPARATION TECHNIQUES 18

Currently, the best commonly available, workable, and safe solder alloy is 63/37.

That is, 63

The metals involved are not the only things to consider in a solder. Flux is vital to a

good solder joint. Flux is an aggressive chemical that removes oxide and impurities from

the parts to be soldered. The chemical reactions at the point(s) of connection must take

place for the metal to fuse. RMA type �ux (Rosin Mildly Active) is the least corrosive

of the readily available materials, and provides an adequate oxide removal.

In electronics, a 60/40 �xed core solder is used. This consists of 60

There are certain safety measures which you should keep in mind when soldering.

The tin material used in soldering contains dangerous substances like lead (40-60

When soldering, keep the room well ventilated and use a small fan or fume trap. A

proper fume trap of a fan will keep the most pollution away from your face. Professional

electronic workshops use expensive fume extraction systems to protect their workers.

Those fume extraction devices have a special �lter which �lters out the dangerous fumes.

If you can connect a duct to the output from the trap to the outside, that would be great.

Always wash hands prior to smoking, eating, drinking or going to the bathroom.

When you handle soldering tin, your hands will pick up lead, which needs to be washed

out from it before it gets to your body. Do not eat, drink or smoke while working with

soldering iron. Do not place cups, glasses or a plate of food near your working area.

Wash also the table sometimes. As you solder, at times there will be a bit of spitting

or sputtering. If you look you will see tiny balls of solder that shoot out and can be

found on your soldering table.

Page 28: ultrasonic object detection

Chapter 9

SOFTWARE SECTION

19

Page 29: ultrasonic object detection

Chapter 10

CONCLUSION

We can conclude that this low cost control system can be implemented in the areas like

walking sticks of blind,Automatic water tap,Advanced burglar alarm and which can be

used for humans welfare.

20

Page 30: ultrasonic object detection

Bibliography

[1] R THEAGARAJAN Microprocessors and Microcrocontrollers. 2005.

21