IoT Based Smart Water Tank Using Android Applications

C. Senthil Kumar *  C. Bhavani **  S. R. Harshini Priya ***  S. Jayalakshmi ****
*-**** Department of Electronics and Communication Engineering, AVS Engineering college, Salem, Tamil Nadu, India.

Abstract

Using IoT and Android applications, this paper proposes a more effective water monitoring and control system for water utilities to reduce existing water wastage. Traditional water tanks are unable to monitor or control the level of water in the tank, resulting in significant wastage. Water level is measured using an ultrasonic sensor. Other parameters such as pH, TDS, and turbidity should be calculated. The Microcontrollers can process the estimated values from the sensors and upload them to the internet via the Wi-Fi module (ESP 8266). Other technologies, on the other hand, had certain limitations in one form or another.

Keywords :

Introduction

Due to uncontrolled wastage of accessible fresh water, one of the key challenges that has lately surfaced is the sustainability of water resources. Overflowing water tanks are responsible for the vast majority of water waste. Majority of the time, water tanks are regulated manually by an operator. Water continues to overflow in the absence of a person until the motor is turned off. Dip sensors are used in a few systems that are automated. As a result of being in touch with water, the material utilised in the sensor is prone to rusting. These sensors can only control the water level locally, therefore the operator must keep a close eye on how well they work. Smart water tanks use Internet of Things (IoT), allowing users to monitor and control the tank's operation from anywhere in the world using their smartphone.

Water is always an important aspect of daily living. Water management and conservation are critical for human life due to the current worldwide environmental crisis. In recent years, there has been a significant demand for consumerdriven humanitarian projects that might be established quickly using Internet of Things (IoT) technologies. A smart water tank setup is shown in Figure 1. The application of smart water tank is explained in Figure 2.

Figure 1. Smart Water Tank Setup

Figure 2. Applications of Smart Water Tank

Drinking water is extremely valuable to all humans. Growing population, ageing infrastructure, and other factors have caused problems for all humans and species on the planet in recent years. As a result, finding a solution for a water monitoring and control system is critical. Water level is measured using an ultrasonic sensor. Water parameters such as pH, TDS, and turbidity should be calculated. The microcontrollers may process the estimated values from the sensors and upload them to the internet via the Wi-Fi module (ESP 8266).The user can monitor and operate the system from anywhere in the world using their smartphone. MIT app inventor has been used to create the Android app. This system can be placed in existing water tanks and does not necessitate the purchase of a new water tank.

1. Literature Review

Divya (2016) presented a paper on water conservation. Making a control system to automatically operate the water pump necessitates thorough observation of what people do on a daily basis in order to ensure that the tank is always filled. Almost every state in India has a State Water Supply body that is responsible for the development and control of the state's water supply. Because there is a scarcity of water, the discharge of water is regulated and done at specific times throughout the day. As a result, the purpose of this study is to present the project of embedding a control system inside an autonomous water level controller utilising a Wi-Fi module.

Vijayakumar and Ramya (2015) developed a low cost system for real time monitoring of the water quality in IoT. The system is made up of many sensors such as pH, turbidity, and water level sensors, among others. All of the parameters are measured, and the data from the sensors may be analysed by the Raspberry PI B+. Sensor data can be shown on the internet using cloud computing, and these devices are more efficient, low-cost, and capable of processing and delivering data to mobile phones over Wi- Fi modules. This may be used to monitor the environment, and the data can be accessed from anywhere on the planet.

Maqbool and Chandra (2013) published a paper that detailed the architecture, which includes a water quality sensor, a water level sensor, a GSM modem, a PC, an XBee, and a database. Sensor nodes perform a specific function or duty, sense data, and transfer that data to the end tool or machine via an inverter. Network devices, such as routers, coordinate the sensed data. The router will collect data from the end tool, such as Xbees, which will then collect data from sensors, and deliver it to the coordinator. All of the data is displayed on the computer. The bore water level is displayed on the computer using the C sharp application. A certain task can be performed from a computer, such as sending an SMS to the user's system and setting an alarm to the required level. All of this information is maintained in a database that will be used to develop a "water expert system" through long-term monitoring and analysis.

Thinagaran et al. (2015) used IoT to develop a water monitoring system for a real-time water scenario. It is relevant and incorporates a system integrated to a cloud server, and these data can be received by user terminals owned by customers via the Internet. The final findings of the water measurement are displayed as a cloud. A portion of the alarm system called Thing speak is also included. Residential users, as well as industrial users and water utilities, can benefit from this form of organisation.

Dhivya priya et al. (2016) developed GSM based water tank level monitoring and pump control system. In this paper, a new method for continually monitoring the amount of water in water systems such as above water tanks is proposed. The user can send a message to the system to get information on the tank's water level. The system can also be used to regulate the pump on its own by turning it off when the critical level of water in the tank is achieved and sending a message to the user that the tank is full. The goal is to use an ultrasonic sensor and GSM technology to control the water level.

Varma et al., (2015) presented a study which offered a realtime water monitoring system for the campus. The work was done with an off-the-shelf ultrasonic sensor called the HCSR04, which is positioned on the tank's top. It shoots a large number of 40 kHz ultrasonic pulses towards the water's surface and measures the time it takes to receive reflected waves by measuring when the reflected edge crosses a threshold. This method works well when the received signals have a significant amplitude, thus its range has been limited to around 4 kilometres, which is sufficient for big distribution tanks with depths of up to 8 metres.

Raghavendra et al. (2013) implemented simulated water level controller. Water is one of the most fundamental needs of all living things. Uncontrolled use, on the other hand, wastes a tremendous amount of water. Another machine-driven water level monitoring system is also available at this time, however the majority of the method has some gaps in it. We have a tendency to try to solve these problems by enforcing an economic machinedriven water level monitoring and dominance system. The fundamental goal of this analysis is to come up with a system that is versatile, cost-effective, and easy to use.

Shirode et al. (2018) presented a paper on IoT based water monitoring system. This method can be used to monitor quality using a microcontroller and a zigbee module to create a WSN (Wireless Sensor Network) that is low-cost and efficient. Furthermore, data from all over the world may be monitored in an IoT environment utilising a Raspberry Pi as a gateway, and cloud computing technology is used to monitor data over the internet. There is also a web browser application to make the system more user-friendly. As a result, they can achieve the suggested system's goal and objective.

2. Basic Concepts

2.1 ESP 8266

It's a Wi-Fi module with an SSID and password that can connect to the internet as a hotspot. It can be configured to execute logic statements based on the system's requirements. The ultrasonic sensor measures the distance between the water's surface and sends the information to ESP. When connected to the internet, the ESP uploads this value to a cloud database. It also fetches some database values that are set by the user in the android applications. As a result, the motor's operation is determined by the present water level as well as the highest and lowest values.

2.1.1 ESP8266 Functions

When it comes to IoT, the ESP8266 has a lot of uses. Here are only a few of the functions of the chip:

Networking: Wi-Fi antenna on the module allows embedded devices to connect to routers and transmit data.

Data Processing: With an RTOS or Non-OS SDK, you can process basic inputs from analogue and digital sensors for far more complex calculations.

P2P Connectivity: Using IoT, establish direct connectivity between ESPs and other devices.

Web Server: Access pages written in HTML or development languages via a web server.

2.1.2 ESP8266 Applications

The ESP8266 modules are often found in IoT devices such as:

Surveillance cameras and smart locks, which are examples of smart security technologies.

HVACs and thermostats are examples of smart energy devices.

PLCs (Programmable Logic Controllers) are smart industrial devices.

Wearable health monitors and other smart medical gadgets.

2.2 Ultrasonic Sensor

Ultrasonic sound waves are generated by an ultrasonic sensor and battered on the water's surface. This sensor is made up of a speaker that generates an ultrasonic sound wave and a microphone that detects it. Because we used an ultrasonic sensor, there is no water contact with the sensor, ensuring that it lasts a long time.

The ultrasonic module is a non-contact measuring module that can measure distances from 2 cm to 400 cm with a ranging accuracy of 3 mm. It is based on the echolocation principle.

As a trigger and an echo pin, the ultrasonic sensor is used. This pin receives a high signal from the Arduino, which lasts 10 microseconds. When the sensor is activated, it emits eight 40 kHz sound waves to the water's surface. The wave is echoed back to the sensor when it reaches the water's surface, and the arduino reads the echo pin to measure the time between triggering and receiving the echo. We can compute the distance using Distance = (time/2)*speed of sound, because we know the speed of sound is roughly 340 m/s.

To figure out how much water is in the tank, we need to know the whole length of the tank. This number will allow us to calibrate the tank. A push button is introduced here, which is utilised to measure the tank height at the time of circuit installation. This can also be used to replace an old water tank with a new one.

Conditions:

If the water level falls below 20%, the pump will begin to run, and if the water level rises beyond 100%, the pump will stop.

If the pump is running and the sump tank is empty, the pump will shut down.

If the pump is turned off and the sump tank is empty, the pump will turn off.

The water level in the tank is monitored using an Android app.

2.3 Cloud-Firebase

Google's Firebase is a cloud service that uses the JSON language. The values from the Android app and the ESP are saved here. The ESP and app then use specific functions to obtain the values. To access these values, a special authentication key is required, ensuring data security.

There are three parts to this unit. Figure 3 shows how the control system receives requests and responds in real time to the Android Mobile Application via the key component, firebase. Firebase is a Google-backed open-source app development platform that enables developers to create high-quality mobile apps for iOS, Android, and the web. Its real-time database is cloud-hosted and SQL-free, allowing users and client devices to store, retrieve, and synchronise data.

Figure 3. Connectivity Path between System and User Module

2.4 MIT App Inventor-Android Application

This is an MIT-developed scratch programming platform that aids programmers in designing and testing Android applications. This programme has been used to construct our application. The user must set the maximum and minimum water levels in the tank in this app. In addition, the app shows the current water level in the tank. The app has a login interface, which ensures that the software is secure to use.

We will create an Android app to turn on/off or regulate the circuit in order to use the automatic water level indicator. MIT App Inventor is an online platform for mobile app development, and after connecting the ESP8266 to the ultrasonic sensor, we need to use the MIT app creator to construct an app. The database secret key (password) and URL key would be requested while constructing this app, and the app would then be linked to Firebase. As a result, the app will be able to see the value stored in firebase and will also be able to change the value stored in firebase, so changing the value of ESP's pins and controlling the ON and OFF operation of the relay, thus controlls the motor.

3. System Design and Implementation

We utilised an ESP8266 microcontroller for this work. ESP gets the maximum and minimum level values from the firebase cloud. The ultrasonic sensor determines these values. The motor is turned ON or OFF based on these variables. Figure 4 shows a block diagram of the system.

Figure 4. Block Diagram of the System

The condition of the motor will be automatically controlled based on the water levels, as described. If the water level is between the two levels, the user can use the android application to operate the motor by toggling the state of the motor. Start and Stop buttons have been provided for the same.

The application is set up in such a way that it displays the current water condition in percentages in real time. The tank's height must be set once in ESP. The percentage of water will be calculated using this height. This will be used to calculate the current water level. Logical programming is easier to construct when making decisions with percentages.

4. Results

After the completion of all of the connections, need to log in with proxy and run the command. Continuous values are read and stored on cloud and local databases, and once the command is run, those values are presented on the proxy interface. The proxy terminal's output is displayed. The turbine begins to rotate as the water runs through it. It splits the water into three layers 50%, 75%, and 100% are the percentages. When the water flow hits 50%, the condition happens. Because we can't always rely on the internet, we're uploading the values to both the cloud and a local database. The values will be uploaded in 15 seconds to avoid traffic during the uploading process. Table 1 presents the conditions of water levels and the states of motor.

Table 1. Proposed Working of Water Tank and Motor

Conclusion

All living things require water as one of their most basic necessities. Seas and oceans contain 97 percent water, (Water n.d). That means that only 3% of the available water is fresh water. Only 1% of the water in this 3 percent is suitable for human consumption. However, due to uncontrolled usage and exploitation of water resources, a large amount of water is squandered. Other automated water level monitoring systems exist as well, however most of the technologies have flaws in practise thus far. We have attempted to solve these issues by putting in place an effective automated water level monitoring and control system. The goal of this study has been to develop a versatile, cost-effective, easily adjustable, and, most significantly, portable technology that may help us tackle our water wastage problem. We used ESP and an ultrasonic sensor to cut costs and make this work more cost-effective. Furthermore, this work does not necessitate the installation of an unique tank; current water tanks can be utilised. It can be used in homes, hospitals, offices, colleges, and so on. This work has been tested and completed successfully.

References

[1]. Dhivyapriya, B., Gulabsha, C., Maniprabha, S. P., Kandasamy, G., & Chandrasekaran, D. V. (2016). GSM based water tank level monitoring and pump control system. International Journal of Advanced Research in Management Architecture and Technology Engineering (ARMATE), 108-112.
[2]. Kaur, D. (2016). IoT based water tank control. Embedded for You.
[3]. Maqbool, S., & Chandra, N. (2013, September). Real time wireless monitoring and control of water systems using ZigBee 802.15.4. In 2013, 5th International Conference and Computational Intelligence and Communication Networks (pp. 150-155). IEEE. https://doi.org/10.1109/ CICN.2013.42
[4]. Perumal, T., Sulaiman, M. N., & Leong, C. Y. (2015, October). Internet of Things (IoT) enabled water monitoring system. In 2015, IEEE 4th Global Conference on Consumer Electronics (GCCE) (pp. 86-87). IEEE. https://doi.org/10. 1109/GCCE.2015.7398710
[5]. Raghavendra, R., Kumari, M. U., &Hariprasad, S. A. (2013). Implementation of Simulated Water Level Controller. International Journal of Advanced Research in Computer Science and Software Engineering, 328-332.
[6]. Shirode, M., Adaling, M., Biradar, J., & Mate, T. (2018). IOT based water quality monitoring system. International Journal of Scientific Research in Computer Science, Engineering and Information Technology, 3(1), 1423-1428.
[7]. Varma, P., Kumar, A., Rathod, N., & Jain, P. (2015). IoT based water management system for a Campus IEEE. IEEE First International Smart Cities Conference (ISC2). https:/doi.org/10.1109/ISC2.2015.7366152
[8]. Vijayakumar, N., &Ramya, A. R. (2015, March). The real time monitoring of water quality in IoT environment. In 2015, International Conference on Innovations in Information, Embedded and Communication Systems (ICIIECS) (pp. 1- 5). IEEE. https://doi.org/10.1109/ICIIECS. 2015.7193080
[9]. Water, (n.d). In Wikipedia. Retrieved from https://en.m. wikipedia.org/wiki/Water