Development of Electronic Water Meter Based on Wireless Network and RF

The global need for water is increasing. Water must be used more economically in order to be sustainable. Water consumption per capita in Turkey is below the world regarding its geographical location. Manual reading water meters are inconvenient and time-consuming, they have low accuracy, they are very slow and resource wasting. Using wireless communication will mitigate these unwanted states. Consumers will be able to observe their water consumption in real time and be able to compare with the average water consumption in their district. With this system water pressure of whole pipes could be observed. Keywords-remote meter reading; sustainable and qualified service; water loss; wireless and RF network; smart water meter; accurate and high performance


INTRODUCTION
In accordance with regulations issued by the Ministry of Water Affairs, municipalities are responsible for 30% of drinking water losses, and in the following 4 years they should reduce them to 25%.The first project initiated to pursue these regulations throughout Turkey is the Kocaeli, Izmit District Drinking Water Project for Reduction of Loss.The increase in population, which results in more residential areas being constructed, constantly expanding industry sites, and utility companies seeking billing systems for residential and industrial environments to require less human interaction, necessitates the reduction in the cost of implementing a water-metering system.Smart water meter systems increase time efficiency and adequacy, since bills are delivered timely and more accurately.Another advantage is that the system can be adapted for use in other domains such as gas or electricity [1][2][3].Water distribution network monitoring provides the opportunity for automatic billing data collection, rejecting unauthorized connections, infrastructure security (tampering), leak detection [4], and water quality monitoring.In real life scenarios, the drive-by scenario is problematic as the readout procedure might fail and urbanized area range limitations due to signal attenuation are present, resulting in the need for a repeated drive-by.The target of authors in [5] was to optimize energy consumption of all these components.The optimization will give a positive impact on cost minimization and on the prolongation of battery life time.It will simplify the deployment of wireless sensor networks for monitoring the water distribution networks.Simplified packet repeater principle showed great results during trial network deployment and reduced overall installation costs by minimizing the required gateway nodes that need direct network connections.The proposed case does not consider such a solution.A pseudo autonomous system is tuned for minimal operational costs, including maximization of non-stoppable service uptime by maximization of battery lifetime.
In [6], authors focused on implementing a smart water management system to assist users in obtaining real-time data for real-time analysis.The system provides the user with realtime data for water consumption.It also creates various visual graphs of the collected data and represents them in a readable manner to the customer.The scope of the paper does not allow it to focus on the continuous development of analogue water meters for greater accuracy or to consider how the raw data can be linked to the billing utility system.Automatic measurement systems make life easier for science and technology.The use of these systems saves time, minimizes human error factors, reduces costs, and provides ease of analysis and management.The economic use of water consumption and the reduction of leaks are inevitable.The automatic measuring system is the development of a radio frequency based water meter or a module to be connected to the measuring device.In this way, instantaneous water consumption, and device intervention will be monitored remotely and the necessary intervention will be made immediately.

II. RELATED WORK
Authors in [5] showed the use of wireless sensors in water distribution networks and focused on the energy consumption and the consistency of data in wireless communications.Communication is achieved by adding fixed electric routers to the points where meters cannot be reached.Improved protocol was used for low energy consumption compared to mobile ad hoc network.Despite the traditional point-to-point communication, the wireless sense network (WSN) is able to save data by sending only data that needs to be moved to the external network using its own account capability [7].The work done in [6] about the Advanced Sense Network Research Group is focused on the economical use of water.One solution is to retrieve data via physical cable.It is observed that this is not practical in terms of time and cost.Alternatively, the

III. COMMUNICATION NETWORKING
Smart water meters must be accurate and fast enough to serve a large number of subscribers.Bidirectional communication should be used.Utility companies should therefore implement smart water metering which should be capable to support geographically spread modules.Remedy of latency, fastness, accuracy, security and reliability are the specifications which are compulsory.Network topology refers to the physical and logical placement of computers in the local area network (LAN).Physical topology specifies how all devices in the network are connected to each other and what kind of cable is used.There are several network topologies.Five common topologies are described below.

A. Bus Topology
All devices are connected to each other via a main cable and all devices have access to it.The cable used is usually a coaxial cable.Devices on the line must make sure that the line is completely empty before sending data, otherwise there will be conflicts.Data are sent to all devices connected to the line, but only the target device receives them.It is the topology with the lowest performance [10].

B. Star Topology
In star topology, each device on the network is connected directly to central connectors called switches or hubs.Data go through the central connector (switch or hub) to the destination.It is the central connector that manages and controls all functions of the network.

C. Mesh Topology
In mesh topology all nodes in the network are connected to each other.This topology is also called complex topology.Mesh does not need to use any distributors.On the other hand, the routing process has a significant share in the mesh.That is, the paths of the data packets should be defined in advance.This is the most secure network topology.Since there is a connection between each point, data transfer can be hidden.For example, while two computers are exchanging data among themselves, others cannot see these data.Mesh-type networks are always in communication.The corruption of any connection doesn't affect the other connections.If any cable breaks, the network will continue to run by using another path and no computer will be out of the network.Therefore, this network is preferred when communication breakdown is dangerous.The mesh also provides short response time.Mesh has and some disadvantages.As the number of computers to be connected increases, the number of cables increases exponentially.This increases the complexity and cost because each new computer will need to establish new separate lines with the other computers on the network.Therefore, mesh connection is not preferred in large-scale networks.It is mostly used in special places and small networks.It has a limited usage area.

D. Tree Topology
It is often used to link networks in star topology.The networks can thus be enlarged.The branches of a tree represent networks in different topologies, and they are interconnected with the tree's body.Many working groups can be put together.When the backbone cable is broken, network traffic on the partitions is affected.It is difficult to install and edit [11].

E. Ring Topology
All devices in the ring topology are connected to each other in a ring shape and each device has two separate neighbors.The devices on the line are visited one by one with the help of a token until data reach the target [12].

IV. PROPOSED ALGORITHM AND SENSOR NETWORK STRUCTURE
A Wi-Fi based network is created with 3 Raspberry Pi's [10].One of them is also used as a hotspot.Another Raspberry Pi is used as a gateway to which the network is connected through RF (radio frequency).RASBIAN (based on Linux) is used on these Raspberry Pi's.For easiness to learn and compatibility reasons, PYTHON language is used.Time periods mentioned below are saved in a file and can be changed by the user.The block diagram is shown in Figure 1 and the flowchart in Figure 2. The implemented software steps from the flow chart have the following functions: • IPs of the active modules in the network are searched and saved for future use.This is done by all modules daily.
• Getting and saving in a file the track of current water meter index (every 30 minutes) • Sharing index data with neighbor modules through Wi-Fi (or RF) every 3 hours.By this way every module saves the data from all modules in the same network.
• The collected data from the modules are sent to the gateway through RF once per day.
• If there is a problem in the transmission between the central module in the network and the gateway, another path is used according to the closest IP from the central module.
• The result's data are displayed on web pages (Figure 3).The energy consumption in wireless communication is important.The lifetime of the battery can be calculated according to the equations below [5]: where: As an example, package size is 23 bytes, baud rate is 4800bps and time period is 15 minutes.By using the above equations the battery lifetime is calculated as follows:

V. CONCLUSION
In this paper, four modules are used to create a network.A WiFi network is created among the modules in the same building.An extra module for hotspot is not used.According to the mesh topology, the data of all modules are sent among themselves in the same network.The module with the lowest IP sends the whole data to the gateway via RF.In case of transmission failure the module which has the next IP takes this responsibility over.There are some technologies like Sigfox, Zigbee, GSM, LTE and LORA with their own advantages and disadvantages.Three parameters are considered which are low energy, long distance and license.In our case LORA technology was used.It is possible to detect the water leaks by using this system.The amount of leakage is the difference between the amount of water supplied and the total amount of water used.The less the water consumption, the easier the www.etasr.com Gorenekli & Becerikli: Development of Electronic Water Meter Based on Wireless Network and RF detection of water leakage.Minimum use of water is observed during night hours.The hourly recordings at the night make the detection of the water leakage easier.This study covers the district of Izmit, which has 160.000 subscribers.

VI. FUTURE WORK
This work can be adapted to the IOT (Internet of Things) technology.By using this technology the number of gateways will be decreased.In addition, temperature, pressure and humidity data might be detected.Energy might be supplied by adding tribunes before water meter.Tank levels can be increased to keep the water pressure of subscribers at the same level.If there is water consumption when the subscriber is outside, the system may inform him and also turn the water meter off automatically.

Fig. 3 .
Fig. 3.Displaying indexes of all three Raspberry Pi's in web pages.

Fig. 4 .
Fig. 4. Debian installed on Raspberry Pi 3 module with RF added

T
awm : Average working time of microcontroller, (ms) I avg.m : Average current of the microcontroller, (mA) I avg.t : Average current of transmitter, (mA) I avg.losses : Average losses of circuit, (mA) T mc : Microcontroller working cycle, (ms) I mc : Microcontroller current at working cycle, (ms) I tc : Transmitter current at working cycle, (mA) T awt : Average transmitting time of transmitter, (ms) T tc : Transmitter working cycle, (ms) C new : Capacity of fully charged battery, (mAh) C 10y : Estimated capacity of new battery after 10 years caused by self-discharge, (mAh) T bath : Estimated sensor node lifetime, (h)

11 )
ൎ 21 ‫ݏݎܽ݁ݕ‬ (13) 4800 baud rates with the package size of 23 bytes converted into bits shown in (4).If the above equations are processed the lifetime of this battery will be about 21 years as shown in (13).
[9]d between water meter and gateways.LDBRS (low data bit rate sense) proposes the use of Zigbee[8]using IEEE 802.15.4 protocol.Modbus-RTU and IEC 61107 Mode C communication protocols are used frequently in remote meter reading systems[9].
Corresponding author: K. Gorenekli www.etasr.comGorenekli & Becerikli: Development of Electronic Water Meter Based on Wireless Network and RF wireless communication is