http://www.press.ierek.com ISSN (Print: 2357-0849, online: 2357-0857) International Journal on: Environmental Science and Sustainable Development pg. 92 DOI: 10.21625/essd.v4i3.679 Development of an Open-Source Water Consumption Meter for Housing Miguel Arzate1, Gerardo Arzate1, Javier Aguirre1 1 Department of the Environment, Division of Art and Science for Design, Metropolitan Autonomous University, Mexico City, Mexico, mape@correo.azc.uam.mx Abstract This article reports on the project "Design and development of water and gas P.L. measurement devices in the housing: an approach to sustainable consumption in Mexico", prepared at the Metropolitan Autonomous University in the Department of the Environment, whose objective was to develop a device to measure water consumption in the housing, which allows users to know their spending and can make decisions in favor of efficiency through the reduction of water use in household activities. The meter is made up of open source, programmable or reconfigurable software, which receives the signal from a water flow sensor and a casing designed to contain the hardware and facilitate the user's installation. Both the hardware and the casing can be purchased, downloaded, manufactured and assembled at home (Do It Yourself). As specific results were obtained: hardware programming and housing design and as a final result: the assembly of the functional prototype with which measurements of water consumption were made in a housing in Mexico. With this work we conclude that through the development of new accessible and common measurement technologies for the users of a house, it will be possible to promote efficiency in the use of natural resources in cities, increasing availability and promoting a more sustainable urban development. © 2019 The Authors. Published by IEREK press. This is an open access article under the CC BY license (https://creativecommons.org/licenses/by/4.0/). Peer-review under responsibility of ESSD’s International Scientific Committee of Reviewers. Keywords Meter; Water; Housing; Town Planning; Design; Efficiency; Sustainability. Nomenclature f= flow (liters per second) F= Frequency (number of pulses) CF= Conversion Factor (7.5) V= Volume (liters) T= Time (seconds) IWS= Inhabitants with water service (people) DCSI= Daily consumption in the shower per inhabitant (liters) Y= 365 days of consumption (year) 1. Conceptual framework The water fundamentally sustains the environment, society and the economy. Ecosystems such as wetlands, rivers, aquifers and lakes are indispensable for life on the planet and essential to directly guarantee a set of benefits and http://www.press.ierek.com/ https://creativecommons.org/licenses/by/4.0/ Arzate/ Environmental Science and Sustainable Development pg. 93 services such as drinking water, water for food and industry, habitats for aquatic life and natural solutions that purify water, mitigate floods and overcome periods of drought, so they are essential for sustainable development, peace and security, and human well-being (PNUMA, 2017). According to the World Health Organization (WHO) in 2017, there are 2100 million people in the world who lack access to drinking water services and 4500 million people who lack safe sanitation services. Recall that 70% of the planet's surface is covered by water, but only 1% is consumable (OMS, 2018). In Mexico, according to estimates of the National Population Council (CONAPO by its acronym in Spanish), between 2012 and 2030 the population of the country will increase by 20.4 million people. In addition, by 2030 approximately 75% of the population will be in urban locations (Agua.org.mx, 2018). The increase in population will cause the decrease of renewable water per capita nationwide so it will be important to reduce demand by increasing the efficiency of water distribution systems in cities and consumption in homes, as it poses the National Water Plan (NWP) “…operate and manage our national waters in a sustained, sustainable and responsible way, considering climate change, population growth and the needs of industry, the countryside and urban public supply.” (Gobierno de la Republica, 2018, pág. 11), as well as the Sustainable Development Goals (SDG) in goal 6.4: significantly increase the efficient use of water resources in all sectors (ONU, 2018) and 11.b: increase the number of cities that adopt plans to promote the efficient use of resources (ONU, 2018). According to data from the National Institute of Statistics and Geography (INEGI by its acronym in Spanish), in Mexico, 95% of households with potable water availability were counted in 20151, what represents that about 30 million homes or 111 million people who have this public service (INEGI, 2018). However, although this number is favorable to the development indexes of the country, we must monitor and preserve this resource, since its availability over the last hundred years has been significantly reduced from 31,000 m3 to only 4230 m3 for every Mexican (CONUEE, 2018). Another significant aspect is the increase in water consumption per capita: in 1955, each Mexican consumed about 40 liters a day; it is estimated that in 2012 consumption increased to 280 liters by person per day (Agua.org.mx, 2018). The use of water in the domestic sector can be classified as: hydration: water that people ingest to satisfy human biological needs; food repair: water used to wash, prepare and cook food; Personal hygiene: includes shower, washing face, teeth and hands; washing kitchen utensils used in the preparation of food; washing machine clothes; Water Closet (WC): the water used in each WC and other discharge, such as irrigation, washing, recreation (Castillo Ávalos & Rovira Pinto, 2013). In Mexico there is a large number of homes that do not have drinking water measuring equipment, a fixed quota is applied to them, which causes a great disparity between the water consumed and the water that is paid; therefore if the user does not have information that indicates his daily expenditure generates disinterest in being more efficient in saving the vital liquid (SACMEX, 2018). “The measurement of household water consumption may be desirable for reasons of equity and to allow volumetric charges that better reflect the costs of the water consumed by each family”. (Solís, M., 2005) The growing increase in the demand for water resources increasingly requested for a greater number of uses makes it limited and highlights the fact that more efficient ways must be found to take advantage of it and take measures that allow using less water in any process or activity, for the conservation and improvement of water resources (Castillo Ávalos & Rovira Pinto, 2013), for these reasons and taking into account some NWP strategies such as improving measurement systems in urban and industrial public uses as well as promoting scientific research and technological development (Gobierno de la Republica, 2018, págs. 70,72) the design and development of a water consumption meter for housing in Mexico is proposed, which will allow users to know their water expenditure and can make decisions that promote efficiency through the reduction of the use of water resources in their domestic activities. 1 In Mexico, water uses have been classified into two main groups: consumptive use (the main ones: agriculture, urban public, industry, aquaculture and domestic), which in simple terms refers to the consumption of water by different sectors, and non- consumptive use, which involves the use of the motor energy of water to produce electricity (hydroelectric). Arzate/ Environmental Science and Sustainable Development pg. 94 2. Investigation methodology In order to fulfill the main objective of the project to solve the design and development of a water consumption meter for housing in Mexico, the analytical and experimental method was used, performing an applied research where knowledge was sought to integrate technologies and improve the quality of life of people. The methodology is described below: 2.1. Get the set of elements that make up a system (hardware) 2.1.1. Select the elements of a water consumption meter for a housing The Arduino Yun card (see figure 1) was selected, consisting of a microcontroller based on the Amtel Atmega 32u4 and the Atheros AR0331. Linux support based on OpenWRT, Ethernet and WIFI communication, USB-A port, micro SD memory slot, 20 digital pins configurable as inputs and outputs and 16MHZ clock. Figure 1. Arduino Yun card The ½ "water flow sensor model YF-S201 was selected, it consists of a valve with a plastic body, a water rotor, and a Hall effect sensor. The sensor internally has a rotor whose vanes have a magnet, the chamber where the rotor is completely isolated avoiding water leakage, externally to the chamber has a hall effect sensor that detects the magnetic field of the magnet of the vanes and with this the movement of the rotor, the hall effect sensor sends the pulses through one of the sensor cables where they are converted into flow through the Arduino Yun card. 2.1.2. Program software A code was programmed in Wiring, based on the Processing platform with C/C++ language to read water consumption in the home, where the basic syntax was used, as well as operators of control structures, variables, constants, types of data, conversions and analog functions through an Integrated Development Environment (IDE) offered by Arduino. 2.1.3. Download software With the IDE, we download the code to the Arduino Yun card, execute and purify it until all the operations that will make the selected water intake, the water sensor and the Arduino Yun card function properly. To obtain the flow rate, the following equation was used: f = F/CF (1) To obtain the volume, the following equation was used: V= f x T (2) Arzate/ Environmental Science and Sustainable Development pg. 95 2.1.4. Connect elements that make up the system (hardware) The necessary physical connections between the water sensor and the Arduino Yun card were made for the correct functioning of the parts. 2.2. Get the design of the hardware casing (see figure 2(b)) 2.2.1. Design shape, function, ergonomics and usability of the casing in which the hardware will be housed A design methodology was used that includes six stages: plating the concept, analyzing form, analyzing function, analyzing ergonomics, analyzing materials and developing final volumetry (digital file in .stl format). 2.2.2. Build the casing designed by means of three-dimensional printing For the manufacture of the casing, the robo3D plastic injection printer (see figure 2 (b)) was used, which has a printing surface of: 25.4 cm long x 2.86 cm wide x 20.32 cm high, the thermoplastic acrylonitrile butadiene styrene (ABS) although the printer can adapt to various materials as it reaches a melting temperature higher than 290°C. Figure 2 (a). Final volumetry of the 3D casing Figure 2 (b). Plastic printer 2.3. Obtain final prodduct: water consumption measurer 2.3.1. Couple casing/hardware The final product was a water consumption meter made up of the Arduino Yun card (in which the developed code was downloaded), the water sensor (YF-S201) and the casing which was designed to integrate with the hardware. 2.3.2. Connect water meter - Connect the water sensor cables to the Arduino Yun card. - Connect the water sensor to the source of origin. - Connect the Arduino card to the electric current. - Identify and connect the wireless network to a computer the Access Point of Arduino Yun. - Open a browser and access the Arduino Yun configuration with the address: Arduino.local/ - Become a client of a gateway that has an external and wireless network. - Search in the gateway in your Local Area Network the IP assigned to the Arduino Yun. - Write in a browser the assigned IP more:/arduino/start/1 to start the measurement. a b Arzate/ Environmental Science and Sustainable Development pg. 96 - To consult the data obtained write the assigned IP more:/arduino/consecutive/1 or consult the MicroSD in the file "datalog.txt" 2.3.3. Take measurements of water consumption Many tests were made to verify the correct functioning of the meter: energize the system, verify the communication between water sensor and Arduino card, verify communication between Arduino card and gateway, check resistance quality and casing assembly, check connections of each one of the components, check that the flow of water flowed correctly and various measurements for the final calibration. Figure 3. Diagram of connection and sending of meter data Then an experiment (see figure 4), which is described below was performed: to demonstrate the information provided by the meter water consumption in housing presenting spending data from a thrifty shower in the toilet of a person in one day. General characteristics of the home: located in Mexico City, multi-family, apartment on the third floor, water supply to basic services per elevated tank with a capacity of 5 thousand liters, has two full bathrooms, step heater, money-saving showers Brand: Dica, model: 4502DP. The variables considered are the time a person takes to bathe and the liters consumed in this interval. The variables that could modify the measurement are the working pressure, the flow rate and the temperature. Figure 4. Measurement of water consumption Arzate/ Environmental Science and Sustainable Development pg. 97 3. Analysis of results With an IDE supported by Arduino (version 1.8.2), a digital file with the extension ".ino" was obtained, which contains the programmed code and all the parameters to measure and deliver water consumption data in a certain time, this file is free to use and can be downloaded in any digital medium with internet access. Using computer assisted drawing software, a digital file with the extension ".sldprt" containing the three-dimensional model of the housing that was integrated into the aforementioned hardware, was later exported to the ".stl" extension, which defines geometries. of 3D objects to be manufactured in a plastic injection printer, this file is free to use and can be downloaded in any digital medium with internet access. With the development of the code and the design of the housing the objective of this project was obtained: a water consumption meter for the home ready to be used, which we verified with the proposed experiment, inviting the person who lives in the apartment to participate through 2 samplings; the first consisted of taking an average shower of 10 minutes (see figure 5) and the second consisted of taking an effective shower of 5 minutes (average suggested by the WHO) (see figure 6), with this it was possible to verify the amount of water which is consumed in the time indicated in each sample in a daily shower. Figure 5. Water consumption taking a 10 minute shower Figure 6. Water consumption taking a 5 minute shower With the obtained results we can propose two scenarios with the equation described below: IWSxDCSIxY 1000 = 𝑚3/𝑌 (3) Arzate/ Environmental Science and Sustainable Development pg. 98 • Average scenario according to the WHO in Mexico: take a shower in 10 minutes. 111 million inhabitants x 25 liters x 365 days 1000 = 434 𝑚𝑖𝑙𝑙𝑖𝑜𝑛 𝑚3 (4) • Efficiency scenario according to WHO in Mexico: take a shower in 5 minutes. 111 million inhabitants x 10 liters x 365 days 1000 = 217 𝑚𝑖𝑙𝑙𝑖𝑜𝑛 𝑚3 (5) Total water that can be saved per year in Mexico if we take into account the second scenario: 217 million m3. I would have a 50% saving in the use of water with only the time it took to take a shower, information that the meter gave us and that the user could consult every day. This also shows us that the longer we use water, the more data servers it does not matter if the systems are savers. The user confirmed that 5 minutes is enough time to shower. 4. Discussion and reflections In Mexico, there are current problems in water management such as a low revenue collection, illegality and irregularities in the water and sanitation system, informal potable water vendors, high costs for operation and maintenance, and unjustified tariffs and poorly applied subsidies. By this, in the country there are people who receive the water at no cost, others pay for it with subsidies, and even, there are people who pay exorbitant prices. In Mexico City, the local government values the water for the housing sector considering the following factors: 1. The classification of the property (popular, low, medium, high), 2. the type of water intake, 3. the type of meter (which is not installed in all the houses and only can be read by the government), 4. the measure of the general consumption, 5. and a high percentage of the subsidy that is provided by the government. This methodology makes the final price very variable, difficult to calculate and unrealistic (since important environmental and economic aspects are not taken into account), causing confusion and disinterest in people about the use of water in their daily activities. The proposed meter (with an approximate cost of US$100) is a necessary tool for the housing sector in Mexico since it enables people to take a clear measurement of their water consumption helping to improve the current regulation and to strengthen social participation which is important to achieve equity in water distribution, to guarantee its availability and quality, and to educate people about the importance of caring and respecting this vital source of life. The meter will also help people to save some money since it allows them to make decisions for reducing their water consumption. We can say that an action to reduce the expense of the water resource is to provide the user of a home with the immediate information of daily water consumption provided by devices (meters) that are installed in the home in an easy and simple way so that people they can carry out an adequate management obtaining as a result, a much more efficient consumption avoiding waste and excessive use of water. The search for new technologies in developing countries that are accessible in cost, manufacturing and simple installation can be found in Arduino, since it is a microcontroller widely used by areas related to electronics and robotics, but currently other professions are beginning to use it to solve important needs of society, in this case, has been used by the architecture to obtain a product that helps users of a home to know their water consumption can make savings decisions and efficiency in the daily use of this vital liquid. This project has fostered multidiscipline with the participation of architecture, urbanism, industrial design and electronic engineering, this must be considered in an important way in the design and development of new products that are more friendly to the environment. The architecture contributes the proposal of the project, the urban planning and growth of the place, the industrial design brings the creativity and technique of devising useful and aesthetic objects that a society may require to satisfy its needs; one of the most important tools that currently has this profession Arzate/ Environmental Science and Sustainable Development pg. 99 are 3D printers, as they are technologies that have transformed the way of producing all kinds of objects and electronic engineering that controls industrial processes through microprocessors; one of the most used tools in this profession is the Arduino since it has an integrated circuit through which instructions can be written using a programming language that allows establishing programs that interact with electronic circuits. Through the proposal of the development and design of a water consumption meter in which an open source platform has been selected and a housing has been designed to be coupled in the hardware, it will allow users to share, use, and even freely build the meter in your home. In addition, this project promotes access to new technologies to be used in housing in favor of efficiency and saving of natural resources. 5. Conclusions The water is fundamental for the survival of the human population and for the ecosystems that make up the Earth, most of the water used by anthropogenic activities is in the activities of agriculture, in the transformation of energy, in the elaboration or transformation of consumer products and in the distribution and supply for cities with the infrastructure that requires it. The constant growth of the human population has generated greater pressure on the water resources resulting in little availability of the resource, which in many cases has brought impacts on public health in many towns or cities. In addition, we can include the current problems of climate change that have altered the rainfall patterns and poles with the melting of the main glaciers where fresh water is distributed, complicating even more, the management and distribution and obtaining of the liquid. To plan measures to conserve water resources, work should be done to develop and implement adequate technology related to the supply and consumption of water; with systems of recovery and reuse of water, with the infrastructure that allows us to infiltrate and replenish aquifers and retention to capture rainwater and reuse it and with a systematized management where consumption can be controlled, leaks can be detected and educate people efficient use to meet their basic needs. Because Mexico faces a problem of water loss per inhabitant in the last 100 years, it must take efficiency measures in each of its existing cities since it is projected that in 2030 75% of the population will be in urban areas. The water conservation in cities should be sought through education through programs that promote the saving of this liquid, an action that would bring great benefits would be the installation of meters in each of the homes since there is currently a large number of homes does not have such measurement equipment. This growth should guarantee universal access to adequate, safe and affordable housing, as well as access to green and public spaces, this represents a great opportunity to design and build efficient infrastructures that bring us closer to more sustainable lifestyles. Implementing constructions that generate low impact on the environment, that save resources and energy in the different phases of construction and habitation, arises as a demand of society indispensable in the future growth of cities, where the lifestyle must be sustainable, promoting a behavior change that encourages an efficient consumption of resources. The main benefits of the implementation of technology to measure the consumption of water in a house and be more efficient in their use are water savings; decrease in CO2; the reduction of expenses; the preservation of water resources for future generations, reduction of pressure on the state or municipal water supply network, use of water savings in other important sectors that influence the quality of life of the human being. Acknowledgement We thank the Metropolitan Autonomous University, Azcapotzalco for supporting this project entitled "Design and development of water and gas P.L. measurement devices in the housing: an approach towards sustainable consumption in Mexico" whit the number N-462. References AGUA.org.mx. (2017). Falta de medidores y fugas alteran el consumo de agua no facturado. Retrieved on June 15, 2018, of https://agua.org.mx/falta-medidores-fugas-alteran-consumo-agua-facturado/ Agua.org.mx. (2018). Visión general del Agua en México. Retrieved on June 14, 2018, of https://agua.org.mx/cuanta-agua-tiene-mexico/ Arzate/ Environmental Science and Sustainable Development pg. 100 Castillo Ávalos, Y., & Rovira Pinto, A. (2013). Eficiencia hídrica en la vivienda. Tecnología y ciencias del agua., 4(4), 159-171. Retrieved on June 15, 2018, of http://www.scielo.org.mx/scielo.php?script=sci_arttext&pid=S2007-24222013000400011&lng=es&tlng=es. CONUEE. (2018). Comisión Nacional para el Uso Eficiente de la Energía. Retrieved on June 14, 2018, of Coverage of drinking water: https://www.gob.mx/conuee/acciones-y-programas/cobertura-de-agua-potable-agua-y-energia-bombeo-de-agua-estados-y- municipios?state=published Gobierno de la Republica. (26 de Junio de 2018). Plan Nacional Hídrico. Retrieved in 2014, of http://www.conagua.gob.mx/CONAGUA07/Contenido/Documentos/PROGRAMA_Nacional_Hidrico_2014_2018_espa%C3%B1ol.pdf INEGI. (2018). Instituto Nacional de Estadística y Geografía. Retrieved on June 12, 2018, of Bank of indicators: http://www.beta.inegi.org.mx/app/indicadores/?t=0120002000000000&ag=00#D0120002000200000#divFV31140050013114005001 OMS. (2018). Organización Mundial de la Salud. Retrieved on June 11, 2018, of Press center: http://www.who.int/es/news-room/detail/12-07- 2017-2-1-billion-people-lack-safe-drinking-water-at-home-more-than-twice-as-many-lack-safe-sanitation ONU. (2018). Objetivos de desarrollo sostenible. Retieved on June 12, 2018, of clean water and sanitation: https://www.un.org/sustainabledevelopment/es/water-and-sanitation/ ONU. (2018). Objetivos de desarrollo sostenible. Retrieved on June 13, 2018, of Sustainable cities and communities: https://www.un.org/sustainabledevelopment/es/cities/ PNUMA. (2017). Programa de las Naciones Unidas para el Medio Ambiente. (O. m. ambiente, Ed.) Retieved on June 03, 2018, of Strategy on freshwater 2017-2021: https://wedocs.unep.org/bitstream/handle/20.500.11822/20479/Freshwater_strategy_2017- 2021_SP.pdf?sequence=4&isAllowed=y SACMEX. (2018). Sistema de aguas de la Ciudad de México. Retieved on June 16, 2018, Service by tandeo: http://www.sacmex.cdmx.gob.mx/atencion-usuarios/tarifas Solís, M., L. (2005). La escasez, el costo y el precio del agua en México. Economía UNAM, 2(6), 24-42. Recuperado el 10 de Noviembre de 2018, de http://www.scielo.org.mx/scielo.php?script=sci_arttext&pid=S1665-952X2005000300002&lng=es&tlng=es.