Anda di halaman 1dari 8

International Journal of Electronics,

Communication & Instrumentation Engineering


Research and Development (IJECIERD)
ISSN(P): 2249-684X; ISSN(E): 2249-7951
Vol. 5, Issue 4, Aug 2015, 1-8
TJPRC Pvt. Ltd.

MEASUREMENT AND CONTROL OF LEVEL USING ULTRASONIC SENSOR


G. PRATHYUSHA & B. RAM MURTHY
Department of Instrumentation & USIC, Sri Krishnadevaraya, Anantapur, Andhra Pradesh, India

ABSTRACT
The measurement and control of level is an important process parameter in process industries. In spite of having
different methods to complete this task, non-proximity type methods have its own significant features. In this regard we made
an attempt to measure and control of liquid level of tank using ultrasonic sensor. Ultrasonic level sensor works on the time of
flight principle using the speed of sound in terms of time. The developed prototype level measurement with ultrasonic
sensor was implemented and the results are evaluated. The results are in good agreement as compared with the standard
values. The developed prototype system is working properly and it is simple, portable and low cost.

KEY WORDS: Ultrasonic Sensor HCSR04, Level, Microcontroller, DC Motor, UART, LCD Display
INTRODUCTION
In order to adequacy and meticulous apply ultrasonic measurement technology to the fields such as industry,
materials and liquid levels to realize the factual measurements of measured objects, the present measuring technology based
on ultrasonic waves is analyzed and researched [2]. The measurement principles, hardware selection calibration, data
transmission and acquisition of the ultrasonic waves are introduced in seriatim. By adopting the ultrasonic measurement
technology to descry and analyze the liquid level of a storage tank, the results show that the ultrasonic measurement
technology has the characteristics of high measuring accuracy, safe and reliable operation, low cost, etc [1].
In this paper the level measurement is developed to measure the level or height of a fluid or solid containing in a
vessel [9].There are several instances required to monitor the liquid level of a tank. Depending upon the complexity situation,
there are different methods for measuring the liquid level. They are Float type, Hydrostatic differential pressure gauge type,
Capacitance type, Ultrasonic type, Radiation techniqueetc., Level is measured by using ultrasonic sensor which is a device
used to indicate detect the level of liquid contained in a tank [3].

HARDWARE
The block diagram of a microcontroller based level measurement using ultrasonic is shown in figure 1 [4], its
schematic diagram in figure 2 and in photograph 1 consists the following units.
They are

Ultrasonic sensor (HCSR04)

Microcontroller P89v51Rd2FN

DC motor

LCD display

www.tjprc.org

editor@tjprc.org

G. Prathyusha. & B. Ram Murthy

MAX 232

Personal computer

Figure 1: Block Diagram of Level Measurement and Control using Ultrasonic Sensor

Figure 2: Circuit Diagram of Level Measurement and Control using Ultrasonic Sensor
Impact Factor(JCC): 5.2896

NAAS Rating : 2.23

Measurement and Control of Level Using Ultrasonic Sensor

Photograph 1: Complete System of Level Measurement and Control using Ultrasonic Sensor

Ultrasonic sensor (HCSR04)

Photograph 2: Ultrasonic Sensor (HCSR 04)

WORKING PRINCIPLE
Ultrasonic level sensor works on the "time of flight" principle using the speed of sound. The sensor emits a
high-frequency pulse, generally in the 20 kHz to 200 kHz range, and then listens for the echo. The pulse is transmitted in a
cone, usually about 6 at the apex. The pulse impacts the level surface and is reflected back to the sensor, now acting as a
receiver and then to the transmitter for signal processing. Basically, the transmitter divides the time between the pulse and its
echo by two [5] [6], and that is the distance to the surface of the material. The transmitter is designed to listen to the highest
amplitude return pulse (the echo) and mask out all the other ultrasonic signals in the container.

Figure 3: Ultrasonic Signals in the Container


www.tjprc.org

editor@tjprc.org

G. Prathyusha. & B. Ram Murthy

Microcontroller P89V51RD2FN
Microcontrollers are widely used in many commercial and industrial applications. High level programs are used for
most popular microcontrollers and this makes the program development and subsistence (maintaining) a much easier task.
It is 5V Operating voltage with frequency 11.0592MHz crystal. The output data of microcontroller which is in digital form
i.e., level of liquid displays on the LCD display. The digital data lines D0-D7 are connected to Port1 of the microcontroller.
The operation of the level measurement system is very simple [7].The time duration for receiving of echo is sensed by the
ultrasonic type level sensor. This time is then converted in to distance format by using the formula
distance=(velocity/time)/2.trigger pulse and echo signal lines of ultrasonic sensor are assigned to P3.2,P3.5 respectively and
time as output is stored in register, it is send through port P0 of microcontroller. The microcontroller receives this data and
displays the level on LCD display, the above course of is oftentimes(repeated) continuously.LCD display data D4-D7 are
assigned to P1.0-P1.3 pins [8],The RS,R/W,EN are assigned to P2.0, P2.1,P2.2 respectively. It receives the liquid level in
digital form, processes this data and then displays the level on LCD display.
DC Motor
The DC motors is used in the present work operates with +12V/1A power supply. It consists of one inlet and one
outlet for maintaining the level in a tank by pumping liquid/water and the two motors controlled by a microcontroller P1.4
and P1.5 through two relays using ULN2003 driver circuit.
MAX 232
The application software for the present work for developed through communication interface of MAX232 with PC
developed in Keil environment using C language with It converts the RS232 voltage levels to TTL voltage levels and vice
versa. The main advantage of it is its operating voltage +5V same as microcontroller and it has two sets of line drivers for
transferring and receiving data.
LCD Display
A 16x2 LCD means it can display 16characters per line and there are 2 such lines in thisLCD each character is
displayed in 5x7matrix This LCD has two registers namely command register and data register. The command register stores
the command instruction. A command is an instruction given to LCD to do a ascertain task like initializing, Clearing its
screen, setting the cursor position, controlling display etc., the data register stores the data to be displayed on the LCD.

SOFTWARE
The Keil version 4 used for the development of application program of level measurement using ultrasonic level
sensor. It provides facilities for source code editing, program debugging and complete simulation in one powerful
environment. The micro version development platform is easy to use and helping to quickly create embedded programs that
work. The micro version editor and debugger are integrated in a single application that provides an embedded project
development environment.
The algorithm and flowchart of level measurement and control with ultrasonic sensor presented and shown

ALGORITHM

Initialization.

Impact Factor(JCC): 5.2896

NAAS Rating : 2.23

Measurement and Control of Level Using Ultrasonic Sensor

Send the trigger pulse of 1sec time

Initialize the timer of microcontroller.

Wait till echo will be reached.

Timer is off.

Calculate distance d = Speed*time/2.

By using Relay through ULN2003 driver control the motors for controlling the level of the tank.

If level of the tank reached set point the motor will be off.

If the level of measured tank greater than the set point, then the water will be pumped outside from the measured
tank2 to tank3 and tank1 motor will be off position by sending low signal to motor1.

FLOW CHART FOR LEVEL MEASUREMENT AND CONTROL USING ULTRASONIC SENSOR
If set point is reached
Motor is OFF
Stop
Display the value on LCD display
Level=speed of air *time/2
Calculate the time for echo will be reached.
Wait till echo will be reached from Ultrasonic sensor
Motor is OFF
Stop
Display the value on LCD display
Level=speed of air *time/2
Calculate the time for echo will be reached.
Start
Wait till echo will be reached from Ultrasonic sensor
Send the trigger pulse of 1sec time Initialize P89v51RD2 microcontroller and Ultrasonic sensor HCSR04
If set point is reached

RESULTS AND CONCLUSIONS GRAPH


The proposed work was successfully developed and implemented .The obtained results are presented in table 1and
graph 1.The calibration curve for the level measurement using ultrasonic sensor shows in figure 5. The results are showing
good agreement and working consistently.
www.tjprc.org

editor@tjprc.org

G. Prathyusha. & B. Ram Murthy

Table1
S. No
1
2
3
4
5
6
7
8
9
10
11

Height
Measured
(CMS)
0
3
6
9
12
15
18
21
24
27
30

Level
Measured
(Liters)
0
1.000
2.000
3.000
4.000
5.000
6.000
7.000
8.000
9.000
10.000

Level
Standard
(Liters)
0
1.000
2.000
3.000
4.000
5.000
6.000
7.000
8.000
9.000
10.000

Table 2: Showing the Level Measurement with the Height Measurement of Ultrasonic Sensor
The development system is satisfactory, working within the standard limits for the extension, the system may be
interfaced with personal computer via serial port for implementing the remote measurement and control using advance
technology like GPS/GPRS, WI-FI and web based technology. Theinstrument providing an actual measurement and control
with an accuracy of 0.03cm height with reliable and low cost.

REFERENCES
1.

V.E.Shakharov, S.A. Kuznetsov,B.D.Zaitsev, I.E.Kuznetsova and S.G.Joshi, Liquid level sensor using ultrasonaic
Lamb waves, Ultrasonic, Volume41, Issue4, pages 319-322, June 2003.

2.

B.G. Khusainov, Float Method for measuring liquid levels, Mechanical Measurements.

3.

Gouthamkumar N., Veena Sharma, R. Naresh. "Disruption based gravitational search algorithm for short term
hydrothermal scheduling" Expert Systems with Applications, Vol. 42, pp. 70007011, 2015.

4.

Gillum D.R., "Industrial Pressure, Level and Density Measurement", ISA Resources for Measurement and control
series. Research Triangle Park. NC Instrument Society of America 1995.

Impact Factor(JCC): 5.2896

NAAS Rating : 2.23

Measurement and Control of Level Using Ultrasonic Sensor

5.

Daniel K. Fisher, Ruixiu Sui "AQn inexpensive open -source ultrasonic sensing system for monitoring liquid
levels" CIGR Journal, Vol.15, No.4, December, 2013.

6.

http://www.robotshop.com/media/files/pdf/water-level-with-the-ping-28015.pdf

7.

V.Matz, M.Kreodl, R. Smid.Classification of ultrasonic signals.

8.

Sabuj Das Gupta, and Islam Md. Shahinu "Design and Implementation of Water Depth Measurement and object
Detection Model Using Ultrasonic Signal System:, International Journal of Engineering Research and
Development e-ISSN:2278-067X,p-ISSN: 2278-800X, Volume 4, Issue 3 (October 2012), PP.62-69

9.

http://www.Keil.com/dd/docs/datashts/philips/p9v51rd2.pdf

www.tjprc.org

editor@tjprc.org

Anda mungkin juga menyukai