Design and Implementation of an Energy Meter System for Optimized Cost using Internet of Things (IoT) Technology Administration

The noticeable increase in electricity bill cost is one of the most significant factors that negatively affect the lifestyle of society and economics of all countries in the world. This is due to the depletion of unnecessary energy, which leads to financial losses for customers. Moreover, the high price of electricity due to excessive consumption may cause a big problem between the consumer and the electricity distribution companies. The absence of an energy consumption monitoring system exacerbates this problem. Therefore, it became necessary to develop a strategy to monitor energy consumption that can calculate daily consumption and display it to customers to know their energy consumption without facing any difficulties. This paper aims to design and implement an energy meter system for optimized cost using internet of things (IoT) technology. This is to alert customers to take preventive measures that help limit the rise in electricity bills. This system is simulated through the TINKERCAD program; it did through the Arduino Integrated Development Environment (IDE) as for the system programming. Moreover, the system implementation and testing have been completed, and the required results have been analyzed and successfully reached. The system has performed well and is acceptable. Also, it can be classified as efficient, simple, and easy to use.


Introduction
Electric energy is considered one of the essential sources for the progress and development of peoples. Also, the remarkable increase in the cost of electricity is one of the most important factors that negatively affect society's lifestyle and the economy in all countries of the world . The increase in the electricity demand comes from the wrong use of resources, which leads to the depletion of unnecessary energy sources, leading to financial losses for countries and customers (Saini, D. K., 2021). Also, the rise in electricity prices due to excessive consumption may cause a big problem between consumers and electricity distribution companies. Many different previous literature works are collected to be analyzed and studied to obtain useful information for the project, summarized in the significant components required, and determined the best methodologies that can follow in implementing the system.
A study conducted by (Kewal et al., 2018) illustrates the increasing demand for electricity in the modern era.
Furthermore, many sectors need energy, such as industry, agriculture, hospitals, household needs, and many more.
The increase in population, hence the increasing demand for electrical appliances, leads to a rise in electricity's financial expenses. Also, customers' inability to control energy is a big problem and should be solved to reduce energy depletion and financial losses. Again, this system needs other needs, including reducing energy theft and tampering with the meter, leading to increased economic losses. This study also focuses on designing a device that helps people control power to reduce unnecessary depletion and inappropriately waste money, resulting in significant financial losses. A study conducted by (Pooja et al., 2016) which explains the role of electricity in people's daily lives and the importance of preserving it in order to create an economically conscious society in the field of electricity. Moreover, consumers should monitor their consumption of that energy to reduce unnecessary depletion. This study is designed to help customers control their energy consumption. An IoT-based power meter is designed to enable customers to monitor power consumption over the Internet. Therefore, IoT is the basis of communication between devices and the world of the Internet. In addition, the normal power meters installed in homes contain many disadvantages, including the ease of energy theft because there is no control system in the meter. Also, the regular billing system which requires the employee to go to all those houses and take the bills from them is impractical and may take a lot of time.
A study conducted by (Aneesh et al., 2017) explained the increasing complaints of customers on energy employees and the loss of confidence among them because of the high prices of electricity bills, which led to many economic problems. Besides, an intelligent power meter should be designed to monitor daily units to help customers see why these bills are rising. When they know why, customers will solve their electricity problems, whether they know their energy depletion or energy theft in their homes. Therefore, solving this problem is necessary to reduce energy depletion and financial losses. In this study, IOT is used to monitor and control the energy consumption by the smart power meter, which in turn monitors and controls the use of energy. A study conducted by (Birendrakumar et al., 2017) discussed the problems that customers and meter reading staff may face due to the traditional methods they use to obtain electricity bills. The person reading the power meter must go to all those houses to get the electricity bill.
This work is useless, as it is hard work and time-consuming. Therefore, it is necessary to have a Smart energy meter, which calculates electricity bills and delivers them to both electricity and customers through the internet. This smart meter will also solve many problems, such as employee readout errors for the meter, which leads to an increase in electricity bill prices. Besides, it will increase consumer awareness of energy conservation and reduce energy depletion.
This paper aims to design and implement an energy meter system for optimized cost using internet of things (IoT) technology. This is to alert customers to take preventive measures that help limit the rise in electricity bills.

Method & Materials
In the present study we studied the implementation of efficient energy meter system based on IoT techniques. Figure 1 shows the circuit flow diagram of the Energy meter monitoring system to show the system components used and interconnection among the components. The main aim of this system is to design and implement an energy meter system for optimized cost using Internet of Things (IoT) technology that allows users to monitor the Energy meter readings via IoT. The work of the energy consumption monitoring system depends on the design of a system consisting of the following devices: collection.

ESP8266 Node MCU
Node MCU is used as a platform for the Internet of Things. It has a Wi-Fi unit which is used to connect to the Internet for the purpose of communication between systems. So, this platform is ideal for all systems that run on the Internet of Things. Node MCU is the heart of the system for the smart energy meter, it controls all the devices in the system and links them together to form an integrated system. It performs many functions such as arithmetic and logical operations, coding, analyzing and decoding all incoming data. Node MCU consists of 8 numeric pins that are used for input and output operations as shown in Figure 2 (Components101, 2019).

Arduino Uno
Response Arduino Uno is an open-source electronic system as shown in Figure 3. It is a small computer system integrated on the minute chip. Arduino is an essential part of this system which used to control the whole process of the system by reading and manipulating the data input from sensors. It has six analogue inputs pins which are used for sinusoidal signal. It has 16 input/output pins used for the digital data. Six digital output pins from the 16-digital input/output pins which are used for Pulse width modulation (PWM). It can be powered up by using a USB cable,

ACS712 Current Sensor
Response ACS712 Current Sensor is used to measure the electrical current for the devices where current is required to be measured. This sensor generates a signal depending on the type of device, whether it is an analog or digital device. Furthermore, here the current sensors are used to measure the current in the individual devices such as a fan and a Bulb. Each current sensor has two input slots so that the first slot is connected to the Node MCU and the second slot is connected to the device that its current need to be measured, either the fan or the Bulb as shown in Figure 4 (Components101, 2019).

Designing the Software
The Arduino Uno is the open-source electronic system uses Atmega 328, which is the heart of the system. It is linked to other devices such as Arduino Node MCU, ACS712 Current Sensor, AC Fan, AC Light Bulb and LCD I2C (20x4) by programming its operations required by the Arduino Integrated Development Environment used to design this system. Furthermore, the system code is written in the simplified C ++ language which is specially designed to write system codes. In addition, the IDE program makes it easy to write and download instructions codes on the Arduino board and the ability to run them quickly in the program designated for them from Windows operating system. Moreover, the program icon is then uploaded to the Node MCU that will send the information to the IOT BLYNK platform via Wi-Fi module as shown in Figure 5. IOT BLYNK platform is the program that has been chosen to design the energy meter monitoring system on it. This platform is designed to facilitate the development and design of IOT related projects. In addition, the smart energy meter system is simulated by using the TINKERCAD simulation program for the ease of simulating the systems on it and because of its speed and accuracy (Diygeeks.org, 2019).

Proposed System Implementation
The smart energy meter is implemented by connecting required devices such as Node MCU, Arduino Uno based Atmega 328 microcontroller, ACS712 Current Sensor, AC Fan, AC Light Bulb, LCD I2C (20x4) as shown in Figure   6. Initially, the system code is written by the Arduino Integrated Development Environment, and then the code is uploaded to the Arduino to perform as per the required instructions given to the system. In this system, two current sensors are used, one is used to sense the current in AC lamp and the other is used to sense the current in AC fan. Each current sensor has two input slots, the first slot is inserted into the device that its current need to be measured and the second slot is inserted into the Arduino Uno slot which uses ATmega 328. Moreover, another type of Arduino is added, which is Node MCU, it is working as per the instructions received from Arduino UNO to the IOT BLYNK App through Wi-Fi unit. Therefore, the Arduino Uno which uses Atmega 328 is linked to the Arduino Node MCU, for transferring information to the specified software via the Internet. In addition, the I2C (20x4) LCD screen is connected to the Arduino Uno to display the current readings on it. Arduino Uno which used here Atmega 328 and Arduino Node MCU acts together as the main system connecting all the devices, so they are considered the heart of the system and for the purpose of communication between the devices. Also, Arduino Uno is the microcontroller which uses Atmega 328 as a data processor, so the system programming code is loaded on it to perform the required operations and to be sent into Arduino Node MCU. Therefore, all required information is sent via Wi-Fi unit in the Node MCU to BLYNK platform, which is specially designed to display system data such as electrical power and price. Moreover, the energy meter readings are monitored directly.

Proposed System Testing
This section will present the proposed system's testing process for determining the accuracy of computation and data analysis results (Yousif & Saini, 2020).

Hardware Components testing
The proposed system test will measure the operational efficiency and test how quickly it responds to the instructions. Moreover, each device is individually tested several times to be fully demonstrated; then, the system is thoroughly tested to ensure the desired working efficiency as shown in Figure 7. All required information is sent via the Wi-Fi module in the Node MCU to the BLYNK platform successfully. Moreover, the energy meter readings are monitored directly in a successful way. The result of testing AC Light Bulb and AC Fan is presented Figure 8. Two sensors are used to sense lamp and fan current values. Each current sensor measured the needed data and send the information using Wi-Fi modules.

Economic cost analysis
Calculating the economic and technical costs before the start of the project is an important task. Therefore, the total price is computed for all components required for this system, identified through the websites. Moreover, this study confirmed that the system is suitable and inexpensive. The total cost of the project is presented in Table 1.

Result and Discussion
The energy consumption monitoring system was tested by performing ten tests for each component, as shown in Table 2. Moreover, all the mentioned components have been examined, and their accuracy and efficiency are known.
For example, Arduino Uno Microcontroller, AC Fan, AC Light Bulb, and LCD 12C (20x4) passed the test 100% successfully, as it did its required functionality and there is no error. Node MCU gave the test by 90%, the minor error that occurred maybe because of the poor internet connectivity in the place of testing, so it is considered an excellent percentage. The current sensor has passed the test by 80%, and the shortage of rate is possibly due to power failure in it, as shown in Figure 9.  Figure 9: Results of Applying 10 Tests

Conclusion
Online In conclusion, as noted through previous research, the increase in electrical appliances and their multiple uses has resulted in excessive electricity bills due to the depletion of energy. Day by day, electricity bills increase further due to the increase in the number of electrical appliances, which leads to an increase in the daily use of electricity. The absence of an energy consumption monitoring system exacerbates this problem. Therefore, it became necessary to develop a system to monitor energy consumption that can calculate daily consumption and display it to customers to know their energy consumption without facing any difficulties.
Implementing the devices for the energy consumption monitoring system has been completed by connecting all the required devices to the system core (Arduino UNO, which uses Atmega 328). The hardware required to implement this system was Node MCU, Arduino Uno Microcontroller, AC Fan, AC Light Bulb, LCD I2C (20x4), and ACS712 Current Sensor, which is responsible for sensing the current of electrical devices. As for the system programming, it did through the Arduino Integrated Development Environment (IDE). Therefore, this system started to work by sensing electrical devices' currents through current sensors to send the information to the Arduino UNO. That was for analyzing the data and enter it into mathematical equations to extract the amount of electrical power in watts and then convert it to a price. Moreover, all the necessary data was sent to the LCD screen and the Arduino Node MCU, sending the information via the Wi-Fi unit to the BLYNK application. Therefore, all the necessary data was displayed on the LCD screen and the BLYNK application. Moreover, the system implementation and testing have been completed, and the required results have been analyzed and successfully reached. The system has performed well, and it is simple to use, reliable, and efficient.