IOT-Based Energy Monitoring System for Energy Conservation

. The aim of this project is to develop an Internet of Things (IoT) based Energy Monitoring System to reduce energy waste and cutting down energy cost. Therefore, it needs a system which provide efficient energy consumption management. For the starting of designing an IoT-based Energy Monitoring System, different sensor and calculated AC measurement methods were studied. The development of this system is to integrate each of the sensor, energy measuring device and IoT system into one complete module. The concept of Wireless Sensor Network (WSN) was implemented in this project. The WSN obtained data information from sensor and send them to the cloud through the IoT network for cloud storage of the ThingSpeak platform. The system contains two input signal which is voltage and current. The device that transfers the data or information from the energy monitoring device to the cloud storage is the ESP8266 Wi-Fi module. The output is the energy consumption that has been used according to the real-time data measurement. Lastly, the data that is transmitted to the cloud can be monitored through the mobile application ThingView. In conclusion, this system is necessary because it can control and manage energy consumption to avoid wastage and promote energy conservation.


Introduction
Energy conservation refers to the practice of reducing energy usage through more efficient means, with the aim of reducing energy waste and cutting down on energy costs.Consumption of energy has increased drastically around the world as people become wealthier and populations grow [1,2].
Nowadays, some of the energy management in corporations confront a few circumstances to manage the energy consumption in their company.Therefore, the establishment of a new platform to that can enhance the effectiveness of energy conservation is very important.Energy monitoring system not only provide information on your appliances energy usage but also help you learn where and when you spend the most energy consumption and expenditures [3].Understanding the current condition is the first step in developing an energy-saving strategy.We can identify waste energy and debate savings targets by monitoring energy and showing it in graphs and reports.While energy is required to build things, it is uncommon to find energy waste due to a tendency to place a premium on quality and ease of production.It is critical that we visualize energy usage and design a comprehensive solution from there to continue working toward energy savings [4,5].Malaysian government also have acted on energy efficiency and conversation by establishing the Ministry of Energy, Green Technology and Water (KeTTHA).This demonstrates that Malaysian government's desire to encourage energy efficiency and discourage wasteful and inefficient energy usage behaviors [6].
Internet of Things (IoT) is a type of network that can not only interface infrastructure, but also program, acquire, transmit and prepare data or information intelligently, as well as achieve scientific management anytime and everywhere via a variety of sensing devices and the internet.Based on the empathetic, the design of an IoT-based energy monitoring system to enhance energy consumption and also lower the cost can be done.The IoT-based energy monitoring system can help to take care of the issues of gathering, transmitting, and saving enormous data on energy usage procedures by utilizing some assortment strategies [7].This study helps to comprehend the government's objective to make efficient utilization of energy.The proposed idea for the project is an IoT-based energy monitoring system that use an Arduino as a processor, a current and voltage sensor as the sensing elements.The IoT element is added by transferring data to the cloud via a Wi-Fi module.The data taken from the current transformer will be calculated in Arduino and sent to a cloud base to be shown on mobile apps.

Energy monitoring available in market
The existing Energy Monitoring System in the market is to achieve continual improvement in power supply and utilization, it is necessary to have a thorough understanding of the relevant local system circumstances, as well as information on all possible sources connected to the system.It also contains all the necessary information for power monitoring, power quality recording, disturbance recorders, phasor measurement, and system software applications.The current product is primarily focused on Power Quality and Power Measurement, which provides providers and energy users with solutions for precise measurement, acquisition, and reporting of the necessary data to determine, adapt, and improve the health of the power system in a continuous process.The existing product is considered expensive and to be used for industry.Table 1 show the detail about existing energy monitoring system in the market.

Previous related work
Based on work by Pingle and Bhatkar [11], the goal of their study is to eliminate energy and money waste by creating a device that uses electricity efficiently.Other than that, it allows the user to keep track of how much electricity their device uses, and if the device malfunction, it will use a lot of energy.The device will transmit alerts, suggestions, statistics, graphs and other information to the user regarding his household electricity usage.Energy administration turns out to be more imperative regarding quick expanding energy cost.The fundamental prerequisite for beginning and acknowledging energy-saving measures is that precise investigation should be introduced to the electrical loads [12].Huang Haoran pointed out the design of the Three Phase Network Parameter Monitoring System [13].It focuses on improving the precision of input current and voltage including the real-time detection of power network parameters, programs of the data acquisition and calculation are made, remote data transmission, and energy calculation.2 Methods

Hardware design
The project is designed to monitor the energy for a single-phase system.It was able to take several readings for energy analysis that is voltage, current, active power (P), apparent power (S), and power factor (pf).Other than that, because this system is based on IoT it must be able to be monitored from the mobile application.The device also can be installed easily by using a split-core current transformer that can support up to 100 A. Based on the hardware design, the suitable components used in this project are chosen containing Current and Voltage Transformer (CT and VT).The current transformers used in this project do not have their own burden resistor at the secondary to generate an output signal.
The output signals at the secondary are so small that they are fit for the input signal of Arduino.The processing unit that is used for this project is Arduino.The program is sent to Arduino via USB cable.The boards can be added with hardware units called "shields", which provide extra functions like Wi-Fi, Ethernet, and RF communication.

Calculation burden resistor for current transformer
The current transformer that was used is SCT-013-000 and does not have a burden resistor to act as a dummy load to give an output signal to the Arduino.By the calculation, the suitable burden resistor can be chosen.The project is designed to monitor the energy for a single-phase system.This project uses a current transformer with a maximum range of 100 A that needs to be converted into RMS current to peak current by multiplying √2.
Primary peak current = RMS current × √2 To enhance measurement resolution, the voltage across the burden resistor at peak current should be 0.5 of the Arduino analogue reference voltage.The Arduino AREF voltage is 5V.So, dividing by 2 will get 2.5V.The ideal burden resistor is calculated as: Ideal burden resistor = 2.5 ÷ secondary peak current A lesser value must be chosen, else the maximum load current will result in a voltage greater than AREF.

Calculating a suitable voltage divider
The voltage transformer that uses in this project step a down transformer from 240 V to 9 V.The transformer's output signal is a sinusoidal waveform.The positive peak voltage of the 9V RMS transformer was 12.7 V, while the negative peak voltage was -12.7 V.The resistors R 1 and R 2 form a voltage divider to scale down the AC voltage.The resistors R 3 and R 4 give the voltage bias.For the AC signal, C 1 provides a low-impedance connection to the ground.The value used in this circuit is 10 µF.The value for resistor R 1 and R 2 needs to be chosen to give out a peak voltage output of ~1V.For a 9 V RMS transformer output, a resistor combination of R 1 is 10k and R 2 is 100k can be considered suitable.

Root mean square current and voltage
By using the formula below, where is input data taken from voltage transformer and number of samples, N.

Real power
The real power is important is deciding the usage of energy.The formula of real power as shown in the equation below where the functions respect to the time are continuous signal.But instantaneous current and voltage need to be in digitized sample.

IoT development
The use of the IoT for this project is to make the monitoring become easier by sending the data to the cloud.As for the mobile application, the software Android-based was used.Figure 1 shows the system architecture of IoT, which is the simplest way to understand this project, Demand Control System will send data to the cloud through a router by ESP8266 Wi-Fi module.And then the cloud will deliver the data to the mobile application for users to monitor their data of the system.The mobile application flow process is shown as in Figure 2. The user needs to choose to add a new channel in the mobile application.After that need key in the channel id user want to view.If the user buys the pro version there will be several choices for the user to view the energy usage for daily, monthly, or yearly.

MATLAB reading sampling data without noise
The Nyquist Theorem or also known as the sampling theorem is a principle that needs to be followed in the digitization of analog signals.The analog to digital conversion (ADC) to get the result in realistic reproduction of the signal, the sample of an analog waveform must be taken frequently.The number of samples per second is called the sampling frequency.According to the Nyquist theorem the sampling frequency must be twice or higher than the analog frequency.
The base frequency of the sinusoidal waveform is 50 Hz.So, by using this theorem sampling frequency is decided to be 200 Hz and 1000 Hz for MATLAB software simulation and for the energy monitoring system is 200 Hz, 900 Hz and 8900 Hz.The sampling frequency is different depend on the ability of the processing unit.This sampling frequency is chosen to see the accuracy of data taken and the plotted graph.Figure 3 shows the simulation result of the sinusoidal wave of 200 Hz sampling frequency with 4 plotted data sampled based on the 50Hz sinusoidal waveform.Figure 4 shows the graph plotted based on the data sampling taken.It shows that the graph changes in shape from sinusoidal to triangular. Figure 5 shows the simulation result of sinusoidal wave of 1000 Hz of sampling frequency with 20 plotted data sampling based on the 50Hz sinusoidal waveform.From Figure 6, the graph plotted is identical to the graph of simulation done in MATLAB.With more reading taken the graph plotted will be more accurate and the reading taken for actual device can be assured.Table 2 shows that there is no error as the sample is pure sine wave.

MATLAB reading sampling data with noise
The graph generated in Figure 7 shows that it is not a pure sine wave, but it has noise that mostly same as in reality.For the 200Hz sampling frequency the data taken is 4 by referring to pure sine wave before.From the Figure 9 the graph plotted is triangular shape and by calculating the data taken of it sampling frequency 200 Hz the voltage value is 159.54V.As for the Figure 10, the graph is identical as the original graph that is generated.The value of voltage for 1000 Hz sampling frequency is 166.5439V. From these two types of sampling frequency, the data taken for 1000 Hz is more accurate and have low error as it closer to the value of pure sine wave.

Sampling data of current for heater
From the reading taken at Serial Monitor the current, I RMS . is 9.38 A. The value that has been calculated need to be multiplied with the value of ratio that is 0.2962.This value came from the supply voltage of Arduino that is 5 V divide by 1023 ADC value and then multiply by calibration value 60.601.Figure 12 and Figure 13 shows that the graph is more like a pure sine wave because lots of data.Table 4 shows that there is a small percentage of error happen when only 4 samples of data taken to be calculated.This happens because of the heater is a pure sinusoidal wave because of its characteristic as linear load.Figure 13 shows the graph of 178 samples of data and compare to Figure 11 shows the graph of 4 samples data it is difference in term of shape.By analysing the shape of waveform the accuracy of value taken can be quite difference from reading value.As for 18 samples of data the error almost have the same error as 178 samples of data.The error may be cause by the current transformer characteristic that having a Class 5 accuracy's that is 5% reading error [14].By measuring the current using the I RMS value, one can calculate the amount of electrical energy being used by a device or system over a given time period.This information can then be used to identify opportunities for energy savings and conserve the energy by optimizing the operation of the device or system.

Sampling data of current for heater
From the reading taken at Serial Monitor the current, I RMS is 3.31 A. Figure 14 shows the data sampling for 4 data taken from reading the Arduino.The value that has been calculated need to be multiplied with the value of ratio that is 0.2962.This value is same with the previous data.As aforementioned, the value obtained from the Arduino reading represents the voltage level being measured by the ADC.It needs to be multiplied by the ratio in order to obtain an accurate measurement of the current flowing through the circuit [15].Table 5 shows that there is a big percentage of error when only 4 samples of data were used for calculation.This happens because of the air conditioner is not a purely sinusoidal wave because of its characteristic nonlinear load [16].Figure 16 shows the graph of 178 samples of data and Figure 14 shows the graph of 4 samples of data it is difference in term of shape.The differences in the number of samples taken cause the error in reading.As for 18 samples of data the error is almost half the error of 4 samples of data.The error also may be cause by the current transformer characteristic that having a Class 5 accuracy's that is 5% reading error [14].As the data taken for one cycle are increases, it also increases the accuracy of the reading.

Conclusion
In the era of evolving smart technology, this project focuses on the use of energy-efficient technologies aimed at promoting energy conservation.Monitoring and control systems rely on the methods and techniques employed by these systems to give a useful and essential solution.The hardware of an energy monitoring system for domestic use had been designed and tested.The project was tested with two types of loads that is linear load heater and nonlinear load air conditioning.Through the Nyquist Theorem, it shows that the higher the sampling frequency, the more accurate the reading taken.By using this project, the data for power consumption and electricity can be obtained for power monitoring and minimized the uses of power consumption.By conserving energy, individuals and societies can reduce their impact on the environment and promote sustainability.

R 3
and R 4 must produce a voltage bias equal to half of the Arduino supply voltage.The value of R 3 and R 4 should be equal and that is 470 kΩ indicating lower energy consumption when the resistance is high.

Fig. 11 .
Fig. 11.Graph of sampling data for 4 samples of heater.

Fig. 12 .
Fig. 12. Graph of sampling data for 18 samples of heater.

Fig. 13 .
Fig. 13.Graph of sampling data for 178 samples of heater.

Table 1 .
Existing energy monitoring systems.

Table 2 .
The difference data between 200Hz and 1000Hz for MATLAB pure sine wave.

Table 3 .
The difference data between 200 Hz and 1000 Hz for MATLAB sine wave (noise).

Table 4 .
The percentage of error for different sampling data of heater.

Table 5 .
The percentage of error for different sampling data of air conditioner.