Boniface Ntambara, Nkoloogi Blasius, Devotha G. Nyambo, Dickson Kipketer, Mussa Ally
©SHUTTERSTOCK.COM/ELENABSL
The Arusha Urban Water Supply and Sanitation Authority (AUWSA) is a public utility responsible for ensuring the reliable delivery of clean water to the people of Arusha, Tanzania. However, issues with water bill payments have emerged, which have impacted the AUWSA’s operations and ability to provide a sustainable and affordable water supply service. Late payment of water bills and revenue loss due to the outdated postpayment water metering technology are the major challenges faced by the AUWSA. To address these issues, a study has designed and developed an intelligent GSM-based smart prepaid water meter with improved prepayment methods. The prepaid water meter includes a custom user interface, water flow sensor, automatic token generator, and Unstructured Supplementary Service Data (USSD) application. Customers can easily register; load their water credits using Airtel Money, TigoPesa, or Mpesa; and check their usage. An LCD displays water usage information, and customers receive short message service (SMS) notifications via GSM technology when their tokens are about to expire or have been successfully loaded. Water flows, and the valve stops when credits are exhausted. The system’s administrator (admin) communicates with the meter remotely via a web interface developed using PHP, HTML, JavaScript, and SQL. This interface enables the AUWSA to monitor and manage the meter, which should help reduce revenue losses and improve overall efficiency. Future research should focus on predicting water leakage and cybersecurity using artificial intelligence (AI)/machine learning (ML) technologies.
The annual population growth in Arusha, Tanzania, has led to higher demand for water consumption (Lifewater, 2022). In 2022, the population of the Arusha region in Tanzania had reached 3.5 million (NBS, 2022). As a result, the number of customers of the country’s water company in each district had increased by up to 5% compared to the number of customers in 2021 (Rujomba, 2022; WaterAid, 2021). Water loss rates have increased in the Arusha region, causing higher losses for water suppliers. For example, between 2019 and 2021, the AUWSA water company experienced an annual increase of 5% in water loss, rising from 21.5% to 26.5% (Maserele, 2021).
Water is one of the most important resources, but, as the population in Tanzania rapidly grows, water resources are also becoming tremendously scarce. This is due, in part, to irresponsible usage and poor management systems, which have resulted in the collapse and obsolescence of the water metering infrastructure of the water utility company (UNICEF, 2022). In the capacity of the government of Tanzania through the AUWSA, it was noted that these resources have produced increased revenues from users across the nation, particularly in Arusha, which is a tourist region. Therefore, the AUWSA implemented water metering systems to improve how water should be handled by both consumers and service providers during revenue collection processes (Suresh et al., 2017).
For billing procedures, the water metering systems—like volume counters, flow meters, flow-gauging devices, accumulators, billing systems, or water totalizators—are designed to measure and record, from the pipes at outlets, the volume of water consumed in homes, industries, offices, or other facilities (Rodriguez, 2005). These types of water meters, categorized as postpaid meters, are mechanically and electromagnetically operated such that users are billed and pay charges after water utilization, but they are easy to tamper with for zero meter readings (AUWSA, 2022). The remote monitoring and management of water metering systems, such as increased security, service stability, resilience to disruptions, and high performance, are needed to reduce losses to the AUWSA company (Moahloli et al., 2019). The current utilization of water meters by the AUWSA has resulted in losses for both the company and its users due to regular misreadings. In addition, many customers frequently disregard their water bills and fail to make payments, resulting in overdue amounts. As a consequence, the company and users both experience financial losses. The proposed system, which incorporates prepaid and GSM technologies, can overcome these challenges and safely resolve them.
An analysis of water metering infrastructure markets demonstrated that the integration and deployment of water prepayment systems is a very important subject in research, and different researchers have studied these infrastructures with different metering and prepayment models. All of the water metering and payment systems presented in the literature review of the water metering study had merits and drawbacks. The application of optimal metering and prepayment theories showed that a novel and intelligent GSM prepaid water meter can dynamically improve and manage water metering and payment challenges. Proving the performance of this novel and intelligent GSM prepaid water metering approach for a wider range of variation in water metering and payment parameters is the key motivating factor for this article.
This research is organized into four major sections. First, it gives an overall introduction to water metering and the payment problems and demerits in Arusha, Tanzania, including the motivation and novelty of the proposed intelligent GSM prepaid water meter. Second, past achievements of water metering systems using post- and prepayment approaches are briefly reviewed and presented. This article also identifies past research gaps and suggests a novel solution to the challenges. Third, the materials and methodology needed to solve complaints and problems related to the water metering and payment are addressed: in the case study, a novel and intelligent GSM-based smart prepaid water metering system with different payment methods is studied and developed. Fourth, the article also proposes a solution and discusses the hardware and software requirements of the developed prototype with prepaid unit, user unit, and server admin unit integration and deployment. The proposed and developed GSM-based smart prepaid water meter is compared with the current water metering and payment strategy by testing and performance experiments. Finally, the general conclusion and future works are documented.
A prepaid water meter based on an AT89S52 microcontroller was developed by Nurhayata (2021), and this system provides an offline prepaid service that did not require access to the Internet. The microcontroller reads the number of water pulses stored in electrically erasable programmable read-only memory (EEPROM) memory and displays the remaining information of the customer’s water pulses on the LCD. If the system still has water pulses, the microcontroller opens the solenoid valve to allow water to flow out of the water source to the user’s water network.
The microcontroller also measures the amount of water usage through a flow sensor. Furthermore, the microcontroller updates the number of water pulses in the EEPROM memory according to the amount of water usage by reducing the number of customer water pulses. If the water pulses have run out, the system closes the valve and informs the customer on the LCD screen to immediately refill the pulse. Unfortunately, infrared difficulties, such as line-of-sight constraints; the risk of blocking by common items; restricted range; poor data transmission rates; and the effects of environmental variables, such as rain, fog, dust, and pollution, were not considered (Thang, 2020).
A wireless sensor network for a digital water meter with a web-based interface for centralized valve control was also developed. This metering system uses a water flow sensor as a valve controller and LoRa SX1278 technology to communicate between the node and the sink node. This improvement may make it easier for officers to simplify consumption, payment, and water controller monitoring, potentially reducing the need for officers to visit each customer’s home. The protocol, however, does not allow continuous transmission due to constraints on the frequency range and distance over which it is used (Hudiono, 2021).
An intelligent SMS-based remote water metering system was proposed by Islam and Wasi-ur-Rahman (2009). The system contains the prepaid unit that connects the water supply line from the utility supplier to the user line. It controls the water supply to the user line and measures water usage. This prepaid unit keeps informing about how much water is to be supplied and can disconnect the user’s water supply line. In addition, the unit should communicate with the main server to receive rechargeable updates. It also transmits security alert signals to the main server unit. The main server unit updates all of the prepaid units and also stores necessary user information. The main weakness of this system is that it cannot manage to identify the user meter number when poor data transfer occurs, and it disrupts users with unexplainable stoppages.
It is also easier to tamper with the water reading information during the bill payment process (Marais, 2016). Current water metering and payment methods with systems that use prepaid voucher codes prove to be insensitive, inefficient, ineffective, and inaccurate for both water users and utility suppliers. They are inefficient and less secure—with lower data speed transfer and capacity—compared to the intelligent GSM technology, which is based on Internet of Things systems and provides high computational time and processes for the system. The objective of this study was to design and implement a novel and intelligent GSM prepaid water meter with which a user has to pay before accessing water services. This study also aimed to develop a smart prepaid water meter that enables the water service provider to mitigate revenue loss; minimize water wastage, water metering, and payment tampering; and eliminate the monthly meter reading time and stresses on the utility operator side. The developed GSM prepaid water metering system also presents enhanced and optimized metering and payment systems to the water utility supply company.
A USSD application was developed in which a user is able to send queries from a mobile phone through a USSD gateway, which forwards them to a hosted web application that responds to HTTP requests via application programming interface clouds. A payment method like Airtel Money, M-Pesa, and or TigoPesa was selected and authorized by a payment gateway to allow the admin server to token generations and send them back to the user.
A database on the admin server side was created and developed to store user information, such as name, telephone number, city, meter number, and tokens bought. The system design also involves an ATmega 328 microcontroller that processes and controls all sensing and actuating unit data, like the GSM module, which sends SMS messages to the user; a water flow sensor that measures the flow rate and volume of water that passes to the solenoid valve to open and close the water flow; a remote control and keypad that enable the user to enter tokens; an LCD responsible for a water credits display; a buzzer for alarms in the case of an alert notification; and a 12-Vdc rechargeable battery that was converted to 5 Vdc to power the whole developed system. Fig. 1 shows the GSM-based smart prepaid water meter that was designed and developed.
Fig 1 A block diagram of the GSM-based smart prepaid water meter. REST: Representational State Transfer.
Fig. 2 shows the use cases of the software part of the developed system. It allows the user to log in, select a payment method, choose water units, buy credits, and receive the tokens and credit information. The water utility supplier (provider) can manage water bills, manage user complaints, generate tokens, and maintain the system according to the user and system security requirements.
Fig 2 The software system use case.
The developed system allows the user to check the meter status and enter tokens after a water credit payment; then, the user receives a message notification of loaded tokens. The water provider can manage water bills, manage user complaints, enable the prepaid system, and then disable and maintain the system. Fig. 3 illustrates the use cases of the developed hardware system.
Fig 3 The hardware use case.
The developed system starts to initialize all sensing and actuating units and displays a welcome message including the available units in the meter. It then checks the number of available units against the threshold that was set. Therefore, if the number of available units is greater than zero, the microcontroller sends an opening command signal to the solenoid valve, and then water can flow out. Otherwise, if the number of available units is not greater than zero, the solenoid valve is commanded by the microcontroller through a 5-Vdc relay switch to close and shut down the valve. In addition, the LCD displays the low status of units or credit, and then the GSM sends an SMS message to the user’s mobile phone, notifying them about the low unit status and advising the customer to buy tokens and load them into the meter. If the user loads invalid tokens into the prepaid meter unit, the system should not accept the tokens and request that the user reload them. An SMS notification of recharged water units is sent to the user’s mobile phone via GSM technology. Fig. 4 shows a flowchart diagram of processes for the developed system prototype.
Fig 4 A flowchart of the developed system.
The system architecture of this study consists of a USSD application, web application, admin dashboard, database, and hardware meter.
Fig. 5 shows the dashboard of the admin storing different users’ information. The admin can register a new user with customer information including the phone number, city, village, and tokens bought. The system assigns each customer a unique meter number.
Fig 5 The admin dashboard on the water supplier company side.
The admin also has the capability of registering a new user. The registration window contains user personal identification information, such as the phone number, city, village, and national identity number, as shown in Fig. 6.
Fig 6 A new user registration by the admin.
Fig. 7 depicts the USSD application window, which prompts the user to enter the meter number that was assigned during the customer registration. Before the system accepts the meter number, it must validate it in the database.
Fig 7 The USSD application window.
The USSD application window provides options from which the user can select to buy water credits, view account information, etc. After selecting the option to buy water, the user enters the desired number of units, as shown in Fig. 8.
Fig 8 A user buying water.
The customer can select payment methods, such as the TigoPesa, M-Pesa, and Airtel Money applications, and insert the corresponding number, as illustrated in Fig. 9.
Fig 9 The payment method selections.
In addition, if the user selects a payment method like Airtel Money, the user can also buy water credits for a chosen number of liters that they can afford, and the system admin requests that the water user enter an encrypted payment method password as a security precaution, as indicated in Fig. 10.
Fig 10 Buying on Airtel Money with an encrypted password.
The admin system confirms that the user has successfully bought the water credits as a feedback message that includes the number of liters purchased and USSD tokens to be loaded into prepaid units meter, as shown in Fig. 11.
Fig 11 The water credits have been bought successfully.
The ATmega 328 microcontroller is powered by 5 Vdc, using a rechargeable battery to control the entire hardware system. After powering this microcontroller, the GSM module sends a notification message to the user’s mobile phone regarding the current status of credit. The flow rate data from the water flow sensor are sensed, calibrated, and analyzed. The 12-Vdc solenoid valve has been powered to enable open and closed operation for the water supply. This operation is performed by a 12-Vdc electrical relay, which is in normally open and normally closed modes.
The LCD display is also connected to the system to display the amount of water volume loaded and the balance of units in the system. The infrared remote keypad is used to punch the purchased tokens into the water meter. The buzzer has been used for alarm alerts of low credit status. Fig. 12 shows the printed circuit board (PCB) hardware architecture design of the GSM-based smart prepaid water meter.
Fig 12 The 2D printed circuit board hardware architecture design.
The PCB hardware design (Fig. 12) has also been implemented in 3D for the proper design of the system board. Fig. 13 illustrates the 3D board that controls the whole developed water metering system.
Fig 13 A 3D view of the PCB.
The hardware system was tested and validated during the experiment. Fig. 14 shows the PCB of the system connected with other components, and Fig. 15 shows the connected LCD and manual keypad that have been used on the soldering side in this study.
Fig 14 The physical PCB of the GSM smart prepaid water meter.
Fig 15 The LCD and keypad as assembled in the prepaid meter.
The user is able to load tokens using a remote keypad into the hardware prepaid smart water meter. After buying the water credits and generating tokens (see Fig. 11), the user needs to insert those tokens remotely. After inserting the tokens, the water starts flowing for usage, and, after the tokens are finished, the solenoid valve closes and stops the water flow. Fig. 16 shows a user punching the tokens into the prepaid water meter during the testing phase.
Fig 16 A GSM prepaid meter with a user punching the tokens.
Tests were conducted by buying 13 L of water credits, and the credit information was successfully sent to the user’s mobile phone after the prepaid unit informed the user that there were no credits (Fig. 17). The user consumes the water bought and, whenever the water is finished, the prepaid unit again sends a message via the GSM modem to the user’s phone asking the user to load more credits.
Fig 17 An SMS notification from the GSM smart prepaid water meter.
Fig. 18(a) shows the final system prototype displaying 13 units of water loaded, and Fig. 18(b) indicates that 4.9 units have been used so far and that the balance is 8.1 units, as displayed on the LCD display.
Fig 18 The GSM-based smart prepaid water meter displays (a) loaded units and (b) used and remaining units.
In this study, a GSM-based smart prepaid water meter was developed and tested with different scenarios. Water management was improved by reducing limitations such as low revenue collection, time-consuming processes, frequent complaints, human errors, and inconveniences. The performance of this study has been measured at a 99.98% success rate as efficient and effective in minimizing user costs and increasing revenues for water service providers because the water company personnel stress related to traveling and billing the water usage at the end of the month was removed. Furthermore, the use of USSD in this system enabled users of feature phones to easily use the system since USSD is readily available on users’ phones as long as it was launched. Therefore, USSD does not require storage space to be used. The GSM through which this system sends SMS notifications to the user was stable, with a communication protocol in which SMS bundles are affordable to the user. Moreover, in addition to a keypad, an infrared remote control was included in this system for user input within a range of at least 8 m. Future work is recommended to integrate the USSD application with a mobile application using AI/ML/DL (deep learning) technologies to completely mitigate cyberthreats and cyberattacks on prepaid systems and strategic approaches.
Upon request, the corresponding author will provide the data that support the conclusions of this article.
The authors declare that there are no conflicts of interest regarding the publication of this article.
This work was supported in part by the Center of Excellence for ICT in East Africa (CENT@EA) under the Master of Science in Embedded and Mobile Systems program, The Nelson Mandela African Institution of Science and Technology, P.O. Box 447, Arusha, Tanzania.
L. Water, “The Tanzania water crisis: Facts, progress, and how to help.” Lifewater International. Accessed: Dec. 25, 2022. [Online] . Available: https://lifewater.org/blog/tanzania-water-crisis-facts/
“Matokeo ya sensa,” National Bureau of Statistics, Dodoma, Tanzania, Nov. 2022. [Online] . Available: https://sensa.nbs.go.tz/
J. Rujomba, “Tanzania: 12bn/ – To implement water projects in Arusha,” Tanzania Daily News, vol. 2, no. 5, pp. 11–15, Aug. 2022. [Online] . Available: https://allafrica.com/stories/202208110076.html
“Sustainable rural water services in Arusha,” WaterAid, Arusha, Tanzania, 2021. [Online] . Available: https://www.wateraid.org/tz/
L. Maserele, “Improved nonrevenue water management using GIS and water loss recovery,” AUWSA, Arusha, 2021. [Online] . Available: https://www.esri.com/en-us/lg/industry/water/stories/auwsa-case-study
“Water scarcity and metering issues in Arusha,” UNICEF, Arusha, Tanzania, 2022. [Online] . Available: https://www.unicef.org/ [Online] . Available: https://www.unicef.org/wash/water-scarcity
M. Suresh, U. Muthukumar, and J. Chandapillai, “A novel smart water-meter based on IoT and smartphone app for city distribution management,” in Proc. IEEE Region 10 Symp. (TENSYMP), 2017, pp. 1–5, doi: 10.1109/TENCONSpring.2017.8070088.
M. O. B. Rodriguez, “Water meter, municipal water supply,” in Water Encyclopedia. Hoboken, NJ, USA: Wiley, 2005, ch. 1, pp. 575–585.
“Water metering,” AUWSA, Arusha, Tanzania, Dec. 2022. [Online] . Available: https://design.maji.go.tz
A. Marnewick, A. Moahloli, and J. H. Pretorius, “Domestic water meter optimal replacement period to minimize water revenue loss,” Water SA, vol. 45, no. 2, pp. 165–173, Apr. 2019, doi: 10.4314/wsa.v45i2.02.
I. G. Nurhayata, I. W. Sutaya, and K. U. Ariawan, “The development of prepaid water meters based on AT89S52 Microcontroller,” J. Phys., Conf. Ser., vol. 18, no. 2, pp. 1–9, Mar. 2021, doi: 10.1088/1742-6596/1810/1/012004.
V. C. Thang, “A solution for water factories in Vietnam using automatic meter reading technology,” Int. J. Comp. Netw. Inf. Secur., vol. 10, no. 8, pp. 44–50, 2018, doi: 10.5815/ijcnis.2018.08.05.
Boniface Ntambara (bonifacen@ieee.org) earned his B.Sc. (Eng.) degree in electrical power engineering from the University of Rwanda/College of Science and Technology, Rwanda, in 2015; his M.Sc. degree in industrial engineering from Moi University, Kenya, in 2022; and his M.Sc. degree in embedded and mobile systems (embedded system option) from The Nelson Mandela African Institution of Science and Technology, Tanzania. He is with the Department of Embedded and Mobile Systems, School of Computational and Communication Science and Engineering, The Nelson Mandela African Institution of Science and Technology, Arusha 447, Tanzania. His research interests include industrial automation, programable logic controller and supervisory control and data acquisition systems, intelligent systems, aerial robotics, and drone technology. He is a reviewer at Springer Nature for International Journal of Intelligent Systems and Robotics Applications; a reviewer for the IEEE Southern Power Electronics Conference (IEEE SPEC 2022); and an IEEE NM-AIST Student Branch Chair, IEEE Tanzania Section, Europe, Middle East, and Africa (Region 8). He is a Member of IEEE.
Nkoloogi Blasius (blasiusn@nm-aist.ac.tz) earned his B.Sc. degree in computer science from Cavendish University, Uganda. He is currently pursuing his M.Sc. degree in embedded and mobile systems (embedded systems) at the Department of Embedded and Mobile Systems, School of Computational and Communication Science and Engineering, The Nelson Mandela African Institution of Science and Technology, Arusha 447, Tanzania. His research interests include Python, Java, and C++ programming; operating systems; embedded systems; digital signal processing; and MATLAB software. From 2011 to 2020, he was a sound engineer and senior audio producer at Bless Touch Records; a training assistant in computer repair, digital signal processing, databases, and supercomputing technologies; and an audio production instructor at ESOM School of Music in Uganda.
Devotha G. Nyambo (devotha.nyambo@nm-aist.ac.tz) earned her Ph.D. degree in information and communication science and engineering from The Nelson Mandela African Institution of Science and Technology. She is a lecturer and researcher with the Department of Embedded and Mobile Systems, School of Computational and Communication Science and Engineering, The Nelson Mandela African Institution of Science and Technology, Arusha 447, Tanzania. She is a well-versed systems analyst and lecturer who consistently works on data-driven models and platforms. She has previously worked on dairy farming systems for cluster-based modeling and agent-based simulations of requirements for more milk. Her research interests include data-driven solutions for health and small-scale agriculture system advancements. As an African Women in Agricultural Research and Development fellow, she has engaged in research that benefits East Africans for more than seven years, with a track record of winning grants and scholarships, some of them being from the Government of Tanzania through the Tanzania Commission for Science and Technology, African Development Bank through Nelson Mandela–AIST, AWARD, Deep Learning Indaba, Women in Machine Learning, Queen Elizabeth Scholarship–Advanced Scholars Program, and Grace Hopper Celebrations for Women in Computing. She is an active researcher and works with M.Sc. and Ph.D. students in the areas of data science and artificial intelligence, and she is actively publishing her original work in various peer-reviewed journals and conference proceedings.
Dickson Kipketer (kipketert@nm-aist.ac.tz) earned his B.Sc. degree in computer science from Moi University, Kenya. He is pursuing his M.Sc. degree in embedded systems at the Department of Embedded and Mobile Systems, School of Computational and Communication Science and Engineering, The Nelson Mandela African Institution of Science and Technology, Arusha 447, Tanzania. He is a Member of the IEEE.
Mussa Ally (mussa.ally@nm-aist.ac.tz) earned his B.Sc. degree in computer engineering and information technology from the University of Dar es Salaam in 2008; his master of science degree in telecommunication engineering from the University of Dodoma in 2011; and his Ph.D. degree in information and communication engineering from the Beijing Institute of Technology, Beijing, China, in June 2017. He is a senior lecturer with the Department of Embedded and Mobile Systems, School of Computational and Communication Science and Engineering, The Nelson Mandela African Institution of Science and Technology, Arusha 447, Tanzania, and a deputy centre leader of the Centre of Excellence for ICT in East Africa. His research interests include signals and communication systems analysis, modeling, optimization, and development, and he is currently working on the development of a farmers’ extension support system and a centralized private school admission system.
Digital Object Identifier 10.1109/MPOT.2023.3262908