Ultrasonic Sensor Based Water Level Controller Using Arduino
Background Introduction of Ultrasonic sensor water level controller
In an attempt to mitigate problems such as poor water allocation, inefficient use, and lack of adequate and integrated water management, Automatic Water level controller system is designed to monitor liquid level in an overhead tank or any liquid storage system with an automatic pumping system attached to it to refill the tank once the liquid gets to the lower threshold, while switching OFF the pump once the liquid gets to the higher threshold.
Generally, this device controls, monitors and maintains the water level in the overhead tank and ensures continuous flow of water round the clock eliminating the stress of operating the pump manually thereby saving time, energy , water etc.
Components Used Water level Controller:
- 5v relay
- Motor (pump)
- Ultrasonic Sensor
- Bridge Rectifier
- Capacitor C1= 100u, C2= 100p
- Variable resistor 10k
TOOLS AND INSTRUMENTS
The tools and instruments used include:
Block Diagram of Water level Controller
The various units which make up the whole system is showed in the block diagram.
This unit comprises of the transformer, bridge rectifier, filtering capacitor and a voltage regulator. In this work, a 5volts and 12volts DC was used, hence the need to use dual voltage source. The regulator 7812 stabilizes the DC voltage to +12V, while the variable resistor (POT-HG) reduces +12v top +5v needed to power some parts of the circuitry. This unit is very vital in any electronic circuit as it supplies the required power to each module.
The MicroController Unit:
The control unit is made up of a single micro controller chip capable of executing a user program, normally for the purpose of controlling the device; the ULN203 serve as switch to the load relay and it receives its switching control from the microcontroller.
(If you are new, check interprets and timers of Arduino- complete guide)
Liquid Crystal Display Unit:
This unit displays digitized outputs showing the operation and working of the circuit in an easy and understandable format at high and low positions.
This unit makes use of a distance measurement sensor module called ultrasonic sensor capable of providing non-contact measurement within the range of 2cm – 400cm with ranging accuracy reaching 3mm to measure the distance of empty space in a tank and sends it to the microcontroller in other to take action and display it on the LCD. It works on the principle of echolocation.
Principle of Operation of Water Level Controller
This is a closed loop feedback operating system as the constant availability, inflow and outflow of liquid content within a storage tank is dependent on the operation of the sensor which triggers ON/OFF the pump switch using a relay. The ultrasonic sensor has a trigger and an echo pin. The sensor is placed at the top end of the (overhead) tank with its transmitter and receiver faced towards the bottom of the tank. The ultrasonic sensor reads the distance from the bottom of the tank using ultrasonic wave transmission by the formula (distance = speed * time).
After the sensor is triggered, it sends out sound waves to the surface of the water/liquid content which obstructs the signal at whichever level and echoes back to the sensor. This echo effect enables distance measurement by allowing the Arduino read the echo pin to determine time spent between triggering and receiving of the echo.
Note: Speed of sound is around 340m/s thus distance can be calculated using
Distance= (time/2)*Speed of sound
To determine the level of the water in the storage tank, total length of the tank Must be ascertained. This value would enable us calibrate our tank to suit design specifications.
The microcontroller signals the relay for automatic switching OFF of the pump when water reduces to a low level, the device beeps an alarm to alert the user and automatically starts the pump to refill the tank.
An LCD is incorporated to display the “Empty space in the tank in cm (centimeters)”. If the distance between the bottom of the tank and the module equals the programmed distance for Low/High level, it turns ON/OFF the motor respectively.
With this steady water supply is ensured for public/private water management systems.
Arduino Sketch is the integrated development platform (IDP) for developing and debugging Atmel and AVR microcontroller based applications. The Arduino sketch IDP gives easy-to-use environment to write, build and debug your applications written in C/C++ code.