Design of an Ultra-Low Powered Data-Logger for Stand-Alone PV Energy Systems

DOI: http://dx.doi.org/10.24018/ejece.2020.4.6.261 Vol 4 | Issue 6 | December 2020 1 Abstract — This paper presents an open-source, ultra-low powered data-logger for off-grid photovoltaic (PV) energy systems. Deep-sleep mode of ESP32-S2 microcontroller is used along with voltage, current, and light sensors for logging the data of PV energy system to an external micro SD card. A toggle switch is used to switch the operational modes of data-logger between deep-sleep and web-server modes. Real-time PV data can be monitored in a local web-portal programmed in the microcontroller. The same web-portal is also used to check and download the historical data of a PV energy system. The energy consumption of the designed system is 7.33mWh during deepsleep mode and 425mWh during the web-server mode. The total cost of the designed data-logger is C$ 30.


I. INTRODUCTION AND LITERATURE REVIEW
H The world's energy demand is increasing at a high pace due to rapid technological advancement and population growth. Energy or electrical power is vital for any country's economic progress because the goals of industrial operations, agricultural expansions, and advanced civilizations cannot be achieved with limited conventional energy resources. Increasing energy demand is also leading to environmental hazards because more than 70% of global energy is produced by burning fossil fuels [1]. Renewable energy resources are everlasting energy resources and have the ability to overcome both energy shortage and environmental hazard problems. Hydro and wind energy have a major share in the present renewable energy market, but the solar photovoltaic system is most commonly used for residential applications. Solar photovoltaic is one of the rapidly growing and commonly available renewable energy sources. Photovoltaic is all about the conversion of solar radiation to electricity by using a semiconductor material. The solar photovoltaic system is usually installed in modular form so it can be modified as per the future load variations [2].
Stand-alone PV energy units can help to reduce the energy demand in developing countries by isolating the domestic load from the local utility grid. The initial cost of a photovoltaic energy unit is extremely high as compared to conventional energy resources (coal, oil, gas, etc.) so increasing its effectiveness is very important for the future growth of this technology. Constant data-logging and behavior analysis of stand-alone PV energy units can play a vital role in improving its efficiency and reliability for Published on December 30, 2020. Asif Ur Rehman, Memorial University of Newfoundland, Canada.
(corresponding e-mail: aurehman mun.ca) domestic applications [3]. Researchers have been working on photovoltaic data loggers for a long time. The author has proposed a data logging system for solar-powered street light in [4] using voltage sensor, current sensor, and battery control unit to record the output of PV energy system and battery charge capacity by using ATmega328 microcontroller. All data is stored in a local SD card after every minute, which can be extracted by using a computer for monitoring and analysis purposes. The self-power consumption of that design is high.
A monitoring and data logging system is developed in paper [5] by using a microcontroller and a single-board computer. That data logger is specifically designed for an offgrid solar photovoltaic unit installed in a private house. The current sensor and voltage divider are used to detect the PV system's current and voltage, and the STM32 microcontroller processes all data. A Linux based single-board computer receives the data from STM32 and transmits it to a remote server through the internet every five minutes. That singleboard computer can also store the data to its local SQL database in case of internet connection failure. This data logger is suitable for monitoring the small PV energy system's important parameters with maximum current up to 25A and voltages up to 55V. [6] Introduces a PV analyzer with lower manufacturing cost by using a voltage sensor, current sensor, temperature sensor, variable rheostat, and Arduino UNO. The Arduino UNO gets the data from all sensors and transfers it to a locally installed computer, where the Parallax Data Acquisition tool is used for logging the data in an excel sheet. This analyzer logs the power output of a PV energy unit and also records the parameters that affect the performance of the system like temperature and humidity. The measurement accuracy of this analyzer is almost equal to a good quality millimeter. As the author is logging the data in a local computer so the self-power consumption of this design is high.
Self-power consumption of the data-logging system increases by adding more and more features in the system. As per the literature review, we can say that most researchers focus on providing technological advancements in PV datalogging and monitoring systems. This advancement leads to the addition of more components in the design and results in extra power consumption of the system itself. Some of the authors have also discussed this issue and tried to reduce the power consumption of data-logging and monitoring systems [7], [8]. Stand-alone PV energy systems are normally installed at remote locations and have a limited energy availability, so reducing the power consumption of a datalogging and monitoring system can support this field. The M. Tariq Iqbal, Memorial University of Newfoundland, Canada. (e-mail: tariq mun.ca) @ @ Design of an Ultra-Low Powered Data-Logger for Stand-Alone PV Energy Systems Asif Ur Rehman and M. Tariq Iqbal purpose of this research is to introduce an ultra-low powered data-logger for a stand-alone PV energy system. This purpose is achieved by using the deep sleep mode of the latest microcontroller ESP32-S2 along with voltage, current, and light sensors.

II. DATA-LOGGER DESCRIPTION
The advanced and intricate design of a PV data-logger always increases its self-power consumption, which leads to more energy losses and imposes an extra burden on the limited energy supply of the PV system. The low power consumption goals can be achieved by simplifying the design and limiting the features of PV data-logger. The essential components of the ultra-low powered PV data-logger designed in this research are ESP32-S2 microcontroller, micro SD card reader, voltage sensor (voltage divider), current sensor (ACS712), and light sensor (light dependent resistor). The design is kept as simple as possible to reduce the self-power consumption of the data-logger. Following is the description of some major components used to design this data-logger.
A. ESP32-S2 Microcontroller ESP32-S2 designed by ESPRESSIF is a single core WiFi microcontroller that provides high performance, low power consumption, and a large number of I/O (input and outputs). ESP32-S2 supports a large number of peripherals, which includes 43 programmable GPIOs (General Purpose Inputs and Outputs) with an ability to configure as USB OTG (Universal Serial Bus On-The-Go), LCD interface, camera interface, Serial Peripheral Interface (SPI), I2S interface, Universal Asynchronous Receiver-Transmitter (UART), Analog to digital converter (ADC), Digital to analog converter (DAC) and other standard features. ESP32-S2 has configurable LCD and capacitive touch GPIOs to provide HMI (Human Machine Interface) features for touchpads and different touch screens. The development board used in this research is designed by Liligo, and the model of this board is LILYGO® TTGO T8 ESP32-S2-WOOR V1.1. Table I shows some technical specifications of the ESP32-S2-WOOR development board [9]. Each pin of this microcontroller can be programmed for different applications, depending on the program configuration in Arduino UNO. Pin configuration chart is required to determine the capacity of each port. There are also some limitations for some specific configurations and user manual of microcontroller provides all this guideline of programming. Fig. 1 shows the pin configuration chart of LILYGO® TTGO T8 ESP32-S2-WOOR V1.1 used for the designing of data-logger. The primary purpose of selecting this microcontroller is its ultra-low-power co-processor. This co-processor acts as the main CPU (central processing unit) during the deep-sleep mode. Only the data stored in RTC memory can be processed during the deep-sleep mode. The power consumption of this board is 25µA while only using RTC memory and RTC clock during deep-sleep mode [10]. Arduino IDE software is used for the programming of the selected microcontroller.

B. Voltage Sensor
ESP32-S2 provides 13bit ADC inputs with a maximum read value of 3.3V, which means the processor will read 8191 while applying 3.3V to its selected ADC pin. A simple voltage divider circuit is converting the DC bus voltages of the PV energy unit to a readable microcontroller range. The voltage divider is designed to convert 36V to 3.3V, which means this system is suitable to measure a full 36V dc bus. The following formula can calculate the required resistances: The values of R1 and R2 are 10k Ω and 1k Ω, respectively, to convert 36V to 3.273V. Fig. 2 shows the circuit diagram of the voltage divider.
C. Current Sensor ACS712 Hall current sensor is used to measure the DC current from solar panels. It is a compact hall effect-based current sensor to measure linear current with a voltage isolation level of 2.1 kVrms. A current conductor of low resistance is used in this sensor. The selected current sensor can measure a maximum of 20A with a scale factor of 100mV/A at a supply voltage of 5VDC. The analog signal measurement range of ESP32-S2 is 3.3VDC, so this sensor is being powered up by using the 3.3V pin of the microcontroller by adjusting the scale factor to 66mV/A. The main chip used in this sensor is ACS712ELCTR-20A-T. Fig.  3 shows the connection diagram of the ACS712ELCTR-20A-T chip and sensor's physical appearance.

D. Light Sensor
A light-dependent resistor (LDR) is used as a light sensor in the designed data-logger. The resistance of LDR is inversely proportional to the light. The resistance of this particular LDR is 400Ω at 1000 lux and 9KΩ at 10 lux of applied light [11]. A simple voltage divider by using 10kΩ resistance and LDR is designed to detect light intensity. Fig.  4 shows an LDR along with its circuit diagram. The voltage source is the 3.3V pin of the microcontroller, so the potential at the ADC pin is increasing along with increasing light intensity.

E. Card Reader
An external micro SD card is used for logging the data collected by ESP32-S2. For that purpose, a micro SD card module is attached to the fast serial peripheral interface pins (FSPI) of the ESP32-S2-WOOR board which are from IO34 to IO37. This module provides an onboard pop-up micro SD card interface, where the memory card can be installed easily. The operating voltage of this micro SD card module is 3.3V, so VCC and GND pins of the module are connected to 3V3 and ground pins of the microcontroller. The operating current of this module is 80mA at a 3.3V supply. The selected micro SD card module supports a maximum 32GB memory card. Fig. 5 shows the block diagram of pin connections of the micro SD card module with the ESP32-S2-WOOR development board.

III. SYSTEM DESIGN AND PROGRAMMING
ESP32-S2 collects data from voltage, current, and light sensors through the first three pins of ADC1 and stores it in an external memory card installed in a micro SD card module. 3V3 pin of the development board is used to provide power to all sensors and memory cards. IO11 pin of the microcontroller is used to connect a toggle switch for selection between deep-sleep and monitoring modes of datalogger. A light-emitting diode (LED) is connected to the IO12 pin to show the status of the web-server of the data-logger. Fig. 6 shows the block diagram for the pin configuration of the microcontroller. All the components of the data-logger are assembled on a breadboard for testing purposes, as shown in Fig. 7. Deep-sleep mode and web-server mode are two operating modes of data-logger that can be selected by the toggle switch. The selector switch is connected to 3.3V pin and IO11 pin of the microcontroller. The data-logger operates in deepsleep mode and log data to the SD card after every 60 sec if the selector switch is at an OFF position. The data-loggers check for the previously logged data every time after waking up from deep-sleep mode to calculate the serial number and total energy of PV system. The data-logger will operate in web-server mode, and data can be monitored by any device connected to the local network if the toggle switch is at an ON position. An LED light shows the status of monitoring mode. Glowing LED light shows that the data-logger is operating in monitoring mode. Fig. 8 shows the basic algorithm chart of the designed data-logger's program. This diagram shows the default cycle time which is 60 sec. This data-logging cycle is adjustable through web-portal as per the requirements of user.

IV. LAB TESTING ON A PV SYSTEM
The photovoltaic test system consists of 2 solar modules of 140W each. Both modules are connected to a 12V battery unit through a maximum power point tracker (MPPT) based charge controller. Fig. 9 shows the control scheme of the installed system along with the data-logger. The MPPT controller adjusts the output of the DC-DC converter after sensing the current and voltage feedbacks of solar panels. The same current and voltage feedback is also connected to the data-logger for monitoring and data-logging purpose. Fig. 9. Control and data-logging of isolated PV system. Fig. 10 shows the hardware connection setup of the designed data-logger. There are total six different arrays of solar panels having their own charge controller in testing lab. Each array has 140 watts of solar panels attached to the battery bank. The data-logger is connected to one of the PV incoming bus for logging and monitoring the data of that specific array. The data-logger is designed to operate more in deep-sleep mode. The monitoring mode is designed only to adjust the settings of data-logger and extract logged files. The laptop is connected to the data-logger through a WiFi connection and shows the data-logger's web-portal. Same laptop is connected to microcontroller through USB cable to detect the IP address of data-logger. The data-logger shows its own IP address to the serial port after initializing the local web-server. Any device connected to the data-logger through WiFi can easily access the designed web portal by browsing that IP address. Fig 11. Shows the main page of data-logger's web-portal. Users can view the historical data, adjust the log interval, check the size of logged data, download the stored file, and delete previously logged file through this portal. The current consumption of microcontroller is 25µA at 5VDC. The test results show that the current consumption of the designed data-logger is less than 1mA during deep sleep mode. The data-logger is programmed to wake-up for 1 sec during each 60 sec cycle and the current consumption during wake-up time is 35mA. The following formulas can calculate the power consumption of the data-logger.
Nominal The calculation shows that the designed data-logger is consuming 64Wh per year, which is ultra-low for a PV datalogger. The total cost of a designed data-logger is also very low as compared to many other commercial PV data-logging products. Table II. Shows the total cost of this data-logger. Table 3 shows the price comparison of some commercial PV data-logging and monitoring products available in market. All of these products are technologically advanced options as compared to designed data-logger. The results of this comparison show that the designed data-logger provides fewer features in less cost. VI. CONCLUSION Data-logging and monitoring of a PV energy unit can help to increase the annual energy yield by scheduling preventive and periodic maintenance of the system. Self-power consumption of a data-logger is also a burden to an isolated PV system, which is reduced by simplifying its design. Results show that the use of the deep-sleep mode of ESP32-S2 microcontroller along with voltage, current and light sensors to measure PV voltage, PV current, PV power, sunlight availability, and PV energy, reduced more than 90% self-power consumption of PV data-logger. The total annual power consumption of the designed and tested data-logger is 64Wh. The total cost of all the components used to design this data-logger is C$ 30.