Design a generic Framework solution for e-detecting meters consumption

: Energy has always been the source of growth and dispute between providers and consumers. Nowadays, the discovery of a new and entire system with improved methods to automate monitoring of this resource is a must, instead of monitoring the customer's meter with the usual physical monitor, which has become an obsolete solution and could lead to unreliable reading and ineffectiveness of process. Addressing this problem, we proposed a new meter reading system design based on an infrared detector used to calculate the energy consumption in a simple different way based on some existing components in the meter, so there is no need to replace the current meters, which represent a new invention in the market. After the reading, the measured value is passed via the 433 MHz LoRa, to be shown on the web services platform. This framework offers customers and service providers multiple services, achieving 100% accuracy with a low cost, extensive coverage, and 15 days of autonomy, making our system perfect for companies.


Introduction
A human operator does traditional meter reading for water and electricity consumption and billing from house to house and building to building.This requires many labor operators and long working hours to complete area data reading and billing.Human operator billing is prone to reading errors as sometimes the house's electric power meter is placed in a location that is not easily accessible.Labor billing is sometimes also restricted and slowed down by bad weather conditions.Printed billing tends to be lost in the mailbox.The increasing development of residential housing and commercial building in a developing country such as Morocco requires more human operators and longer working hours to complete the meter reading task.This increases the energy provider operation costs for a meter reading.The Automatic Meter Reading (AMR) system plays a vital role in addressing earlier problems to achieve efficient meter reading and reduce billing errors and operation costs.
Automatic meter reading (AMR) is the automatic recording of electric energy, gas, and water consumption for monitoring and billing.It is also an effective means of data collection that allows substantial saving through the reduction of meter re-read, greater data accuracy, frequent reading, improved billing and customer service, more timely energy profiles and consumption trends updates, and better deployment of human resources.With the advent of digital technology, the analog electro-mechanical meter is continuously replaced by the digital electronic meter.A digital energy meter offers greater convenience for electronically implementing and establishing an automatic meter reading system.
The efficiency and reliability of retrieving meter readings in the AMR system was a significant challenge.
In Morocco, the National Office for Electricity and Potable Water (ONEE) uses mechanical meters (Fig. 1) so that the agents manually monitor information on water and electricity consumption.These have to physically control the value of the customer's meter, leading to an unreliable reading and inefficient process.The smart meter is one of the intelligent city measures that could overcome this problem.
In this research, we have proposed a new meter reading system based on an infrared detector used to calculate consumption simply and differently based on some existing components in the meter.This means there is no need to replace existing meters.The measured value is then transmitted via a Wireless system (Wi-Fi or Lora interface) to be used in the web services platform.
This framework provides multiple services to both customers and water service providers.
Our system hardware part is made up of: The leftover portion of this paper is organized as takes after.Section 2 depicts the related works of all meter index reading technics.We introduce the proposed method and the energetic study in sections 3 and 4. Results & Discussion are presented in section 5. We conclude and present some perspectives in section 6. Authors in [1] use a flow sensor to measure water consumption with 97.31% accuracy, then transmit the value via Lora for a maximum distance of 200m.The original water meter is removed, and the user can track water usage in real time via the platform.They used (nodegatewayserver) architecture.The gateway can handle 500 nodes, and the system has lower battery consumption.Node measure & send data, gateway collect data from several nodes, and the server: provides a web-based platform (PHP & MySQL).The flowing water will rotate the rotor at a certain speed; the hall effect sensor will generate a pulse signal because of the magnetic pieces in the rotor.The microcontroller (Arduino) presents this signal as a flow; the measured value is displayed on the LCD screen and sent to the gateway via Lora.The gateway (raspberry) receives the data from nodes and forward it to the server but also keeps the most recent data in an SD card for maintenance purposes.This system is hard to install because of calibration requirements.
Authors in [2] used an inductive emitter sensor that works only on water meters with a halfmetal spinning wheel.It is complex to implement as it needs an extra LC circuit to detect the metal or magnet field, and it generates a weak signal which could lead to an error reading (Our system uses an IR sensor, works almost on any water meter that has all kind of wheels: halfmetal, half-cut, colored, and it generates strong signal).For communication, they used LPWAN NB-IoT, a low-power communication technology based on 3G, but it will cost extra bills for every node.Good battery anatomy as the use automatic charging technique by solar system or water-turbine, but this would affect the battery life due to continuous cycles charging.
In this work [3], the authors used the same sensor as [1], a flow sensor, to measure water consumption.However, their main focus is the network architecture, which is somehow too complicated, as they use a series of repetitive inter-middle (they call them relay) devices to transmit the data to a data center via the gateway, but our network architecture is simpler and easier to maintain.The platform allows the client to get real-time data from the water meter at any time, so the water matter Lora receiver is always running, which consumes much power.
For such an unnecessary task.
The main object of this study [4] is to solve the problem of low accuracy in flow measurement by the old mechanical water meter.By replacing it with a smart meter that measures actual water consumption only and not air.They use flow sensors to measure water usage; their system checks if the client has paid previous bills; if not, the system will not let the water flow in the house.They use RTC to send data stored in a memory every month.The client or operator can also request data from the meter anytime.The system uses the house's electricity to feed the circuit, and they do not use a battery.This solution is unsuitable for every case, as we can find farms or buildings without electricity.For the communications, they used the ZigBee module, its range is 10 to 100m, so it will cover a small area, but our system uses Lora, which can Handel more significant ranges.
In Table 2, we compare the most cited approach in the literature with our system, considering various criteria such as Sensor, Measure accuracy, Area Range, Area capacity, power, and Extra.

General context
In Morocco, data collection from water meters is carried out manually at most once a month by the National Office for Electricity and Drinking Water.This water service provider often issues bills based on estimates.Estimated consumption is calculated from previous months' average consumption, accumulating reading errors.The office corrects these errors during the last month of the year.This process subjects the bills to serious price problems due to water consumption bands, as shown in Fig 2 .The price of the invoices increases according to the consumption bracket to which the customer belongs.According to customer testimonials, water bills have reached as high as $150 for customers who typically pay around $20 per month.In summary, the manual process can pose multiple problems for customers and water meter service providers due to the high cost of these corrective operations and the lack of accurate consumption data.
To solve this problem, we have proposed a new water meter reading system based on an infrared detector used to calculate water consumption based on existing components in the water meter.It is therefore not necessary to replace existing water meters.
The system retrieves the consumption value, and the measured value is then transmitted via a wireless network card (WIFI or LORA interface), to be then used in the web services platform.
This framework provides multiple services to customers and water service providers.

System components
The hardware part of our system is composed of different components (as shown in Table 2):    Our prototype was designed to operate with any mechanical water meter with a wheel, this wheel spins when water flows through the meter, and it is the rotation of this wheel that we use as an indicator for water flow measurements.We use an infrared sensor that detects the movement of the wheel of the mechanical water meter.The Arduino pro mini microcontroller uses the signal generated from the infrared sensor to count the number of rotations that occur depending on the water meter characteristics.We can calculate the water consumption by knowing the relationship between water volume and the wheel's number of rotations; in our case, we found that one rotation equals one liter of water.
The measured value will be sent to the server once every day (depending on the user's needs) via a wireless transceiver module, and also the system will also record a copy of the same value in an SD memory for future use purposes with the date and time of measurement provided by the RTC (Real Time Clock) module.To increase the efficiency of our system, the EEPROM is used to save the data periodically to prevent data loss in case of system failure or restart.The gateway gathers all data from nearby nodes and forwards it to the server, where it will be stored in the database.The system in the server will generate monthly bills for the clients and gives access to any client to the platform, where he can see the water consumption in real time for the current month or browse historical water usage in previous months.

Energetic Study
One of the most significant issues that embedded systems encounter is energy.The design of an energy-efficient embedded system is influenced by several factors, including the system's usage and battery quality.To meet this problem, we used a combination of techniques to maximize the use of our smart meter.In our case, the Arduino board will always be running, but the Lora module will be turned on N every day and turned off after sending the data.It will run for a few milliseconds, as shown in Table 3.We can estimate the autonomy of our system by using this formula:  =

𝐶 𝐼 𝑎𝑣𝑔
Where  is the discharge time of the battery (in hours),  is the battery capacity and   is the average power consumption of the system in a day.Our power component capacity is mAh for the battery.Here are some results of the autonomy according to givens values of N:

Results & Discussion
We used air pomp to simulate the water flow to test our smart water meter.We adjust the period of sending data to every 10 seconds so we can easily track the measurements during the experiment.We locked at both the platform and the mechanical water meter to compare the data; we found all the times that they were the same.So, the accuracy of our system by experience is 100%.For communication, we also tested the range of the Lora module as we use a cheap Chinese transceiver; the results were not satisfying, as the system could not send data for more than 200m, but the specification of some suitable Lora modules said that it could works without problem for more than 1000m.
Our proposed system has higher accuracy of 100% than the proposed meters in other studies mentioned in the related work section.

Conclusion & Perspectives
In this paper, we proposed a smart water meter prototype that works with any mechanical water meter with a spinning wheel on it; it uses an IR sensor to detect the movement of this wheel when water flows through the water meter.With this information, the Arduino can calculate the water consumption by the client, then save the data locally and send it also the server via the Lora protocol.Clients can monitor their water usage via the platform in real time.
Our objective was to use simple technology to achieve the same results as expensive other smart meters and reduce energy consumption and easy installation and maintenance.In this prototype, we used the Arduino as the central unit to control the system, but in future work, we could use

Fig 4 :
Fig 4: Embedded water meter system in a black box.
fig 5: circuit diagram of our smart water meter

fig 6 : 7 :
fig 6: Functional diagram of our smart water meter

Fig 8 :
Fig 8: results in the mechanical water meter Fig 9: results in the platform

Table 1 :
Benchmarking study of most recent related work.

Table 2
Different components of our system

Table 3 :
Energetic study of the systemTo calculate the average current consumption during a period, we can use this formula:   Is the current consumption by raspberry in a state (), and Δ  Is the time used in where