Design and Development of Microcontroller Based Ultrasonic Flaw Detector
Mrs. Safia A. Kazmi
Department of Electrical Engineering
Zakir Husain College of Engineering & Technology
Aligarh Muslim University, Aligarh
India
E-mail: safiakazmi@gmail.com
Rupendra K. Pachauri
Department of Electrical Engineering
Zakir Husain College of Engineering & Technology
Aligarh Muslim University, Aligarh
India
E-mail: rupendra_pachauri@rediffmail.com
Abstract The microcontroller based ultrasonic flaw detector is developed to determine the distance of flaw (if
existing) using ultrasonic sensors (SRF04). The ultrasonic sensors are based on wave phenomenon in different
mediums (air, water, fluid etc.) to measure the distance flaw. These distance sensors detects echoes from objects
and evaluate their propagation time with amplitude. The intelligent microcontroller is used to implement the
formula of time and speed for determining the distance of flaw which displays using LCD. The range of the
measurement depends upon types of ultrasonic transducers are used. The designed flaw detector can be used for
a range from 32cm to 250 cm (This range has been practically implemented).
Introduction
Sensors work as a sensing organs of technical systems. They collect information about variables in the
environment as well as non-electrical system parameters and provide the results as electrical signals. Sensors are
an essential part of power generation and distribution systems, automated industrial processes, traffic
management systems, as well as environmental and health maintenance systems. Even relatively complex
sensors, which previously could be realized only as scientific instruments are now feasible as compact devices at
low costs.
Further, the proliferation of control systems opened a high application potential for ultrasonic sensors.
Ultrasonic sensors are based on the medium. These sensors measure quantities, which often are immediately
relevant for humans, such as short distances e.g. level measurement within a mans reach or very long distances
e.g. obstruction detection in pipelining process. Moreover, these sensors imply generic approaches which could
be used for other gases and even for liquids.
Objectives
The object of this work is to replace the old traditional flaw detector, used in several applications. In present
work the flaw position is measured electronically by using LCD display by replacing the heavy and bulky
circuits with the compact circuits using intelligent Microcontroller. The bulky pressing switch is replaced by the
small and one touch tactile switch. It saves electric consumption, saves the no. of man power, through one LCD
display and one microcontroller as well as ultrasonic receiver & transmitter sensors.
Ultrasonic Waves
Sound waves with frequency range from 20 Hz to 20 KHz are responsive to the human ear. Vibrations above
this frequency are termed as ultrasonic. Ultrasonic signals are affected by the properties of the medium. Thus
while passing through a particular medium these signals get attenuated. The attenuation of ultrasonic signal is
taken as the means for the measurement of distance of the target and for different other applications (Raju, 2001)
Ultrasonic distance sensors are used to detect the presence of flaw by measuring the distance. They do so by
evaluating the echo of a transmitted pulse with concern to its travel time. Time dependent control of sensitivity
is used to compensate the distance dependency of the echo amplitude, while different reflection properties are
compensated by an automatic gain control, which holds the average echo amplitude constant. Echo amplitude
therefore has very little influence on the accuracy of the distance measurement provided the signal to noise ratio
is not very low. By considering whether the echo has been received within a time window, i.e. a time interval,
which can be preset by the user, the distance range is given in which the sensor responds to the presence of an
object. Using this technique, interference can be suppressed and relevant objects are monitored more reliably
(pandey, et al 2008).
A variety of ultrasonic presence sensors with different operation frequencies are designed for different distance
range and different resolution. Such sensors are employed in the automation of industrial processes as well as in
traffic control systems, for example to monitor, whether car parking places are occupied. Ultrasonic distance
meters are used for the measurement of the filling level in containers or the height of material on conveyor belts.
Ultrasonic waves are generally used two types which are given as
(a) Longitudinal wavesLongitudinal waves exist when the motion of the particle and the medium is parallel to the direction of
propagation of the waves. These types of waves are referred as L waves. Since these can travel in solid, liquid
and gases. These waves can be easily detected einert
).
(b) Transverse wavesIn this case particles of the medium vibrate at right angle to the direction of propagation of the waves. These are
also called shear waves.
Ultrasonic Distance Sensors
Ultrasonic sonar sensors actively transmit acoustic waves and receive them later. This is done by ultrasonic
transducers, which transform an electrical signal into an ultrasonic wave and vice versa. The ultrasound signal
carries the information about the variables to be measured. The task for the ultrasonic sensors is not merely to
detect ultrasound, as intelligent sensors they have to extract the information carried by the ultrasonic signals
efficiently and with high accuracy. To achieve this performance, the signals are processed, demodulated and
evaluated by dedicated hardware. Algorithms based on models for the ultrasonic signal propagation and the
interaction between the physical or chemical variables of interest are employed (munich,1994). Furthermore,
techniques of a sensor specific signal evaluation are being applied. Ultrasonic sensors can be embedded into a
control system that accesses additional sensors, combines information of the different sensors, handles the bus
protocols and initiates actions.
Fig.1 - Receiving & transmitting process of ultrasonic echoes for flaw detection
Distance sensors based on ultrasonic principles use the travel time and amplitude of the received signal (e.g. the
echo) to derive the presence, distance, and type of a sound reflecting object. Intelligent evaluation methods
allow target objects to be recognized and classified. Furthermore, lateral details can be recognized by
introducing defined relative movement between the sensor and the object (munich,1994).
Present Work
Receiver & Transmitter
The designed circuit detects the ultrasonic which returned from the flaw. The output of the detection circuit is
detected using the comparator. At this time, the operational amplifier of the single power supply is used instead
of the comparator. The operational amplifier amplifies and outputs the difference between the positive input and
the negative input. In case of the operational amplifier which doesn'
t have the negative feedback, the inverter is
used for the drive of the ultrasonic sensor.
Signal Amplification Circuit
The ultrasonic signal received with at the receiver sensor is amplified by 1000 times (60dB) of voltage with the
operational amplifier with two stages. Therefore, for the positive input of the operational amplifiers, the half of
the power supply voltage is applied as the bias voltage. Then the alternating current signal can be amplified on
4.5V central voltage. When using the operational amplifier with the negative feedback, the voltage of the
positive input terminal and the voltage of the negative input terminal becomes equal approximately (kumar,
kumar & gupta2002).
Resonator
In this system 4-MHz resonator is used. It is 1 microsecond per count for the counter count up time. Timer1 to
use for capture is a maximum of 65535 counts (16 bits). So, a maximum of 65.535 milliseconds count is made.
The propagation speed of the sound in air is 343 m/second in case of 20C. In the time which goes and returns
in the 10-m distance, it is 20m/343m/sec = 0.0583 seconds (58.3 milliseconds). As the range meter this time, it is
an exactly good value.
LCD Display Unit
Frequently, an 8051 microcontroller interacts with the outside world using input and output devices. One of the
most common devices connected to the 8051 is an LCD display. Some of the common LCDs connected to the
8051 are 16x2 and 20x2 display (Kalsi).
Fig.2 - Block diagram of ultrasonic flaw detector
Microcontroller
The 8051 developed and launched in the early 80s, is one of the most popular micro controller in use today. It
has a reasonably large amount of built in ROM and RAM. In addition it has the ability to access external
memory. The generic 8x51 is used to define the device. The value of X defining the kind of ROM, i.e.
X=0.indictes none=3, indicates mask ROM, X=7, Indicates EPROM of Flash (Ayala, 1996).
Features:
(1)
8-bit CPU. (consisting of the A and B registers)
(2)
4K on- chip ROM
(3)
128 byte on- chip RAM
(4)
32 I/O lines. (Four- 8 bit ports, labeled P0, P1,)
(5)
Two 16 bit timers/Counters
(6)
Full duplex serial data receiver / transmitter.
(7)
5- interrupt sources with two priority levels (two external and three internal)
(8)
On- chip oscillator (frequency = 11.0592 MHz)
Power Supply Circuit
+9V are used for the transmitter and the receiver and +5V voltage is used for the lighting-up of LCDs, because
they are controlled by PIC. It is converting voltage with the transistor to make control at the operating voltage of
PIC (+5V). Because C-MOS inverters are used, it is possible to do ON/OFF at high speed comparatively.
Fig.3 - Power Supply for the Ultrasonic flaw detector
Ultrasonic Wave Propagation Speed In Different Medium (Air, Water, Fluid, Etc.)
The sound wave propagation speed in different mediums as in air, water, fluid etc. is changed by the
temperature. Generally in air- At 0C, it is 331m/sec. At 20C, it is 343m/sec. At 40C, it is 355.5m/sec. The time
which the sound wave takes to go and return is 2m/331.5m/sec = 0.006033 seconds = 6.033 milliseconds. As we
see that the ultrasonic sound speed varies according the temperature of the medium. (Ferris, Torng & Lin, 2000),
(Carullo & Parvis, 2001).
Experimental Set- Up & Results
As a system designed of the Ultrasonic flaw detector, for measurement the distance of flaw or obstruction so the
three tactile buttons A, B and D are used as shown in the flow chart operations. First of all switch ON the
system, LCD shows the message as the instructions as press A for speed measurement and press B for distance
measurement of flaw and last key D to refresh the system.
For measuring the distance of the flaw, first calibrate the system for defining the speed in a particular
atmosphere. By this method the system defines or calculates the speed of the ultrasonic waves or echo in
environmental atmosphere in which the system calculates the distance of flaw.
The system measure the distance of flaw, press the buttons A, B, and D one by one and find out the results on
the LCD in centimetres which is unit of the length. As defined by the mathematical relationship between the
time, speed and distance as
Distance = Speed * Time
Accordingly, the above relationship calculated all the parameters as Time, which is calculated by the help of
the Timers/Counters in intelligent micro controller. The above relation is programmed to ROM in Assembly
Language Programming (ALP) and in last the results is shown in the LCD display device. e.g. taking different
times results with the help of the system.
Further Algorithm is showing the operation of the system in figure.
Fig.4 - Flow chart operation of the ultrasonic flaw detector for key identification
Fig.5 - Flow chart operation for distance measurement of flaw
Results
The results obtained on the basis of experimental work as shown in table (1) and a graph is plotted between
actual distance of flaw and distance measured by system is shown in fig.
Fig.6 - Module of ultrasonic flaw detector showing the flaw as an obstruction
S.NO.
ACTUAL
DISTANCE
OF THE
FLAW
X- AXIS
ECHO
POSITON
MEASURED
BY SYSTEM
Y- AXIS
(Cm)
(Cm)
1.
32
32
2.
42
42
3.
50
45
4.
60
12
5.
70
60
6.
85
34
7.
100
22
8.
112
19
9.
128
128
10.
140
110
11.
155
56
12.
165
78
13.
185
46
14.
195
34
15.
210
210
16.
220
76
17.
235
84
18.
245
245
Table-(1) Results between actual distance of flaw and distance measured by system
Fig.7- Graph between actual distance of flaw and distance measured by the system
Conclusion
Evidence has been given that a lot of different ultrasonic sensors can be developed for operation in air. Topics
for future research and development work comprise: advanced physical models and algorithms to improve the
sensor functionality and accuracy, application of digital signal processors to provide improved sensor signal
evaluation at competitive costs, extension of the intelligent ultrasonic sensor concept forming a decentralized
multiple sensor system with bus communication capabilities. The application potential for ultrasonic sensors is
apparent in many areas, for example in private housing, health care, environment protection, traffic and
automotive control or industrial process control. In the future, ultrasonic sensors with improved functionality
will continue to expand their applications.
References
AG. Munich: Ultrasonic Sensors in Air Valentin Magori Corporate Research and Development,
Siemens, Germany 1994 ultrasonic symposium, pp-1-5.
Alessio Carullo and Marco Parvis: An Ultrasonic Sensor for Distance Measurement in Automotive
Applications, Senior Member IEEE, sensors journal, vol. 1, no. 2, August 2001, pp- 143-148.
http://www.8051projects.info/intro_11.asp
H.S. Kalsi: Transducer & Display system, Chapter-03-04-05, TMH Publication.
Kenneth J. Ayala: The 8051 Microcontroller Architecture, Programming and Applications, West
Publishing Company, College and school Division, 1996.
Murugavel Raju: Ultrasonic Distance Measurement with the MSP430 Application Report
SLAA136A October 2001, pp- 1-7.
Robert W. Weinert Very high frequency piezoelectric transducers, IEEE Trans. on Sonics and
Ultrasonic .January 1977.Vol SU 24 No 1 pp 48-53.
Satish Pandey, Dharmendra Mishra, Anchal Srivastava, Atul Srivastava, R. K. Shukla:Ultrasonic
Obstruction Detection and Distance Measurement Using AVR Micro Controller, Sensors &
Transducers journal, vol. 95, Issue 8, August 2008, pp-49-57.
Timothy L.J. Ferris, Jingsyan Torng and Grier C.I. Lin: Design of two tone ultrasonic distance
measurement system, The First Japanese-Australian Joint Seminar, March 2000, Adelaide, Australia,
pp- 1-6.
Yudhisther Kumar, Ashok Kumar and Rita Gupta: Calibration of ultrasonic flaw detector, National
Seminar of ISNT, Chennai, 2002, pp-1-7.