1. Introduction
Solar radiation per unit area (W·m
−2), or irradiance, is an essential variable for several applications including renewable energies, agriculture, health, engineering, and architecture. Two main methods have been used to obtain surface solar radiation, surface monitoring by instruments and that based on satellite images [
1,
2,
3,
4]. Both methods can have a high ability to provide radiometric data but with several technical limitations. Solar irradiance based on a planar surface of monitoring the surface instrument has the disadvantage of being expensive to implement because pyranometers are used. On the other hand, the solar irradiance method based on satellite images presents technical limitations as it is incapable of providing real-time data [
1].
The pyranometer is a high-precision instrument dedicated to measuring solar radiation flux density on a horizontal surface based on a thermopile sensor or silicon semiconductor (Si). The two types of pyranometers differ in spectral sensitivity, time response and implementation cost [
2,
3,
4]. Pyranometers based on thermopiles have a spectral sensitivity of between 300 nm and 2800 nm with a time response higher than 10 s and a cost that can surpass USD 10,000. Pyranometers based on silicon semiconductors have a selective spectral sensitivity from 350 nm and 1100 nm with a time response of 10 μs and lower cost [
5]. However, semiconductor-based pyranometers require a significant investment to implement and expand radiometric monitoring networks. In Brazil, the cost of implementing an essential infrastructure for monitoring solar irradiation has become quite limited for the national radiometric network, affecting the understanding of the behavior and availability of these crucial environmental data. The implementation cost of solar irradiation measurement systems has imposed restrictions as it is a point value [
1,
5,
6,
7,
8,
9,
10].
The development of systems for the continuous measurement of solar irradiation has been increasingly recurrent. Nwankwo et al. [
11] developed a pyranometer based on Si semiconductors. The proposed system had minimal hardware and was based on a digital multimeter. The irradiance was determined using calibration factors with no data transmission. Rus-Casas et al. [
1] presented an electronic device capable of measuring solar radiation using Internet of Things (IoT) concepts to transmit the data. The developed system was aimed at photovoltaic applications, measuring the diffuse and global components of solar radiation. This system utilized low-cost microcontrollers to obtain global solar radiation values from sensors and transmit them to cloud-based data.
Martínez et al. [
5] developed a pyranometer based on Si semiconductors with a spectral sensitivity in the range of 400 to 750 nm. The system featured hardware based on a programmable interface controller (PIC) featuring a heating system, communication via the serial port for the transmission of the collected data and level adjustment. In order to correct the effect of the movement of the solar disk, a diffuser made of polytetrafluoroethylene (PTFE) was implemented. Balan et al. [
12] developed a system to monitor solar radiation based on a microcontroller and data transmission via a wireless network. The transmitted data was stored in a structured database, allowing immediate consultation.
Thus, commercial solutions that combine measurement irradiation with wireless data transfer technology are scarce and expensive, leading to the development of systems that combine the continuous monitoring of surface solar irradiation with the IoT, thus reducing cost and uncertainty [
13,
14]. The IoT corresponds with the set of objects, generically treated as “things”, with software, sensors, and protocols to connect to the world wide web, allowing a remote interaction with the physical environment [
15,
16,
17]. The IoT enables intelligent devices to communicate with high latency wireless networks, offering reliability, security, and privacy of the transmitted data [
18,
19,
20].
This study presents the development, implementation, and validation of the preliminary results for a system that allows a remote measurement of surface solar irradiation in real-time. The proposed system uses IoT technology to safely enable low-cost, intelligent, and reliable measures and provide radiometric data from multiple web platforms. The study’s contribution is to present a temperature-insensitive smart electronic device that can send data to web interfaces and reduce the pyranometers based on the cost of semiconductor junctions.
2. System Architecture
2.1. Conceptual Design
The proposed system for the real-time measurement of surface solar irradiation is presented in
Figure 1. It comprises an irradiation sensor, an indicator for status/alert messages, a signal conditioning circuit, and a low-consuming energy microcontroller. The microcontroller Tensilica Xtensa LX106 implements the MQTT (message queuing telemetry transport) protocol for data transmission.
The prototype has a rectangular external body 125 mm long × 85 mm wide × 70 mm high) and 3 mm thick polyethylene. The case has layers of acrylic paint to increase the resistance to ultraviolet (UV) radiation. It has hygroscopic salt inside to prevent condensate formation and has an adjustable base allowing the system to be installed on pedestals or horizontal surfaces.
Figure 2 represents the hardware structure of the proposed system. The principle of the operation and resources inherent to the prototype system will be addressed in
Section 2.2,
Section 2.3, and
Section 2.4.
2.2. Hardware
The electronic hardware is composed of a microcontroller, a signal conditioning circuit, and an irradiation sensor. The microcontroller runs the developed firmware to control all processes necessary to measure surface solar irradiation with an autonomous operation and self-supervision.
2.2.1. Radiation Sensor
The radiation sensor (
Figure 3) consists of a diffuser (A), a photodiode (B), a temperature sensor (C) and a housing (D) that contains all of the elements mentioned.
The diffuser (A) is located at the top of the prototype, acting as a directional optical window made of polytetrafluoroethylene (PTFE). The selection of the material was based on the optical properties of constant transmittance for the entire range of spectral sensitivity of the photodiode and resistance to UV radiation, providing a response to the displacement of light with losses of less than 5% and a dimensional stability for the chosen geometry [
5,
21,
22,
23]. The diffuser has beveled edges at 45° and a diameter that allows the photodiode a semi-angle of sensitivity (α) greater than 65°, offsetting the displacement of the light rays at low altitudes [
5,
22].
The radiation sensor is made up of a Vishay BPW34 model photodiode. It was chosen based on the characteristics listed in
Table 1 from a technical analysis of the most popular commercial models.
The photodiode output signal (ΔI
ph) presents the relationship between the incident surface solar irradiance (R), the active surface area (A) and the photodiode’s responsiveness (β). The estimation of the output signal is obtained by Equation (1), based on the irradiance of 1000 W·m
−2 and the photodiode characteristics listed in
Table 1.
2.2.2. Signal Conditioning Circuit
The signal conditioning circuit (
Figure 4) converts the photodiode output signal (ΔI
ph) into a proportional voltage signal (V
out). An instrumentation amplifier circuit implemented the conditioning circuit (U1–U3) and buffer (U4). The buffer (U4) provides electric isolation from the photodiode and keeps the output signal V
out stable [
25,
26].
The topology of the instrumentation amplifier was modified, turning it into a combination of two negative feedback trans-impedance amplifiers (U1 and U2) connected to a differential amplifier (U3). The topology obtained allows the polarization current of the photodiode (ΔI
ph) to flow simultaneously in the two feedback resistors (RF). Thus, the output voltage (V
out) is proportional to the product between the photodiode current (ΔI
ph) and the resistors RF, R6 and R4. Equation (2) presents the relationship between the output voltage (V
out) and photodiode current (ΔI
ph).
Figure 5 shows the relationship between V
out and ΔI
ph. The values of RF, R4 and R6 resistances are 22 Ω, 4.7 kΩ and 6.8 kΩ, respectively. The resistor’s values were determined based on the estimation of ΔI
ph necessary to obtain a maximum output voltage of 400 mV (V
out).
2.2.3. Microcontroller
A low-energy microcontroller ESP8266 with a Tensilica Xtensa LX106 32-bit processor with a maximum clock of 160 MHz is used to implement the proposed solution. It presents the following resources: 64 KB RAM, 512 KB flash memory, GPIOs connectors, an internal 10-bit resolution analog-to-digital converter (ADC), 3.22 mV sensitivity and a maximum sampling rate of 80 kHz. The microcontroller’s inputs and outputs are designed for operating at voltages from 0 V to 3.3 V. The system is connected to an external 18 W DC power supply.
The microcontroller (
Figure 6) has an integrated radio transceiver integrated with the IEEE 802.11b/g/n standard for a connection speed up to 2.4 GHz. The radio transceiver operates with a built-in ShockBurst™ protocol, allowing the microcontroller to maintain wireless connections to TCP/IP networks. In addition, it supports WPA/WPA2 safe communication and sets up a connection with authentication or communication encrypted by a token [
27,
28].
2.2.4. Data Storage
The hardware presents a datalogger that stores the collected data in a removable flash memory. The datalogger has a storage capacity of 4 GB, allowing for consecutive data storage up to four years or 106 cycles. The datalogger prevents lost data when the communication between the microcontroller and the wireless network is interrupted. The output files use extensions .txt or .csv with an ASCII writing pattern stored at 60 s intervals. The stored values correspond with the voltage level (mV), radiation level (W·m−2), sensor temperature (°C) and alerts generated by the microcontroller.
2.3. Firmware
In order to perform a system operation to regulate surface radiation and data storage, the firmware was developed in C++ language and is shown in
Figure 7. The firmware controls and executes all of the processes essential for a hardware operation (threads). The threads can generate signal statuses or alerts by a visual indication of an RGB LED. The signal statuses or alerts are listed in
Table 2.
Thread 01 is responsible for the device′s startup and communication with local internet networks. It identifies available wireless networks within 50 m of the device, connects the device and synchronizes it with the server. Thread 02 verifies the operation and availability of data storage space in the datalogger. Thread 03 is a self-supervising mechanism, checking the connection between the device and the wireless network with a data storage capacity while Threads 04 and 05 occur. Thread 04 is responsible for the process of reading the signal from the conditioning circuit, obtaining the irradiation value, and requesting data transmission. Thread 05 transmits data directly to the server even on limited networks.
2.3.1. Data Transmission Protocol
The protocol implemented for data transmission to the server is the MQTT, a flexible network model used to send information between devices and servers. This protocol is compatible with most network protocols, allowing for orderly connections without data loss on low-power devices and wireless networks with a limited speed and high latency [
29,
30,
31,
32,
33,
34,
35,
36].
2.3.2. Adjust of Radiation Sensor Output
The output signal of the conditioning circuit (V
out) can be affected by the photodiode temperature (T) and by the average trajectory of the solar disk. In order to mitigate those effects, it has implemented correction functions based on the methodologies of King et al. [
36], Kern [
37] and Myers [
38] and Mcarthur et al. [
39].
A temperature sensor (DS18B20) was used to correct the influence of temperature (°C) on the photodiode current output, keeping readings stable during the operation. A linear and dimensionless correction function
f(
T) (Equation (3)) is applied. The coefficients
θ and
τ are 8 × 10
−3 °C
−1 and 0.998, respectively.
The function for the trajectory correction of the solar disk was based on Fanner et al. [
40] and Brooks [
41] (Equation (4)). It is modeled as a cosine function that uses the local time when the device is installed and is valid for the active photoperiod with time (h) in the range from 330 min to 1050 min. The coefficients used in function
g(
h) are γ = 2.6762 and ϖ = 3.9 × 10
−3 min
−1, respectively. The corrected voltage of the conditioning circuit (V
out_corr) is expressed by Equation (5).
2.4. Data Visualization System
Figure 8 shows the user interface developed for data visualization. It shows the geographic location of the measurement, sensor number, time data, instantaneous surface irradiation value, the time elapsed since the last update and the download option. The user interface is available at
https://www.radiacaoagora.tk/, (accessed on 27 April 2021) which uses an API of the platform ThingSpeak. A cloud computing system performs the procedures for collecting, processing, storing, exhibiting, and automatically exporting the measured data to the website and users.
2.5. Prototypes
The experiments were carried out with two prototypes (P01 and P02), which were calibrated and tested in Campina Grande/Paraíba in the northeast region of Brazil (NEB) at 512 m above sea level with average annual temperatures of 23.5 °C and annual rainfall between 300 and 1200 mm [
42,
43,
44]. The prototypes were installed in an urban area, 3 km away from the reference weather station (
Figure 9). The installation of the devices maintained a maximum inclination of 2.0 °C in relation to the horizontal plane and was free of shading on the devices.
2.6. Calibration
The calibration of the prototypes was carried out from 21–25 October 2019. The calibration procedure for the prototypes followed the ISO 9847 standard using a standard Lambrecht secondary pyrometer, model 16106, for a data acquisition rate of 1 min. The calibration occurred at the Brazilian National Institute of the Semi-Arid (INSA) facilities, Campina Grande, Brazil.
The data processing in the calibration data employed a K-means clustering algorithm [
45], which analyzed and modeled the collected data, minimizing dispersion effects because of a variation in the atmospheric transmittance and synchronization of the data acquisition time between the prototype and the reference pyranometer.
2.7. Data and Experimental Area
A weather station′s official data of surface solar irradiation were obtained at the Brazilian Agricultural Research Company (Embrapa-Algodão). The weather station has a class 2 standard pyranometer connected to the Brazilian National Institute of Meteorology (INMet) and a unit of surface solar irradiation given in kJ·m−2.
2.8. Data Analysis
A data analysis compared the values provided by the prototypes and the reference data from Embrapa/INMet, which were analyzed using the statistical techniques of Reda [
46], Miot [
47], Diniz [
48] and Tiepolo [
49]. Data processing followed the statistical parameters of coefficients of determination (R
2), Pearson’s correlation coefficient (r), mean absolute percentage error (MAPE), root mean square of relative errors (rRMS), index of agreement (d) of Willmott et al. [
50] and confidence index (c). In order to classify the parameters,
Table 3,
Table 4 and
Table 5 were used as references. In addition, the relative frequencies of radiometric divergences were analyzed and presented as histograms and a probability density function (PDF).
4. Conclusions
This paper presented a new low-cost electronic system for the real-time measurement of surface solar radiation. The proposed system was composed of a solar radiation sensor, a conditioning circuit, a low-power ESP8266 microcontroller, a unit to register data (datalogger) and an internet user interface application. It was autonomous and provided remote access to surface solar radiation levels based on IoT tools. The proposed solution was composed of an electronic hardware and software tool capable of operating with minimal human intervention. The system had a power consumption of 5 W·h, a mass of 400 g and an estimated cost of USD 200.
The proposed system was validated with experimental tests comparing the results with those provided by INMet for Campina Grande, Brazil. The experimental tests, carried out in areas with wireless network availability, indicated that the device provided irradiation levels with an accuracy greater than 96.0% and a confidence level greater than 90%. It showed an estimated error of ±500 kJ·m−2, equivalent to 138.89 W·m−2.
Commercial solutions that combine measurement irradiation with wireless data transfer technology are scarce and costly. The proposed architecture stands out from commercial solutions due to its low cost, flexibility, fast installation, modularity, automated data processing capacity and applicability in a wide range of research areas such as meteorological, environmental, and photovoltaic power generation, among others.
The proposed architecture also stands out from related studies for the model accuracy and the ability to connect to wireless networks, self-monitoring algorithms, and automated and cloud data processing capabilities.