SciELO - Scientific Electronic Library Online

 
vol.14 issue6Analysis of the long-term effects of groundwater extraction on the water balance in part of the Urucuia Aquifer System in Bahia - BrazilDecolorization of textile azo dye Reactive Red 239 by the novel strain Shewanella xiamenensis G5-03 isolated from contaminated soil author indexsubject indexarticles search
Home Pagealphabetic serial listing  

Services on Demand

Journal

Article

Indicators

Related links

Share


Revista Ambiente & Água

On-line version ISSN 1980-993X

Rev. Ambient. Água vol.14 no.6 Taubaté  2019  Epub Nov 28, 2019

https://doi.org/10.4136/ambi-agua.2407 

ARTICLES

Low-cost wireless sensor network applied to real-time monitoring and control of water consumption in residences

Rede de sensores sem fio de baixo custo, aplicada ao monitoramento e controle em tempo real do consumo de água nas residências

Arnon Jadir Rodrigues Alves1  * 
http://orcid.org/0000-0003-4579-3879

Leandro Tiago Manera1 
http://orcid.org/0000-0002-8908-1470

Marcel Veloso Campos2 
http://orcid.org/0000-0002-0581-7314

1Faculdade de Engenharia Elétrica e de Computação (FEEC). Departamento de Componentes Semicondutores, Instrumentos e Fotônica (DSIF). Universidade Estadual de Campinas (UNICAMP), Rua Carlos Gomes, n° 241, CEP: 13083-970, Campinas, SP, Brazil. E-mail: arnonjra@hotmail.com, manera@dsif.fee.unicamp.br

2Departamento de Ciências da Computação. Universidade Estadual de Montes Claros (UNIMONTES), Avenida Prof. Rui Braga, s/n, CEP: 39401-089, Montes Claros, MG, Brazil. E-mail: marcel.veloso@unimontes.br


Abstract

The objective of this work is to explore the implementation of a low-cost real-time monitoring and control of water consumption together with a user feedback interface. Water usage information will be available in a cloud storage and can be accessed through a mobile application. The collected data allows access and supervision of both client- and water concessionaire. Project feasibility is analyzed in terms of hardware and software, as well as each element required for the design. The simulations were carried out with the purpose of verifying system operation, considering the following metrics: transmission rate, signal strength and transmission quality. After the simulations, the hardware and software were integrated, and the final result was presented through a mobile application. This work presents and applies a design and development methodology of Wireless Sensor Network (WSN) using Internet of Things (IoT) technologies and Smart City in water-distribution systems.

Keywords: IoT; smart city; water consumption; wireless sensor network.

Resumo

O objetivo deste trabalho é realizar o monitoramento e o controle em tempo real do consumo de água nas residências, com feedback aos usuários e de baixo custo. As informações de consumo de água serão disponibilizadas na nuvem e poderão ser acessadas através de um aplicativo de celular. Os dados coletados possibilitam que a concessionária de fornecimento de água da cidade também tenha acesso e supervisão sobre eles. Sendo assim, é analisada a viabilidade do projeto em termos de hardware e software e seus elementos necessários para sua concepção. Feito isso, simulações foram realizadas com o objetivo de comprovar o funcionamento do sistema considerando as seguintes métricas: taxa de transmissão, potência do sinal e qualidade de transmissão. Após as simulações, o hardware e software foram integrados e o resultado final foi apresentado através de um aplicativo. O trabalho apresentou e aplicou uma metodologia de projeto e desenvolvimento de RSSF, aplicando-se tecnologia da Internet das Coisas (IoC) e Cidades Inteligentes na área de sistemas de distribuição de água.

Palavras-chave: cidade inteligente; consumo de Água; IoC; redes de sensores sem fio.

1. INTRODUCTION

The water supply in Brazil is a recurring and worrying theme not only in the dry season but also during the whole year in certain regions. Due to the deficiency of the last years and to the decrease of the water level in the dams, the water supply has become a serious problem. To make matters worse, water loss is very high. According to the SNIS (2019), in 2016 the state of Minas Gerais lost 34.47% of revenue due to water loss, leaks, robberies, clandestine connections and measurement errors. In Brazil, this average total value was 36.24%, which represents a loss of over R$ 8 billion. For instance, the northern area of Minas Gerais, in the city of Montes Claros, Brazil, was forced to endure several periods of shortage, some of them interrupting water distribution for two days (COPASA, 2019), causing several hardships to city residents. According to a United Nations report (UNESCO, 2015) and Christofidis (2003), if current water supply and distribution conditions are maintained, 70% of the planet's inhabitants will face deficiencies in water supply, and a quarter of the population suffer chronic shortages of drinking water.

The shortage of natural resources is a constant concern of environmentalists, government, institutions and companies who also wish to reduce expenses, in addition to the environmental factor. For this reason, programs to reduce losses and raise awareness about the use of natural resources are a constant theme in the country's affairs. Silva et al. (2016) presented a study to describe the technologies developed by Embrapa, a public agricultural research institution, for the rational use of water in irrigation systems of Brazil. The majority of them are related to knowledge and techniques, such as personal training, construction of small dams, collecting rainwater, etc. Some technologies featured in the work of Silva et al. (2016) use software to check the crops and farms, but the use of new IoT and Smart City concepts are not largely applied yet.

The use of IoT technologies brings new possibilities to measure and predict water consumption and to store data about how water is being used. These data can help water concessionaires foresee problems such as leakages or robberies faster, and thereby avoid losses. This large amount of information will be stored in the cloud, so it can be used as input for statistical studies or in machine-learning applications. Further, online feedback information would help to establish better practices. The work of Tom et al. (2011) illustrates how important it is to have real-time consumption information with easy access for residents. This research reports that households that received data loggers feedback from daily consumption had a significant improvement in reducing consumption compared with those who received weekly advice from a professional at home. Based on these findings, this work proposes the use of the Wireless Sensor Networks (WSN), Smart City and IoT concepts to perform individual monitoring with online feedback and control of water consumption in residences through an Android mobile application, with excessive-expense or leak-warning tools.

A recent report in Saravanan et al. (2018) has illustrated a SCADA system to measure water flow, temperature and turbidity. The data is sent to a web server that performs analytics to show water conditions to the user but, in this case, using GSM technology may not be the best choice due to the high operational cost and power consumption. Riis (2016) also proposed the installation of the SCADA software with PLC and Fieldbus/Ethernet communication in control points of the water company supply; but despite being a robust option, it is expensive and the solution does not include domestic water monitoring. Gupta et al. (2018) proposed a water-quality monitoring system using Raspberry Pi module with integrated WiFi network, which depends on WiFi signal to send information to the cloud. Other similar researches in several applications are proposed by Kim et al. (2008), Larson et al. (2012), Anjana et al. (2015), Wadekar et al. (2016), Rasin and Abdullah (2017), Rajurkar et al. (2017), Suresh et al. (2017), Srihari (2018), Zhang et al. (2019), Zin et al. (2019). This paper proposes the new IoT solution for domestic water-consumption monitoring with the use of the Zigbee technology. This system was developed to operate in low-cost and low-power conditions to build large WSNs, through mesh network, capable of sending data to the cloud and providing the user the possibility of having online information through a mobile app. Water consumption will be on display, and the user can take action when necessary. Although the only parameter measured is the water flow, for power consumption optimization, the system can easily be modified to accept many others; when the microcontroller can handle it, the software need only be updated to receive the new parameters.

The “Materials and Methods” section of the paper shows the hardware and software design. The “Results and Discussion” section presents prototype testing. Finally, the “Conclusion” section concludes the study.

2. MATERIALS AND METHODS

Figure 1 shows the schematic of the water consumption monitoring system with the IoT technology and Smart City concept. The system includes Sensor Nodes, responsible for measuring domestic water consumption through a flow sensor and transmitting the collected data through a Radio Frequency (RF) module to the Base Station, which will collect this data and send it to the cloud through the gateway. The system will also be able to detect leakage by setting volume limits configured in the app. The user will be able to close the valve water remotely.

Source: The Author.

Figure 1. Water-Consumption Monitoring System. 

The Coordinator Node will be responsible for receiving the data from the Sensor Nodes and transmitting them via serial communication to an application or program that will be running on a mobile device or computer. This application will be responsible for processing the data and sending it to the network gateway. Once this data arrives at the gateway, it is transmitted to the Internet via Ethernet and stored in the cloud, so it can be accessed from anywhere and at any time through mobile applications or web pages. This data may also be sent to the water concessionaire server, so they would have access to it and could manage the entire water distribution system. The water valve closing procedure can be carried out remotely only by the concessionaire if wanted, e.g., in case of non-payment. This criterion is a strategic-possibility feature since it is technologically available.

The set established by the Node Coordinator, Application and Gateway is called the “Base Station”, because all the data will arrive there and be transmitted to the cloud. The Base Station can be placed in a street-light pole, where the device can be powered. Furthermore, it will preferably be located in a central network region so that the sum of the distances between the Sensor Nodes and the Base Station is as small as possible.

The use of ZigBee protocol in the communication between the sensing points and the Base Station was chosen because the technology is developed for low-power applications, and it is able to implement a network of more than 10,000 nodes with topology mesh. For instance, if a communication point is lost, the network will immediately reroute this data to reach the Coordinator Node.

2.1. Hardware

The Base Station consists of an RF-communication module, which is the Coordinator Node, connected to a computer or device with Internet-access capability and a gateway. The data will arrive via RF to the Coordinator Node and will be transmitted to the computer USB port using serial communication. Once this data arrives at the computer, it is sent to the cloud through the application developed using Javascript language and the Firebase platform, a Google-owned company that offers cloud service for mobile- and web developers (FIREBASE, 2019). The Sensor Node, which is responsible for sending the data flow to the Coordinator Node, is formed by the following: a processor unit, - that processes data information from sensors and commands from user; a sensor unit that transforms water-flow data into some signal that can be read by the microcontroller; a transmitter module that transmits information via RF; and a power source, the energy supply. An enclosure with dimensions of (6x8.5x4) cm is used to pack those devices. Below, we show the sensor node configuration:

  • Processor Unit: Arduino Pro Mini, ATmega328, 3.3V Flash Mem. 32KB, 8MHz

  • Sensor Unit: Flow Meter - Hall Effect

  • Communication Technology: Zigbee, 802.15.4

  • Transmitter Module: Xbee S2C, Tx@33mA, Rx @28mA, 3.3V

  • Power Source: 2 batteries of 1.5V

The Xbee module hardware was chosen due to the Wireless Sensor Network applications, small size, low cost and the fact that it operates with the ZigBee protocol. It has an average communication-distance range large enough to communicate between neighboring houses in an urban environment.

Regarding the Sensor Unit, there are two approaches for water-flow measurement: the inline-direct flow, which is intrusive, and the non-intrusive flow estimation. The first approach needs direct contact with the water while the second does not, which is better with respect to installation but not as good with respect to price and calibration. Table 1 shows these characteristics for the main water-flow sensors used in the literature review.

Table 1. Water-flow sensing techniques. 

Intrusive Install Complexity Calibration Complexity Price
Water Flow (Hall Effect) YES AVERAGE LOW LOW
Water Pressure (Piezoelectric, Electromagnetic, Capacitive, Strain-gauge) NO, but need a point of access (Hose bib, sink faucet, etc) AVERAGE LOW (If comes already calibrated from factory) AVERAGE
Acoustic (Doppler Effect) NO HIGH HIGH HIGH
Vibration (Accelerometers) NO LOW HIGH AVERAGE

Based on cost, installing and calibration complexity, the flow sensor with hall effect was chosen. The sensor has a propeller that rotates as water passes through it. This propeller has a magnet on one of the blades, responsible for generating the magnetic field that passes through a semiconductor inside the sensor. Consequently, it generates a square wave voltage signal the frequency of which is proportional to the propeller´s rotational speed, i.e., the higher the water-flow rate the higher the pulse frequency. The Pulse Rate versus Flow Rate is provided by the YF-S201 sensor Datasheet. The linear relation flow (y) and frequency (x) is represented by Equation 1.

y=0.121x+0.025 (1)

Tests for obtaining data throughput, signal quality and signal strength were performed with the Sensor Node near the hydrometer box, located outside the residence, and the Base Station, located inside, in the residence room. Results are shown in the next chapter.

2.2. Software

Figure 2 shows the software overview operation with the respective routines of each program. The first part, (1), depicts the Sensor Nodes capable of communicating with each other, so that the information reaches (2), the Coordinating Node, which will receive the data and address from (3), the computer, through serial communication. Parts (2) and (3) pertain to the Base Station of the system; in part (3), the computer will process the information through an application, which will send the received data to the cloud (Internet).

After that, an application was created using the Android Studio® development platform, so that any user, from anywhere, with a cell phone and internet, could have access to the information (5). It should also be noted that the information could be sent in the opposite way, when the user or concessionaire sends commands to the Sensor Node to close or open valve. In this case, the command information starts from the mobile, (5), to go to the cloud database (4); the application in (3) identifies the receiving information in the cloud; it retrieves this information that will be sent to the respective Node Sensor (1) destination. Each network device has its own and unique MAC address that is sent within the transmitted data and used for identifying the source and destination device packet.

Source: The Author.

Figure 2. Network configuration. 

3. RESULTS AND DISCUSSION

3.1. Hardware

Figure 3 shows the Sensor Node installed for system transmission and accuracy testing. In the figure we can identify the processor unit, sensor unit, the transmitter and power supply.

Source: The Author.

Figure 3. Sensor node installation. 

The testing was performed by placing one Sensor Node near the hydrometer, outside of the house. The Base Station with the Coordinator Node was located inside the house, in which the estimated distance between the Coordinating Node and the Sensor Node is 8.5 m, in a straight line, with three physical barriers. First, to verify RF transmissions, a test was done by sending and receiving 100 packets of 255 bits (maximum packet size). The result was zero packet loss; the signal strength was -27 dBm, which corresponds to approximately 2 μW, knowing that the receiver sensitivity is up to -96 dBm (0.25 pW) (DIGI, 2019), the minimum value for transmission to occur.

After this first step, the second was measuring water-flow transmission data. Information was sent with 1-second intervals. Each packet sent from the Sensor Node to the Base Station had the maximum size of 232 bits. Thus, the maximum transmission rate was 0.232 kbps, much lower than defined by the maximum limit of the RF transmission module, 250kbps, and 100% of the data was transmitted without presenting problems related to packet loss and transmission distance.

The third and final step consisted of doing a comparative between the water flow manually measured and water flow automatically measured by the Sensor Node. For manual measurement, a container with a fixed volume of 2L and a stopwatch was used. First, the Sensor Node was installed in the hose that would also fill the container. The valve was opened and it was timed for three different flows (the flow was controlled by the opening of the water valve). The flow value is obtained by dividing the volume (L) by the time (s) and converting that unit of measurement to L.min-1. At the same time, the data was also sent by the Sensor Node to the application that calculated the flow and saved it in the data cloud. The results showed errors less than 5% after the sensor calibration.

3.2. Application

The left side of Figure 4 illustrates the screen of an Android mobile emulator running the developed application; the right side displays the application already installed on the phone and running. This form will inform the user of the current water consumption, the accumulated consumption of the day and of the month. In addition, the user will be provided with the value of his water bill, in which this data can be monitored and compared with that of the Water Supply Company. The water rate is defined by the Water Utilities and it is public-domain information.

In order to decrease water consumption, the application can be configured so that the user chooses the maximum consumption value per day or per month. When this value is reached, a message is generated to alert that the value has been exceeded.

Source: The Author.

Figure 4. Water Consumption app. 

4. CONCLUSIONS

This work proposes a low-cost real-time monitoring and control of water consumption together with a user feedback interface. A methodology was developed and implemented based on WSN and IoT technologies. Tests and analyses were executed to prove the system’s functionality. RF transmissions presented good performance with a maximum data rate of 250kbps, much greater than the need for water-flow data, which is 0.232 kbps. There was no package loss during tests and a signal strength of -27 dBm was reached. After some corrections on the linear relation between water-flow sensor pulses and the expected water flow, the consumption water volume reached errors less than 5%.

Among the advantages of this system are the low operational- and implementation costs, modularity, the mobile app and the use of cloud data, allowing real-time access to the readings and throughput values that can be used in the future as statistical data. Besides that, by using a standardized communication protocol, such as Zigbee, the Firebase and the Android Studio platforms, allows greater interoperability and system robustness.

As future works, we suggest the implementation of a network in a neighborhood or urban area, with the use of as many Node Sensors as possible to check its performance on a larger scale. The suggested solution can also be used with other sensors to measure different parameters, such as water quality and temperature, in order to obtain more information about its use. Energy harvesting is another direction that may be explored to make these IoT devices autonomous in terms of energy supply.

5. REFERENCES

ANJANA, S.; SAHANA, M. N.; ANKITH, S.; NATARAJAN, K.; SHOBHA, K. R.; PAVENTHAN, A. An IoT based 6LoWPAN enabled experiment for water management. In: IEEE INTERNATIONAL CONFERENCE ON ADVANCED NETWORKS AND TELECOMMUNICATIONS SYSTEMS (ANTS), 2015, Kolkata. Proceedings[…] [S.l.]: IEEE, 2015. p. 1-6. https://dx.doi.org/10.1109/ANTS.2015.7413654Links ]

CHRISTOFIDIS, D. Água, ética, segurança alimentar e sustentabilidade ambiental. Bahia Análise & Dados, v. 13, n. esp., p. 371-382, 2003. [ Links ]

COPASA. Rodízio em Montes Claros. Available at: Available at: http://www.copasa.com.br/wps/portal/internet/imprensa/noticias/plano-de-racionamento/racionamento-encerrado/co-montes-claros/rodizio-em-montes-claros-03-09-18/ . Access: Jan. 2019. [ Links ]

DIGI. XBee/XBee-PRO S2C 802.15.4 Modules. Available at: Available at: https://www.digi.com/support/productdetail?pid=5616&type=documentation . Access: Jan. 2019. [ Links ]

FIREBASE. Firebase Home. Available at: Available at: https://firebase.google.com/ . Access: Jan. 2019. [ Links ]

GUPTA, K.; KULKARNI, M.; MAGDUM, M.; BALDAWA, Y.; PATIL, S. Smart Water Management in Housing Societies using IoT. INTERNATIONAL CONFERENCE ON INVENTIVE COMMUNICATION AND COMPUTATIONAL TECHNOLOGIES (ICICCT), 2., Coimbatore, 2018. Proceedings[…] [S.l.]: IEEE, 2018. p. 1609-1613. https://dx.doi.org/10.1109/ICICCT.2018.8473262Links ]

KIM, Y.; SCHMID T.; CHARBIWALA, Z. M.; FRIEDMAN, J.; SRISVASTAVA, M. B. Nawms: Nonintrusive autonomous water monitoring system. In: ACM CONFERENCE ON EMBEDDED NETWORK SENSOR SYSTEMS, SENSYS 2008, 6., Nov. 5-7 2008, Raleigh. Proceedings[…] New York: ACM, 2008. p. 309-322. https://dx.doi.org/10.1145/1460412.1460443Links ]

LARSON, E.; FROEHLICH, J.; CAMPBELL, T.; HAGGERTY, C.; ATLAS, L.; FOGARTY, J.; PATEL, S. N. Disaggregated water sensing from a single, pressure-based sensor: An extended analysis of HydroSense using staged experiments. Pervasive and Mobile Computing, v. 8, n. 1, p. 82-102, 2012. https://doi.org/10.1016/j.pmcj.2010.08.008Links ]

RAJURKAR, C.; PRABAHARAN, S. R. S.; MUTHULAKSHMI, S. IoT based water management. In: INTERNATIONAL CONFERENCE ON NEXTGEN ELECTRONIC TECHNOLOGIES: SILICON TO SOFTWARE ICNETS2, Chennai, 2017. Proceedings[…] [S.l.]: IEEE, 2017. p. 255-259. https://dx.doi.org/10.1109/ICNETS2.2017.8067943Links ]

RASIN, Z.; ABDULLAH, M. R. Water Quality Monitoring System Using Zigbee Based Wireless Sensor Network. International Journal of Engineering & Technology IJET, v. 9, n. 10, 2017. [ Links ]

RIIS, T. S. Modeling Water Distributions Systems - Integration Between SCADA Systems and Hydraulic Network Simulation Models. 2016. 98p. Master thesis - Norwegian University of Science and Technology, Trondheim, 2016. http://hdl.handle.net/11250/2402854Links ]

SARAVANAN, K.; ANUSUYA, E.; KUMAR, R. et al. Real-time water quality monitoring using Internet of Things in SCADA. Environmental Monitoring Assessment, v. 190, p. 556, 2018. https://doi.org/10.1007/s10661-018-6914-xLinks ]

SILVA, C. L. da; BASSI, N. S. S.; ROCHA Jr., W. F. da. Technologies for rational water use in Brazilian agriculture. Revista Ambiente & Água, v. 11, n. 2, p. 239-249, 2016. https://dx.doi.org/10.4136/ambi-agua.1808Links ]

SISTEMA NACIONAL DE INFORMACOES SOBRE SANEAMENTOS (Brasil). Diagnóstico dos Serviços de Água e Esgoto 2016. Available at: Available at: http://www.snis.gov.br/diagnostico-agua-e-esgotos/diagnostico-ae-2016. Access: Jan. 2019. [ Links ]

SRIHARI, M. M. Intelligent Water Distribution and Management System Using Internet of Things. In: INTERNATIONAL CONFERENCE ON INVENTIVE RESEARCH IN COMPUTING APPLICATIONS ICIRCA, 2., Coimbatore, 2018. Proceedings[…] [S.l.]: IEEE, 2018. p. 785-789. https://dx.doi.org/10.1109/ICIRCA.2018.8597325Links ]

SURESH, M.; MUTHUKUMAR, U.; CHANDAPILLAI, J. A novel smart water-meter based on IoT and smartphone app for city distribution management. In: 2017 IEEE REGION 10 SYMPOSIUM (TENSYMP), 2017. Cochin. Proceedings[…] [S.l.]: IEEE, 2017. p. 1-5. https://dx.doi.org/10.1109/TENCONSpring.2017.8070088Links ]

TOM, G.; TAUCHUS, G.; WILLIAMS, J.; TONG, S. The Role of Communicative Feedback in Successful Water Conservation Programs. Applied Environmental Education & Communication, v. 10, n. 2, p. 80-90, 2011. https://dx.doi.org/10.1080/1533015X.2011.575632Links ]

UNESCO. The United Nations world water development report 2015: water for a sustainable world. Paris, 2015. Available at: Available at: http://unesdoc.unesco.org/images/0023/002318/231823E.pdf . Access: Mar. 2019. [ Links ]

WADEKAR, S.; VAKARE, V.; PRAJAPATI, R.; YADAV, S.; YADAV, V. Smart water management using IOT. In: INTERNATIONAL CONFERENCE ON WIRELESS NETWORKS AND EMBEDDED SYSTEMS WECON, 5., 2016, Rajpura. Proceedings[…] [S.l.]: IEEE, 2016. p. 1-4. https://dx.doi.org/10.1109/WECON.2016.7993425Links ]

ZHANG, D.; HEERY, B.; O’NEIL, M.; LITTLE, S.; O’CONNOR, N. E.; REGAN, F. A Low-Cost Smart Sensor Network for Catchment Monitoring. Sensors, v. 19, n. 10, p. 2278, 2019. https://dx.doi.org/10.3390/s19102278Links ]

ZIN, M. C.; LENIN, G.; CHONG, L. H.; PRASSANA, M. Real-time water quality system in the internet of things. IOP Conference Series: Materials Science and Engineering, v. 495, n. 1, 2019. https://dx.doi.org/10.1088/1757-899x/495/1/012021Links ]

Received: April 22, 2019; Accepted: September 11, 2019

*Corresponding author: Arnon Jadir Rodrigues Alves, e-mail: arnonjra@hotmail.com

Creative Commons License This is an open-access article distributed under the terms of the Creative Commons Attribution License