Next Article in Journal
Transforming Neural Networks into Quantum-Cognitive Models: A Research Tutorial with Novel Applications
Previous Article in Journal
Using Prediction Confidence Factors to Enhance Collaborative Filtering Recommendation Quality
Previous Article in Special Issue
Data-Driven Learning Models for Internet of Things Security: Emerging Trends, Applications, Challenges and Future Directions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Development and Evaluation of Solar Radiation Sensor Using Cost-Effective Light Sensors and Machine Learning Techniques

by
Jesús Antonio Nava-Pintor
1,
Uriel E. Alcalá-Rodríguez
1,
Héctor A. Guerrero-Osuna
1,
Marcela E. Mata-Romero
2,
Emmanuel Lopez-Neri
3,
Fabián García-Vázquez
1,
Luis Octavio Solís-Sánchez
1,
Rocío Carrasco-Navarro
4 and
Luis F. Luque-Vega
5,*
1
Posgrado en Ingeniería y Tecnología Aplicada, Unidad Académica de Ingeniería Eléctrica, Universidad Autónoma de Zacatecas, Zacatecas 98000, Zacatecas, Mexico
2
Subdirección de Investigación, Centro de Enseñanza Técnica Industrial, C. Nueva Escocia 1885, Guadalajara 44638, Jalisco, Mexico
3
Centro de Investigación, Innovación y Desarrollo Tecnológico CIIDETEC-UVM, Universidad del Valle de México, Tlaquepaque 45601, Jalisco, Mexico
4
Department of Mathematics and Physics, ITESO, Tlaquepaque 45604, Jalisco, Mexico
5
Department of Technological and Industrial Processes, ITESO, Tlaquepaque 45604, Jalisco, Mexico
*
Author to whom correspondence should be addressed.
Technologies 2025, 13(5), 182; https://doi.org/10.3390/technologies13050182
Submission received: 15 February 2025 / Revised: 22 April 2025 / Accepted: 29 April 2025 / Published: 3 May 2025
(This article belongs to the Special Issue IoT-Enabling Technologies and Applications)

Abstract

:
The accurate measurement of solar radiation is essential for applications in agriculture, renewable energy, and environmental monitoring. Traditional pyranometers provide high-precision readings but are often costly and inaccessible for large-scale deployment. This study explores the feasibility of using low-cost ambient light sensors combined with statistical and machine learning models based on linear, random forest, and support vector regressions to estimate solar irradiance. To achieve this, an Internet of Things-based system was developed, integrating the light sensors with cloud storage and processing capabilities. A dedicated solar radiation sensor (Davis 6450) served as a reference, and results were validated against meteorological API data. Experimental validation demonstrated a strong correlation between sensor-measured illuminance and solar irradiance using the random forest model, achieving a coefficient of determination (R2) of 0.9922, a root mean squared error (RMSE) of 44.46 W/m2, and a mean absolute error (MAE) of 27.12 W/m2. These results suggest that low-cost light sensors, when combined with data-driven models, offer a viable and scalable solution for solar radiation monitoring, particularly in resource-limited regions.

Graphical Abstract

1. Introduction

Solar radiation is fundamental to life on Earth and is critical in regulating essential processes such as the carbon cycle and biomass productivity [1]. As the primary energy source for photosynthesis, it enables photosynthetic organisms to convert light into chemical energy through carbon fixation, vital for plant growth [2]. Therefore, a broad understanding of solar radiation is essential for effective forest management, ecosystem preservation, food production, and the monitoring of marine ecosystems [3].
The accurate measurement of solar radiation is vital in agriculture. It facilitates the optimization of crop management by providing insights into light-use efficiency. Recent studies have illustrated that the amount of solar radiation intercepted by plants is directly correlated with their biomass production and photosynthetic efficiency [4]. Additionally, monitoring solar radiation contributes not only to improving agricultural productivity but also to ensuring sustainability within agricultural practices, particularly in the context of a changing climate.
Solar radiation measurement is also essential in various agriculture-related applications, such as evaluating the performance of photovoltaic systems, climatology, and environmental research. For accurate solar radiation measurement, it is important to consider that radiation varies significantly based on the time of day, season, geographic location, and altitude [5]. Traditionally, pyranometers have been used to measure solar irradiance. While these devices are highly accurate and reliable, their high cost and limited sensitivity under low irradiance conditions present significant challenges for widespread use in large-scale and budget-conscious applications [6].
Technological advances and the growing need for sustainable energy solutions have increased interest in developing more cost-effective and accessible methods for measuring solar radiation [7]. These methods are necessary for various applications, including solar radiation forecasting [8], evaluating the efficiency of organic Rankine cycles utilizing solar collectors [9], supporting aquaculture activities [10], optimizing photovoltaic systems, and enhancing the performance of solar trackers [11]. In this context, low-cost photometers have emerged as a promising alternative. Photometers are devices that measure the intensity of visible light in lux units [12]. Although these devices do not directly measure solar radiation in energy units (W/m2), their use could provide a relative measure of the available light, particularly under low solar irradiance conditions.
The use of low-cost photometers has several advantages. First, these devices are much more affordable than pyranometers, making them accessible to a broader range of users, including independent researchers, small businesses, and community projects [13]. Second, photometers are easy to install and maintain, reducing operational costs and implementation time. Additionally, integrating photometers with microcontroller-based data acquisition systems and IoT platforms allows for the continuous and real-time monitoring of solar radiation [14].
Photometers come with certain challenges that need to be taken into account. The main limitation is that photometers measure light in lux units, whereas solar irradiance is typically measured in W/m2 [15]. This discrepancy requires the development of conversion factors to convert lux to W/m2 accurately. Moreover, the reliability of photometer readings can be compromised by environmental conditions, including temperature, humidity, and atmospheric contaminants [16]. Addressing these issues will enhance the effectiveness of photometers in various applications.
Recent advancements in machine learning (ML) have shown significant potential to enhance the accuracy and reliability of sensor-based measurements across diverse applications. Research indicates that integrating ML models, including deep learning and ensemble approaches, with low-cost photometers can substantially improve radiation estimation by dynamically adjusting conversion factors according to real-time environmental conditions [17]. Additionally, these ML-driven models effectively compensate for the effects of atmospheric contaminants, humidity, and sensor degradation, thereby reinforcing the robustness of photometer-based radiation measurement systems [18].
This study aims to evaluate the capability of low-cost light sensors to estimate solar radiation compared to professional solar radiation sensors and investigate the potential limitations of photometers in measuring solar radiation. The main contribution of this work lies in deriving a conversion factor to transform lux readings into W/m2, offering an accessible alternative for solar radiation monitoring in various applications as substitutes for the solar radiation sensors used in professional meteorological stations. The contributions of this paper can be summarized as follows:
  • An IoT architecture for sensor characterization, integrating low-cost photometric sensors, a specialized solar radiation sensor, and meteorological data from an API to evaluate the performance and accuracy of photometric sensors when used as solar radiation sensors.
  • Achieving a reliable conversion model through a comparative analysis of statistical and ML models (linear, random forest, and support vector regressions), enabling the establishment of accurate lux-to-irradiance conversion factors for solar radiation estimation.
  • An analysis of weather variables and their correlation with solar radiation to enhance the model, utilizing data from the OpenWeather API, thereby confirming the model’s efficacy in improving solar radiation estimation.
This paper is organized as follows: Section 2 comprehensively reviews related works. Section 3 outlines the process for obtaining a conversion factor to convert lux readings to W/m2, along with a description of data collection methods, the design of the proposed solution, and the analytical techniques used to evaluate its effectiveness. Section 4 presents the experimental results and their analysis, while Section 5 discusses these findings. Finally, Section 6 concludes with a summary of the results and suggestions for future work.

2. Related Works

The accurate and cost-effective measurement of solar radiation is essential to address increasing energy demands, facilitate the adoption of renewable energy sources, and optimize agricultural productivity. Over the past decade, researchers have focused on developing low-cost sensors and integrating them with the Internet of Things (IoT) for real-time monitoring. In addition, efforts have concentrated on refining calibration techniques to translate illuminance (lux) into irradiance (W/m2) and employing artificial intelligence algorithms for predictive analytics and system optimization. These advancements respond to the need for scalable, reliable, and economical solutions that function effectively across various environmental conditions.
Hence, this section includes solar radiation forecasting, low-cost solutions for solar irradiance measurement, conversion between measurement units, IoT-based solutions for solar irradiance monitoring, and smart management, providing a comprehensive panorama of the current state of the art and laying the foundation for the present study.

2.1. Solar Radiation Forecasting

Solar forecasting has the potential to enhance grid stability, promote economic efficiency, improve operational planning, facilitate market participation, encourage technological innovation, ensure compliance with regulatory standards, and optimize energy storage solutions [19].
Solar radiation is complex and challenging to predict. Diverse factors influence its intensity, including atmospheric conditions and weather variables such as cloud cover, humidity, wind speed, and temperature. Additionally, the time of day and the changing seasons significantly impact the amount of solar energy that reaches the Earth’s surface [8].
In this context, the challenge of forecasting solar radiation has driven researchers to explore various approaches that combine meteorological variables with data-driven models. Forecasting methods are categorized based on their temporal focus, as each time frame meets different needs. There are four main types of forecasting: very short-term, short-term, medium-term, and long-term [20].
Depending on the forecasting requirements, various algorithmic approaches can be employed. These include statistical techniques, machine learning-based regression models, deep learning architectures, and hybrid methods integrating multiple strategies to enhance prediction accuracy [21].
Among the most widely adopted methods in the recent literature are artificial intelligence-based approaches, particularly neural network architectures such as support vector regression (SVR) [7], random forest regression (RFR) [22], and long short-term memory (LSTM) [23]. Given solar radiation’s inherent periodicity and seasonality, time series models like Autoregressive Integrated Moving Averages (ARIMA) and their variants have also been extensively explored for solar forecasting tasks [24].
Each approach has specific advantages and limitations depending on the forecasting horizon, data availability, and computational resources. Thus, the selection of forecasting methods must be aligned with the specific application context, as practical implementations can vary significantly based on dataset characteristics, operational settings, and forecasting objectives [20].

2.2. Low-Cost Solutions for Solar Irradiance Measurement

The development of cost-effective solutions for solar irradiance measurement has been extensively researched in the last decade. In [16], an embedded system combining multiple sensors was proposed to enhance directional response and reduce errors in ground-based measurements, achieving an average absolute error of 1.27%. This system stands out for its portability and the provision of remote monitoring through secure wireless channels, facilitating its implementation in climate and energy research applications.
Similarly, a low-cost pyranometer using local materials was developed in [25]. The device, calibrated against commercial equipment, achieved average irradiances of 16.00 MJ/m2/day and demonstrated competitive performance, establishing itself as an ideal option for regions with limited access to sophisticated equipment.
More evidence of an irradiance measurement solution was shown in [26], where authors developed an irradiance and temperature meter specifically for solar applications, employing a phototransistor and a temperature sensor. This device was tested alongside commercial pyranometers over 90 days, resulting in a correlation of 0.9996. These findings indicate that cost-effective systems can produce results comparable to professional-grade equipment, particularly in educational and community contexts.
Additionally, ref. [27] reviewed the application of artificial neural networks (ANNs) in predicting solar energy generation. The review underscored the critical importance of precise instrument calibration in enhancing the accuracy of solar predictions and facilitating the efficient integration of solar energy into the electrical grid.

2.3. Conversion Between Measurement Units

Another crucial aspect of solar irradiance research is the accurate conversion between measurement units. Photometers commonly measure light in lux, while solar irradiance is typically expressed W/m2.
In [28], authors proposed a guide for converting lux to W/m2, emphasizing the importance of accurate calibration to integrate cost-effective sensors into solar systems. This approach facilitates the evaluation of photovoltaic system performance under low irradiance conditions, providing an accessible energy study solution.
To broaden the range of applications, ref. [29] designed a device to measure ultraviolet (UV) and solar irradiance using photodiodes and trans-impedance amplifiers. This system demonstrated a 0.99 correlation with standard devices, validating its effectiveness in environmental monitoring and climate research.
While [28,29] demonstrated the feasibility of converting lux to W/m2 using low-cost photometers and photodiodes, there is still a need to standardize and improve these processes for various environmental conditions. Specifically, further research is required on calibrating conversion factors under different spectral variations and extreme irradiance levels. Additionally, most studies have been conducted in controlled environments, highlighting the need to assess these methods in large-scale field applications such as agriculture or environmental monitoring in resource-limited areas. Furthermore, it is essential to consider other environmental factors, such as temperature, humidity, and atmospheric conditions, which can significantly influence sensor performance. Testing these approaches in diverse environmental settings will enhance the validity and reliability of the conversion models, ensuring their applicability across different climatic and geographical regions.

2.4. IoT-Based Solutions for Solar Irradiance Monitoring

IoT-based platforms have also gained relevance in solar irradiance measurement. Integrating IoT sensors with machine learning enables the intelligent processing of large datasets, leading to improved forecasting and overall management of the agricultural environment. IoT sensors can use real-time data to make immediate and future decisions regarding irrigation, fertilization, and other critical agricultural activities [30,31].
Moreover, integrating sensors with a cloud platform facilitated real-time data collection and analysis, enhancing decision-making efficiency in urban and rural applications. In this way, the authors of [14] presented an IoT lux meter that, while demonstrating deviations of up to 40% under high irradiance conditions, successfully allowed these deviations to be corrected through mathematical techniques.
In addition to these technological advancements, optimizing solar tracking is crucial for maximizing energy capture. In [32], the authors designed a dual-axis system capable of measuring Direct Normal Irradiation (DNI), Global Horizontal Irradiance (GHI), and Diffuse Horizontal Irradiance (DHI). This system enables remote control through a collaborative graphical interface, facilitating energy feasibility studies without needing on-site visits.
Similarly, ref. [33] developed a self-sustainable IoT station based on a low-cost pyranometer using the BPW34 photodiode powered by solar energy, ensuring efficient and continuous monitoring in outdoor environments, ideal for urban and rural applications. This system leverages energy from a solar panel to operate sustainably, transmitting data to the ThingSpeak platform via an ESP32; the collected data reduced information loss by 2.47% over a full month of measurements.
On the other hand, the authors of [34] introduced a data logging device for irradiance based on a Peltier cell and ANN. This device, designed to operate autonomously for up to a year with three AAA batteries, excels in its ability to model real-time irradiance using artificial intelligence, thereby facilitating the optimization of photovoltaic system performance.
In [35], the authors optimized a sensor model for measuring solar irradiance using a pyranometer, integrating global, direct, and diffuse radiation measurements and achieving a strong correlation with international standards.
In the context of the IoT, ref. [36] proposed hybrid models that combine meteorological sensors with machine learning algorithms to estimate solar irradiance in areas without access to pyranometers. This approach reduces implementation and maintenance costs while maintaining high accuracy by integrating meteorological data with empirical models.
Furthermore, ref. [37] developed an IoT-connected lux meter with data logging capabilities on an Secure Digital (SD) card, enabling remote monitoring and data visualization through the blynk application, optimizing lighting management in indoor and outdoor spaces.
Finally, ref. [38] designed an IoT-based meteorological system integrating multiple sensors, including the BH1750, for light intensity measurement. This system enables real-time weather monitoring through a Node-RED-based web interface, supporting agricultural and meteorological applications.

2.5. IoT-Enabled Monitoring of Light Intensity and Smart Agricultural Management

The IoT in agriculture has gained relevance in recent years. It allows the real-time collection, transmission, and analysis of data, enabling smart agricultural management. Several studies have focused on integrating light-intensity sensors and other variables, harnessing cloud platforms, machine learning algorithms, and intelligent traceability techniques to autonomously and efficiently enhance cultivation processes, irrigation, pest control, and resource management.
In [39], the BH1750 sensor was employed in an IoT system that transmitted data through ThingSpeak and enabled smartphone visualization, optimizing environmental conditions to enhance production in greenhouses. Similarly, an IoT-based agricultural monitoring system developed by [40] employed the BH1750 sensor to measure light intensity, enhancing crop production by optimizing lighting conditions in real-time.
The authors of [41] proposed a cloud-based intelligent system for interactive agricultural management. This system collects data from multiple IoT sensors, processes it in the cloud, and dynamically visualizes it through interactive dashboards. Integrating such systems enhances operational efficiency and facilitates data-driven decision-making to identify real-time patterns and anomalies.
In [42], a smart agriculture system based on deep reinforcement learning (DRL) and cloud computing was developed. The system comprises multiple layers: data collection, edge processing, transmission, and cloud-based analysis. Artificial intelligence is applied to optimize decisions such as the amount of water needed for irrigation, autonomously improving crop growth.
Traceability also plays a fundamental role in the IoT ecosystem; ref. [43] introduced the concept of smart traceability, which enables digital sensors to calibrate themselves to ensure measurements’ accuracy automatically. This approach guarantees the quality of data generated by sensor networks, thereby optimizing processes such as predictive maintenance in agriculture and other industrial sectors.
Additionally, ref. [44] explored the advantages of IoT in the agricultural sector, highlighting how integrating sensors with artificial intelligence algorithms enhances production efficiency. The proposed system enables remote device control via mobile applications and the automated management of processes such as irrigation and fertilization, contributing to resource waste reduction.
On the other hand, ref. [31] emphasized the challenges and opportunities of IoT in modern agriculture. They underscored how sensors and data platforms can improve agricultural practices such as irrigation and pest control.
Lastly, ref. [45] presented a precision agriculture model based on IoT that leverages data analysis and machine learning. The model was applied to disease prediction in apple orchards in the Kashmir Valley, demonstrating how predictive analysis can anticipate disease outbreaks and improve real-time decision-making to reduce production losses.

2.6. Measurement of Irradiance

Solar irradiance refers to the amount of solar energy received per unit area on a given surface and is typically measured in watts per square meter (W/m2). It is fundamental in solar energy studies, climate change research, and agronomy as it provides critical information on the amount of radiation reaching the Earth’s surface under various atmospheric and cloud-cover conditions. Solar irradiance is calculated using satellite imagery and ground-based measurements, enabling its estimation even in scenarios with clear or overcast skies [46,47].
Solar radiation is primarily measured using pyranometers designed to record global solar radiation, encompassing both direct and diffuse radiation reaching a horizontal surface. Pyranometers use heat- or light-sensitive sensors to measure the solar energy striking the surface, yielding irradiance values in watts per square meter (W/m2) [48,49].
Solar radiation at the top of the atmosphere can be considered relatively constant, with an estimated value of 1366.1 W/m2 and a variation of ± 3.4 % due to changes in the Earth–Sun distance [32]. DHI is the portion of scattered radiation in the atmosphere that reaches a particular point on the ground. Diffuse irradiance accounts for a significant fraction of the total irradiance. GHI denotes the sum of direct and diffuse components incident on a horizontal plane. In contrast, the direct beam of sunlight passing through the atmosphere is referred to as DNI [50].
This study conducted solar irradiance measurements using a sensor integrated into the Davis Instruments Vantage Pro 2 weather station, equipped with the proprietary solar radiation sensor model 6450 [51]. As stated by the manufacturer, this pyranometer-type sensor is designed to measure radiation in the range of 0 to 1800 W/m2.

2.7. Luminance Measurement

According to [52], approximately 50% of the solar radiation that reaches the Earth’s surface is composed of visible light, which falls within the 400–700 nm range. Photometers are used to measure light as perceived by the human eye. They are calibrated according to the standards established by the International Commission on Illumination (CIE), as shown in Figure 1.
The CIE curves were originally developed by measuring human responses to various wavelengths of visible light. Because these measurements involved human perception, the curve from 1924 contained inaccuracies at certain points within the visible spectrum [53]. This issue was addressed with a new CIE curve released in 1988 and further refined in 2008 [54]. This highlights the principle that, by definition, light outside the visible spectrum is not included in these measurements [55].
The previous state of the art highlights the need for cost-effective and reliable solar radiation measurement systems. Low-cost photometric sensors and IoT platforms efficiently collect and transmit real-time data, optimizing agriculture, energy management, and environmental monitoring. Finally, an accurate conversion of illuminance (lux) to irradiance (W/m2) is needed for system reliability and supports research and development of better sensor calibration and large-scale implementations.
The following section outlines the materials and methods utilized in this study, emphasizing design considerations, sensor selection, and the experimental procedures implemented to meet our research objectives.

3. Materials and Methods

This section outlines the design and implementation of a system for measuring luminosity and solar radiation using low-cost sensors, specifically the BH1750 and VEML7700, along with a high-precision reference sensor, the Davis 6450. The system utilizes a NodeMCU ESP32 microcontroller manufactured by Espressif Systems (Shanghai) Co., Ltd., located in Shanghai, China.
To collect and transmit data, enhanced by the Open-Meteo API for obtaining additional meteorological information. This document also details the PCB layout to optimally integrate the sensors and discusses the implementation of a light diffuser to prevent saturation. The program’s workflow enables data acquisition and transmission to the cloud for analysis, allowing for the assessment of the sensors’ accuracy in comparison to the reference sensor.

3.1. System Architecture for Luminosity and Solar Radiation Measurement

In order to evaluate the capability of low-cost ambient light sensors to estimate solar radiation compared to professional solar radiation sensors and investigate the potential limitations of photometers in measuring solar radiation, the architecture depicted in Figure 2 is proposed.
Thus, the primary data acquisition unit, the Sensor Board, incorporates low-cost ambient light sensors and a high-precision Davis 6450 radiation sensor manufactured by Davis Instruments Corporation, located at Hayward, CA, USA. The board transmits the collected data to Azure cloud services via a Local Area Network (LAN), providing real-time monitoring and storage.
Furthermore, the Open-Meteo API was integrated into the system. This integration allowed for the provision of supplementary meteorological data, including temperature, humidity, wind speed, and atmospheric pressure. This adds an overall understanding of environmental conditions by offering additional context for the sensor readings. The API fetches historical and real-time weather data, which are used to correlate the captured sensor data with regional weather patterns, improving the analysis of sensor accuracy under different atmospheric conditions.
Ultimately, the collected data from the sources were analyzed to compare light sensors to estimate solar irradiance comprehensively, evaluating low-cost alternatives’ precision, reliability, and practical applicability. The following sections provide a detailed description of each system component.

3.1.1. Sensor Board

This study used the BH1750 and VELM7700 light sensors, cost-effective solutions to measure the intensity of ambient light. These sensors and a high-precision Davis 6450 radiation sensor were integrated into a custom-designed Printed Circuit Board (PCB). The sensors were interfaced with a NodeMCU ESP32 microcontroller. This microcontroller featured a dual-core Tensilica Xtensa LX6 processor, manufactured and licensed by Cadence Design Systems, Inc., located in San Jose, CA, USA, operating at up to 240 MHz, and included integrated Wi-Fi and Bluetooth connectivity, making it ideal for IoT applications. The NodeMCU ESP32 had multiple peripheral interfaces, such as Inter-Integrated Circuit (I2C), Serial Peripheral Interface (SPI), Universal Asynchronous Receiver–Transmitter (UART), and Analog-to-Digital Converter (ADC). The wiring diagram is depicted in Figure 3.

3.1.2. BH1750 Light Sensor

The BH1750 is a digital light sensor that measures illuminance in lux with a spectral response similar to the human eye. It features a measurement range of 1 to 65,535 lux, well suited for various lighting conditions, from low-light environments to high-intensity sunlight indoors and outdoors. The sensor communicates via an I2C interface into embedded systems with low power consumption for real-time data acquisition. A key feature of the BH1750 is its adjustable sensitivity, which allows compensation for optical window effects or varying lighting conditions. This enables the sensor to adapt to different transparency levels, providing accurate measurements across diverse environments [56].

3.1.3. VEML7700 Ambient Light Sensor

The VEML7700 manufactured by Vishay Intertechnology, Inc., located in Malvern, PA, USA, is a digital ambient light sensor that features a high-sensitivity photodiode, a 16 bit ADC, and an I2C communication interface, allowing seamless integration with the NodeMCU ESP32 microcontroller. Its extensive measurement range of 0.003 lx to 120,000 lx (120 Klx) makes it particularly suitable for capturing both low- and high-intensity lighting conditions, which was vital for this study’s experimental conditions.
Additionally, the VEML7700 offers temperature compensation for stable and accurate measurements across varying environmental conditions and includes flicker noise rejection at 100 Hz and 120 Hz to mitigate interference from artificial light sources. The sensor’s auto-memorization feature allows it to retain the last measured ambient light data even when in shutdown mode, facilitating efficient data logging without requiring continuous operation.
Table 1 presents a comparative analysis of the two light sensors.
In this way, the VEML7700 was tested by comparing its measured values against those from a calibrated optometer, indicating close agreement for illumination levels of up to approximately 1000 lx. In these modes, the sensor’s output remained linear; however, at higher illumination levels, non-linearities were introduced, which could be managed by applying a factory-provided polynomial correction [57]. Consequently, we considered the VEML7700 a responsible reference for calibrating and validating the performance of the BH1750 sensor manufactured by ROHM Semiconductor, located in Kyoto, Japan.

3.1.4. Davis 6450 Sensor

The Davis Instruments Model 6450 Solar Radiation Sensor is a pyranometer designed to measure global solar radiation, including direct and diffuse components, within a range of 0 to 1800 W/m2, with a resolution of 1 W/m2 and an accuracy of ± 5 % . It uses a silicon photodiode calibrated for spectral response from 400 to 1100 nanometers and has a rapid response time of 10 microseconds. Its cosine response is accurate for incident angles of up to 70 °C (deviation < ± 3 % ) and remains within ± 10 % for angles between 70 °C and 85 °C.
The sensor operates from −40 °C to 65 °C. It features a weather-resistant Polyvinyl Chloride (PVC) housing, a diffuser to reduce errors from thermal radiation and water accumulation, and a level indicator for proper alignment. Each Davis 6450 sensor is calibrated against a secondary standard, which is periodically calibrated under natural daylight conditions using an Eppley Precision Spectral Pyranometer. The sensor’s calibration stability is maintained over time, with an annual percentage change relative to the full-scale measurement typically remaining below 1–3%, indicating minimal drift and reliable long-term performance [58].
Table 2 presents the main features of the Davis Instruments Model 6450 solar radiation sensor.
In this study, the Davis Instruments 6450 solar radiation sensor was used as a reference to evaluate the performance of low-cost light sensors, such as the BH1750 and VEML7700, in estimating solar irradiance. The 6450 sensor provided a stable foundation for analyzing the correlation between lux-based measurements and irradiance values. The sensor was integrated into the sensor board and communicated via an analog interface, where its voltage readings (measured in millivolts) were converted into irradiance values (in W/m2) using the conversion factor specified in the manufacturer’s datasheet [52].
The processed irradiance data were then transmitted to the Azure cloud services for further storage and analysis. Measurements were conducted simultaneously with the BH1750 and VEML7700 sensors, creating a comprehensive dataset for subsequent performance evaluation and comparative analysis.

3.1.5. PCB Design and Fabrication

The PCB design presented in Figure 4 was specifically developed to integrate the NodeMCU ESP32 microcontroller with the 6450 solar radiation sensor, as well as the BH1750 ambient light sensor and the VEML7700 ambient light sensor. The layout was designed to position the sensors near one another, ensuring that they were all exposed to the same physical stimuli under uniform environmental conditions, such as light intensity or solar radiation. The sensors were mounted at the same height, separating 30 cm between the sensors and the mounting connector of the 6450 sensor.
A level bubble was integrated into the PCB design to improve measurement consistency and assist with the correct alignment and orientation of the sensors during data collection. This design approach aimed to reduce the variations caused by different sensor placements to collect more consistent and reliable measurements.
Although the sensors offer a wide dynamic range for luminance measurements, direct exposure to intense sunlight leads to saturation issues, occasionally exceeding the operational limits of the sensor. A white light diffuser depicted in Figure 5 was implemented to address this issue, reducing saturation and providing measurements that consistently remained within the sensor’s range. The completed PCB is illustrated in Figure 6 and Figure 7.
The developed program for the ESP32 microcontroller followed a structured workflow, depicted in Figure 8, for data acquisition and cloud transmission. The process began with the start phase, where the system initialized the necessary peripherals and configurations. The first critical step was to connect to Azure, which established communication with the cloud services. If the connection failed, the system continuously attempted to reconnect before proceeding further.
Once the connection was successfully established, the program transitioned to the sensor reading phase, where data were sequentially acquired from the three sensors:
  • Read Davis 6450: Converted analog readings into irradiance values.
  • Read VEML7700: The sensor was set up with the following parameters: a gain of 1/8, which helped prevent saturation in high sunlight conditions; an integration time of 50 ms; and a continuous operation mode that allowed for real-time monitoring without the need for reactivation. Furthermore, the sensor had a maximum resolution of 16 bits, enabling precise data collection.
  • Read BH1750: The BH1750 was configured in continuously high-resolution mode (Continuously H-Resolution Mode2), which offered a resolution of 0.5 lux per count and a measurement time of 120 ms.
After all sensors had been read, the collected data were processed and formatted into a JavaScript Object Notation (JSON) in the Send Data state. This JSON structure organized the sensor readings, timestamps, and relevant metadata. The formatted data were then transmitted to the Azure IoT hub via the MQTT (Message Queue Telemetry Transport) protocol, enabling cloud storage and further processing [59,60].
Following the data transmission, the system entered a wait 1 min phase, during which, it remained idle to avoid redundant operations. Once the waiting period ended, the workflow looped back to the read sensors stage, providing a continuous monitoring cycle.

3.2. Internet of Things for Data Acquisition

As shown in Figure 9, Azure cloud services were used to process the data collected by the sensor board. The data were transmitted to the cloud via the MQTT protocol [61,62]. Once the data reached the cloud, they were ingested by Azure IoT hub, the central communication hub, enabling secure and bidirectional communication between the sensor devices and the cloud infrastructure.
The Azure IoT hub is the central message broker that provides bidirectional communication between sensor devices and the cloud. It provides device-to-cloud and cloud-to-device messaging, data ingestion, monitoring, and control capabilities. It also supports device identity management, telemetry routing, and built-in security mechanisms, including encryption and authentication via SAS tokens or X.509 certificates, to protect the data throughout its transmission lifecycle.
After receiving the data, Node-RED processed it by handling the incoming JSON messages sent by the sensor board. This data flow manager extracted sensor information, illuminance, and irradiance values, which were correctly formatted and structured to be stored in a Structured Query Language (SQL) database.
The processed data were then stored in an Azure SQL database, which provided structured storage for historical data and allowed querying and analysis. As a fully managed, cloud-based, relational database, the Azure SQL database is the backbone for data persistence, storing all sensor readings and making them readily available for further use. Each record in the database includes illuminance and irradiance values, along with the corresponding timestamp, enabling precise tracking and analysis over time. Additionally, the database benefits from automated backups, intelligent query processing, and seamless integration with other Azure services, such as Power BI for visualization and Azure Machine Learning for predictive analytics.
In addition to the sensor data, Node-RED was configured to interact with the Open-Meteo API, which provides real-time and historical weather data sourced from national meteorological services and global atmospheric models, offering weather information with coverage across various geographic regions. Through scheduled HTTP requests, Node-RED periodically fetched meteorological data such as temperature, humidity, and cloud cover by sending requests to the Open-Meteo API’s endpoints. The retrieved JSON responses were parsed within Node-RED, extracting the relevant weather parameters that complemented the sensor board data: cloud cover, relative humidity, and surface pressure.
It is important to emphasize that Open-Meteo data are derived from national weather services, and observations are integrated into numerical models, such as the Integrated Forecasting System (IFS) developed by ECMWF. Depending on the location, the Open-Meteo API combines different models to provide the best weather estimation with 1.5 to 55 km of resolution and a minimum frequency of 1 h, as specified in [63].

3.3. Statistical and Machine Learning Methodology

As illustrated in Figure 10, the proposed methodology consists of several key stages. First, data are collected from low-cost ambient light sensors, the 6450 solar radiation sensor, and OpenWeather API resources to build a comprehensive dataset. The dataset includes key variables such as illuminance values (Lux BH1750 and Lux VEML7700), solar irradiance measurements from the Davis 6450 sensor, and environmental parameters including temperature at 2 m, relative humidity, cloud cover, and surface pressure from Open-Weather API. Each data point is time-stamped for proper temporal tracking and analysis.
This comprehensive dataset is the foundation for two parallel analytical approaches: statistical analysis (SA) and machine learning (ML). The statistical analysis provides fundamental insights through exploratory data analysis and regression techniques. Simultaneously, the ML approach (linear, RFR, and SVR) employs algorithms to uncover complex, nonlinear relationships between illuminance and solar irradiance by incorporating various environmental factors such as temperature, humidity, and cloud cover.
The SA approach involves descriptive statistics, exploratory data analysis, and regression modeling to identify trends and relationships between illuminance and solar irradiance. In parallel, the ML approach employs algorithms to uncover complex patterns and nonlinear relationships between illuminance and solar irradiance under varying environmental conditions [64].
A model comparison and validation phase was conducted following the development of both statistical and machine learning models. This step determined which model was most accurate and reliable based on performance metrics such as the coefficient of determination (R2), root mean squared error (RMSE), mean absolute error (MAE), and mean squared error (MSE), as described in Equations (1)–(3):
R M S E = 1 n i = 1 n ( y i x i ) 2
M A E = 1 n i = 1 n y i x i
MSE = 1 n i = 1 n ( y i x i ) 2
where n is the number of observations and y i x i is the error between the forecasted and actual values. The RMSE is a mathematical formula used to standardize the units of measurement of the MSE.
While the MSE assesses variance by evaluating how well a model fits the training data, the RMSE emphasizes specific data points more. This means that if a prediction is incorrect, it will significantly impact the overall error, as illustrated in Equation (1).
In contrast, the MAE measures the distances from the predicted values to the actual points. Unlike RMSE, the MAE does not heavily penalize outliers, as it averages all errors regardless of their magnitude. This results in a more generic and bounded performance measure for the model, expressed in Equation (2).
Ultimately, integrating both approaches leads to the derivation of an optimized conversion factor that allows for the accurate transformation of lux values into irradiance measurements.

3.4. System Deployment

As depicted in Figure 11, the experimental setup employed in this work has been installed in the municipality of Ojocaliente, located in the state of Zacatecas, Mexico, at geographic coordinates 22°33′40″ N latitude and 102°14′44″ W longitude, with an altitude of 2043 m above sea level.
According to the Global Solar Atlas data for the site, the DNI is 6.858 kWh/m2 per day, while the GHI reaches 6.112 kWh/m2 per day. The site also experiences a Diffuse Horizontal Irradiation (DHI) of 1.685 kWh/m2 per day and a Global Tilted Irradiation (GTI) at the optimum angle of 6.616 kWh/m2 per day, with an optimal PV module tilt of 25°.

4. Results

This section presents the results from the tests conducted, which evaluated various aspects of the system. It details the data obtained from measurements, the system’s responses to different conditions, and comparisons between expected and actual results. Key findings are highlighted to assess the effectiveness and accuracy of the implemented design and demonstrate how they contribute to this study’s objectives.

4.1. Collected Data

The resultant data comprised information from 8 November–6 December 2024. During this period, data were collected continuously at 1 min intervals, resulting in an expected 1440 samples per day; however, due to intermittent communication interruptions, the total number of recorded samples per sensor was approximately 40,124. These interruptions were minor and did not significantly affect the overall quality or continuity of the dataset. Figure 12, Figure 13 and Figure 14 present graphical representations of the last 10 days of recorded data for the BH1750, VEML7700, and Davis 6450 sensors, respectively.
According to the data, the Davis 6450 sensor recorded maximum solar irradiances in the 600 to 700 W/m2 range, with a peak of 706 W/m2 recorded on November 26, 2024 (see Figure 14). Moreover, the complete dataset from the Davis 6450 sensor showed maximum irradiance values ranging from 641 W/m2 to 946 W/m2.
On the other hand, both illuminance sensors reflected a pattern similar to the irradiance measurements. The maximum recorded illuminance values were 36.3 Klux for the VEML7700 sensor and 37.6 Klux for the BH1750 sensor, both observed around solar noon. Illuminance levels commenced at approximately 6:51 AM, gradually increasing until midday, before tapering to zero by 6:30 PM. This behavior aligned with the documented solar trajectory, as depicted in Figure 15.

4.2. Results for the Relationship Between Illuminance and Solar Irradiance

After compiling the dataset, a correlation matrix analysis was developed to identify the degree of association between the collected variables, as shown in Figure 16.
The analysis revealed strong correlations between illuminance values from the BH1750 ( r = 0.97 ) and VEML7700 ( r = 0.94 ) sensors and solar irradiance measurements obtained from the Davis 6450 sensor.
Other environmental factors, such as temperature ( r = 0.70 with BH1750, r = 0.65 with VEML7700) and relative humidity ( r = 0.52 with BH1750, r = 0.47 with VEML7700), exhibited moderate correlations, suggesting their potential influence on the conversion process. The relatively lower correlations of cloud cover ( r 0.00 ) and surface pressure ( r 0.61 ) indicated that these variables might have had a limited impact on the conversion of illuminance to irradiance.
Figure 17 shows the relationship between illuminance (Lux) data from the BH1750 and VEML7700 sensors and solar irradiance (W/m2) obtained from the 6450 sensors.
The positive trend for BH1750 and VEML7700 data indicated that higher illuminance readings corresponded to higher irradiance measurements. However, the spread of the points varied slightly between the two sensors, reflecting their distinct response characteristics under different lighting conditions. These results suggest that both sensors could be representative of the estimation of solar irradiance.
This way, a linear regression (LR) model was applied over the complete dataset to establish the relationship between illuminance (Lux) data from the BH1750 and VEML7700 sensors and solar irradiance (W/m2) obtained from the 6450 sensors and the Open-Meteo API, as illustrated in Figure 17.
The LR model used to describe this relationship is expressed by Equation (4):
Y = m X + b
where
  • Y represents the predicted solar irradiance (W/m2);
  • X is the measured illuminance (lux);
  • m is the slope of the regression line, representing the rate of change of irradiance with respect to illuminance;
  • b is the intercept, representing the irradiance value when illuminance is zero.
The LR model is described by Equation (5):
y = 0.0163 x 14.7387
where R2 = 0.9221.
The analysis resulted in a coefficient of determination of 0.9221, indicating a strong relationship where the irradiance values tended to show a corresponding trend as illuminance levels increased.

4.3. Results for Statistical Analysis: BH1750

According to the variable correlation matrix, the correlation between the illuminance sensors, specifically the BH1750 sensor, and the Davis 6450 sensor was r = 0.97 . This correlation suggested that illuminance values could effectively estimate irradiance levels through mathematical modeling.
This way, the statistical analysis approach used linear and polynomial regression models applied to the BH1750 sensor and 6450 solar radiation sensor data to evaluate the relationships between the variables. The plot on the left in Figure 18 presents the first-order (linear) regression analysis results. In contrast, on the right side of Figure 18, the second-order (polynomial) regression model applied to the same dataset is depicted.
As shown in Figure 18, both the linear (left) and polynomial (right) regression models demonstrated relative linear correlations between the BH1750 illuminance sensor and the Davis 6450 solar radiation sensor. The difference in R values between the linear and polynomial models was not extremely large; however, this improvement indicated that the second-order model may have yielded more accurate solar irradiance estimates, especially when illuminance values approached the upper end of the measured range.
Table 3 presents the polynomial equations and the MSE, MAE, and RMSE metrics for these models, which help elucidate the modeled dynamics more clearly.
Figure 19 compares solar irradiance values obtained from the Davis 6450 sensor over three days, the estimated irradiance derived from the BH1750 illuminance sensor, and direct radiation measurements. The measured data from the Davis 6450 sensor (represented by red crosses) served as the reference. In contrast, the estimated values (represented by blue plus signs) were calculated using the second-order regression in the Table 3 model that converted illuminance (Lux) to irradiance (W/m2).
As shown in Figure 19, the two data series followed a similar daily pattern, especially around midday when irradiance peaked, where a temporal offset existed between the two measurements. This offset may have resulted from the Davis 6450’s longer update interval of 50 s to 1 min, which averaged or integrated values over that duration. In contrast, the BH1750 had a much shorter sampling time of 120 milliseconds, allowing it to capture variations in irradiance instantly. Additionally, the broader spectral response range of the Davis 6450 (400–1100 nm) compared to the BH1750’s focus on the visible spectrum (400–700 nm) may also have contributed to the minor discrepancies in the timing of detected irradiance maxima and minima. Nevertheless, these observations indicated that the BH1750 sensor could reasonably approximate solar irradiance under typical conditions.

4.4. Results for Statistical Analysis: VEML7700

Similarly, as with the BH1750, for the VEML7700, the correlation between the illuminance sensors, specifically the VEML7700 sensor, and the Davis 6450 sensor was r = 0.95 . Second-order and third-order polynomial regression models were employed to evaluate the relationships between variables in the data from the VEML7700 sensor and the 6450 solar radiation sensor. The left side of Figure 20 displays the results of the second-order regression analysis. In contrast, the right side of Figure 20 shows the results from applying the third-order regression model to the same dataset.
Figure 20 compares the second-order (left) and third-order (right) polynomial regressions that related the illuminance values from the VEML7700 sensor (measured in lux) to the solar irradiance readings from the Davis 6450 sensor (measured in W/m2). Both models exhibited a strong correlation, with R approximately equal to 0.98, demonstrating that the illuminance data from the VEML7700 sensor could effectively estimate solar irradiance levels. The second-order polynomial regression effectively modeled the primary curvature of the data, providing a solid representation of the relationship. In contrast, the third-order polynomial introduced an additional term that accommodated more subtle variations within higher and lower illuminance ranges. While this approach could enhance the accuracy of the model, it is important to note that it also added to the complexity of the analysis.
Table 4 presents the polynomial equations and the MSE, MAE, and RMSE metrics for these models.
Figure 21 compares the solar irradiance values obtained from the Davis 6450 sensor over three days with the estimated irradiance derived from the VEML7700 sensor and direct radiation measurements. The measured data from the Davis 6450 sensor, represented by red crosses, served as the reference point. In contrast, the estimated values, depicted with orange plus signs, were calculated using the second-order regression provided in Table 4. Similarly, the direct radiation values (indicated by green circles) served as an external benchmark to evaluate the accuracy and consistency of the Davis 6450 sensor and the VEML7700-derived estimations.
In contrast to the relationship observed between the BH1750 and Davis 6450, Figure 21 illustrates a smaller temporal gap between the VEML7700 sensor and the Davis 6450 across the three datasets. This reduced discrepancy could be attributed to the VEML7700 sensor’s rapid update rate, which was more closely aligned with the Davis 6450 (4.8 s), thereby minimizing the temporal offset observed in their measurements.

4.5. ML Approach

This section presents the machine learning methods that modeled the relationship between measured illuminance and solar irradiance. Multiple linear regression (MLR) was used as a baseline to evaluate the effectiveness of simple, interpretable models in capturing irradiance dynamics.
The datasets employed in this study consisted of structured tabular data gathered at consistent intervals from light and environmental sensors. Given the nature of the data, we chose to implement supervised regression models, which were the most suitable approach for our analysis.
Moreover, emphasis was placed on designing a predictive model that could be efficiently implemented in microcontroller-based systems for the real-time estimation of solar irradiance. With this in mind, the selected machine learning models—RF and SVM regression—were chosen for their balance between predictive performance and computational feasibility. All models were trained using the same input features (illuminance, temperature, and relative humidity), selected based on the correlation analysis described in Section 4.2.

4.6. Multiple Linear Regression

The ML approach was designed to estimate solar irradiance by leveraging illuminance and environmental data, with feature selection based on the correlation analysis (see Figure 16). According to the correlation matrix, the illuminance values from the BH1750 and VEML7700 sensors exhibited a strong correlation with the solar irradiance measured by the Davis 6450 sensor ( r = 0.97 and r = 0.95 , respectively), indicating their significant predictive potential. Additionally, temperature ( r = 0.62 ) and relative humidity ( r = 0.46 ) showed moderate correlations with irradiance, suggesting their potential influence in refining the model’s accuracy by accounting for environmental variability.
Based on these insights, the selected features—illuminance, temperature, and humidity—were preprocessed. The Davis 6450 sensor data were used as the target variable to train and evaluate the predictive model, aiming to achieve a generalizable conversion from illuminance to solar irradiance across varying conditions.
The dataset was split into training (80%) and testing (20%) subsets to validate the model’s performance. An MLR model was applied to establish the relationship between the selected variables and solar irradiance, following the equation
( W / m 2 ) = β 0 + β 1 · x 1 + β 2 · x 2 + β 3 · x 3 + β 4 · x 4
where
  • x 1 is the BH1750 data sensor;
  • x 2 is the VEML7700 data sensor;
  • x 3 is the temperature;
  • x 4 is the humidity.
During the training phase, the model estimated the regression coefficients by minimizing the MSE to achieve the best possible fit. The performance of the model was assessed using key evaluation metrics such as the R 2 , MSE, and MAE. In this way, the results are depicted in Table 5.
Therefore, Equation (6) was employed to estimate irradiance along with the coefficients obtained from the ML approach. This method incorporated the illuminance values recorded by the BH1750 and VEML7700 sensors and relevant environmental parameters such as temperature and relative humidity.
Figure 22 shows that the estimated irradiance (represented by purple plus signs) closely followed the measured irradiance values (depicted by red crosses) across the three-day period.
Moreover, Figure 22 indicates that the ML-based approach using illuminance data (BH1750/VEML7700) and temperature and relative humidity could capture the overall daily irradiance pattern. While there were minor discrepancies around the midday peaks, the estimated model followed the general shape and magnitude of the measured data.

4.7. Random Forest Regression

For the RFR model, 100 estimators were configured using default hyperparameters. All data points with zero irradiance were removed before training to focus exclusively on solar activity. The model was trained on 80% of the dataset and tested on the remaining 20%. The performance metrics are summarized in Table 6.
Figure 23 depicts the regression performance of the RFR model.
Figure 24 compares the actual solar irradiance measurements with the values predicted by the RF model over a representative time period.

4.8. Suported Vector Regression

For the SVR model, the standard hyperparameters were employed with the radial basis function (RBF) kernel. Similar to the RF regression model, all data points exhibiting zero irradiance were excluded prior to training to concentrate only on solar activity. The input features underwent standardization through z-score normalization. The performance metrics are detailed in Table 7.
Figure 25 depicts the regression performance of the suported vector regression model.
Figure 26 compares the actual solar irradiance measurements with the values predicted by the SVR model over a representative time period.
A one-way analysis of variance (ANOVA) was applied to the absolute prediction errors to assess the performance differences among the evaluated models. The results showed a highly significant difference between the models (F = 997.4, p < 0.0001), indicating that not all models performed equally. Figure 27 presents a box plot of the absolute errors. RF exhibited the lowest error variability and mean, followed by SVR, while linear regression showed the highest prediction error among the three.

5. Discussion

This section compares recent works on solar irradiance forecasting to contextualize the proposed approach’s performance. Table 8 summarizes selected studies, highlighting the forecasting methods used, the input variables considered, and the corresponding performance metrics such as R2, RMSE, and MAE.
Table 8 shows a notable deviation between the fixed conversion factor proposed in [28] and the results obtained in this work. The linear regression model yielded a conversion equation of the form y = 0.0172 x 9.2273 , which corresponded to an approximate conversion factor of 1 W / m 2 58.1 lx . This value significantly differed from the 1 W / m 2 122 lx ratio used in their study, suggesting that a universal constant may not be appropriate for all sensors or environmental conditions. The discrepancy likely arose from sensor-specific characteristics, such as spectral sensitivity and measurement range, as well as the influence of contextual factors like temperature, humidity, and incident light angle.
Furthermore, polynomial regression models provided an improved fit over the linear approach. For instance, second- and third-degree models applied to the VEML7700 sensor data achieved higher determination coefficients ( R 2 = 0.9833 ) and substantially lower error values ( RMSE 31.9 ) compared to the BH1750 linear model ( R 2 = 0.9450 , RMSE 57.9 ). These results reinforce the idea that incorporating nonlinear relationships through calibrated models yields more accurate irradiance estimations than relying on fixed, general-purpose conversion factors.
According to [7], an optimized random forest model achieved an R 2 of 0.95 using sunshine hours, temperature, humidity, and pressure. In comparison, our approach relied on ambient light data and essential weather variables (temperature and humidity), reaching an R 2 = 0.9922 and RMSE = 44.46 . While these results are promising, they are based on a relatively limited dataset collected under specific environmental conditions, which may affect generalizability. Moreover, light sensors like the BH1750 and VEML7700 are sensitive to incident angle, enclosure interference, and spectral mismatch compared to standard irradiance sensors, which may introduce bias in real-world applications.
The authors of [22] reported high accuracy ( R 2 = 0.996 , RMSE = 1.08 ) using a hybrid approach of XGBoost, Extra Trees, and Gradient-Boosting, supported by high-resolution radiation data (GHI, DHI, GTI) and comprehensive meteorological variables. Although more complex, such models benefit from richer data sources that are not always available in all settings. In our case, weather variables were obtained via an external API. This could introduce discrepancies due to location granularity or interpolation errors, particularly in microclimates or areas with rapid weather changes.
Similarly, ref. [23] used a hybrid RF + LSTM model incorporating a broad range of features, achieving R 2 = 0.98 and MAE = 26.22 . While their approach offers strong performance, it requires more computational resources and a more extensive feature set. In contrast, our method aims to provide a practical, low-cost, and moderately accurate solution using readily available sensors and simpler models. Although the results are encouraging, further testing with larger, more diverse datasets and improved sensor calibration would be necessary to validate its robustness across different environments.

6. Conclusions and Future Work

This study explored the feasibility of estimating solar irradiance using low-cost ambient light sensors (BH1750 and VEML7700) in combination with basic meteorological data retrieved via an external API. Applying classical regression techniques, including linear, polynomial, and ML models, enabled reasonably high predictive accuracy, mainly when sensor calibration was performed using nonlinear models. The results demonstrate that ambient light sensors, when appropriately modeled, can serve as practical proxies for solar radiation measurement, offering an accessible alternative to more expensive pyranometers or weather stations.
Furthermore, assessing how model error varies under different irradiance conditions and how cloudy days might modify the model is essential. Moreover, the highest radiation levels occurred during the summer station at Ojo Caliente, Zacatecas. However, the measurements were captured during the last autumn; future works plan to enhance the model by incorporating summer data and data for the whole year, enabling us to analyze in a better way the influence of higher irradiance and cloudy days on model performance and error variability. This additional analysis is expected to further improve the robustness and accuracy of our irradiance estimations across a broader range of lighting conditions.
Our current study was based on data from a single station and conducted under controlled conditions with minimal connectivity issues. Future works plan to expand our study by incorporating additional stations with diverse climatic and geographic conditions to improve the model’s generalizability, applicability, and reliability across varied settings. Furthermore, future work will consider integrating data acquisition strategies to address network stability challenges and data loss, thereby enhancing the overall robustness of the system.
Finally, the findings suggest that when combined with appropriate data processing and ML techniques, low-cost sensors can provide an effective and cost-efficient solution for estimating solar irradiance in applications such as renewable energy monitoring and agricultural management. Future work should focus on expanding the dataset to include diverse environmental conditions and optimizing the models for real-time applications.

Author Contributions

Conceptualization, H.A.G.-O. and L.F.L.-V.; methodology, M.E.M.-R. and E.L.-N.; software, F.G.-V. and J.A.N.-P.; validation, M.E.M.-R., F.G.-V., and R.C.-N.; formal analysis, H.A.G.-O., R.C.-N., and L.F.L.-V.; investigation, M.E.M.-R., U.E.A.-R., and J.A.N.-P.; resources, E.L.-N. and L.O.S.-S.; data curation, U.E.A.-R. and J.A.N.-P.; writing—original draft preparation, J.A.N.-P. and U.E.A.-R.; writing—review and editing, H.A.G.-O., L.F.L.-V., and E.L.-N.; visualization, J.A.N.-P. and L.O.S.-S.; supervision, L.F.L.-V. and L.O.S.-S.; project administration, F.G.-V. and R.C.-N.; funding acquisition, E.L.-N. and H.A.G.-O. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data supporting the reported results can be found at https://github.com/fabianngv29/Solar-radiation-data-UAZ (accessed on 8 April 2025).

Acknowledgments

The authors want to thank the Mexican Secretariat of Science, Humanities, Technology and Innovation (SECIHTI by its initials in Spanish) for its support to the National Laboratory of Embedded Systems, Advanced Electronics Design and Micro Systems (LN-SEDEAM by its initials in Spanish), project numbers 282357, 293384, 299061, 314841, 315947, and 321128 and scholarship numbers 1301325 and 1012274.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
ADCAnalog-to-Digital Converter
ANNArtificial Neural Network
CIECommission on Illumination
DHIDiffuse Horizontal Irradiance
DIFDiffuse Horizontal Irradiation
DNIDirect Normal Irradiance
DRLDeep Reinforcement Learning
GHIGlobal Horizontal Irradiance
GTIGlobal Tilted Irradiation
I2CInter-Integrated Circuit
IoTInternet of Things
LANLocal Area Network
MAEMean Absolute Error
MLMachine Learning
MQTTMessage Queue Telemetry Transport
MSEMean Squared Error
PCBPrinted Circuit Board
PVCPolyvinyl Chloride
R2Coefficient of Determination
RFRRandom Forest Regression
RMSERoot Mean Squared Error
SAStatistical Analysis
SPISerial Peripheral Interface
SQLStructured Query Language
SVRSupport Vector Regression
UARTUniversal Asynchronous Receiver–Transmitter
UVUltraviolet

References

  1. Sivakumar, M. Importance of Solar Radiation and the Need for Improved Respect to Sun by Agrometeorologists. J. Agrometeorol. 2023, 27, 45–52. [Google Scholar] [CrossRef]
  2. Punia, H.; Tokas, J.; Malik, A.; Satpal; Rani, A.; Gupta, P.; Kumar, S. Solar radiation and nitrogen use efficiency for sustainable agriculture. In Resources Use Efficiency in Agriculture; Singh, A.K., Kumar, P., Dhankar, R., Eds.; Springer: Berlin/Heidelberg, Germany, 2020; pp. 177–212. [Google Scholar]
  3. Thomas, C.; Wandji Nyamsi, W.; Arola, A.; Pfeifroth, U.; Trentmann, J.; Dorling, S.; Aculinin, A. Smart Approaches for Evaluating Photosynthetically Active Radiation at Various Stations Based on MSG Prime Satellite Imagery. Atmosphere 2023, 14, 1259. [Google Scholar] [CrossRef]
  4. He, Y.; Wang, Z.; Sun, S.; Zhu, L.; Li, Y.; Wang, X.; Zhou, Z. Using crop intercepted solar radiation and vegetation index to estimate dry matter yield of Choy Sum. Front. Plant Sci. 2023, 14, 1208404. [Google Scholar] [CrossRef]
  5. Sengupta, M.; Habte, A.; Gueymard, C.; Wilbert, S.; Renne, D. Best Practices Handbook for the Collection and Use of Solar Resource Data for Solar Energy Applications, 2nd ed.; National Renewable Energy Lab. (NREL): Golden, CO, USA, 2017. [Google Scholar]
  6. Onatoyinbo, O.O.; Willoughby, A.A.; Soge, A.O.; Dairo, O.F. Comparison of the sensitivities and accuracies of optoelectronic transducers for solar irradiance measurement. Sustain. Energy Res. 2023, 10, 19. [Google Scholar] [CrossRef]
  7. Villegas-Mier, C.G.; Rodriguez-Resendiz, J.; Álvarez-Alvarado, J.M.; Jiménez-Hernández, H.; Odry, Á. Optimized Random Forest for Solar Radiation Prediction Using Sunshine Hours. Micromachines 2022, 13, 1406. [Google Scholar] [CrossRef] [PubMed]
  8. Pérez-Rodríguez, S.A.; Álvarez-Alvarado, J.M.; Romero-González, J.A.; Aviles, M.; Eileen, M.R.A.; Carlos, F.S.; Rodríguez-Reséndiz, J. Metaheuristic Algorithms for Solar Radiation Prediction: A Systematic Analysis. IEEE Access 2024, 12, 100134–100151. [Google Scholar] [CrossRef]
  9. Martínez-Sánchez, R.A.; Álvarez-Alvarado, J.M.; Pérez-Soto, G.I.; Macías-Socarrás, I.; Camarillo-Gómez, K.A.; Rodríguez-Reséndiz, J. Thermal Efficiency Analysis of a 1 kW ORC System with a Solar Collection Stage and R-245fa Working Fluid: A Case Study. Fluids 2024, 9, 217. [Google Scholar] [CrossRef]
  10. Castillo Alvarez, Y.; González González, Y.; Jiménez Borges, R.; Iturralde Carrera, L.A.; Álvarez-Alvarado, J.M.; Rodríguez-Reséndiz, J. Energy Efficiency and Mathematical Modeling of Shrimp Pond Oxygenation: A Multiple Regression Experimental Study. Eng 2024, 5, 2862–2885. [Google Scholar] [CrossRef]
  11. Pérez-Gudiño, J.L.; Gómez-Guzmán, M.A.; García-Valdez, C.; Carrillo-Serrano, R.V.; Pérez-Soto, G.I.; Rodríguez-Reséndiz, J. The Low-Cost Mechanism of a Defined Path Guide Slot-Based Passive Solar Tracker Intended for Developing Countries. Technologies 2024, 12, 250. [Google Scholar] [CrossRef]
  12. Bernal Rosso, F. Control de la Iluminación; Ediciones Paraninfo, S.A.: Madrid, Spain, 2019. [Google Scholar]
  13. Feresu, Z.T.T.; Mashonjowa, E.; Matandirotya, E. A Low-Cost Photodiode Based Solar Radiation Measuring System. J. Electr. Eng. Electr. Technol. 2023, 12, 1. [Google Scholar]
  14. Lorenzo, O.G.; Suárez-García, A.; Peña, D.G.; Fuente, M.G.; Granados-López, D. A Low-Cost Luxometer Benchmark for Solar Illuminance Measurement System Based on the Internet of Things. Sensors 2022, 22, 7107. [Google Scholar] [CrossRef] [PubMed]
  15. González, E.G. Guía Básica de Conceptos de Radiometría y Fotometría; Universidad de Sevilla: Sevilla, Spain, 2006. [Google Scholar]
  16. Roy, S.; Panja, S.C.; Patra, S.N. An embedded system to measure ground-based solar irradiance signal. Measurement 2021, 173, 108598. [Google Scholar] [CrossRef]
  17. Xu, L.; Li, Y.; Wang, X.; Liu, L.; Ma, M.; Yang, J. A Machine Learning Approach to Estimating Solar Radiation Shading Rates in Mountainous Areas. Sustainability 2024, 16, 931. [Google Scholar] [CrossRef]
  18. Huang, L.; Kang, J.; Wan, M.; Fang, L.; Zhang, C.; Zeng, Z. Solar radiation prediction using different machine learning algorithms and implications for extreme climate events. Front. Earth Sci. 2021, 9, 596860. [Google Scholar] [CrossRef]
  19. Chodakowska, E.; Nazarko, J.; Nazarko, Ł.; Rabayah, H.S. Solar Radiation Forecasting: A Systematic Meta-Review of Current Methods and Emerging Trends. Energies 2024, 17, 3156. [Google Scholar] [CrossRef]
  20. Mystakidis, A.; Koukaras, P.; Tsalikidis, N.; Ioannidis, D.; Tjortjis, C. Energy Forecasting: A Comprehensive Review of Techniques and Technologies. Energies 2024, 17, 1662. [Google Scholar] [CrossRef]
  21. Wang, L.; Shi, J. A Comprehensive Application of Machine Learning Techniques for Short-Term Solar Radiation Prediction. Appl. Sci. 2021, 11, 5808. [Google Scholar] [CrossRef]
  22. Atiea, M.A.; Shaheen, A.M.; Alassaf, A.; Alsaleh, I. Enhanced Solar Power Prediction Models with Integrating Meteorological Data toward Sustainable Energy Forecasting. Int. J. Energy Res. 2024, 2024, 8022398. [Google Scholar] [CrossRef]
  23. Chand, S.; Krishnan, N.; Kumar, R.K. Medium-Term Forecasting of Solar Radiation Using Hybrid Modelling. Peer Rev. J. Sol. Photoen. Sys. 2023, 2, PRSP.000534. [Google Scholar]
  24. Chodakowska, E.; Nazarko, J.; Nazarko, Ł.; Rabayah, H.S.; Abendeh, R.M.; Alawneh, R. ARIMA Models in Solar Radiation Forecasting in Different Geographic Locations. Energies 2023, 16, 5029. [Google Scholar] [CrossRef]
  25. Amakoromo, T. Development of a Low-Cost Solar Pyranometer. Int. J. Eng. Technol. Manag. Res. 2023, 10, 42–48. [Google Scholar] [CrossRef]
  26. Ogundimu, E.; Akinlabi, E.; Mgbemene, C.; Jacobs, I. Design and Implementation of a Low-cost Irradiance-Temperature Data Logging Meter for Solar PV Applications. Am. J. Mech. Ind. Eng. 2021, 6, 50–55. [Google Scholar] [CrossRef]
  27. Pazikadin, A.R.; Rifai, D.; Ali, K.; Malik, M.Z.; Abdalla, A.N.; Faraj, M.A. Solar Irradiance Measurement Instrumentation and Power Solar Generation Forecasting Based on Artificial Neural Networks (ANN): A Review of Five Years Research Trend. Sci. Total Environ. 2020, 715, 136848. [Google Scholar] [CrossRef] [PubMed]
  28. Michael, P.R.; Johnston, D.E.; Moreno, W. A Conversion Guide: Solar Irradiance and Lux Illuminance. J. Meas. Eng. 2020, 8, 153–166. [Google Scholar] [CrossRef]
  29. Olatunde, O.M.; Alexander, W.A.; Feyisayo, D.O.; Theophilus, E.; Babatope, K.L. Design and Construction of Ultraviolet and Incoming Solar Irradiance Sensing Device. Iraqi J. Sci. 2022, 5197–5207. [Google Scholar] [CrossRef]
  30. Mekonnen, Y.; Namuduri, S.; Burton, L.; Sarwat, A.; Bhansali, S. Machine learning techniques in wireless sensor network based precision agriculture. J. Electrochem. Soc. 2019, 167, 037522. [Google Scholar] [CrossRef]
  31. Ayaz, M.; Ammad-Uddin, M.; Sharif, Z.; Mansour, A.; Aggoune, E.H.M. Internet-of-Things (IoT)-based smart agriculture: Toward making the fields talk. IEEE Access 2019, 7, 129551–129583. [Google Scholar] [CrossRef]
  32. Achuthan, K.; Freeman, J.D.; Nedungadi, P.; Mohankumar, U.; Varghese, A.; Vasanthakumari, A.M.; Kolil, V.K. Remote triggered dual-axis solar irradiance measurement system. IEEE Trans. Ind. Appl. 2020, 56, 1742–1751. [Google Scholar] [CrossRef]
  33. Lim, M.T.; Tan, R.H.; Tan, G.A.; Hew, C.H.; Lee, W.K.; Mercha, M. Development of low cost pyranometer IoT based solar irradiance measurement station. In Proceedings of the IOP Conference Series: Earth and Environmental Science, Penang, Malaysia, 7–8 June 2023; IOP Publishing: Bristol, UK, 2023; Volume 1281, p. 012012. [Google Scholar]
  34. Palo-Tejada, E.; Campos-Falcon, V.; Merma, M.; Huanca, E. Low-Cost Data Logging Device to Measure Irradiance Based on a Peltier Cell and Artificial Neural Networks. J. Phys. Conf. Ser. 2020, 1433, 012008. [Google Scholar] [CrossRef]
  35. Nugraha, M.; Adriansyah, A. Development of a Solar Radiation Sensor System with Pyranometer. Int. J. Electr. Comput. Eng. 2022, 12, 1385. [Google Scholar] [CrossRef]
  36. Kosovic, I.; Mastelić, T.; Ivanković, D. Using Artificial Intelligence on Environmental Data from Internet of Things for Estimating Solar Radiation: Comprehensive Analysis. J. Clean. Prod. 2020, 266, 121489. [Google Scholar] [CrossRef]
  37. Ahmad, M.; Noor, S.; Rahman, N.; Haris, F. Lux Meter Integrated with Internet of Things (IoT) and Data Storage (LMX20). In Proceedings of the 2021 IEEE International Conference in Power Engineering Application (ICPEA), Busan, Republic of Korea, 8–9 March 2021; IEEE: Piscataway, NJ, USA, 2021; pp. 138–142. [Google Scholar]
  38. Phutane, R. IoT: Based Weather Monitoring System. Int. J. Res. Appl. Sci. Eng. Technol. 2022, 10. [Google Scholar] [CrossRef]
  39. Sandryadi, A.; Tarigan, H. Development of Solar Radiation Intensity Measurement Tool Using BH1750 Sensor Based on The Internet of Things with Smartphone Display. Pillar Phys. 2022, 15, 149–157. [Google Scholar]
  40. Wahyu, S.; Syafaat, M.; Yuliana, A.; Meliyani, R. Aplikasi Sensor BH1750 Untuk Sistem Monitoring Pertumbuhan Tanaman Cabai Menggunakan Arduino Bertenaga Surya Terintegrasi Internet of Things (IoT). J. XYZ 2021, 9, 71–78. [Google Scholar] [CrossRef]
  41. Dineva, K.; Atanasova, T. Cloud Data-Driven Intelligent Monitoring System for Interactive Smart Farming. Sensors 2022, 22, 6566. [Google Scholar] [CrossRef]
  42. Bu, F.; Wang, X. A Smart Agriculture IoT System Based on Deep Reinforcement Learning. Future Gener. Comput. Syst. 2019, 99, 500–507. [Google Scholar] [CrossRef]
  43. Eichstädt, S.; Gruber, M.; Vedurmudi, A.P.; Seeger, B.; Bruns, T.; Kok, G. Toward Smart Traceability for Digital Sensors and the Industrial Internet of Things. Sensors 2021, 21, 2019. [Google Scholar] [CrossRef]
  44. Hedau, N.; Isasare, P.; Bhosale, P. IoT and Data Analytic in Smart Agriculture. Int. J. Adv. Res. Sci. Commun. Technol. 2023, 3, 140–146. [Google Scholar] [CrossRef]
  45. Akhter, R.; Sofi, S. Precision Agriculture Using IoT Data Analytics and Machine Learning. J. King Saud Univ. Comput. Inf. Sci. 2021, 34, 5602–5618. [Google Scholar] [CrossRef]
  46. Zhang, H.; Huang, C.; Yu, S.; Li, L.; Xin, X.; Liu, Q. A Lookup-Table-Based Approach to Estimating Surface Solar Irradiance from Geostationary and Polar-Orbiting Satellite Data. Remote Sens. 2018, 10, 411. [Google Scholar] [CrossRef]
  47. Yuan, M.; Leirvik, T.; Wild, M. Global Trends in Downward Surface Solar Radiation from Spatial Interpolated Ground Observations during 1961–2019. J. Clim. 2021, 34, 9501–9521. [Google Scholar] [CrossRef]
  48. Thuillier, G.; Zhu, P.; Snow, M.; Zhang, P.; Ye, X. Characteristics of Solar-Irradiance Spectra from Measurements, Modeling, and Theoretical Approach. Light Sci. Appl. 2022, 11, 79. [Google Scholar] [CrossRef] [PubMed]
  49. Oyelami, S.; Azeez, N.A.; Adedigba, S.A.; Akinola, O.J.; Ajayi, R.M. A Pyranometer for Solar Radiation Measurement-Review. Adeleke Univ. J. Eng. Technol. 2020, 3, 61–68. [Google Scholar]
  50. Mohanty, S.; Patra, P.K.; Sahoo, S.S.; Mohanty, A. Forecasting of Solar Energy with Application for a Growing Economy like India: Survey and Implication. Renew. Sustain. Energy Rev. 2017, 78, 539–553. [Google Scholar] [CrossRef]
  51. Davis Instruments. Solar Radiation Sensor—SKU 6450. Available online: https://www.davisinstruments.com/products/solar-radiation-sensor (accessed on 3 October 2024).
  52. Austin, E.; Geisler, A.N.; Nguyen, J.; Kohli, I.; Hamzavi, I.; Lim, H.W.; Jagdeo, J. Visible Light. Part I: Properties and Cutaneous Effects of Visible Light. J. Am. Acad. Dermatol. 2021, 84, 1219–1231. [Google Scholar] [CrossRef]
  53. CIE. “Physiologically-Relevant Luminous Efficiency Functions CIE Data Sets”. Available online: http://www.cvrl.org/lumindex.htm (accessed on 3 October 2024).
  54. Colour & Vision Research Laboratory. 2008 Data. Available online: http://www.cvrl.org/database/data/lum/linCIE2008v2e_5.htm (accessed on 3 October 2024).
  55. NIST. Realization of Related Photometric Units. Available online: https://www.nist.gov/pml/sensor-science/optical-radiation/realization-related-photometric-units (accessed on 3 October 2024).
  56. Rohm. Digital 16bit Serial Output Type Ambient Light Sensor IC BH1750FVI. Available online: https://www.mouser.com/datasheet/2/348/bh1750fvi-e-186247.pdf (accessed on 3 October 2024).
  57. Vishay Semiconductors. Designing the VEML7700 Into an Application; Revision: 06-Mar-2025; Document Number: 84323. Available online: https://www.vishay.com (accessed on 3 October 2024).
  58. Burt, S. The Weather Observer’s Handbook; Cambridge University Press: Cambridge, UK, 2012; p. 270. [Google Scholar]
  59. Oliveira, G.M.; Costa, D.C.; Cavalcanti, R.J.; Oliveira, J.P.; Silva, D.R.; Nogueira, M.B.; Rodrigues, M.C. Comparison between MQTT and WebSocket Protocols for IoT Applications Using ESP8266. In Proceedings of the 2018 Workshop on Metrology for Industry 4.0 and IoT, Brescia, Italy, 16–18 April 2018; IEEE: Piscataway, NJ, USA, 2018; pp. 236–241. [Google Scholar]
  60. Nettikadan, D.; Raj, S. Smart Community Monitoring System Using Thingspeak IoT Platform. Int. J. Appl. Eng. Res. 2018, 13, 13402–13408. [Google Scholar]
  61. Hercog, D.; Lerher, T.; Truntič, M.; Težak, O. Design and Implementation of ESP32-Based IoT Devices. Sensors 2023, 23, 6739. [Google Scholar] [CrossRef]
  62. Zachariah, T.; Klugman, N.; Dutta, P. ThingSpeak in the Wild: Exploring 38K Visualizations of IoT Data. In Proceedings of the 20th ACM Conference on Embedded Networked Sensor Systems, Boston, MA, USA, 6–9 November 2022; ACM: New York, NY, USA, 2022; pp. 1035–1040. [Google Scholar]
  63. Open-Meteo. Open-Meteo Documentation. Available online: https://open-meteo.com/en/docs (accessed on 28 March 2025).
  64. Mata-Romero, M.E.; Simental-Martínez, O.A.; Guerrero-Osuna, H.A.; Luque-Vega, L.F.; Lopez-Neri, E.; Ornelas-Vargas, G.; García-Vázquez, F. A Low-Cost Wearable Device to Estimate Body Temperature Based on Wrist Temperature. Sensors 2024, 24, 1944. [Google Scholar] [CrossRef]
Figure 1. Photopic (red) and scotopic (blue) luminosity functions.
Figure 1. Photopic (red) and scotopic (blue) luminosity functions.
Technologies 13 00182 g001
Figure 2. System architecture for luminosity and solar radiation measurement.
Figure 2. System architecture for luminosity and solar radiation measurement.
Technologies 13 00182 g002
Figure 3. Wiring diagram of BH1750, VEML7700, and 6450 sensor integration with NodeMCU ESP32.
Figure 3. Wiring diagram of BH1750, VEML7700, and 6450 sensor integration with NodeMCU ESP32.
Technologies 13 00182 g003
Figure 4. PCB layout design with the integration of BH1750, VEML7700, 6450 sensors, and NodeMCU ESP32.
Figure 4. PCB layout design with the integration of BH1750, VEML7700, 6450 sensors, and NodeMCU ESP32.
Technologies 13 00182 g004
Figure 5. Ambient light diffuser.
Figure 5. Ambient light diffuser.
Technologies 13 00182 g005
Figure 6. Fabricated PCB for the implementation of the solar monitoring system.
Figure 6. Fabricated PCB for the implementation of the solar monitoring system.
Technologies 13 00182 g006
Figure 7. Sensors mounted on the PCB.
Figure 7. Sensors mounted on the PCB.
Technologies 13 00182 g007
Figure 8. High-level flowchart of the program running in the microcontroller.
Figure 8. High-level flowchart of the program running in the microcontroller.
Technologies 13 00182 g008
Figure 9. High-level diagram of data processing on Azure cloud services.
Figure 9. High-level diagram of data processing on Azure cloud services.
Technologies 13 00182 g009
Figure 10. Diagram of the methodology for deriving the lux-to-watts conversion factor.
Figure 10. Diagram of the methodology for deriving the lux-to-watts conversion factor.
Technologies 13 00182 g010
Figure 11. Map of the experimental site with corresponding solar irradiation data.
Figure 11. Map of the experimental site with corresponding solar irradiation data.
Technologies 13 00182 g011
Figure 12. Time series of BH1750 illuminance measurements over last 10 days.
Figure 12. Time series of BH1750 illuminance measurements over last 10 days.
Technologies 13 00182 g012
Figure 13. Time series of VEML7700 illuminance measurements over last 10 days.
Figure 13. Time series of VEML7700 illuminance measurements over last 10 days.
Technologies 13 00182 g013
Figure 14. Time series of 6450 radiation measurements over 10 days.
Figure 14. Time series of 6450 radiation measurements over 10 days.
Technologies 13 00182 g014
Figure 15. Correlation of solar path and illuminance data: a comparison of solar elevation, azimuth, and measured lux levels.
Figure 15. Correlation of solar path and illuminance data: a comparison of solar elevation, azimuth, and measured lux levels.
Technologies 13 00182 g015
Figure 16. Variable correlation matrix of the results from the sensors.
Figure 16. Variable correlation matrix of the results from the sensors.
Technologies 13 00182 g016
Figure 17. Relationship between solar radiation and light intensity from BH1750 and VEML7700 sensors.
Figure 17. Relationship between solar radiation and light intensity from BH1750 and VEML7700 sensors.
Technologies 13 00182 g017
Figure 18. Linear and polynomial analysis results of the BH1750 and 6450 sensors.
Figure 18. Linear and polynomial analysis results of the BH1750 and 6450 sensors.
Technologies 13 00182 g018
Figure 19. Comparison of solar radiation between the BH1750 and 6450 sensors over a three-day period.
Figure 19. Comparison of solar radiation between the BH1750 and 6450 sensors over a three-day period.
Technologies 13 00182 g019
Figure 20. Results of the second- and third-order polynomial regression analysis.
Figure 20. Results of the second- and third-order polynomial regression analysis.
Technologies 13 00182 g020
Figure 21. Comparison of solar radiation between the VEML7700 and 6450 sensors over a three-day period.
Figure 21. Comparison of solar radiation between the VEML7700 and 6450 sensors over a three-day period.
Technologies 13 00182 g021
Figure 22. Comparison of solar radiation between the results of the 6450 sensor and the radiation estimated by the regression models.
Figure 22. Comparison of solar radiation between the results of the 6450 sensor and the radiation estimated by the regression models.
Technologies 13 00182 g022
Figure 23. Random forest regression plot.
Figure 23. Random forest regression plot.
Technologies 13 00182 g023
Figure 24. Random forest: actual vs. regression.
Figure 24. Random forest: actual vs. regression.
Technologies 13 00182 g024
Figure 25. Random forest regression plot.
Figure 25. Random forest regression plot.
Technologies 13 00182 g025
Figure 26. Random forest regression plot.
Figure 26. Random forest regression plot.
Technologies 13 00182 g026
Figure 27. Distribution of absolute prediction errors for the evaluated regression models: LR, SVR, and RF.
Figure 27. Distribution of absolute prediction errors for the evaluated regression models: LR, SVR, and RF.
Technologies 13 00182 g027
Table 1. Comparative features of BH1750 and VEML7700 light sensors.
Table 1. Comparative features of BH1750 and VEML7700 light sensors.
SensorBH1750VEML7700
ManufacturerRohm SemiconductorVishay Semiconductors
Measurement Range1 lux to 65,535 lux0 to 140,000 lux
Minimum Detectable Light1 lux0.0042 lux
Maximum Detectable Light65,535 lux140,000 lux
Resolution (High/Low)1 lux/4 lux0.0042 lux
ADC16 bit16 bit
Communication InterfaceI2CI2C
Power ConsumptionLow, power-down mode availableUltra-low (0.5 µA shutdown current)
Operating Voltage2.4 V to 3.6 V2.5 V to 3.6 V
Application SuitabilityIndoor/outdoor lighting detection, IoT systemsAmbient light sensing, IoT systems
Special FeaturesLow dependency on light source, adjustable measurement windowTemperature compensation, flicker noise rejection
PriceUSD 3.71USD 1.38
Table 2. Specifications of the Davis Instruments Model 6450 solar radiation sensor.
Table 2. Specifications of the Davis Instruments Model 6450 solar radiation sensor.
FeatureSpecification
Measurement TypeGlobal solar radiation (direct + diffuse)
Measurement Range0 to 1800 W/m2
Resolution1 W/m2
Accuracy ± 5 % of the reading
Spectral Response400 to 1100 nanometers
Update Time50 s to 1 min
Cosine Response< ± 3 % (0° to 70°) ± 10 % (70° to 85°)
Operating Temperature−40 °C to 65 °C
Housing MaterialWeather-resistant PVC
CalibrationAgainst secondary standard, validated with Eppley Precision Spectral Pyranometer
Dimensions2.00″ × 2.75″ × 2.25″ (51 mm × 70 mm × 57 mm)
Weight0.5 lbs (226 g)
Additional FeaturesDiffuser to minimize errors, built-in level indicator
PriceUSD 225
Table 3. Regression model results for the BH1750 sensor data.
Table 3. Regression model results for the BH1750 sensor data.
ModelEquationR2MSEMAERMSE
Linear Regression y = 0.0172 x 9.2273 0.94503355.151136.192357.9237
Polynomial Regression y = 0.0000001452 x 2 + 0.0123 x 3.1112 0.94963074.637432.328955.4494
Table 4. Polynomial regression model results for the VEML7700 sensor data.
Table 4. Polynomial regression model results for the VEML7700 sensor data.
ModelEquationR2MSEMAERMSE
Second-Order Regression y = 6.314 × 10 7 x 2 0.0057 x + 0.6766 0.98331019.638914.688331.9318
Third-Order Regression y = 1.282 × 10 12 x 3 + 1 × 10 5 x 2 0.006684 x + 0.956598 0.98331018.061714.923631.9071
Table 5. Machine learning model evaluation results.
Table 5. Machine learning model evaluation results.
MetricValue
Coefficient of Determination ( R 2 )0.9517
Mean Squared Error (MSE)2899.07
Root Mean Squared Error (RMSE)53.8430
Mean Absolute Error (MAE)37.6716
Intercept95.8841
FeatureCoefficient
Lux BH1750 1.8103 × 10 2
Lux VEML7700 6.3838 × 10 4
Temperature (°C) 6.3488
Relative Humidity (%) 3.0808
Table 6. Performance metrics for the RFR model.
Table 6. Performance metrics for the RFR model.
MetricValue
Coefficient of Determination ( R 2 )0.9922
Mean Squared Error (MSE)383.89.07
Root Mean Squared Error (RMSE)19.59
Mean Absolute Error (MAE)7.91
Table 7. Performance metrics for the suported vector regression model.
Table 7. Performance metrics for the suported vector regression model.
MetricValue
Coefficient of Determination ( R 2 )0.9599
Mean Squared Error (MSE)1976.85
Root Mean Squared Error (RMSE)44.46
Mean Absolute Error (MAE)27.12
Table 8. Comparison of ML approaches for solar radiation forecasting.
Table 8. Comparison of ML approaches for solar radiation forecasting.
AuthorMethodUsed VariablesR2RMSEMAENotes
Peter R. Michael et al. [28]Linear RegressionSolar lightN/AN/AN/ADirect conversion based on a fixed factor ( 1 W / m 2 122 lx )
Villegas-Mier et al. [7]Optimized RFSunshine hours, Temperature, Humidity, Atmospheric pressure0.9570.7833.44N/A
Atiea et al. [22]Hybrid (XGBoost + Extra Trees + GB)Radiation (GHI, DHI, GTI), Temperature, Humidity, Rainfall, Wind direction0.9961.08N/AN/A
Chand et al. [23]Hybrid (RF + LSTM, Model 3)Year, Month, Day, Hour, Temperature, Pressure, Relative humidity, Wind speed, Sky clearness0.9836.1126.22N/A
This workMultiple Linear Regression, RFR, SVRBH1750 light sensor, VEML7700 light sensor, Humidity, Temperature,0.992244.4627.12For BH1750, conversion factor was approximately 1 W / m 2 58.1 lx
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Nava-Pintor, J.A.; Alcalá-Rodríguez, U.E.; Guerrero-Osuna, H.A.; Mata-Romero, M.E.; Lopez-Neri, E.; García-Vázquez, F.; Solís-Sánchez, L.O.; Carrasco-Navarro, R.; Luque-Vega, L.F. Development and Evaluation of Solar Radiation Sensor Using Cost-Effective Light Sensors and Machine Learning Techniques. Technologies 2025, 13, 182. https://doi.org/10.3390/technologies13050182

AMA Style

Nava-Pintor JA, Alcalá-Rodríguez UE, Guerrero-Osuna HA, Mata-Romero ME, Lopez-Neri E, García-Vázquez F, Solís-Sánchez LO, Carrasco-Navarro R, Luque-Vega LF. Development and Evaluation of Solar Radiation Sensor Using Cost-Effective Light Sensors and Machine Learning Techniques. Technologies. 2025; 13(5):182. https://doi.org/10.3390/technologies13050182

Chicago/Turabian Style

Nava-Pintor, Jesús Antonio, Uriel E. Alcalá-Rodríguez, Héctor A. Guerrero-Osuna, Marcela E. Mata-Romero, Emmanuel Lopez-Neri, Fabián García-Vázquez, Luis Octavio Solís-Sánchez, Rocío Carrasco-Navarro, and Luis F. Luque-Vega. 2025. "Development and Evaluation of Solar Radiation Sensor Using Cost-Effective Light Sensors and Machine Learning Techniques" Technologies 13, no. 5: 182. https://doi.org/10.3390/technologies13050182

APA Style

Nava-Pintor, J. A., Alcalá-Rodríguez, U. E., Guerrero-Osuna, H. A., Mata-Romero, M. E., Lopez-Neri, E., García-Vázquez, F., Solís-Sánchez, L. O., Carrasco-Navarro, R., & Luque-Vega, L. F. (2025). Development and Evaluation of Solar Radiation Sensor Using Cost-Effective Light Sensors and Machine Learning Techniques. Technologies, 13(5), 182. https://doi.org/10.3390/technologies13050182

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