Design and Implementation of a Prototype Automatic Reading System for the Consumers’ Electrical Energy Meters

The research aims to design and implement a prototype for an automated system that reads electrical energy meters for the consumers and collects these readings in a central unit via the World Wide Web (the Internet). This is done by adding a camera that automatically captures the meter reading of the electric meter as an alternative to the mobile meter reader. This meter reading image is processed and the value of the meter reading is extracted by using a Raspberry Pi device and the Python language depending on OCR (Optical Character Recognition) algorithm and then sent via Internet and collected from all consumers through the Internet cloud in a database in the Central Electricity Department. After collecting this information, it can be used to monitor electrical loads, record invoices, and give reports about loads and costs to consumers, and thus participate in rationalizing electrical energy consumption. The most important characteristic of the proposed model is its simplicity as it does not change anything in the structure of the meter and does not need to make any modifications to its internal composition. This system will save a lot of effort and time and contribute to reducing human errors when reading metrics and making some kind of interventions between the supplier and the consumer to reduce waste, rationalize consumption and reduce costs.


INTRODUCTION
The problems related to the traditional electric meter reading system started to increase day after day due to several reasons, including:  Human errors.  Population growth.  Environmental conditions.  Remote areas.  Repeated visits. As a result of these problems, a device thatautomatically reads the electric meter has been designed and called AMR, this device collects energy information and sends it to the main stations of the Electricity Office for the purpose of analyzing it and calculating the bill. So using this reading systemAMR will reduce human errors resulting from reading, as well as reaching remote areas that cannot be visited.
This system is not only used to calculate the electricity meter, it is also used to read the water and gas meter in developed countries.
This research builds a new system that automatically reads the meter without changing the traditional energy meter using the camera and a singleboard computer (Raspberry Pi) supplied with our traditional energy meters that will take image of the meter reading when need to make bill for consumer, then convert this image to text and send itto the central station with meter number(useridentification [ID]) for eachconsumer. This data will be processed andautomatically generated invoice. After the bill is generated, it will be sent to each consumer via SMS (short message service).
There are many researches and studies that deal with the different cases and methods of recording the reading of electric energy meters. Here, the summarysome of them: E.Aravindetal.,(2014) Enhanced Power Meter that supports wireless datatransmission, which designs prototype of the power meter by use current sensor and voltage sensor andADC (Analog to Digital Converter).Raspberry Piperforms all the basic functions of the microcontroller and supports features such as sending emails and SMS with the help of a Wi-Fi dongle And GSM modem. This automated system enablescontinuous monitoring of energy consumption [1].
Eyad Ibrahim et al.,(2015) Develops a system for reading electrical energy metrics for the Iraqi consumer, using Bluetooth technology that developed the old meter and add the controller Arduino and Bluetooth to overcome human errors of reading the meter and shortening the manual data entry [2].
Anirudh Kumar et al.,(2018) Develop real-time monitoring of the AMI-enabled AMR power meter in smart city-IoT applicationdescrybing the active energy measurement method recorded by conventional real-time meter [3].
J.B.Samson et al., (2019) Smart power monitoring is suggested using Raspberry Pi. It is able to monitor various parameters such as Current, Voltage, Power, consuming unit, and the consumer can take appropriate precautions to reduce the electrical appliances used as well [4].

THE PROPOSED METHODOLOGY
Theproposed new system as Fig. (1) uses camera setup in front of electrical meter for capturing image to get the counting number of meter out with OCR algorithm usingRaspberry Pi which is a sort of minicomputer with Linux OS and python language and send it via internet to the cloud for building the data base and calculating the consumerbill may be monthly or any time.
The proposed system in this research differs from the previous works. Where the designing and the implementation of an automatic reading system for an electrical energy meter have been done without changing the structure of the traditional meter in addition to its low cost and high accuracy also the method used by image processing and not by connecting a voltage sensor and current sensor or changing the internal structure of the meter as in the previous works.
Python is a highly interpreted programming language derived from natural English languagewhich is used in this research because it is a powerful language and open source, so the Python program can be worked on any system in the world.Python provides multithreading technology that allows the program to be able to execute several commands at the same time,as well it contains many libraries, and this work used some of these libraries to distinguish the number from the image, in addition to sending to the cloud. Also, it helps to link the external parts to the Raspberry Pi [5].

Raspberry Pi Camera
Raspberry Pi camera in Fig. (2) is a device that was used to take a picture of the electric meter. It is connected to the Raspberry Pi by a slot cable. This camera has many specifications, including the image resolution of 5 Mega pixels in addition to video shooting and it is used as a camera formonitoring the electric meter in real time. The image that is taken is stored in the SD Card in Raspberry Pi [6].

Raspberry Pi3 module B
The Raspberry Pi3moduleB is an embedded computer or an SBC (single board computer). The processor of thisRaspberry Pi is a hybrid between a microprocessor andmicrocontroller. It is actually a SoC (system on chip), containing multiple dies stacked on top of each other [7] [8].
It contains 4x USB2 ports and40 pins Extended GPIO, Bluetooth, Wi-Fi and etc.By programming Raspberry Pi in the Python language as mentioned previously, where it takes a periodic and automatic picture of the energy meter, for example in Iraq, the meter reading is taken monthly so it is programmed to do this processmonthly so that each customer's bill is calculated by taking a picture and storing it in the Raspberry Pi memory in order to be done application of the OCR algorithm by the libraries in the Raspberry Open CV and Tesseract.
Tesseract is a tool recognizes and reads the text present in images as in Fig. (3) where the algorithm is applied to the image of the energy meter to extract the meter reading where this process is done in four stages, in the first stage converts the image to grayscale so as to reduce the image details and then in the second stage of the image is converted to a binary image to reduce and remove the background details and in the third stage, it is the corrosion process to reduce and eliminate noise in order to isolate the number from the background in order to facilitate the process of distinguishing numbers [9][10].

IoT Modem
For the houses that have not internet, IoT modem device can be used to connect the Raspberry Pi in the proposed system to the Internet with 2.4 GHZ bandwidth where each device has its own unique IP address. This can be used also for the remote areas. The Raspberry Pi connected directly to the Internet for the houses that already have.

Cloud
The cloud refers to the servers that are accessed over the Internet where the data collected from all the consumers'Raspberry Pi as database for analysis and make billing by equations of the Electricity Office for each consume, Google Drive Spreadsheet is used [11].

VNC (Virtual Network Communication)
VNC is a free application used to view the visual desktopofRaspberry Pi and controls each.consumer's Raspberry Pi that connected from any place on the world by internet.

RESULTS AND DISCUSSIONS
After the process of extracting the number from the image by use OCR algorithm as Fig.(4)   Fig. 2 Raspberry Pi Camera.  These are the most important things that the Department of Electricity needs, and it is possible to provide any additional information that the department may need. After providing the information, it is possible to communicate with the customer via the mobile number and to inform him through a report stating the amount of his consumption of electrical energy and any other notes. This information also provides a reliable database for conducting integrated calculations of energy consumption and costs, analyzing and drawing them for every home and every residential neighborhood, and it can cover the whole country and this information is available at all times possible.

CONCLUSION
In this research, a prototype was designed and implemented for the electric energy meter reading system for all consumers using a new method that does not affect the basic meter structure. This method is characterized by simplicity, speed and accuracy, it provides all the necessary information about the subscribers, including their meters identification numbers and the values of their readings, which represent the amount of energy that is consumed by them.
The continuous communication with customers is made, and it can be used to send invoices and guidance and aware-ness messages to rationalize electrical nergy through SMS. The database associated with the proposed system provides reliable information to conduct integrated calculations of energyconsum-ption and costs, and to analyze it for every home and every residential neighborhood and can cover the entire country. This information isavail-able at all possible times to facilitate monitoring of the electrical network.