Next Article in Journal
Exploration of the High-Efficiency Hardware Architecture of SM4-CCM for IoT Applications
Next Article in Special Issue
Improving Characteristics of LUT-Based Three-Block Mealy FSMs’ Circuits
Previous Article in Journal
Infrared Image Small-Target Detection Based on Improved FCOS and Spatio-Temporal Features
Previous Article in Special Issue
A New Fully Closed-Loop, High-Precision, Class-AB CCII for Differential Capacitive Sensor Interfaces
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Low-Cost Data Acquisition System for Solar Thermal Collectors

by
Orestis Panagopoulos
and
Athanassios A. Argiriou
*
Laboratory of Atmospheric Physics, Department of Physics, University of Patras, GR-26500 Patras, Greece
*
Author to whom correspondence should be addressed.
Electronics 2022, 11(6), 934; https://doi.org/10.3390/electronics11060934
Submission received: 16 February 2022 / Revised: 10 March 2022 / Accepted: 15 March 2022 / Published: 17 March 2022
(This article belongs to the Special Issue Feature Papers in Circuit and Signal Processing)

Abstract

:
Solar thermal collectors are among the most popular renewable energy research subjects. Automatic Data Acquisition Systems (ADAS) have greatly facilitated their experimental testing, but their high cost is a drawback. In this paper, we present the design and testing of a decentralized, low-cost alternative ADAS based on the ESP32 microcontroller and on open-source software. The proposed system can be used for the experimental characterization of water (or air) operated solar thermal collectors in accordance with the ISO 9806:2017 requirements, but it is also compatible with sensors with lower specifications. We present also its performance results when applied for the testing of a solar thermal collector.

1. Introduction

Data acquisition applications of the Arduino technology on several renewable energy systems have been investigated in the modern literature. However, to the authors’ knowledge, there are not any publications regarding any application on the performance assessment of solar thermal collectors. The present work focuses on the development and testing of low-cost hardware along with modern programming techniques in order to obtain a high-quality experimental testing automatic data acquisition system (ADAS) for the performance of solar thermal collectors.
The first Arduino board appeared in the market in 2005 as a means of introducing students to microcontrollers and programming. A few years later, the first use of the Arduino board for data acquisition was reported. In 2011, Rodriguez et al. [1] used an Arduino board to measure temperature and relative humidity inside a data center and to transfer the data over the Zigbee mesh network. During the same year, an Arduino was used by Gomes et al. [2] to interface solar radiation and LM35Z temperature sensors to a computer, as well as to control a pyranometer shadow band and to process Global Positioning System (GPS) data. Solar radiation measurements from two different sensors (SPLite2 and BF3) were compared, yielding satisfactory results. In 2013, Gasparesc [3] connected the Arduino board to a PC via USB in order to collect and visualize temperature sensor readings via a Graphical User Interface (GUI) developed under MATLAB. Baker [4] collected data from DHT22 temperature sensors and uploaded them to a Drupal website. A Real-Time Clock (RTC) module was connected to a battery-powered Arduino board, itself connected to the internet via Ethernet. In 2015, Arnold et al. [5] interfaced multiple thermocouples to an Arduino board via a multiplexer. The Arduino was connected to a Raspberry Pi via USB. Data stored to the Pi could be accessed via Secure Shell (SSH), since the Pi was connected to the internet over WiFi. In 2015, Gandra et al. [6] built a data acquisition system where thermocouple readings were logged on an SD card using an Arduino nano board and the necessary SD card module. In 2016, Avallone et al. [7] connected 80 DS18B20 temperature sensors to an Arduino Mega Board using a multiplexer. Measurements were stored in an SD card at 5 s intervals. The prototype data logger could read up to 100 or 120 sensors. In 2016, Simoes et al. [8] used an Arduino nano board to read temperature data from sensors and upload them to a Java web application using HyperText Transfer Protocol (HTTP) requests. The board was connected to the internet over Ethernet. In 2016, Carlos-Marfil et al. [9] acquired data from DS18B20 temperature sensors and saved them to an SD card with an Arduino Mega Board. Measurements were visualized using Labview. In 2017, Syafi et al. [10] acquired temperature and relative humidity values from a DHT22 thermohygrometer and irradiance values from an OPT101 photodiode, along with the electrical parameters of a photovoltaic panel. Measurements were sent to a base station using the Zigbee protocol. In order to perform this task, an Arduino Mega Board was used together with the necessary XBee, Ethernet and RTC modules for connectivity and time keeping. In 2017, Hasanah et al. [11] used an Arduino UNO board to read PT100 temperature sensors with the aim to monitor the temperatures of a solar seawater distillation system. In 2017, Silva and Jorge [12] developed a real-time temperature measurement system using thermistors. An Arduino board was used as a data logger; data were visualized with the MATLAB GUI. The system was tested for temperatures from 18 to 35 °C but it has the possibility to measure temperatures from −5 to 270 °C.
WiFi-enabled microcontrollers programmable using the Arduino framework, such as the ESP32 board, have been used as data loggers in renewable energy systems. The first ESP32 board was released in 2016. In 2018, Allafi et al. [13] used an ESP32 board as a simple web server to store photovoltaic (PV) power measurements for a short time period. The data were stored as text on an SD card and were overwritten when the SD card was full.
Internet of Things (IoT) devices are often resource-constrained and battery-powered. In order to increase their battery life, the use of the MQ Telemetry Transport (MQTT) protocol has been investigated. The use of the MQTT protocol together with an ESP32 board appeared for the first time in 2018, where Kodali and Sahu [14] uploaded power consumption data from an ESP32 board to an MQTT broker running on a Raspberry Pi over WiFi.
Another data acquisition system design using the ESP32 was demonstrated by Pereira [15] in 2019. An ESP32 board operating as a client uploaded data over WiFi to a PhP web app to monitor PV electrical parameter measurements in real time.
The fist implementation of a data logger for an automatic weather station based on the ESP32 was published in 2019, by Garcia et al. [16]. The ESP32 board stored the sensor readings on an SD card using a compatible module.
Solar thermal collectors are tested according to the ISO 9806:2017 standard. This has to be followed by all testing laboratories, manufacturers, importers and certification bodies of solar thermal collectors [17]. This ISO standard covers the performance, durability and reliability testing of a wide range of solar thermal collectors. The ISO standard applies to liquid heating collectors, air heating collectors, hybrid solar collectors converting solar radiation to heat and electric power, as well as solar collectors requiring an external power source for their operation, such as tracking concentrating collectors. Testing of all types of solar collectors (be it a simple flat plate collector or a sun-tracking concentrating collector) requires monitoring and acquisition of the same physical quantities. A versatile data acquisition system able to be used for any type of solar collector would provide substantial aid in the rapid development and experimental evaluation of prototype solar collectors.
The objective of the present work is to propose and test a data logger, keeping the hardware cost as low as possible and ensuring that the quality of measurements complies with the aforementioned ISO standard. The proposed data acquisition system is assessed by testing a single-glazed flat plate collector.

2. Components Selection

The general requirements for the design of a data acquisition system are described below.
Hardware requirements
1.
Cost-effectiveness: hardware cost should be as low as possible, without compromising the reliability or the quality of the measurements.
2.
Availability: it should be composed of off-the-shelf components, instead of specialized devices.
3.
Versatility: the system should should provide interfacing options for sensors selected according to the ISO 9806:2017 criteria, as well as for lower-spec sensors.
Software requirements
1.
Reliability: the software should rely on already proven components and communication protocols.
2.
Cost-effectiveness: should be open source.
3.
Data accessibility: real-time visual inspection of measurement data should be provided. Data access should be easy both for programmers and for end users with no programming skills.
4.
Easy maintenance: should be easy to maintain with minimal coding.
5.
Scalability: should be able to support a large number of measurement nodes.
6.
Versatility: should serve as infrastructure for different measurement node types, both centralized and decentralized.
The MCU is placed outdoors, close to the solar collector. Therefore, storing measurements on the MCU or on an SD card is neither convenient nor safe, from the point of view of data access and integrity. This is why we opted to upload measurements over the internet. We selected the ESP32 board by Espressif Systems, because of its built-in WiFi connectivity features, while being one of the most affordable options. A very convenient and secure option for data storage, allowing remote data access, is to use an SQL database. The inspection and analysis of data stored on SQL databases can be easily achieved using readily available software or custom-built scripts. Since it is not possible to upload data to an SQL database directly from an ESP32, this is done by a simple web application back-end.
The necessary quantities to be measured during the performance assessment of a thermal solar collector according to ISO 9806:2017 [17] are summarized in Table 1.

2.1. Irradiance

The minimum requirement according to ISO 9806:2017 is a Class 1 pyranometer. The accuracy of Class 1 pyranometers is ± 20 W · m 2 . The output voltage of a pyranometer with a constant of 10 6 V · m 2 · W 1 for 1000 W · m 2 irradiance is approximately 10 mV. This means that ± 20 W · m 2 corresponds to ± 0.2 mV. The Analog-to-Digital Converter (ADC) must be able to read an analog voltage of 20 mV. The ESP32 micro-controller has a built-in 12-bit-resolution ADC, meaning that there can be 2 12 = 4096 output values. Dividing the reference voltage ( 3.3 V for ESP32) by the number of output values, we obtain the voltage read step: 3.3 V / 4096 = 0.0008 V = 0.8 mV. The ESP32 built-in ADC resolution is not adequate, so an ADC with a higher resolution is necessary. ADS1115 by Texas Instruments is recommended. It has 16-bit resolution with positive and negative full scale. The number of output values is 2 15 = 32768 (1 bit is reserved for the number’s sign). The reference voltage is ± 6.144 V. The voltage read step is 6.144 V / 32767 = 0.1875 mV.

2.2. Temperature

The minimum accuracy of the temperature sensors according to ISO 9806:2017 is 1 % . In order to obtain an accurate reading of a PT100 sensor, the MAX31865 RTD-to-Digital converter is recommended. It has a 15-bit ADC resolution corresponding to 0.03125 °C resolution across a 200 °C to + 850 °C temperature range, with a 0.5 °C level of accuracy.

2.3. Mass Flow

The ESP32 has a built-in square pulse counter. Therefore, any flow sensor with square pulse output and the required accuracy can be used. In order to meet the ISO 9806:2017 requirements, a Biotech VZS-007 ALU with 1 % accuracy is selected.

2.4. Relative Humidity

The minimum accuracy for a specific humidity sensor according to ISO 9806:2017 is 0.001 kg water per kg of dry air at 25 °C, or 1 g/kg mixing ratio. Specific humidity can be derived from relative humidity (RH) measurements using the definition R H = U / U s , with U the mixing ratio and U s the saturation mixing ratio. The saturation mixing ratio at T = 25 °C is U s = 20.1 g · kg 1 . Substituting U = 1 g · kg 1 , we get R H = 1 / 20.1 = 0.0497 or approximately 5 % . A Sensirion SHT20 temperature and humidity sensor with an accuracy of 3 % is proposed. The sensor comes soldered on a Printed Circuit Board (PCB) that facilitates the communication between the sensor and the Micro Controller Unit (MCU) without the need of a separate interface board. The sensor and the PCB are placed inside a waterproof probe. The PCB has perfusion and encapsulation protection, while the probe enclosure is made of a waterproof breathable material that allows water molecules to infiltrate while blocking water droplets.

2.5. Wind Speed

According to ISO 9806:2017, wind speed does not refer to the meteorological wind speed, but to the air velocity over the collector surface. The standard indicates that the speed of the surrounding air over the front surface of the collector must be measured to a standard uncertainty of <0.5 m · s 1 . A Thies compact anemometer has ±0.5 m/s or 3 % of measurement value accuracy and can fulfill the ISO 9806:2017 requirements up to 16.7 m · s 1 wind speed. The output is a square pulse with a frequency range from 2 to 573 Hz that can be obtained by the ESP32 without the need of extra modules.
The selected sensors along with the necessary modules to interface with the ESP32 are summarized in Table 2. The cost of the prototype data logger components (excluding VAT) is 188.59 €. It should be noted that it is possible to measure the necessary quantities with lower-cost sensors that can be interfaced to the ESP32 without breakout boards. However, such sensors are not suitable for our objective, as they do not satisfy the required measurement uncertainties. The proposed implementation, based on the selected sensors and interface modules, maintains a low cost without compromising the quality of measurements.

3. Application Architecture

The data acquisition system structure is illustrated in Figure 1. The ESP32 acts as a client, uploading measurements to the back-end of an application. The back-end is responsible for saving the data to a database. The end-user can visualize measurements through the application front-end.
The MCU reads sensors and issues a JSON payload containing measurement data to a Mosquitto MQTT broker. For our application, we selected the MQTT communications protocol because it is a lightweight publish/subscribe model best suited for resource-constrained and low-power or battery-powered devices. In our case, the data logger is powered by the mains instead of a battery, so a simple HTTP server could have been used. However, the MQTT protocol proved to be much faster, uploading the payload in less than 10 ms, compared to more than 500 ms required by the HTTP protocol. The uploading time reduction allows for the higher sampling rates required in our application, so we opted for the faster protocol. Furthermore, the MQTT broker serves as an infrastructure for decentralized battery-powered devices, increasing the versatility and scalability of the system. In order to redirect the MQTT message payloads and store them in the database, a Node-RED flow is used. This is a programming tool designed to connect hardware devices, Application Programming Interfaces and online services using a low-code approach. It provides a browser-based GUI editor that makes it easy to deploy workflows. The incoming message payloads from the clients are parsed and saved to a MySQL database using a simple “INSERT” function in the NodeRed flow of Figure 2.
The “INSERT” Javascript function produces the SQL query required to insert a row of measurements in a table. For clarity reasons, the table column names are those of the sensor labels.
The use of an SQL database facilitates real-time data inspection, analysis and visualization through other applications or scripts. SQL databases can save the measurement timestamp automatically, avoiding the use of an RTC module on the ESP32, or implementing a time keeping functionality. A Grafana dashboard was used for data visualization, due to its ease of use and flexibility. Grafana being web-based allows remote real-time checks on measurements in using any kind of device.
The Mosquitto, NodeRED, MySQL and Grafana server stack is deployed on a Virtual Private Server (VPS). Therefore, all components of the application and the measurements are accessible over the internet. Each component of the stack runs in a Docker container [18]. Docker facilitates the installation and maintenance of servers. However, if a container is reinstalled, the changes made by users are deleted. In order to preserve the settings of each server, as well as the measurements, data volumes are used. Thus, the containers can be deleted if necessary, but the measurements and settings will remain in the storage of the operating system and will be accessible by freshly installed containers. Data volumes may be backed up to another computer at regular time intervals, while the system is running, increasing thus the reliability of the system. The guidelines on how to build the servers are provided in the docker-compose.yml file as in the example in Listing 1.
Listing 1. docker-compose.yml file example.
  mysql:
    container_name: mysql_container
    image: mysql:latest
    ports:
     - 3360:3306
    volumes:
     - ./volumes/mysql/data:/var/lib/mysql
    networks:
      solar_network:
        ipv4_address: 172.20.0.2
  node-red:
    container_name: nodered_container
    image: nodered/node-red:latest
    ports:
      - 1880:1880
    volumes:
      - ./volumes/node-red:/data
    networks:
      solar_network:
        ipv4_address: 172.20.0.3
networks:
  solar_network:
    ipam:
      config:
        - subnet: 172.20.0.0/24
	  
The docker-compose tool provides a convenient way to develop and maintain the system. A user can bring up the whole server stack with a single command docker-compose up --build. Similarly, taking down all the servers requires the command docker-compose down. The complete docker-compose.yml is in a Github repository (accessed on 16 March 2022).
At every iteration of the main loop, the ESP32 checks for the connection status. When the specified sampling interval has passed, all sensors are read and the mean and standard deviation σ of the measurements of each sensor are calculated and stored in a Measurement object.
When the upload interval has passed, the JSON payload is updated with the mean and σ values. The mean, σ and N for the set of measurements are reset and the updated JSON payload is published to the MQTT broker. The data logger software logic is visualized in Figure 3.
To simplify the configuration process and avoid duplicate code, the project has been structured as illustrated in the class diagram in Figure A1. Thus, all a user has to do is set the WiFi network and MQTT broker credentials in the credentials.h file, and configure the sampling and upload intervals, as well as the sensor parameters (pins, labels, etc.) in the main.cpp file, as in the example in Listing 2. The full code for the ESP32 is in a Github repository (accessed on 16 February 2022).
Listing 2. main.cpp file example.
 
Sensor *sensors[] = {
        new PT(1000, FOUR_WIRE, 26, "Tenv"),
        new PT(100, FOUR_WIRE, 27, "Tout"),
        new PT(100, FOUR_WIRE, 14, "Tin"),
        new Pyranometer("Irr"),
        new Anemometer(12, "Wind", 1.25, &timer),
        new Flowmeter(13, "Flow", 1800, &timer),
};
 
Logger logger(sensors, &timer, len(sensors));
 
void setup()
{
    Serial.begin(115200);
}
 
void loop()
{
    logger.run();
}

4. Methodology

The efficiency n of a solar collector is
n = Q u Q r
with Q u the useful energy and Q r the energy received by the collector. Both quantities are expressed per units of time. The useful energy is calculated as
Q u = m ˙ C p ( T o u t T i n )
with m ˙ (kg·s 1 ) the mass flow rate, C p (J·kg 1 · K 1 ) the specific heat capacity of water and T i n and T o u t the temperature of the heat transfer fluid at the inlet and at the outlet of the collector, respectively. The received energy is calculated as
Q r = I A
with I (W·m 2 ) the solar irradiance at the collector plane and A (m 2 ) the aperture area of the collector. Substituting Equations (2) and (3) in (1), we can express the collector’s instantaneous efficiency as
n = m ˙ C p ( T o u t T i n ) I A
Another definition of the instantaneous efficiency is
n = F R ( τ α ) F R U L T i n T a m b I A
with F R the collector heat removal factor, τ the transmittance, α the absorptance, U L the collector overall heat loss coefficient and T a m b the ambient temperature. Equations (4) and (5) are the basis of the standard test methods for flat plate solar thermal collectors [19]. A flat plate solar collector can be characterized by the efficiency curve using Equation (5).

Experimental Setup

In order to evaluate the performance of the proposed data logging system, outdoor experiments were conducted, using a single-glazed flat plate solar collector as a simple test case. The test device with the sensors can be seen in Figure 4. A total of 10 RTDs were used to measure the temperatures of the system:
  • two RTDs were placed in the water inlet and outlet tubes, labeled T i n and T o u t ;
  • one RTD inside a radiation shield to measure ambient temperature, labeled T e n v ;
  • six RTDs were attached on the absorber’s surface, four on the front (facing the sun) and two on the back;
  • one RTD was placed inside the insulation layer behind the absorber.
The RTDs at the water inlet and outlet are used to calculate the efficiency of the solar collector. The other RTDs are used to obtain the stagnation temperature and to check whether the collector has reached a thermal steady state. The RTD used to measure the ambient temperature and the thermo-hygrometer were placed inside a radiation shield above the collector on the top right corner (Figure 4). The pyranometer was mounted parallel to the collector surface, having a slope of 38°, equal to the latitude of the experimental site. The flow meter was connected to the water inlet. A gate valve connected to the water outlet is used to regulate the flow manually. Water was supplied by the building mains.
The ESP32 board and the necessary components were soldered on a perfboard as seen in Figure 5. The perfboard method was selected instead of a PCB to speed up the prototyping process. Each module could be added on the board, tested or removed easily. The sensor wires were connected to the prototype board, which was placed in a waterproof enclosure. The sampling interval was set to 2 s and the upload interval to 10 s.
Figure 4. Test device.
Figure 4. Test device.
Electronics 11 00934 g004

5. Results and Discussion

The test device was installed outdoors, oriented to the south. Several experiments were carried out. Here, we present the results for 4 October 2021, carried out on a clear-sky day, for brevity. The experiment was carried out from 07:31 to 13:48 UTC. Solar noon for 4 October in Patras was at 10:21 UTC. Time in all time series plots is reported in UTC.
The I values illustrated in Figure 6 ranged from approximately 589 W · m 2 to 1053 W · m 2 at solar noon. The irradiance standard deviation scored a maximum value of 7 W · m 2 , which is considered satisfactory, compared to the 20 W · m 2 ISO 9806:2017 guidelines.
The T a m b and R H records during the experiment are shown in Figure 7. The T a m b ranged from 23.0 °C at 07:30 to 27.8 °C at 12:00, with an average σ of 0.4 °C throughout the duration of the experiment. The standard deviation for the ambient temperature measurements fulfils the σ < 0.5 °C requirement. The recorded R H values ranged between 23.3% and 36.4%, where the maximum σ was 0.7%, well below the requirement of σ < 3 % .
Wind speed values depicted in Figure 8 ranged from 0 to 6 m · s 1 , recording an average of 2.3 m · s 1 and an average standard deviation of 0.5 m · s 1 . The standard deviation complies with the 0.5 m · s 1 ISO guideline.
The water inlet temperature during the experiment ranged from 24.1 °C to 25.1 °C, considered satisfactory according to ISO 9806:2017, suggesting that T i n should be held stable within ± 1 °C (Figure 9).
The temperature difference T o u t T i n between the outlet and inlet, depicted in Figure 10, ranged from 5.92 °C to 11.56 °C, with a maximum σ of 0.05 °C, in compliance with ISO 9806:2017.
The m ˙ ranged from 33 L / h to 42.6 L / h . The fluctuation of the m ˙ values observed in Figure 11 is due to the absence of a more precise flow regulation system, not available at the time of the experiment.
The collector efficiency time series seen in Figure 12 ranged from 0.42 to 0.64. The average efficiency was 0.56, with a standard deviation of 0.04, which is considered satisfactory. A similar pattern is observed comparing Figure 11 and Figure 12. The decisive factor for the rapid changes in the efficiency time series is the mass flow rate. The fluctuation and standard deviation for both quantities can be improved using a precision pump or other flow control device.
Figure 13 illustrates the temperatures placed on the collector and on the insulation layer. The highest temperature of the system is T a f m u , recorded by an RTD placed at approximately 2 / 3 of the absorber’s length measured from the bottom. This is only to be expected and the T a f m u was used to assess the stagnation temperature of the collector [17] on another experiment with zero water flow. At the start of the experiment, the lowest temperature of the system was that of the insulation layer T i m behind the absorber. The insulation temperature reached its peak several minutes later than the other surfaces. This hysteresis is only to be expected since the insulating material has a much lower thermal conductivity.
The collector efficiency curve seen in Figure 14 is:
n = 5.417 ( ± 0.009 ) T i n T a m b I + 0.5859 ( ± 0.0005 )
The correlation coefficient of the linear regression equals R = 0.998 (p-value < 0.05 over 1080 points); therefore, the results are considered to be satisfactory. Comparing Equations (5) and (6), we obtain F R ( τ α ) = 0.5859 ± 0.0005 and F R U L = 5.417 ± 0.009 , both expected values for a flat plate solar collector with dimensions similar to our system under testing [19].
Including more data points in the efficiency curve would have improved the above results. This could have been achieved by preheating the water at the inlet of the collector (higher T i n ) using a water temperature control system. Such a system was not available at our setup at the time of the experiment.
The results presented above showcase the proposed data logger’s performance when used on the target solar thermal system.
Figure 14. Collector efficiency curve.
Figure 14. Collector efficiency curve.
Electronics 11 00934 g014

Advantages

The measurement uncertainty of all measured physical quantities is below the requirements of the ISO 9806:2017 standard, therefore considered satisfactory. During a month of testing, no data loss occurred under normal operation. The stability of the system against network outage was also tested, confirming that the data acquisition and upload process resumed normally when network connectivity was restored, without any need to restart the ESP32.
All hardware components were readily available and assembled using simple techniques. The selected components allow the ESP32 to be interfaced with precision instruments such as a Class I pyranometer, advancing the work of Gomez et al. [2] one step further. Since the ESP32 has built-in WiFi support, no Ethernet shield or wiring is necessary to connect to the internet, as mentioned in older publications [8,10].
Regarding the software and application architecture, modern technologies are used, offering advantages compared to existing low-cost data loggers. Using an SQL database for measurement data storage requires no SD card, unlike past studies [6,9,13,16]. Consequently, no SD card module is necessary, keeping the cost low and the wiring simpler. The risk of data file corruption on the SD card or at the local storage, e.g., due to power loss, is eliminated as well. Since the SQL database stores the timestamp of each measurement row automatically, no RTC module is needed as seen in [4,10], reducing thus the cost and complexity.
The MQTT protocol ensures fast data transfer, enabling sampling rates down to 2 s. Implementing a simple back-end with Mosquitto and NodeRED requires minimal coding skills and is easier than developing a custom application in Java [8] or PhP [15]. Finally, Docker allows for the rapid deployment of the necessary software infrastructure with the instructions contained in a single docker-compose file. Using Docker, the required MySQL, NodeRED and Grafana servers can be uninstalled and reinstalled easily, while user settings and measurement data are not lost.

6. Conclusions

A data acquisition system for solar thermal collector testing was designed, having as low a cost as possible without compromising the quality of the measurements. The proposed system is based on the ESP32 board, which uploads measurement data to a web application’s back-end that stores the data to a MySQL database. Being web-based, the proposed application structure offers convenient real-time access to data, which can visualized or processed using custom scripts. A prototype board has been developed, based on easily available hardware, at a cost of approximately 190 €. In order to investigate the performance of the system, a well-studied flat plate solar thermal collector has been used as a simple test case. The prototype was used to acquire data from sensors mounted on the collector. All measured quantities comply with the ISO 9806:2017 uncertainty requirements. Continuous testing for a month showed that the prototype device was characterized by stable performance without any data loss. The results demonstrated that the proposed system can acquire high-quality measurements and provide real-time data access.

Author Contributions

Conceptualization, O.P. and A.A.A.; methodology, O.P.; software, O.P.; writing—original draft preparation, O.P.; writing—review and editing, A.A.A. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Hellenic Secretariat for Research and Development, grant number T 2 Δ Γ E -0492.

Conflicts of Interest

The authors declare no conflict of interest. The funding bodies had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

Nomenclature

ADASAutomatic Data Acquisition System
GPSGlobal Positioning System
RTCReal Time Clock
SSHSecure Shell
HTTPHyperText Transfer Protocol
GUIGraphical User Interface
MQTTMQ Telemetry Transport
RTDResistance Temperature Detector
PVPhotovoltaic
MCUMicro Controller Unit
ADCAnalog-to-Digital Converter
VPSVirtual Private Server
PCBPrinted Circuit Board
RHRelative Humidity
UMixing ratio
U s Saturation mixing ratio
σ Standard deviation
NNumber of measurements
x i Measurement value
μ Mean of the set of measurements
nCollector efficiency
m ˙ Mass flow rate
C p Specific heat capacity
T i n Collector inlet temperature
T o u t Collector outlet temperature
T a m b Ambient temperature
IIrradiance
ACollector effective area
F R Collector heat removal factor
τ Transmittance
α Absorptance
U L Collector overall heat loss coefficient

Appendix A

Figure A1. ESP32 software class diagram.
Figure A1. ESP32 software class diagram.
Electronics 11 00934 g0a1

References

  1. Rodriguez, M.G.; Ortiz Uriarte, L.E.; Jia, Y.; Yoshii, K.; Ross, R.; Beckman, P.H. Wireless sensor network for data-center environmental monitoring. In Proceedings of the International Conference on Sensing Technology, ICST, Palmerston North, New Zealand, 28 November–1 December 2011; pp. 533–537. [Google Scholar] [CrossRef]
  2. Gomes, J.M.; Ferreira, P.M.; Ruano, A.E. Implementation of an intelligent sensor for measurement and prediction of solar radiation and atmospheric temperature. In Proceedings of the 2011 IEEE 7th International Symposium on Intelligent Signal Processing, Floriana, Malta, 19–21 September 2011; pp. 9–14. [Google Scholar] [CrossRef]
  3. Gasparesc, G. Development of a low-cost system for temperature monitoring. In Proceedings of the 2013 36th International Conference on Telecommunications and Signal Processing, TSP 2013, Rome, Italy, 2–4 July 2013; pp. 340–343. [Google Scholar] [CrossRef]
  4. Baker, E. Open source data logger for low-cost environmental monitoring. Biodivers. Data J. 2014, 2, e1059. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  5. Arnold, F.; DeMallie, I.; Florence, L.; Kashinski, D.O. Method for collecting thermocouple data via secured shell over a wireless local area network in real time. Rev. Sci. Instrum. 2015, 86, 035112. [Google Scholar] [CrossRef] [PubMed]
  6. Gandra, M.; Seabra, R.; Lima, F.P. A low-cost, versatile data logging system for ecological applications. Limnol. Oceanogr. Methods 2015, 13, 115–126. [Google Scholar] [CrossRef]
  7. Avallone, E.; Cunha, D.G.; Padilha, A.; Scalon, V.L. Electronic multiplex system using the Arduino platform to control and record the data of the temperatures profiles in heat storage tank for solar collector. Int. J. Energy Environ. Eng. 2016, 7, 391–398. [Google Scholar] [CrossRef] [Green Version]
  8. Simoes, N.A.; De Souza, G.B. A low cost automated data acquisition system for urban sites temperature and humidity monitoring based in Internet of Things. In Proceedings of the 2016 1st International Symposium on Instrumentation Systems, Circuits and Transducers (INSCIT), Belo Horizonte, Brazil, 29 August–3 September 2016; pp. 107–112. [Google Scholar] [CrossRef]
  9. Claros-Marfil, L.J.; Padial, J.F.; Lauret, B. A new and inexpensive open source data acquisition and controller for solar research: Application to a water-flow glazing. Renew. Energy 2016, 92, 450–461. [Google Scholar] [CrossRef]
  10. Syafii; Rusydi, M.I.; Putra, R.; Putra, M.H. Real-time measurement of grid connected solar panels based on wireless sensors network. In Proceedings of the 2016 International Conference on Sustainable Energy Engineering and Application (ICSEEA), Jakarta, Indonesia, 3–5 October 2016; pp. 95–99. [Google Scholar] [CrossRef]
  11. Hasanah, R.N.; Indyanto, F.R.; Maulana, E.; Suyono, H. Solar Energy Hybrid System for Seawater Distillation in the Coastal Regions. Energy Procedia 2017, 143, 662–667. [Google Scholar] [CrossRef]
  12. Silva, J. Real Time Temperature Monitoring. U.Porto J. Eng. 2018, 3, 42–47. [Google Scholar] [CrossRef]
  13. Allafi, I.; Iqbal, T. Design and implementation of a low cost web server using ESP32 for real-time photovoltaic system monitoring. In Proceedings of the 2017 IEEE Electrical Power and Energy Conference (EPEC), Saskatoon, SK, Canada, 22–25 October 2017. [Google Scholar] [CrossRef]
  14. Kodali, R.K.; Sahu, S. MQTT Based Smart Metering. In Proceedings of the 2018 Second International Conference on Green Computing and Internet of Things (ICGCIoT), Bangalore, India, 16–18 August 2018; pp. 399–402. [Google Scholar]
  15. Pereira, R.I.; Juca, S.C.; Carvalho, P.C.; Souza, C.P. IoT Network and Sensor Signal Conditioning for Meteorological Data and Photovoltaic Module Temperature Monitoring. IEEE Lat. Am. Trans. 2019, 17, 937–944. [Google Scholar] [CrossRef]
  16. García, L.; Parra, L.; Jimenez, J.M.; Lloret, J.; Lorenz, P. Estimation of the Best Measuring Time for the Environmental Parameters of a Low-Cost Meteorology Monitoring System. In Lecture Notes in Networks and Systems; Springer: Cham, Switzerland, 2020; Volume 92, pp. 137–144. [Google Scholar] [CrossRef]
  17. Kramer, K.S.; Mehnert, S.; Geimer, K.; Reinhardt, M.; Fahr, S.; Thoma, C.; Kovacs, P.; Ollas, P. Guide to Standard ISO 9806:2017; A Resource for Manufacturers, Testing Laboratories, Certification Bodies and Regulatory Agencies. Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.: Freiburg, Germany, 2017. [CrossRef]
  18. Merkel, D. Docker: Lightweight Linux containers for consistent development and deployment. Linux J. 2014, 2014, 1–5. [Google Scholar] [CrossRef]
  19. Duffie, J.A.; Beckman, W.A. Solar Engineering of Thermal Processes, 4th ed.; Wiley: Hoboken, NJ, USA, 2013. [Google Scholar]
Figure 1. Application architecture.
Figure 1. Application architecture.
Electronics 11 00934 g001
Figure 2. NodeRED flow.
Figure 2. NodeRED flow.
Electronics 11 00934 g002
Figure 3. ESP32 software flowchart.
Figure 3. ESP32 software flowchart.
Electronics 11 00934 g003
Figure 5. Data logger prototype board.
Figure 5. Data logger prototype board.
Electronics 11 00934 g005
Figure 6. Irradiance ( I ) .
Figure 6. Irradiance ( I ) .
Electronics 11 00934 g006
Figure 7. Ambient temperature ( T a m b ) and relative humidity ( R H ) .
Figure 7. Ambient temperature ( T a m b ) and relative humidity ( R H ) .
Electronics 11 00934 g007
Figure 8. Mean wind speed and standard deviation.
Figure 8. Mean wind speed and standard deviation.
Electronics 11 00934 g008
Figure 9. Water inlet temperature ( T i n ) .
Figure 9. Water inlet temperature ( T i n ) .
Electronics 11 00934 g009
Figure 10. Water outlet–water inlet temperature difference ( T o u t T i n ) .
Figure 10. Water outlet–water inlet temperature difference ( T o u t T i n ) .
Electronics 11 00934 g010
Figure 11. Mean mass flow rate (left Y-axis) and standard deviation (right Y-axis).
Figure 11. Mean mass flow rate (left Y-axis) and standard deviation (right Y-axis).
Electronics 11 00934 g011
Figure 12. Collector instantaneous efficiency ( n ) .
Figure 12. Collector instantaneous efficiency ( n ) .
Electronics 11 00934 g012
Figure 13. Collector surface temperatures.
Figure 13. Collector surface temperatures.
Electronics 11 00934 g013
Table 1. ISO 9806:2017 uncertainty requirements.
Table 1. ISO 9806:2017 uncertainty requirements.
QuantityMaximum Uncertainty
Solar irradiance ± 20 W · m 2
Outlet–inlet temperature ± 1 %
Ambient temperature ± 0.0 K
Mass flow rate ± 1 %
Wind speed ± 0.5 m · s 1
Specific humidity (mixing ratio) ± 1 g · kg 1
Table 2. Selected sensors.
Table 2. Selected sensors.
QuantitySensorOutputInterface Module
IrradianceKipp & Zonen CMP11AnalogADS1115
TemperaturePT100AnalogMAX31865
Mass flow rateBiotech VZS-007 ALUFrequency-
Wind speedThies compactFrequency-
HumiditySHT20 waterproofDigital-
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Panagopoulos, O.; Argiriou, A.A. Low-Cost Data Acquisition System for Solar Thermal Collectors. Electronics 2022, 11, 934. https://doi.org/10.3390/electronics11060934

AMA Style

Panagopoulos O, Argiriou AA. Low-Cost Data Acquisition System for Solar Thermal Collectors. Electronics. 2022; 11(6):934. https://doi.org/10.3390/electronics11060934

Chicago/Turabian Style

Panagopoulos, Orestis, and Athanassios A. Argiriou. 2022. "Low-Cost Data Acquisition System for Solar Thermal Collectors" Electronics 11, no. 6: 934. https://doi.org/10.3390/electronics11060934

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop