The electrical energy usage of monitoring system at real-time using IoT as the primary policy of energy efficiency

The policy of electrical energy conversion requires an energy audit to be right on target. Energy audits require measuring devices and energy usage data recorders in every part of the system. Measurement and recorder integration is using the technology of the Internet of Things (IoT) can facilitate the collection, monitoring, and data analysis. This research is designed and implemented for monitoring the use of electrical energy in real-time by utilizing IoT at a low cost. This system includes a microcontroller that is can communicate via WiFi network type ESP32 Devkit V1, instrument system of measuring electrical energy type PZEM-004T, the connector and wrecker device use Solid State Relay (SSR) and open-source IoT platform. The finding showed that the developed energy monitoring system can successfully record voltage, current, active power, and accumulative power consumption. The monitoring system can be acquiring the power used by the load relatively fast is around 2 to 4 seconds, and the monitoring system uses relatively little power around 5 W.


Introduction
The growth of electrical energy usage has increased significantly, thus requiring an enhancement in energy supply in the coming future. One of the biggest consumers is the campus. The use of Air Conditioning (AC) and LCD projectors in lecturing room significantly increase the consumption of electrical energy consumption. Besides, students also have bad behaviors by ignoring the energysaving program. Several wastes of electrical energy in a campus environment that most often happen such as turning the AC and lights on when the lecture room is not used, besides that some workroom such as meeting rooms and laboratories often sustain this condition.
This condition can be reduced by giving a firmer policy like strict penalties to institutes that make significant energy waste. Therefore, to be right on target, the policy must be supported by accurate data. One of the important data is energy usage data in each field based on time usage. The data can be collected from Automatic Meter Reading (AMR). Real-time measurement in several fields requires a considerable amount of AMR. The price of AMR which has the ability of a large capacity data logger is quite expensive, so the energy audit process needs a substantial cost. It can be solved by using AMR that has no data logger but it has been integrated with a database via internet network due to the development of technology Internet of Things (IoT) that mostly used today to connecting or transferring data through low bandwidth networks. IoT is used in every field such as the automotive industry, logistics, health care, smart grids, and smart cities.
Integrated AMR with IoT on this research is integration between module IoT type ESP32 with module measuring electrical energy PZEM-004T. The load connected to the power source is controlled by a Solid-state type switch. Data measurement is connected with the IoT platform through an internet Wifi connection. IoT platform has a datalogger and dashboard section as a Human Machine Interface (HMI) display.

Basic Theory
Here the explanation of the device used in this research. There are software and hardware

Energy audit
An energy efficiency program that succeeded energy audit has been conducted. The audit process is the first step to identify the potentials of energy saving. This audit will produce energy data usage that can be used for guidance on energy efficiency program. Automatically, the audit results will also provide information about the right steps to operate an energy efficiency program. This process becomes a reference in constructing the action plan that contains energy-saving recommendations. Historically study, it becomes fundamental to identify high sectors of its energy usage and influence toward energy use maps. This information is useful for determining energy-saving priorities as well as providing an overview of energy use patterns in a building.

Automatic meter reading (AMR)
Automatic Meter Reading (AMR) is a technology for collecting consumption, diagnostic and status data automatically from measuring energy devices (gas, electricity) and transferring the data to the data center for billing, problem-solving and analysis. This technology can economize the cost of regular flow to each physical location to read meters.
AMR system can be utilized for some needs like monitoring the energy supply to the customer, monitoring the network loss planning needs, billing or billing, and so on. Reading results data is saved on a database and can be used for analyzing, transaction and troubleshooting. Certainly, this technology can assist the enterprise of the electricity service provider to degrade operational costs and become the additional worth to customers, exactness and accuracy of data read, and give benefits to its user's service. In the beginning, the meter reading is carried out using a cable (wired) or direct dialing/ reading. A computer is connected to the meter using a communication cable (RS 232, RS 485 or RJ 45) or optical probe if it is conducted in the field.
Recently, many communication technologies that can be used by AMR systems such as PSTN (landline phone), GSM, radio wave, PLC (Power Line Carrier) and last meter reading is using LAN/WIFI for meters that supported by TCP / IP. AMR system consists of three components: (1) control Center it is a reading center, database center, and application program center, user, (2) electronic Meters it is an energy metering device with communication capabilities, (3) communication media, it is a means of communication between the control center and the electronic meter. The advantages of using the AMR System are below: (1) meter reading in real-time and accurately, (2) detect the early use of electrical energy illegally, (3) speed up the issuance process of account, (4) increase in electricity sales revenue, (5) State Electricity Enterprise (PLN) and customers can control electricity consumption through accurate data records, (6) improve the quality of service to customers.

ESP 32
ESP32 is a wifi module and as one of the devices created by DOIT to evaluate the ESP-WROOM-32 module. The basic component of this system is microcontroller ESP32 that has WIFI support, Bluetooth, Ethernet in one chip at low power. The module and address of pinout I/O can be seen in Figure 1.

IoT platform
IoT is a concept that has a lot of advantages to internet connectivity. The purpose of each IoT device is connecting to the application device for delivering information using internet protocol transfer. The gap between censor device and data network is filled by IoT Platform that connects data networks to censor settings and provides insight using backend application to discover the amount of data produced by hundreds of sensors.
IoT platform is a multilayer technology that enables supply, management and automation devices that directly connected to IoT. That platform connects the hardware to the cloud using flexible connectivity options, enterprise-level security mechanisms, and extensive data processing power. IoT platform position towards hardware and software application in Figure 2. IoT platform provides a set of features that extremely accelerates the application development for connected devices and maintains cross-device scalability and compatibility.

System Planning
The IoT-based electrical energy monitoring system has several main parts like the electrical energy usage instrument system, the load control switch system, the viewer system, the communication system, and the IoT platform.

Instrument device and actuator
This instrument device system is integration between ESP32 module and Devkit V1 as its microcontroller, PZEM-004T Module as measuring instrument of electrical energy parameter and SSR as the actuator of connector and wrecker load. This functional diagram is like a figure in 4. PZEM-004T Module is a module of electrical energy used by the load. This module is relatively inexpensive. To measure current, this module uses CT (current transformer) non-invasive sensor, chip measuring the energy of SD3004 and microcontroller to measure voltage, current, active power, and power consumption accumulative. Some primary command scripts software on instrument devices include defining Usernames, ID and passwords device. These definitions should be appropriate with the IoT platform in Thinger.io. Other definitions are SSID name and SSID Password as an internet gateway. Those definitions are here below: #define USERNAME "poltekbangsby" #define DEVICE_ID "beban01" #define DEVICE_CREDENTIAL "beban01x" #define SSID "tlb" #define SSID_PASSWORD "tlbok"

Communication data
Communication between the measuring device and the IoT platform is using an internet connection. The measuring device uses a wifi connection to connect microcontroller with an internet gateway. The communication protocol between measuring device or sensor device with IoT platform utilizes the protoson protocol. This protocol is different from the IoT protocol in general, namely Message Queuing Telemetry Transport (MQTT). The protoson protocol is an IoT protocol developed by the Thinger.io team. For users of microcontroller devices with Arduino IDE that has been provided a library of protoson protocol. There are other general categories related to Linux-supported devices such as Raspberry Pi, Intel Edison, or other Linux computers running on Ubuntu or macOS. The Wifi device in this system uses the ESP32 Devkit V1 module. This device has great power saving with a relatively high beat speed which is compatible with processing and delivering data via internet connection.

IoT platform
This system uses Thinger.io as Its IoT platform. Thinger.io has some features below: (1) cloud console, (2) mobile app, (3) server API, (4) server deployment. This monitoring system, measurement data display is designed on Cloud Console. The first design in this platform is an additional device. Each device that sends data to a platform is one device. The parameter device entered are Device Id, Device credential. Both parameters should be compatible with those described in the instrument device. The menu display for additional devices is shown in Figure 5.a, meanwhile, the description of the Arduino IDE is shown in Figure 5 The connectivity status between the instrument device and IoT platform can be seen in the Device List as shown in Figure 3.3.c. if the device is connected, it will be in a "Connected" status and when it is not connected it has a "Disconnected" status.
The measuring data display is designed at the menu dashboard. That menu provides some widgets that can visualize data. Display data design on this monitoring system in Figure 6. variables displayed are voltage, current, power, and energy consumption at the load. Besides, measurement variables also included a button that can be used to turn on or turn off the load.

Testing and Analysis
Testing the system is aimed to determine the characteristics of performance system. The testing types carried out includes measuring instruments testing, connectivity testing, and testing.

Measuring instrument testing
The measuring instrument test is intended to perceive the characteristics of measuring electrical energy. The measuring instrument system utilizes the PZEM-004T sensor module. The measurement results of the electrical energy sensor module with a lamp load as in table 1. The results of the testing system with the AC load have an outcome shown in table 2 based on the data testing result that the monitoring system can conduct measurement appropriately and in real-time. The time lag between measurement and display on the dashboard is greatly influenced by communication network quality. The electrical energy consumption in this monitoring device is very small at around 5 W.

Connectivity test
The data connection test from IoT device to IoT platform is conducted with the time lag measurement from sending to displaying data. The average time needed to acquire data from the sensor to be displayed on the dashboard is around 2 to 4 seconds due to the acquisition data process in censor is around 1 second

Conclusion
The conclusion that may be drawn from our research are as follows: 1. The monitoring system can be acquiring the power used by the load relatively fast is around 2 to 4 seconds 2. IoT system cab displays the amount of voltage, current, and power at load 3. The monitoring system can be supervised everywhere as long as it has internet network access 4. Historical data on IoT servers can display the characteristics of electrical energy use for a certain period of time 5. The monitoring system uses relatively little power around 5 W