Project Correction 2
Project Correction 2
BY
JULY 2021
1
CERTIFICATION
This project has been submitted with the approval of my college supervisor.
Signature;
Date:……………………..
DECLARATION
I declare that this is my original work and has not been presented for any award in my institution
in medical engineering.
Signature……………….. Date…………………..
DEDICATION
I dedicate this project to my parents, siblings, Esther Njenga and all those who are selfless
enough to support me financially.
ACKNOWLEGDEMENT
I’m grateful to Almighty God for this far, if not for his grace I wouldn’t have made it this far. I
would also like to express my heartfelt gratitude to my supervisor MR. Calvin Kipsaina.
TABLE OF CONTENTS
CERTIFICATION............................................................................................................................i
DECLARATION.............................................................................................................................ii
DEDICATION............................................................................................................................iii
ACKNOWLEGDEMENT..............................................................................................................iv
TABLE OF CONTENTS................................................................................................................v
LIST OF SYMBOLS....................................................................................................................viii
Full wave bridge rectifier..........................................................................................................viii
LIST Of ABREVIATIONS............................................................................................................ix
LIST OF FIGURES.........................................................................................................................x
LIST OF TABLES..........................................................................................................................xi
ABSTRACT....................................................................................................................................1
CHAPTER ONE..............................................................................................................................2
1.0 Introduction.......................................................................................................................2
1.1 Background Information........................................................................................................2
1.2 Statement of the Problem.......................................................................................................2
1.3 Purpose of Study....................................................................................................................3
1.4 Main Objective.......................................................................................................................3
1.4.1 Specific objectives..................................................................................................................3
1.5 Justification of Study.............................................................................................................3
1.6 Significance of Study.............................................................................................................3
1.7 Limitation of Study................................................................................................................4
1.8 Assumption Made..................................................................................................................4
CHAPTER TWO.............................................................................................................................5
LITERATURE REVIEW................................................................................................................5
2.0 Introduction............................................................................................................................5
2.1 Electrical Indicators...............................................................................................................5
2.3 Float Based Level Indicators..................................................................................................6
2.4 Pressure Level Sensors...........................................................................................................8
2.5 Ultrasonic Water Level Transmitters.....................................................................................8
2.6 Capacitance Level Sensors.....................................................................................................8
2.7 Radar Level Sensors...............................................................................................................8
2.8 Optical Level Switches..........................................................................................................9
CHAPTER THREE.......................................................................................................................10
METHODOLOGY........................................................................................................................10
3.0 Introduction..........................................................................................................................10
3.1 Block Diagram.....................................................................................................................10
3.1.1 power Supply........................................................................................................................10
3.1.2 level Sensor...........................................................................................................................10
3.1.3 control Circuit.......................................................................................................................10
3.1.4Display Decoder....................................................................................................................11
3.1.5 Seven Segment Display........................................................................................................11
3.2 Power Supply.......................................................................................................................11
3.2.1 Transformer..........................................................................................................................11
3.2.2 Laminated core transformer..................................................................................................11
3.2.3 Rectification..........................................................................................................................14
3.2.4 Filter circuit..........................................................................................................................15
3.2.5 Shunt capacitor filter.............................................................................................................15
3.2.6 Voltage stabilization.............................................................................................................16
3.3 Level sensor.........................................................................................................................17
3.3.1 Ultrasonic sensor..................................................................................................................17
3.3.2Ultrasonic Level Sensor.........................................................................................................17
3.3.3Ultrasonic Level Sensor Installation......................................................................................18
UCL-510 Ultrasonic Water Level Sensor......................................................................................19
3.4 Control circuit......................................................................................................................19
3.4.1 Microcontrollers...................................................................................................................20
The microcontroller's building blocks...........................................................................................20
Memory unit..................................................................................................................................20
Central Processing Unit.................................................................................................................20
Input-output unit............................................................................................................................20
3.5 Display decoders..................................................................................................................22
3.5.1BCD to 7-Segment Display Decoders...................................................................................22
3.6 Seven segment display.........................................................................................................24
3.6.1Common cathode display......................................................................................................25
3.6.2 Common anode.....................................................................................................................25
3.7 CIRCUIT DIAGRAM..........................................................................................................27
3.7.1 Circuit operation...................................................................................................................28
3.8 CONSTRUCTION...............................................................................................................28
CHAPTER FOUR.........................................................................................................................29
STUDY FINDINGS......................................................................................................................29
4.1 TEST RESULTS..................................................................................................................29
CHAPTER FIVE...........................................................................................................................30
DISCUSSIONS CONCLUSION AND INTERPRETATIONS....................................................30
5.0 Introduction..........................................................................................................................30
5.1 Discussion and interpretations.............................................................................................30
5.2 Conclusion...........................................................................................................................30
5.3 Recommendation.................................................................................................................30
APPENDICES...............................................................................................................................31
Appendix 1: Budget...................................................................................................................31
ITEM..............................................................................................................................................31
REFERENCES..............................................................................................................................32
LIST OF SYMBOLS
Transformer
Diode
LIST Of ABREVIATIONS
Vp- Primary Voltage
Vs – Secondary Voltage
Figure 3. 7 Micro-controller..........................................................................................................21
Liquids are used for different reasons depending on their type. These are stored in containers like
tanks especially in the case of water. Monitoring the level is a challenge. Many check the level
manually by climbing on top and checking. This method is not only tedious but also inaccurate.
A better method is therefore sought. This project displays the liquid level in numerical form for
easy interpretation by any one from the outside of the tank. It reads the level in noncontact
method using ultrasonic technology.
CHAPTER ONE
1.0 Introduction
In this chapter, it gives us the background study of the research so as to understand more about
the research and project being carried out.
Water has a very wide application in life. One of this is human consumption.
The human body contains anywhere from 55% to 78% water depending on body size. To
function properly, the body requires between one and seven liters of water per day to avoid
dehydration; the precise amount depends on the level of activity, temperature, humidity, and
other factors.
It is also used for cleaning. This may include clothes, utensils and also floor cleaning among
others. Washing is therefore an important component of several aspects of personal body
hygiene. For these reasons among others, water is widely needed especially in hospitals among
other places. However water supply is not frequent due to many factors resulting to people using
water tanks. These tanks are opaque making the user difficult to identify the level of the water
tank.
Unavailability of some components was the other challenge. The materials that are in the market
are of low quality and thus getting the low quality proved to be a big obstacle to realization of an
effective project. The exact values of some desired components were not available.
The key factor to any successful project is time. During my research there was limited time and
that the research was not awarded adequate time. This is due to studies which run full time
(morning to evening) leaving no room for research.
A Dual Water or Top-Up system is a process whereby a rainwater tank is topped up from the
reticulated water supply (piped drinking water) when the water in the tank runs low. The idea is
that the tank is not topped up to its maximum level, instead the tank is partially topped up so that
most of the tank's capacity is reserved to receive rainwater.
Option A: Top-Up the tank from above utilizing the Air Gap method.
Option B: Top-Up the tank by connecting the water tank directly to the reticulated water
supply via a control valve.
Option B is expensive and problematic because special control valves and backflow prevention
devices must be connected.
The Top-Up can be either a full flow system or a trickle feed system. A full flow system allows
water to flow into the tank at its maximum rate. A Trickle Feed system uses a flow control
device to limit the flow of water into the tank to a few liters per minute.
Rain Alert is installed on top of the water tank and uses an ultrasonic sound beam to sense how
far the water surface is from it. The vertical height from the sensor on top of the tank to the
bottom of the water tank is set on the Rain Alert display at time of installation. This is
accomplished by setting switches on the back of the display unit. The depth of the water tank can
be set in increments of 50mm.
Once every hour, the Rain Alert transmitter senses the level of the water in the tank by sending
out a beam of ultrasonic sound. The sound is reflected from the water surface and is detected by
the Rain Alert transmitter. The transmitter measures the time it takes for the sound to travel to
the water surface and back again. The lower the water level, the longer it takes the sound to
travel.
This measurement is then transmitted to the Rain Alert Display unit which can be located up to
200m away. The Display Unit then displays the water tank level on a 10 element LCD bar graph.
Battery-powered level indicator for measuring the liquid level of water tanks such as rainwater,
sewage chambers or slurry tanks from a distance of up to 100 m. After touching the button,
indication occurs via 10 LEDs in steps of 10 % each (indication 10 - 100 %).
(H Alegre, 2011)
1) LEVETATOR
The weighted float and indicator are connected to the counterweight by separate cords, each cord
running over a pair of pulleys. When the float is half-immersed everything is balanced. Rising
liquid level lifts the float up, the counterweight moves down, and the indicator keeps pace with
the float. Falling liquid levels causes the weighted float to pull the counterweight up, and again,
the indicator keeps pace with the float. At all times the indicator matches the liquid level exactly.
2) LEVEL DEVIL
Like all the other water level gauges described here, it works on the tried and true
float/weight/pulley system.
The weighted float and indicator are connected to the counter-weight suspended inside the
vertical pipe with stainless steel wires running over pulleys. Rising water level lifts the float up,
the counterweight moves down, and the indicator, sliding on the outside of the pipe, keeps pace
with the float. Vice-versa for falling water level. At all times the indicator matches the liquid
level exactly. Durable Aluminum die castings, stainless steel axles and fastenings, marine grade
Delrin pulleys. Level Devil is built to last
3) DIPSTIK
This floating pole type water level gauge, protruding above the tank roof, is the choice for many.
It is ideal for "cup and saucer" tanks. High above the tank the level indicator can be seen from far
away, in every direction, night or day.
This is suitable for installation on potable and rainwater tanks. The gauge has a reversible face
plate. One side can be used for tanks to 1.5m in height, the other side for water tanks to 2.5m in
height. This means that the gauge will give a accurate reading of the current water level in the
tank. The gauge is supplied with a flange plate that is screwed down onto the water tank using
two stainless steel screws (Screws not supplied). The face diameter is 70mm.
The level gauge has a weighted float attached to it via a thin cord. The float is sufficiently
weighted so that as the water level rises or falls, the dial on the level gauge is rotated to indicate
the current water depth.
(Helena Alegre, 2016)
2.4 Pressure Level Sensors
Hydrostatic pressure level sensors are submersible sensors used for measuring the level of
liquids (including corrosive liquids) in deep tanks or water in reservoirs. Pressure water level
loggers provide accuracy and reliability across a wide range of applications.
(P Frymier, 2004)
Non-contact ultrasonic level sensors emit ultrasonic (20 kHz to 200 kHz) acoustic waves from a
transducer which also detects and measures the reflected waves. This type of sensor is ideal for
measuring bulk solids such as sand, cement, grain, rice and plastic pellets as well as liquids with
high viscosity such as slurries, heavy oil, grease and latex.
Often called RF due to the radio frequency signals that are applied to the capacitance circuits,
these type of sensors are excellent for measuring a wide range of liquids, slurries and solids.
Capacitance level sensors can be used to measure media with dielectric constants between 1.1
and 90. Capacitance level sensors are rugged, contain no moving parts, are easy to clean and
simple to use.
Also known as microwave level sensors, radar level sensors are ideal for use in environments
where temperature varies and in moist, dusty or vaporous environments. The microwaves are
able to penetrate temperature and vapor layers that can be problematic for other types of water
level sensor. Objects with high dielectric constants such as metal and conductive water will
reflect microwaves. Conversely, media with low dielectric constants (glass, plastics, food stuffs,
paper) will absorb the microwaves by varying degrees.
Radar water level sensors are ideal for use in a vacuum as the microwaves are electromagnetic
energy and don't require air molecules to propagate.
(P Frymier, 2004)
These are used in tank level measurement and leak detection applications
There are a range of technical terms used to describe this type of level sensing technology.
Optical prism, electro-optic, single-point optical, optical level switch…the list goes on. For this
purpose, we will use the term Optical Level Switch. The switch operates very simply. Inside the
sensor housing is an LED and a phototransistor. When the sensor tip is in air, the infrared light
inside the sensor tip is reflected back to the detector. When in liquid, the infrared liquid is
refracted out of the sensor tip, causing less energy to reach the detector. Being a solid-state
device, these compact switches are ideal for a vast range of point level sensing applications,
especially when reliability is essential. Optical liquid level switches are suitable for high, low or
intermediate level detection in practically any tank, large or small. They are also suitable for
detecting leaks preventing costly damage. Reflected light, such as in a small reflective tank,
mirrored tanks, bubbles, milk or coating fluids can often cause issues with delayed readings.
POWER
SUPPLY
To provide the rated voltages for the circuit to be supplied with a specified tolerance.
To be able to supply the rated maximum current to be supplied to the circuit without the
supply voltage falling outside the specified limits.
To maintain the supply voltage constant within specified limits as the load changes or the
mains supply input voltage varies or the ambient temperature changes.
The power supply consists of a step down transformer, rectifier circuit, smoothening capacitors
and voltage stabilizer circuit.
3.2.1 Transformer
This is a device used to step down the mains ac mains supply to a lower value required by the
circuit, and also to provide isolation between the ac supplies. The physical basis of a transformer
is mutual induction between two circuits linked by a common magnetic flux; consists of two
inductive coils that are electrically separated but magnetically linked through a path of low
reluctance.
Two coils of wire (called windings) are wound on some type of core material. In some cases the
coils of wire are wound on a cylindrical or rectangular cardboard form. In effect, the core
material is air and the transformer is called an AIR-CORE TRANSFORMER. Most power
transformers are of the iron-core type. The principle parts of a transformer and their functions
are:
The CORE, which provides a path for the magnetic lines of flux.
The PRIMARY WINDING, which receives energy from the ac source.
The SECONDARY WINDING, which receives energy from the primary winding
and delivers it to the load.
The ENCLOSURE, which protects the above components from dirt, moisture,
and mechanical damage.
Figure 3. 1Transformer
Vp is primary voltage
Vs is secondary voltage,
Ip is primary current,
Is is secondary current,
Tp is primary turns,
Ts is secondary turns.
The laminated core transformer is the one used here. This is because of the low frequency
operation.
Since the circuit requires 12 V and 400mA to operate, the transformer selected is 240 V to 12V,
500mA step down transformer. This is because the transformer current rating should be slightly
above the circuit rated current. To bet the input current, the transformer equation can be used.
Vs= 12V
Is= 0.5A
Therefore,
3.2.3 Rectification
The purpose of the rectifier section is to convert the incoming ac from a transformer or other ac
power source to some form of pulsating dc.
The four-diode rectifier circuit shown above serves to provide full-wave rectification of the ac
output of a single transformer winding. The diamond configuration of the four diodes is the same
as the resistor configuration in a Wheatstone bridge. This rectifier circuit is similarly known as a
bridge rectifier.
Rectifier diode is selected for this purpose. Each of the four diodes is required to carry the
required current of 400mA and withstand a voltage of at least 12 volts. Therefore, the best diode
for this is the one rated just above 400mA and above 12 volts. Therefore, the ideal diode for this
is IN4007. It has a current capacity of 1 ampere and peak inverse voltage capacity of 1000 volts.
waveform. The output of a bridge rectifier is still not smooth. To reduce the ripple voltage to
A shunt capacitor filter is the most ideal for this due to its simplicity and that it gives the best
result of all.
Therefore, a voltage regulator circuit is needed. This eliminates the spikes and maintains a
constant output voltage with load variation.
Since the required out put voltage is 5 volts DC, 7805 voltage regulator IC is the one used here.
Ultrasonic level sensors one approach commonly used of the various types of measurement-level
offered in the market today. However, there is some other very common method in the
measurement of level, such as RF Capacitance, Radar, Conductance (conductivity), and
Hydrostatic Head (tank gauging). Which method you choose, you need to understand the
underlying theory and how each one works.
Level measurement using radio frequencies (RF) is a set of different configurations of the
electrical characteristics of a capacitor. All types of this type use the frequency range from 30
KHz to 1MHz. An ultrasonic sensor consists of a transmitter and receiver, which operate using
sound waves to determine the fluid level. As for the type of ultrasonic sensor (transmitter /
receiver) using a range of 20-200 KHz, and the sonic type is a frequency of 10 KHz.
The working principle of an ultrasonic level sensors to transmit sound waves from an ultrasonic
transmitter to the surface of the liquid level to be measured. A piezoelectric crystal inside the
transducer converts electrical pulses into sound energy moves in waves at a frequency that was
established and at a constant speed in a particular medium. Echoes that reach the liquid surface
will be reflected and returned and received by the transducer of an ultrasonic receiver.
The time taken by sound waves to return is directly proportional to the distance between the
sensor and the piezoelectric material in the tank. Based on the measured time by the sensor is
then used as the information to calculate the level of liquid in the tank.
Velocity of sound waves can sometimes be affected due to the proper temperature variation
compensation should be provided in the sensor design. In general, the media on the surface of the
fluid is air. However, one can use a blanket of nitrogen or steam as well.
In the non-contact design, the ultrasonic level sensors located above the tank in such a way that
sends sound waves in the form of bursts in the direction of the liquid in the tank down to below
the measurement level. Immediately, after the sound wave hits the surface of the liquid is
directed, the echo will be reflected and returned to the sensor.
UCL-510 Ultrasonic Water Level Sensor
The UCL-510 offers an innovative, non-contact ultrasonic level sensor with no moving parts
built for challenging fluid measurement. This accurate and reliable sensor is built for general
purpose, small tank applications 49.2" (1250 mm) or less and offers switch, controller and
transmitter capabilities in one multi-function transmitter. The UCL-510 is suited for corrosive
and dirty applications and is virtually maintenance free and reduces tank system hardware. The
UCL-510 combines 4 relays, 4-20mA output and pump/valve control in one small sensor. The
UCL-510 offers a total solution for fluid handling and automation.
Applications:
HC-SR04 Ultrasonic Sensor is used here due to its availability. The HC-SR04 ultrasonic sensor
uses sonar to determine distance to an object. It offers excellent range accuracy and stable
readings in an easy-to-use package.
Figure 3. 6 Ultrasonic sensor
Memory unit
Memory is part of the microcontroller whose function is to store data.
Input-output unit
Those locations we've just added are called "ports". There are several types of ports: input,
output or bidirectional ports. When working with ports, first of all it is necessary to choose which
port we need to work with, and then to send data to, or take it from the port.
When working with it the port acts like a memory location. Something is simply being written
into or read from it, and it could be noticed on the pins of the microcontroller.
A PIC 16f73 is considered due to its availability, effectiveness and simplicity.
Figure 3. 7 Micro-controller
R=V/I
R= 5 volts/0.001A
R=5KΩ
A Decoder IC is a device which converts one digital format into another and the most commonly
used device for doing this is the BCD (Binary Coded Decimal) to 7-Segment Display Decoder.
7-segment LED (Light Emitting Diode) or LCD (Liquid Crystal) Displays, provide a very
convenient way of displaying information or digital data in the form of Numbers, Letters or even
Alpha-numerical characters and they consist of 7 individual LEDs (the segments), within one
single display package.
A binary coded decimal (BCD) to 7-segment display decoder such as the TTL 74LS47 or
74LS48, have 4 BCD inputs and 7 output lines, one for each LED segment. This allows a smaller
4-bit binary number (half a byte) to be used to display all the denary numbers from 0 to 9 and by
adding two displays together, a full range of numbers from 00 to 99 can be displayed with just a
single byte of 8 data bits.
Figure 3. 8 BCD to 7-Segment Decoder
The use of packed BCD allows two BCD digits to be stored within a single byte (8-bits) of data,
allowing a single data byte to hold a BCD number in the range of 00 to 99.
7447 DRIVERS
This is a member of the standard TTL family. They have integral ripple blanking facilities.
However they do not have latches. Their outputs are active low designed to drive the common
CD 4511
This CMOS based IC has an integral four-bit latch but no built-in facility for ripple blanking. It
is designed to drive a common cathode display. Its outline and pin designation is shown below.
CD 4511 IC is used here. It is designed to drive a common cathode display. The wiring circuit
Common cathode 7-segment display is used because it is compatible with the CD 4511 driver.
.
Seven resistors Rd are used to protect the seven-segment display. The current required to pass
through each LED of the display is 20 mA beyond which the display will get destroyed. The
Rd = 250
3.7 CIRCUIT DIAGRAM
The microcontroller pin 11 through the use of an internal program generates a pulse to trigger the
ultrasonic sensing module. The microcontroller starts incrementing an internal timer till an echo
is received through pin 12 from the module after being reflected by the water level. The
microcontroller internally calculates the time and outputs binary coded decimal (BCD) output to
the BCD to 7-segment decoder DC4511. This then converts to seven segment codes which then
drive the seven segment display which displays the water level in numerical form.
3.8 CONSTRUCTION
The project was constructed on a strip board by the use of a solder wire and jumper wires. The
project was then tested for endurance before presentation and any problem seen was rectified. It
was then mounted onto the casing. The strip board was mounted on the casing base and the
transformer separate from the circuit board but still on the base of the casing.
CHAPTER FOUR
STUDY FINDINGS
4.0 Introduction
This chapter deals with the test results by measuring the voltage
4 Microcontroller 5 4.7
CHAPTER FIVE
DISCUSSIONS CONCLUSION AND INTERPRETATIONS
5.0 INTRODUCTION
This chapter deals with the discussion, conclusion and interpretation of the study of digital level
water meter.
5.2 CONCLUSION
The project was tested and worked. A flat surface like that of wood or hard board was used to
simulate the water level. When the surface was moved to and fro about the sensor, a low level
was indicated on the display and varied depending on the distance from the sensor. This proved
success of the project.
5.3 RECOMMENDATION
After a thorough research, the project was tested and it worked. However, there recommendation
for the future designs. The project should be integrated with a GPRS means of remotely
monitoring the water level on a computer
APPENDICES
APPENDIX 1: BUDGET
ITEM QUANTITY PRICE PER UNIT TOTAL PRICE
Power cable 1 60 60
Switch 1 80 80
Capacitors 3 50 150
Diodes 4 30 120
Voltage regulator ic 1 85 85
Resistors 15 20 300
IC sockets 3 30 90
TOTAL 6,795
REFERENCES
Bimal K.Bose (2000). Power Electronics and Variable Frequency Drives - Technology and
Applications . canada.93-96.
James Feher (2010). Introduction to Digital Logic with Laboratory Exercises. Global Text
Project.london.17.