Internet of things-based photovoltaics parameter monitoring system using NodeMCU ESP8266

ABSTRACT


INTRODUCTION
The demand for renewable energy sources is growing in tandem with global energy demand.This is due to the worsening environmental impact caused by the use of fossil fueled power plants, which cause a big air pollution and not environmentally friendly.On the other hand, there are several forms of renewable energy-based electricity generation, with technology that is constantly improving [1]- [11].
Solar energy has recently emerged as the most appealing renewable energy source for bridging the gap between consumption and production of electrical energy.This is due to the dramatic cost reductions and advancements in photovoltaic (PV) technology, which is still rapidly evolving [12]- [14].In addition, solar energy is also the cleanest, environmentally friendly, and abundant type of energy compared to other energy Int J Elec & Comp Eng ISSN: 2088-8708  sources.Furthermore, the PV technology can be the most efficient source of energy with modern monitoring and control systems [5], [6], [15]- [23].
The data collected during the operation of a PV system is very interesting, not only for determining whether the design goals were met, but also for improving the PV system's design and operation, as well as a general assessment of the PV technology's potential [24].Moreover, it is necessary to control the PV's parameters in order to optimize it.A PV monitoring system's goal is to provide accurate data on a variety of parameters, including energy potential, energy extracted, fault identification, historical generation analysis, and associated energy losses [14], [25].The literature has detailed descriptions of the classification of PV monitoring systems based on internet technologies, the data acquisition system used, and the monitoring system methods [16], [26]- [29].
The internet of things (IoT) technology is able to monitor and control many smart devices remotely.Many IoT based online and remote monitoring systems has been developed by researcher [30]- [38] such as: i) object monitoring [31], [39], ii) parking space monitoring and management [32], iii) environmental monitoring [33], [36], iv) electricity power consumption monitoring [35], and v) body health monitoring [30], [37].Most of the developed device is using NodeMCU ESP8266 for the main processor and Wi-Fi provider because of the low-cost and low-power consumption module [31], [39]- [42].
In the area of renewable energy generations, especially on PV power generation systems, much research's that has been done to design and develop PV parameter monitoring systems, both offline and online are available in the literature [14], [43]- [51].Due to the sensitivity of PV panels to environmental factors, data such as solar radiation, ambient temperature, weather, and electrical data are used to assess the condition of the PV station.This is why it is crucial to keep track the performance of a PV system at all times [52], [53].
Presently, the PV parameter monitoring system that has been developed by many researchers is still relatively complex and requires high production costs for small-to-medium scale PV applications, this is due to the use of a pyranometer sensor (as a measure of solar irradiance), the use of an expensive controller and also use of high paid monitoring software such as LABVIEW [54].Besides this, the existing system also does not provide an offline data backup/storage feature, if the system's network fails, this may result in data loss [55].
In this paper, an IoT based PV parameter monitoring system is designed with low production costs for small-scale PV-based power generation applications (in this case for energy independent home applications).To achieve this goal, many costly components such as sensors and controllers are replaced with sensors and controllers that perform the same role but cost less and are readily available.Furthermore, instead of using special software that needs high service costs, such as LABVIEW, the monitoring software used was open-source and free IoT software.In addition, to prepare for any network failures, a MicroSD card-based offline data backup system is introduced.

RESEARCH SYSTEM DESIGN
IoT technology is used in the proposed system to track parameter data from PV via internet connection, including both environmental data (metrology) and electrical data (I and V).The microcontroller is used in an IoT-based PV monitoring system to capture, process, store, and analyse data from sensors based on the calculated parameters in the system.The microcontroller will send the data to the cloud server through a Wi-Fi gateway after it has been processed.

The proposed IoT PV monitoring system
Figure 1 depicts a block diagram of the entire proposed system, which includes PV data in the form of environmental parameters collected from temperature and light sensors (to estimate the solar irradiance).The electrical parameters of PV, such as current and voltage, are obtained from the appropriate sensors.With the IoT protocol, the microcontroller collects, processes, data from sensors.Then the data transmit and store into offline data backup systems and cloud servers, respectively.The web-based and open-source software serves as a cloud database and visual data viewer can be accessed via Smartphone or personal computer (PC) via a web server.

Internet of things for PV monitoring system
The IoT allows smart microgrids to exchange information with more users and improves communication through a variety of infrastructures [3].IoT plays a significant role in human everyday life by allowing the integration of many physical devices via the internet, where devices are intelligently linked, enabling new forms of communication between devices and humans, as well as between devices and the system itself, to share data, track, and manage devices from anywhere in the world using only an internet connection [54].IoT technology is used in the field of renewable energy, especially solar PV systems, to track important parameters affecting PV system output in real-time and online.The sensor and transducer provide these parameters, which are then sent to the microcontroller for analysis.Furthermore, PV plants and other power generation systems can be tracked using an IoT-based monitoring system to enhance analysis, quality, and system maintenance.

Display unit and cloud storage system
Continuous data acquisition necessitates graphic or visual data display capabilities, which can be accessed remotely and in real-time via a smartphone or PC.The application programming interface (API) that used for the display unit of the proposed system is an open-source IoT platform namely ThingSpeak.ThingSpeak enables the development of sensor logging applications, location tracking applications, and social networking things with customizable status updates.It allows users to collect, store, analyze, visualize and make decisions based on data that obtained from sensors.

EXPERIMENTAL SETUP
In this research, various sensors are used to measure various parameters of the PV system, such as solar irradiance (light intensity), ambient temperature, PV output current, PV output voltage, and PV output power.The acquired data from the sensor is transferred wirelessly to the cloud server using IoT protocol, then the data is displayed visually using ThingSpeak platform.The goal of the proposed system in this paper is to develop a simple, low-cost, and high-performance IoT solution for monitoring the electric and environmental data of PV solar farms, especially small-scale PV farms (on and off grid condition).It is essential to select sensor and controller hardware that is both low-cost and capable of providing highly accurate data acquisitions.The following are the low-cost sensors that can be used to quantify both environmental variation and electrical data: -DHT22 is used to measure the temperature and humidity data -Photodiode sensor is used to measure the solar radiation intensity -ACS712 is used to measure the current produced by PV -Impedance divider sensor module is used to measure the voltage produced by PV Instead of DHT11, DHT22 is used to assess room temperature and humidity because it provides more precise data acquisition.Pyranometer sensor is replaced by a photodiode sensor due to measure the light intensity transmitted to the PV screen, resulting in lower device costs.The current sensor ACS712 and impedance divider are used to measure the generated power by PV.
The ESP8266 controller is chosen as the main processor of data acquisition systems because of its low-cost, low-power consumption and high-performance computational controller.In addition, the ESP8266 controller has many useful features, such as a built-in Wi-Fi module, has a many general-purpose input/output (GPIO) ports, and a simple programming method.The open-source IoT platform ThingSpeak is used as a database and to visualise the acquired data with an interactive graph and dashboard in order to keep the system low-cost and easy to access and create.Besides, using non-open-source software such as LABVIEW cost would rise the cost due to costly software service payments.Furthermore, an offline backup data system comprised of real-time clock (RTC) and MicroSD modules has been introduced to expand the database systems and serve as internal data storage systems that can be accessed when online data is unavailable.

Photovoltaic system
In the proposed design system, the PV system consist of 50Wp monocrystalline PV panel, 10 A pulse width modulation (PWM) solar charge controller, 12 V 7.2 Ah battery for energy backup, and 30 W constant load.

Sensing unit a) Current sensor
An ACS712 current sensor with a maximum operating range of 5 A was used in this study.Since this sensor can detect both AC and DC currents in a circuit, it can be used in a variety of applications.An Arduino, ESP8266, or another kind of microcontroller can be used to access this sensor.In principle, this sensor works with indirect sensing.The current flows through the onboard hall sensor circuit in its IC.The hall-effect sensor detects incoming current by generating a magnetic field.The hall effect sensor detects the magnetic field and produces a voltage proportional to it, which is then used to calculate the current.b) Voltage sensor The proposed system's voltage sensor is a voltage divider sensor that is used to read the value of the output voltage provided by the PV when the system is in service.The DHT22 sensor is used in the PV monitoring system to measure temperature and humidity at the same time.It is a negative temperature coefficient (NTC) type thermistor that measures temperature and a humidity sensor that is resistant to changes in water content in the air, as well as a chip that performs some analogue to digital conversion (two-way single cable).d) Irradiance sensor The photodiode sensor was chosen as an irradiance sensor to replace the pyranometer sensor, which is rated as extremely costly, thereby raising the overall device cost.To obtain an accurate value, the photodiode sensor must be calibrated using an accurate solar irradiance sensor, such as a pyranometer.

NodeMCU ESP8266 based controller
NodeMCU is an open-source firmware and development kit that assists in the development of IoTbased application systems.NodeMCU was created to make it easier to use a sophisticated application programming interface (API) for IO hardware.APIs can help to reduce the amount of time spent configuring and manipulating hardware devices.The NodeMCU has the advantage of being programmable in a variety of programming languages and with an open-source IDE.The code for this study will be uploaded directly to the NodeMCU board using the Arduino IDE.Meanwhile, the ESP8266 is used as the Wi-Fi integrated chip, and it is very small in size.

Software design 3.2.1. ThingSpeak
ThingSpeak is an open-source internet of things (IoT) platform and API for storing and retrieving data from things that use HTTP over the internet or a local area network (LAN).The internet of things (IoT) gives users access to a wide range of embedded devices and web services.Moreover, it is capable of collecting, storing, analyzing, visualizing, and acting on data from sensors or actuators such as Arduino, NodeMCU, Raspberry Pi, BeagleBone, and other hardware.ThingSpeak, for example, allows sensor logging and location tracking applications.
Additionally, it is a data collector that gathers data from NodeMCU devices and then loads it into the software environment for historical data analysis.A channel, which contains a data field, a position field, and a status field, is the most important part of the ThingSpeak operation.ThingSpeak features includes: i) open API, ii) real-time data collection, iii) geolocation data, iv) data processing, v) data visualizations, vi) device status messages, and vii) plugins are the key features of ThingSpeak.

Monitoring algorithm
Figure 3 shows a flowchart of an IoT-based PV device monitoring algorithm.The proposed monitoring system start with the library definitions, variable parameters, and board setup.Then the system will check the availability of Wi-Fi connectivity.If the connection is accessible, the controller will start to open and read the SD card folder file.Furthermore, if the system successfully reads the SD card folder file, the operation will proceed to read all of the system's sensors before reading the time reference from the RTC module.As a final point, the collected data will be written and stored into the SD card module.In addition, using the built-in Wi-Fi gateway on the NodeMCU, the collected data will be sent to a cloud server.Until the device is deactivated, all procedures will be replicated.

RESULTS AND DISCUSSION
Figure 4 depicts an experimental system in which the PV is used as a power generator and the laptop is used to view graphic data obtained via the ThingSpeak platform.The electrical measurement device is used to verify the accuracy of the electric sensor, the breadboard is used to attach the sensor to the mainboard, the box contains the mainboard and the PWM solar charge controller, and the 12 V battery serves as an energy backup system.
Figure 5 shows the graphical data obtained from the ThingSpeak platform.Moreover, Figures 5(a) to (e) depict the PV parameter measurements, which include solar irradiation level, ambient temperature, PV output voltage and current, as well as the PV output power.The monitoring device's channel placement is shown in Figure 5(f).The linear relationship between solar irradiation, PV output current, and PV output power values indicates that the sensor readings and data collecting system are working appropriately.In around 30 seconds, the sensor collects, analyses, transmits, and stores the data into cloud server.Meanwhile, Table 2 tabulates the costs comparison of several key controllers used in the IoT-based PV monitoring system.This is to show that the proposed system's development costs are the lowest compare to others.In comparison to the other controllers, the Raspberry Pi [10] and BeagleBone Black [9] have the most efficient computational efficiency, but they are also the most costly and complex to program.The cheapest controller is the PIC 16F877 [20], but it has the lowest computational efficiency and requires an external Wi-Fi module to connect to the internet.Due to their easy programming and relatively high performance for many applications, the Arduino MEGA2560 and Arduino UNO R3 [4], [19] have become popular controllers.However, they still have a low computational level as compared to other controllers on the market, and they need an additional Wi-Fi module for IoT applications.The ESP board series [18] was chosen for this proposed system due to its low cost and ability to perform reasonably high-level computation.In addition, the ESP board series has a built-in Wi-Fi module and consumes very little electricity.

CONCLUSION
An IoT-based PV parameter monitoring system was introduced in this paper.The parameters such as solar irradiance, ambient temperature, PV output voltage, PV output current, and PV output power are all measured by the system.Moreover, solar irradiance, ambient temperature, PV output voltage, and PV output current are measured using photodiode, DHT22, impedance divider, and ACS712, respectively.Besides, PV output power is obtained from the product of PV voltage and PV current.The main controller of the system is the NodeMCU V3 ESP8266, which also has the ability to create a Wi-Fi enabled gateway.As a result, the calculated parameters can be transferred wirelessly from the sensor to the cloud without the need for an external Wi-Fi module.Finally, the acquired parameters are tracked on the cloud server using ThingSpeak.
The selected components for the proposed system are low-cost and readily available on the market.The reliability of each components also a factor to consider.Finally, laboratory experiments are used to verify the proposed system.The outcome clearly show that the proposed system offers accurate result in monitoring the PV parameters.It is important to test the proposed system under a variety of environmental conditions over a prolonged period of time for future work.

Figure 1 .
Figure 1.Block diagram of a proposed IoT-based PV monitoring system

3 . 1 .
Int J Elec & Comp Eng ISSN: 2088-8708  Internet of things-based photovoltaics parameter monitoring system using … (Tole Sutikno) 5581 Hardware design Figure 2 shows the wiring diagram for the proposed system's main board.The key components of the device are the NodeMCU ESP8266, various sensors, analog digital converter (ADC) module, RTC, and the SD card module.

Figure 4 .
Figure 4. Experimental setup of the proposed system

Figure 5 .
Figure 5. Captured visual data from ThingSpeak platform; (a) ambient temperature, (b) PV voltage out, (c) PV current out, (d) PV power out, (e) solar irradiance level, and (f) channel location

Table 1 .
Table1shows the complete data and usability of each device.Figure 2. Schematic diagram of proposed system Research components

Table 2 .
Comparison of the controller for IoT monitoring systems *Estimated cost of the main controller (Amazon.com)Internet of things-based photovoltaics parameter monitoring system using … (Tole Sutikno) 5585