Smart Monitoring System of Water Tank Based on Internet of Things





The first village located in Sei Meran Village, Pangkalan Susu Subdistrict, with a population of 640 people consisting of 325 men and 315 women. The village experienced clean water scarcity and received assistance in the form of a drilled well, water pump, and water tank from the Langkat Police Chief through the POLRI Cares for the Environment program. This program significantly improved villagers' access to clean water. However, the village administration and the village head found it challenging to monitor and calculate the fair distribution of clean water. This issue was addressed by implementing an Internet of Things (IoT)-based smart water tank system. This automated system incorporates various sensors, including an ultrasonic sensor and a relay module, to control the water pump and fill the water tank. Additionally, a 4x4 keypad allows villagers to enter an access code that activates the solenoid valve and water flow sensor to measure the distributed water volume. The system can be remotely monitored via the Blynk application using internet access. The ESP8266 microcontroller serves as the data center and control unit. The test results show that the ultrasonic sensor has an average accuracy of 98.7% in measuring distance, while the flow meter sensor has an average accuracy of 98.3% in measuring water flow volume. This system can accurately and efficiently monitor water levels and water withdrawal, automating the water resource management process in the tank.






INTRODUCTION
Water is the most important substance in human life.Water is needed by all living things on earth to survive.In everyday life, water is often used for drinking, bathing, washing, cooking and so on.The human body consists of 60% water, so water is needed to maintain normal body functions.However, in everyday life, there are still many activities that use water inefficiently, so that clean water is wasted.
Water tanks are an important infrastructure in meeting people's daily water needs.Water tanks function to store water from water sources, such as PAM, wells, or springs.The water stored in the water tank can then be used for household needs, such as bathing, washing, cooking, and drinking.This water tank is also widely used for office needs, such as for toilets, kitchens, and office equipment.Even water tanks are also widely needed for industrial needs such as for production processes, sanitation or cooling.
There is a hamlet that is experiencing difficulties in getting clean water, the hamlet is Sei Pandan Hamlet located in Sei Meran Village, Pangkalan Susu District.The hamlet is experiencing difficulties in getting clean water, so it received assistance in the form of a drilled well, a water pump machine and a water tank from the Langkat Regency Police Chief through the POLRI Cares for the Environment program.Until now, the drilled well infrastructure is still used by local residents to get a source of clean water.The drilled well infrastructure is guarded by the Head of Sei Pandan Hamlet.https://doi.org/10.56211/hanif.v2i1.25 Abdillah Husaini 23 Every community who wants to take clean water to the drilled well infrastructure must bring a place to store water such as a bucket, bucket and so on.With an affordable clean water capacity, Sei Meran Village will make regulations to limit the taking of clean water from the drilled well infrastructure in Sei Pandan Hamlet.The regulation is that every resident who comes to get clean water will get approximately 70-110 liters of clean water per day, adjusting the number of families in their respective homes.With this regulation, the village hopes that clean water can be distributed accurately and fairly.This makes it difficult for the Head of Sei Pandan Hamlet to calculate the amount of water that will be released from the water tank when residents come to get clean water.The Head of Sei Pandan Hamlet also has to check the stock of clean water in the water tank, turn the water pump machine on and off manually when the water in the water tank is low.This is because the water pump machine provided by the LANGKAT POLICE CHIEF through the POLRI Cares for the Environment program still uses a manual water pump machine.Inaccurate water level indicators in water tanks can cause water availability to become uncontrolled.This is because we cannot know for sure when the tank is full or empty.As a result, water can overflow and be wasted, or we need to turn the water pump on and off frequently, which can cause inconvenience (Gunawan et al., 2020).
The distance between Sei Meran Village and Sei Pandan Hamlet is quite far, approximately 12 kilometers with bad roads, making it difficult for the village to monitor the condition of the drilled well in implementing the regulations that have been made to run smoothly.There needs to be a remote monitoring system to monitor the extraction of clean water from the drilled well accurately.
Therefore, in this study, an intelligent monitoring system for water tanks based on the Internet of Things will be created.This system allows the water pump machine to turn on automatically when the water in the tank starts to decrease and the water pump machine can turn off automatically when the water tank is full.This system can also make it easier for the Head of Sei Pandan Hamlet to distribute the amount of clean water to the Sei Pandan Hamlet community accurately and fairly, according to the rules made by Sei Meran Village.This system is also equipped with a water usage monitoring display that can be monitored directly by the Head of Sei Meran Village remotely.This makes it easier for the Village Head to monitor the extraction of clean water in the hamlet so that it can run smoothly according to the regulations made.With the existence of an intelligent monitoring system for water tanks based on the Internet of Things, the infrastructure of the drilled well can experience significant changes in the management and utilization of clean water resources.

Complete Tool Set
In designing a smart monitoring tool for IoT-based water tanks, there are a series of designs that will be carried out, namely as follows:

Monitoring Application
In designing an IoT-based smart water tank monitoring system, there is a monitoring display that will be created using the Blynk application, namely as follows:

Hardware Design Results
In designing a water level monitoring and control system in a tank, the results of the hardware design used consist of various electronic and mechanical components.In the NodeMCU microcontroller, a feature is already available to connect to wifi, so that it can be connected to the Internet.In addition, there is also a relay used to control the solenoid valve, so that it can be opened and closed.Namely the HC-SR04 Water Level sensor, 1 Channel Relay, AC / DC pump, Electric solenoid valve, water flow meter, 4x4 keypad, 12V 10 A adapter, Charger adapter, USB Female, water tank or mini water gallon and jumper cable.The results of the display of the designed tool can be seen in Figure 4.19 below: Testing on the power supply circuit serves to measure the output voltage value of the adapter used.This is done in order to find out the amount of voltage issued by the adapter to ensure that the value is in accordance with the needs of the electronic components used in the system.In figure 4 is a series of power supply tests from the voltage source used, namely using a 12volt 10 A power supply to drive the water pump, and a 5volt adapter to provide voltage supply for electronic components such as solenoids, pumps and relays.The results of this measurement show that the input value coming out of the power supply circuit is 12.47 volts.

HC-SR04 Water Level Sensor Testing
The HC-SR04 ultrasonic sensor output test was conducted to test the accuracy of the distance readings produced by the sensor.In this test, the ultrasonic sensor is directed at the water surface at different distances, and the distance reading data produced by the sensor will be compared with manual measurements using a ruler or other measuring instrument.The purpose of this test is to ensure that the ultrasonic sensor can provide accurate distance readings, so that it can be used to monitor the water level in the tank accurately.This test was conducted 2 times, namely testing water measurements with a distance of 5 cm between the surface of the ultrasonic sensor and the water and testing water measurements with a distance of 15 cm between the surface of the ultrasonic sensor and the water, as can be seen in Figure 4.3 below: It can be seen in figure 5 above, when the ultrasonic sensor reads the distance between the water and the ultrasonic sensor surface of 5 cm, the 12v dc pump is off (does not fill the water in the water tank) and when the ultrasonic sensor reads the distance between the water and the ultrasonic sensor surface of 15 cm, the 12v dc pump is on (fills the water in the water tank).Furthermore, there is a voltage output measured on the Water Level sensor, namely:

Testing of Flow Meter Sensor and Solenoid Valve
Flowmeter testing is carried out to test the accuracy of the water flow rate reading produced by the flowmeter.In this test, a certain volume of water is flowed through the solenoid valve to the flowmeter, and the water volume reading data produced by the flowmeter will be compared with the actual water volume.The purpose of this test is to ensure that the flowmeter can provide accurate water flow rate readings, so that the amount of water taken by the user can be monitored properly.

Figure 6. Flow Meter Measurement on Water Pipes
In Figure 6 above, the researcher measured the output or output of the water flow in the water tank used.Keypad testing is done to ensure that the keypad can work properly in receiving input from users or villagers.In this test, each button on the keypad is pressed one by one, and the microcontroller will read and record the input received from the keypad.The results of this input reading are then compared with the input that should be received.The purpose of this test is to ensure that the keypad can receive input from users accurately, so that users or beneficiaries of water assistance in the village can enter the code correctly to take water from the reservoir. https://doi.org/10.56211/hanif.v2i1.25 Abdillah Husaini 27

Water Level Sensor Accuracy Testing Data Results
The accuracy test of the HC-SR04 ultrasonic sensor was carried out to determine how accurate the sensor is in measuring the distance between the sensor surface and the water surface in the tank.In the program configuration, the HC-SR04 water level sensor is used as a water level monitor in the tank, the sensor is programmed with a certain height distance to give commands to the relay.When the water level is above 15 cm from the ultrasonic sensor distance, the pump relay will be active to fill the water tank, if the water distance has reached 5 cm from the ultrasonic sensor surface, the relay will turn off again.The following is a serial monitor program display that can be seen: In this test, the ultrasonic sensor is directed towards the water surface at different distances, and the distance reading data generated by the sensor is compared with manual measurements using a ruler or other measuring instrument.
The table of measurement data measured by the HC-SR04 water level sensor during implementation for 1 (one) day in the field can be seen in the table below:  Based on the data in the table, it can be seen that at 08.00 WIB, the measured distance by the ultrasonic sensor was 5 cm, which indicates that the tank is full, so the pump is off.As time goes by, the measured distance increases, which indicates that the water level in the tank is decreasing.At 14.20 WIB, the measured distance reaches 17.5 cm, which indicates that the tank is quite empty, so the pump is on to refill the tank.The pump continues to run until 21.00 WIB, where the measured distance returns to 5 cm, which indicates that the tank is full, so the pump is off again.During testing, the ultrasonic sensor provides accurate distance readings with an accuracy percentage of 100%.This shows that the ultrasonic sensor can work well in monitoring the water level in the tank and controlling the pump to fill the tank automatically.

Flow Meter Sensor Test Data Results
Flowmeter sensor testing is carried out to determine how accurate the sensor is in measuring the rate of water flow coming out of the tank when water is taken by the community.In the tests that have been carried out, data from the water flow meter sensor is read through the blynk application in real-time.The display of the data that is read can be seen in the image below: From this data, it can be concluded that the flowmeter sensor can work well in measuring the water flow rate and volume of water taken by the community from the reservoir.This information is important for monitoring water use by the community and managing the availability of water in the reservoir better.

CONCLUSION
The conclusions of the research that has been conducted are as follows: The water level monitoring and control system in the reservoir has been successfully designed and implemented using the HC-SR04 ultrasonic sensor to measure the water level in the reservoir, the flowmeter sensor to measure the flow rate of water taken by the community, and the relay and solenoid valve to control the water pump and water intake tap, the HC-SR04 ultrasonic sensor has high accuracy in measuring the distance between the sensor surface and the water surface in the reservoir, with an average accuracy of around 98.7%.This allows the system to monitor the water level in the reservoir accurately, the flowmeter sensor also shows good accuracy in measuring the water flow rate and volume of water taken by the community, with an average accuracy of around 98.3%.This information is important for monitoring water usage by the community and better managing the availability of water in the reservoir, the control system using the relay and solenoid valve can work well in controlling the water pump and water intake tap automatically based on ultrasonic sensor readings and user input via the 4x4 keypad, with this system, the water level in the tank can be monitored in real-time, and water filling and withdrawal can be regulated automatically, thereby increasing the efficiency of water resource management.

Figure 4 .
Figure 4. Power Supply Testing Power Supply

Figure 5 .
Figure 5. Water Level Sensor Distance Testing

Figure 8 .
Figure 8. Arduino IDE Program View Water Level Initiation

Figure 9 .
Figure 9. Sensor Measured Distance Measurement Graph

Figure 10 .
Figure 10.Water Flow Meter Reading Display ResultsThe next step in this test, a certain amount of water with a certain volume is flowed through the flow meter sensor, and the volume reading data generated by the sensor via the blynk application display is then compared with the actual volume of water measured manually using a measuring cup or other volume measuring tool.

Table 1 .
Water Level Output Voltage Measurement

Table 2 .
Water Flow Meter Sensor Output Voltage

Table 3 .
Periodic Ultrasonic Sensor Testing