Next Article in Journal
Predicting Structural Traits and Chemical Composition of Urochloa decumbens Using Aerial Imagery and Machine Learning
Previous Article in Journal
Optimization of Liquid Manure Injector Designs for Cover Crop Systems Using Discrete Element Modeling and Soil Bin Evaluation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Development of a Portable Spectroradiometer for Assessing the Light Environment in Crop Production

by
Alexey P. Dolgalev
,
Alexander A. Smirnov
*,
Yuri A. Proshkin
,
Pavel V. Tikhonov
,
Dmitry A. Burynin
and
Alexander V. Sokolov
Federal State Budgetary Scientific Institution “Federal Scientific Agroengineering Center VIM” (FSAC VIM), 109428 Moscow, Russia
*
Author to whom correspondence should be addressed.
AgriEngineering 2025, 7(12), 405; https://doi.org/10.3390/agriengineering7120405 (registering DOI)
Submission received: 29 October 2025 / Revised: 21 November 2025 / Accepted: 24 November 2025 / Published: 2 December 2025
(This article belongs to the Special Issue Precision Agriculture: Sensor-Based Systems and IoT-Enabled Machinery)

Abstract

When growing plants in artificial conditions, it is important to control the lighting parameters, both natural and artificial. This study explored the feasibility of creating a low-cost portable spectroradiometer for assessing the light environment in crop production. The multi-channel spectrometer sensors AS7341 and AS7263 and the ESP32 module were selected for this task. An analysis of the problem was conducted, and ways to solve it were identified. Machine learning methods (linear regression and decision trees) were used to determine the light source type, recover the spectrum from sensor readings at individual wavelengths, and estimate the photon flux density. The obtained results were evaluated using the MAE, MRPE, and R2 metrics, resulting in MRPE up to 10% for photon flux higher than 50 µmol m−2 s−1, MAE up to 10 µmol m−2 s−1 for less intensities, R2 of at least 0.96 for almost all cases. It is shown that the developed algorithm achieves acceptable accuracy on various light sources, including those not used during the training process. The research results will be useful in the development of low-cost spectroradiometers for measuring illumination in crop production.

1. Introduction

Measuring the light environment parameters when growing plants in a greenhouse is an important task for predicting crop yields [1], especially when growing plants under artificial irradiation [2]. Until recently, high-pressure sodium arc lamps (HPS) were the main sources of artificial irradiation in greenhouses around the world [3]. Since the spectral composition of HPS radiation is known and does not vary significantly depending on the brand and model of the lamp, inexpensive lux meters were used to measure radiation at the plant level. However, with the introduction of LED technologies in greenhouse vegetable growing, the use of a lux meter introduces significant errors when measuring radiation with different spectral compositions of LED lamps. This is due to the fact that the spectral responsivity of the lux meter correlates with the spectral responsivity of the human eye [4], since the light quantities are constructed on the basis of the experimentally established dependence of the human eye’s visual perception on the radiation wavelength. To measure the parameters of light sources with different spectral compositions, it is necessary to use energy or photon quantities.
Special photometers are produced that measure photon irradiance using sensors with equal-quantum spectral responsivity in the spectral range of 400–700 nm [5]. For example, the popular LI-190R quantum sensor measures photosynthetically active radiation (PAR) in µmol m−2 s−1 over a wavelength range of 400 to 700 nm, which closely matches the light used by most plants [6]. The main disadvantage of these quantum sensors is their inability to measure spectral components, including the photon flux density of red and blue light ranges, which are widely used for plant illumination. A solution to this problem was proposed by Xinyu Zhang et al. [7]; to evaluate the PAR, they used two silicon photodiodes as quantum sensors, after passing the light through two bandpass filters with transmission peaks at 450 and 660 nm, which made it possible to obtain the photon flux density of the red and blue spectral ranges. However, this solution is not well suited for modern supplementary lighting systems, which typically use wider spectral ranges.
Recent studies have shown that the 700–750 nm range, being outside the traditional 400–700 nm range, is also photosynthetically active [8]. Apogee Instruments has released the MQ-610 sensor with responsivity in the 400–750 nm range, corresponding to the extended photosynthetically active ePAR range, including the far-red range [9]. But in addition to assessing the total photon flux density (PFD), it is also important to understand the spectral distribution of the radiation falling on the plant across the main sub-ranges: blue 400–500 nm, green 500–600 nm, red 600–700 nm and far-red 700–800 nm. The use of complex and expensive spectrometers based on CCD (Charge-Coupled Device) matrices with diffraction gratings for these purposes is not always justified, since when growing plants, there is no need to evaluate the spectral composition of optical radiation with high spectral resolution. Another way to reduce the spectrometer cost is to use spectrometer modules developed using microelectromechanical systems (MEMS) technology [10]. For example, Diego Real et al. [11] presented a design of a data acquisition system for field measurements based on the Hamamatsu C12666MA spectrometer module with a measurement range from 340 nm to 780 nm. Jolyon Troscianko used the Hamamatsu C12880MA spectrometer module with a measurement range from 340 nm to 850 nm when creating a spectrometer [12]. The use of highly sensitive linear image sensors based on complementary metal-oxide-semiconductor (CMOS) together with MEMS in these devices [11,12] makes it possible to obtain high accuracy in a wide spectral range. The main disadvantage is the relatively high cost of spectrometric modules, which complicates the widespread implementation of these devices in greenhouse vegetable growing. Therefore, the development of an inexpensive portable device for assessing irradiation parameters in greenhouse vegetable growing is a pressing issue.
There have been previous attempts to develop devices for PAR measurement based on inexpensive multi-channel sensors [13]. A recent paper describes the development of a low-cost portable device for measuring PAR and spectral intensity distribution [14]. However, in these works, the sensor was calibrated only to measure total PAR in the range of 400–700 nm without dividing it into sub-ranges. Moreover, the imperfection of the data processing algorithm leads to measurement error increase on light sources of different spectral composition. Thus, the purpose of this research is to design and validate a low-cost spectroradiometer for measuring PAR and to develop a processing algorithm capable of accurately reconstructing the spectral distribution of unknown light sources.

2. Materials and Methods

2.1. Device Design and General Characteristics

As a basis for a low-cost spectroradiometer, we chose the compact multi-channel spectrometer sensors AS7341 and AS7263 (Table 1) for spectral identification and color matching, manufactured by AMS, a part of the OSRAM group (Austria, Europe). These sensors consist of photodiode arrays with filters. The AS7341 sensor has a spectral response in the wavelength range from approximately 350 nm to 1000 nm (Figure 1). 8 visible light spectral channels with declared responsivity peaks at wavelengths of 415, 445, 480, 515, 555, 590, 630, 680 nm and one near-infrared channel with declared responsivity peak of 900 nm, as well as general brightness and flicker sensors, not used in this algorithm for the reasons given below. Access to control and spectral analysis data is provided via the I2C serial interface. The device is housed in an ultra-slim housing with dimensions 3.1 mm × 2 mm × 1 mm. The AS7263 sensor is a digital 6-channel spectrometer for far-red and near-infrared spectral identification. It consists of six independent optical filters with spectral response determined in the red and near-infrared ranges from approximately 600 nm to 870 nm.
By combining several sensors in a single device, it is possible to cover the entire range of light needed to assess the plant growing environment, from blue to near-infrared radiation. As a controller for processing and transmitting information from photosensors to a mobile device, we used a module based on a low-power microprocessor, the ESP32, from the Chinese company Espressif Systems [17]. This controller has a Tensilica Xtensa LX6 dual-core (or single-core) 32-bit processor, 520 KB of SRAM, wireless connectivity (Wi-Fi and Bluetooth v4.2), and peripheral interfaces. The controller is powered by a standard 5 V supply, allowing the use of inexpensive batteries and a USB charger. Since the ESP32 board does not support simultaneous operation with two sensors and the Wi-Fi module, the sensors operate in multiplexer mode: they are turned on alternately and each one takes measurements. The integration time for both sensors was set to 100 ms.
We placed the sensors, controller, and battery in a small 3D-printed plastic housing (Figure 2). A hemisphere of opal plastic was installed in front of the sensors; this, combined with the geometry of the housing, provides the required cosine correction. The cosine corrector is designed so that no flux can reach the sensor at an angle of incidence of 90° or more [18].
The following light sources were used to test the algorithm performance: LED lamps with various combinations of white, blue, green, red, and far-red SMD 2835 LEDs manufactured by Shenzhen Refond Optoelectronics Co., Ltd. (Shenzhen, China); sunlight in clear and cloudy weather; 400 W SYLVANIA Grolux HPS lamps (Feilo Sylvania Europe Limited, Newhaven, UK)
To calibrate the photosensors, a series of sequential measurements of light signals with a bandwidth of up to 30 nm and a peak emission wavelength from 400 to 900 nm were carried out. The light signal was generated by a halogen lamp with the spectrum close to the spectrum of a black body at a temperature of 3050 K; the band signal was extracted from the spectrum of the halogen lamp using a MUM-01 monochromator (Azov Optical and Mechanical Plant, Azov, Rostov region, Russian Federation), in which it was fixedly mounted. Measurement data were recorded using the instrument under study and a PG200N spectrometer (UPRTek Corp., Miaoli County, Taiwan) with an operating range of 350 to 800 nm as a reference instrument, both attached to eyepieces of the monochromator. Reference measurements of photon flux density, irradiance, and spectral composition of the irradiance were also performed using the PG200N. The accuracy of the PG200N spectrometer is ±5%, with the repeatability of 0.2% (data provided by the manufacturer). To ensure repeatability of the result, each measurement with the PG200N spectrometer was carried out as the arithmetic mean of three consecutive measurements.

2.2. Analysis of the Problem and Ways to Solve It

To develop the algorithm for spectral signal processing, it is necessary to solve the problem of unknown light source spectrum recovery over the entire responsivity range of the device based on the readings of the photosensors. This is an inverse problem where spectral reconstruction from multi-channel data is underdetermined, so, in general, it does not have a unique solution: as can be seen from the responsivity graphs in Figure 1, some wavelengths are in the range between the responsivity peaks of the photosensors, so if the peak radiation intensity occurs at such wavelengths, the sensor readings will be significantly underestimated but indistinguishable from the readings for radiation lacking this peak but with the same intensity in other parts of the spectrum. Therefore, in addition to attempts to recover the spectrum, leading to ambiguous results, it is necessary to develop an algorithm that can calculate the photon flux density in the blue, green, red and far-red ranges based on the readings of the corresponding photosensors. A possible solution algorithm and its accuracy are analyzed below.
It should be noted that a number of radiation spectra have features that can lead to significant distortion of the instrument readings and make the spectrum recovery difficult. These spectra are the ones that have a wide intensity band in the invisible (near and short-wave infrared) range: the spectrum of the Sun in clear and cloudy weather, the spectrum of an incandescent lamp, and so on. The broad intensity band in the infrared range, which exceeds the intensity in the visible part of the spectrum, is because these spectra are the radiation spectra of heated bodies, and according to Planck’s law, their radiation includes the blackbody spectrum. The presence of a wide range in the near and short-wave infrared parts of these spectra with an intensity much higher than the intensity in the visible parts of the spectrum (especially in blue) leads to the fact that, although the responsivity of sensors with peaks in the visible (especially blue and green) ranges is very low at each wavelength in the infrared range, this is compensated by the larger range size and much higher radiation intensity (for example, for an incandescent lamp, the intensity at wavelengths of 400 and 1100 nm can differ by two orders of magnitude). Thus, the intensive infrared part of the spectrum can introduce noise into the sensor readings, significantly overestimating them.
Theoretically, this problem can be solved by calibrating sensors not only in the visible but also in the infrared range. In practice, this is extremely difficult not only because of the need to use special measuring equipment and monochromators to work with this spectral range, but also because, due to extremely low responsivity of the sensors in this range, the matrix of the system of linear equations will be ill-conditioned, and the measurements will have an unacceptable signal-to-noise ratio, so this calibration will be very imprecise.
In practice, there are two light sources with such properties in plant growing: sunlight and sodium lamp light. For the Sun, the source of radiation is its photosphere with a temperature of 5800 K, but the sunlight spectrum of the visible on the ground sunlight differs significantly from the spectrum of the photosphere of the Sun due to absorption of sunlight by the Earth’s atmosphere, clouds, and so on. The emission spectrum of a sodium lamp consists of intensity peaks of sodium and other elements used in the gas in the lamp tube (most often mercury), but since the operation of a sodium lamp requires heating the vapor to temperature of 1800 K [19], then the spectrum of a black body of the corresponding temperature is added to intensity peaks of sodium and mercury. Therefore, before proceeding to calculate PFD values from the readings of photosensors, it is necessary to develop an algorithm that reliably identifies the above-mentioned anomalous light sources with strong infrared radiation based on the readings of the device, and for each type of light source, a separate PFD calculation should be made, taking into account the characteristics of this light source.
To improve measurement accuracy, it is also necessary to know the correct responsivity values for each sensor at different wavelengths. The manufacturer does not provide responsivity tables for the sensors, limiting itself to the graphs shown in Figure 1. The simplest solution is to create a responsivity table based on these graphs, but the disadvantage of this approach is the low accuracy of the data obtained, and, in addition, the above graphs do not allow the sensor readings to be converted into mW m−2, which will require additional calibration. Moreover, during numerous preliminary measurements, discrepancies were found between the actual readings of the photosensors and the readings that could be expected given the responsivity declared by the manufacturer. This raises doubts about the accuracy of the responsivity data provided by manufacturer and stated peak responsivity values. The solution is to calibrate the sensors using specialized equipment.
Thus, to solve the problem, it is necessary to perform the following steps.
  • Calibrate the responsivity of the photosensors.
  • Conduct a series of measurements of various light sources, namely LED lamps of various types used in plant growing, sodium lamps and sunlight in clear and cloudy weather.
  • Based on the data obtained during measurements and using machine learning or other methods, develop an effective algorithm that allows the type of light source (LED lamp, sodium lamp, or sunlight) to be determined based on the readings of the device.
  • For each light source, using machine learning methods, derive formulae that allow the PFD to be calculated based on the instrument readings in the blue, green, red, and far-red ranges.

2.3. Calibration of the Photosensors’ Responsivity

Since the PG200N reference spectrometer has a measurement range from 350 to 800 nm, the near-infrared values were calculated using Planck’s formula for a given blackbody temperature and/or using reference data on the solar spectrum [20], the emission spectrum of the elements [21]. Figure 3 and Figure 4 show an example of the spectrum at the output of the monochromator and a typical graph of the light generated by the monochromator.
The readings of each sensor are directly proportional to the integral of the light intensity multiplied by the responsivity of the sensor:
E m e a s = I λ s λ d λ ,
where E m e a s are the sensor readings, I ( λ ) is the intensity at the wavelength λ (measured by reference device, in mW m−2), s λ is the sensor responsivity at the wavelength λ .
For practical calculations, we should choose a step Δ λ and replace the integral with a sum:
E m e a s = i I λ i s i ,
where λ i is the i th wavelength, s i is the sensor responsivity at the wavelength λ i .
Since E m e a s is known to us from the readings of the sensor under study, and I ( λ ) is known from the readings of the reference spectrometer, (2) is a system of linear equations with s i as its variables.
The choice of the measurement step is determined by several considerations. On the one hand, the measurement step should not be too big so that the sensor responsivity is approximately the same over the range corresponding to the step width, i.e., s λ s i if λ λ i Δ λ . On the other hand, the step should not be too small: firstly, when working with the MUM-01 monochromator, the peak value error could be 1–2 nm, and secondly, measuring light signals that are too close to each other will lead to the matrix of the system of Equation (2) being ill-conditioned, and the solutions will be significantly distorted due to minor measurement errors. Based on these considerations, the measurement step Δ λ = 10 nm was chosen.
As can be seen from the graph in Figure 4, the light signal generated by the monochromator has negligible intensity already at a distance of 2 Δ λ from the peak. Thus, the system of Equation (2) effectively becomes tridiagonal: for each wavelength λ i the signals with peaks λ i 1 , λ i , λ i + 1 and only these have nonzero intensity at that wavelength.
It should be noted that for λ i > 800 nm, it was not possible to measure I λ i directly since these wavelengths lie outside the working range of the PG200N spectrometer. However, due to the fact that the spectrum of the incandescent tungsten filament is very close to the blackbody spectrum (which was confirmed by measurements with a spectrometer), the peak intensity values at these wavelengths were recovered using the value at the wavelength of 800 nm (3) according to Planck’s Formula (4):
I λ = I 800 · B λ B 800 ,
B λ = 2 h c 2 λ 5 · 1 e h c λ k T 1 ,
where B λ is the radiation intensity of a black body of temperature T at wavelength λ , c is the speed of light, h is the Planck’s constant, k is the Boltzmann constant. The spectrum around the peak value at all wavelengths has a form corresponding to the graph in Figure 4.
The solution of the system of linear Equation (2) gave values of the responsivity of the sensors in the range from 400 to 890 nm, example in Figure 5.
Due to the partial overlap of the spectral channels generated by the monochromator and the presence of noise and measurement errors, the calculated responsivity plot (Figure 5, blue curve) is distorted. Therefore, smoothed plots (orange and green curves for simple and double smoothing) were used, as they are more similar to those specified by the manufacturer; in addition, smoothing reduces the negative impact of individual measurement errors and noise.
Although the actual responsivity of the sensors was close to that declared by the manufacturer, there were also significant differences (Table 2). For example, for most sensors, the peak of the actual responsivity was shifted to the right relative to the declared value. This explained the underestimation of LED emission readings with intensity peaks corresponding to the responsivity peaks stated by the manufacturer. Furthermore, responsivity values calculated using this algorithm allow immediate measurement of intensity in mW m−2.
It should be noted that these measurements do not allow us to clarify the responsivity of the spectral channel with the declared peak at 910 nm. Calibration for this channel was considered inappropriate due to its very wide responsivity band, which, as will be shown below, makes the matrix of the system of linear equations ill-conditioned and the results of the work not only non-specific to a particular wavelength but also significantly distorted by measurement errors when recovering the spectrum.

2.4. Spectrum Recovery According to the Instrument Readings

With each measurement, both devices provide numerical readings, and the goal is to recover the spectrum as accurately as possible from these readings. Since the original light spectrum can be anything, certain assumptions should be made when recovering it from a limited number of parameters. Thus, for the sensors used, the spectrum of two LEDs will be fundamentally indistinguishable if one of them has a narrow peak, for example, at the wavelength of 690 nm, and the other has a wider but lower peak at the same wavelength.
Thus, the main task is to recover the function I λ from the set of readings E m e a s from 14 spectral channels. Due to the above-mentioned ambiguity of the solution, it was replaced by a simpler one: it is only necessary to recover the values of radiation intensity for the wavelengths corresponding to the responsivity peaks of individual spectral channels, and in the ranges between them the spectrum of light radiation is considered linear; moreover, outside the responsivity areas of all channels, the radiation intensity can be considered zero in most cases, since it does not affect the readings of any of the sensors. So, the recovered radiation spectrum will have a similar appearance:
The algorithm is as follows. Formula (2) is a linear relationship between the intensity perceived by each spectral channel and the intensities of the original light flux at different wavelengths. Considering the original spectrum to be piecewise linear, as in Figure 6, we find that the entire spectrum is determined by its intensities at wavelengths corresponding to the responsivity peaks of the spectral channels, i.e., the number of variables coincides with the number of sensors, which means that we are solving a system of linear equations with the same number of equations and variables. Its solution will be the desired spectrum.
When forming a system of linear equations, it should be taken into account that the responsivity range of each spectral channel significantly overlaps the responsivity ranges of two adjacent channels, i.e., for example, the light intensity at a wavelength of 620 nm makes a significant contribution to the readings of channels with peaks at 600 nm and 640 nm; however, spectral channels with more distant peaks already have almost non-overlapping responsivity ranges, which was also verified in another study using a monochromator [22]. It follows that for each wavelength, we only need to consider the effect of light intensity at that wavelength on the two sensors closest to it, which greatly simplifies the calculations.
Consider N sensors with responsivity peaks at wavelengths of λ 1 ,   λ 2 ,   ,   λ N . Let the intensity of the luminous flux at these wavelengths be I 1 ,   I 2 ,   ,   I N , i.e., I i =   I ( λ i ) . For each i th sensor, the luminous flux E m e a s intensity actually measured by it is denoted as E i . Let also λ 0 be the minimum wavelength at which at least one of the sensors has non-zero responsivity, and λ N + 1 be the maximum wavelength at which at least one of the sensors has non-zero responsivity. Then, as was mentioned above, we assume I 0 = I N + 1 = 0 . Let us rewrite Formula (2) for our case:
E i = λ I λ s i λ ,
where λ can vary from λ 0 to λ N + 1 .
Let us express I λ through I 1 ,   I 2 ,   ,   I N . To do this, let us remember that our spectrum is piecewise linear. If λ i < λ λ i + 1 , then, obviously, I λ = I i λ i + 1 λ + I i + 1 λ λ i λ i + 1 λ i . Then, since, as noted earlier, the readings of the i th sensor are actually affected only by wavelengths between λ i 1 and λ i + 1 , we can write:
E i = λ i 1 λ λ i + 1 I λ s i λ = λ i 1 λ < λ i I λ s i λ + λ i λ λ i + 1 I λ s i λ
E i = λ i 1 λ < λ i I i 1 λ i λ + I i λ λ i 1 λ i λ i 1 s i λ + λ i λ λ i + 1 I i λ i + 1 λ + I i + 1 λ λ i λ i + 1 λ i s i λ
If we add similar terms, we obtain a system of linear equations
E i = a i , i 1 I i 1 + a i i I i + a i , i + 1 I i + 1
This is a system of equations with a tridiagonal matrix, and it can be solved, for example, by the Thomas algorithm. We will write the solution to the system as
I i = j = 1 N b i j E j ,
where the matrix composed of the coefficients b i j will be the inverse of the matrix of the system of Equation (8).
Before applying this algorithm in practice, one very important point should be noted. The closer λ i and λ i + 1 are to each other and the more the responsivity plots overlap (as in Figure 1 and Figure 2), the closer to each other will be the values of s i λ and s i + 1 λ and, consequently, the closer to each other will be the coefficients in this system of linear equations. This will result in the matrix of the system of Equation (8) being ill-conditioned and even small errors in measurements or in responsivity values leading to very significant changes in the results. The solution in this case is to exclude from the algorithm those sensors whose responsivity ranges overlap most strongly with the responsivity ranges of neighboring sensors. Thus, the responsivity range of the AS7263 sensor with a peak at 620 nm significantly overlaps the responsivity ranges of the AS7341 sensors with peaks at 600 nm and 640 nm. Therefore, it seems appropriate to ignore the readings of the sensor with a peak at 620 nm and instead interpolate the spectrum at this wavelength using adjacent wavelengths. Next, both devices under study have a sensor with a peak at 690 nm; however, the responsivity range of both sensors overlaps significantly with neighboring sensors, and these sensors were also excluded from the work. There is also significant overlap between the AS7263 sensor with a peak at 870 nm and the AS7341 sensor with a peak at 910 nm; since the 910 nm sensor has a very wide responsivity range that overlaps with the responsivity ranges of the other sensors, the information obtained from it was considered less valuable, so its readings were not used in further calculations. Finally, obviously, the AS7341 total brightness and flicker channels completely overlap with all spectral channels, and their readings should also be ignored. Thus, for further calculations, it is best to select spectral channels with responsivity peaks at wavelengths of 420, 450, 490, 530, 570, 600, 640, 740, 770, 820, 870 nm—a total of 11 sensors.

2.5. Procedure for PFD Calculation Based on Instrument Readings

As stated earlier, the main light sources in plant growing are LED lamps, sodium lamps and sunlight, and each light source type (except LEDs) has its own broadband infrared spectrum that distorts the measurement results, which means that the measurement results will be distorted in different ways and will require adjustments. Therefore, it is necessary to perform a series of measurements of various light sources; after that, a classification algorithm based on the obtained data should be developed. A standard method for solving such problems with small datasets (about 50–100 samples), which are presumably easily separable based on the intensity in certain spectral regions, is to train shallow decision trees. The data were preprocessed prior to training.
Horticultural LED lamps do not have a strong infrared spectrum band; therefore, it can be expected that the readings from the most responsive sensor in this range (with a peak responsivity of 910 nm), when normalized to the total intensity, will be significantly lower for them than for sunlight or sodium lamps.
Unlike the relatively uniform solar spectrum (Figure 7), the sodium lamp has a spectrum (Figure 8) with very powerful peaks in the yellow-orange range (550–650 nm), a dip in the far-red range of the spectrum (700–800 nm), and a wide band in the infrared range; therefore, it can be expected that the ratio of readings from photosensors with responsivity peaks in the infrared range to readings from photosensors with responsivity peaks in the far-red range will be higher for it than for the solar spectrum.
It also seems appropriate to differentiate sunlight in clear and cloudy weather, since diffuse sunlight, in particular, reduces the proportion of the blue spectrum. It can be expected that brightness sensor readings could be used for this purpose.
The algorithm for determining the light source type will have the form of a decision tree (Figure 9).
For each type of light source, a series of measurements are performed using the device under study and a reference spectrometer. All PFD-B (PFD in the blue range) values are selected from the spectrometer readings, and the readings of sensors with peak responsivity in the blue range are selected from the device under study.
For LED lamps lacking a powerful bandpass spectrum, the readings from other sensors make a significantly smaller contribution and can be excluded from the calculation to reduce the dimensionality of the feature space and avoid overfitting. On the contrary, for a sodium lamp and sunlight, due to the distortions introduced by the wide-band (especially infrared) part of the spectrum, the readings of all sensors are valuable.
The resulting data set is used to train a linear regression with zero intercept (the latter is necessary to avoid overfitting by intensity readings, namely, the trained intercept will actually correlate with the average integrated light intensity in the data set, which will lead to significant errors when trying to measure a light source of a different intensity).
Similar regressions are trained for the green (PFD-G), red (PFD-R), and far-red (PFD-FR) ranges, with sensor readings with responsivity peaks in these ranges selected as features. Now, PFD values are calculated using these regressions. If the result is negative, the PFD value is set to zero. The total PPFD value is calculated as the sum of the PFD values for the blue, green, and red bands.

3. Results

The actual responsivity of the photosensors was calculated as described in Section 2.3. Next, measurements of the spectra of the light sources specified in Section 2.2 were made using both the device under study and the reference spectrometer. To determine the light source type, a decision tree has been trained as described in Section 2.5 (Figure 9). Photosensors were selected to distinguish between the solar and sodium lamp spectra; these sensors have peak responsivity at 740 and 820 nm (Figure 10). Threshold values were also calculated.
To recover the spectrum, Formula (7) was calculated, and after that, the system of linear Equation (8) was formed and solved. The resulting Formula (9) were used to calculate the recovered spectrum. Examples of the algorithm’s working results for various light sources are provided below (Figure 11, Figure 12 and Figure 13).
As noted in Section 2.2, for sunlight, a significant range of infrared radiation, not taken into account by the algorithm, leads to overestimation of instrument readings and, consequently, to distortion of the results of the algorithm. For example, when measuring the spectrum of an incandescent lamp, the readings of sensors with a peak responsivity in the blue region are overestimated several times compared to the readings when measuring the spectrum of LEDs, which have a higher intensity in the blue region. At the same time, for LED lamps, the spectrum is being recovered in an acceptable manner; however, if there are peaks between the responsivity peaks of the photodiodes, their intensity is significantly underestimated.
Next, a series of measurements of light sources of different types were carried out; for each type, a linear regression from Section 2.5 was trained. After that, control measurements were made using the device under study and the reference spectrometer, including light sources that were not used in training the regressions and decision trees (other LED lamps, sodium lamps, sunlight light at different intensities, under different cloud cover, and at different viewing angles). A total of 77 measurements constituted the test sample.
Since precise spectrum recovery is impossible, the algorithm quality metrics were the PFD calculation error and the decision tree accuracy. For all measurements, the decision tree correctly identified the light source type. The PFD calculation accuracy is presented in Table 3.
As can be seen, the average error in calculating the PFD for LED lamps is higher than for sodium lamps and sunlight. This is because sodium lamps have similar spectra, as does sunlight, and the regression, once trained on the training set, produces consistently good results. At the same time, LED lamps have a diverse spectrum; some lamps have peaks in the red and far-red ranges that lie outside the high-responsivity region, while others do not; in addition, a significant portion of the data in the red and far-red ranges had low intensity and, as a result, was noisy. However, it should be noted that the accuracy of the algorithm is quite high; the error in calculating the PFD in most cases does not exceed 10 µmol m−2 s−1, and for a sufficiently high radiation intensity does not exceed 10%. The high coefficient of determination shows that the algorithm correlates well with the PFD variance; the lower value for the sodium lamp spectrum in the blue region is due to the fact that the sodium lamp has a very low radiation intensity in this part of the spectrum and at the same time there is significant noise in the signal from the infrared part of the spectrum, due to which the signal-to-noise ratio is low and it is difficult to accurately recover the intensity in the blue part of the spectrum; considering that it is low and of little interest, and the accuracy of its recovery is acceptable, the performance of the algorithm can be considered satisfactory.

4. Discussion

In this study, we developed an algorithm that allows for high-precision recovery of continuous spectra from readings from two low-cost matrix photodetectors, the AS7341 and AS7263. This solution can be applied to a variety of applications, such as determining color temperature or illuminance assessment.
Attempts to use the readings of such devices have been made previously. For example, an attempt was made to recover the infrared part of the spectrum from a visible color image [24]; this problem was solved, but during its solution, image classification was used: with the help of machine learning methods, an image was assigned to one of the categories for which a clear relationship between the visible and infrared parts of the spectrum has been derived. Data from the AS7341 sensor was used to estimate the PAR [13]; however, the spectrum was not recovered, but only the photosynthetic photon flux density was calculated instead. Using a network of such sensors, the leaf surface area was assessed; for this purpose, the illumination in the areas above and below the leaves was assessed [25], and the sensor readings were used to obtain an illumination indicator—a task similar to that performed by a lux meter or quantum sensor.
The task of spectrum recovery using sensor readings on multiple channels is challenging, as the spectra of light sources can vary widely, including within the same responsivity ranges. However, estimating the intensity at specific ranges and constructing a piecewise linear approximation of the spectrum is possible. In a number of works, the piecewise linear spectrum obtained from the instrument readings is used for further work; for example, AS7341 readings are used to estimate the chlorophyll content in leaves [26]. However, in such studies, a spectrum of a pre-known shape is investigated, which guarantees a high correlation of the calculated vegetation index (most often representing the ratio of intensity at different wavelengths) with the measurement results, and also eliminates the need to calculate intensity in mW m−2.
The developed algorithm, unlike previous studies, allows not only to estimate the PFD across four spectral ranges (blue, green, red and far red) for a therefore uncertain light source with high accuracy instead of calculating the overall PPFD, but also, in many cases, to reconstruct the emission spectrum of the light source with acceptable accuracy.
The algorithm discussed in this article can be improved in further research. For example, it could classify different types of LED luminaires; calculating the photon flux density for each individual luminaire type could be more accurate. In addition, more precise handling of sunlight (for example, training the algorithm on a larger volume of data under different illumination at different times of day and determining the final result as a combination of illumination at different times of day in accordance with the readings of the brightness sensor) or working with a large number of sodium lamps of various characteristics is possible.

5. Conclusions

This paper presents the concept of a low-cost portable spectrophotometer based on the AS7341 and AS7263 spectral sensors. For the first time, the problem of recovering the spectrum of a previously unknown light source was addressed. An algorithm identifying the light source type and calculating not only specific ratios and/or overall irradiance levels but also the light intensity at each responsivity range was developed. For the light sources under study (sunlight, LED and HPS lamps), the measurement error did not exceed 10%. A limitation of the research is that the algorithm was developed to assess the light environment in crop production, and when measuring light sources other than those used in crop production, the error may be higher.
The developed device can be used as a low-cost alternative to spectrometers and lux meters for measuring illumination in plant growing. The advantage of this device over previously developed inexpensive quantum sensors is the ability to measure photon flux density across four spectral ranges for more precise control over the distribution of light used by plants for growth. This will help create more balanced lighting that suits the plant’s needs. In further research, the algorithm discussed in this article can be improved for classifying different types of LED luminaires, different sunlight intensities and/or cloudiness, and other lamps, which will increase the accuracy of calculating the photon flux density of light sources other than those used in horticulture.

Author Contributions

Conceptualization, A.A.S.; formal analysis, A.A.S. and A.P.D.; investigation, A.A.S., A.P.D. and D.A.B.; methodology, A.A.S., A.P.D. and Y.A.P.; project administration, A.A.S. and A.V.S.; resources, A.A.S., D.A.B. and P.V.T.; software, A.P.D.; validation, A.A.S., A.P.D. and Y.A.P.; writing—original draft preparation, A.A.S. and Y.A.P.; writing—review and editing, A.A.S., A.P.D. and Y.A.P.; funding acquisition, A.V.S. All authors have read and agreed to the published version of the manuscript.

Funding

The research was carried out at the expense of the state task of the Ministry of Science and Higher Education of the Russian Federation (FGUN-2025-0008).

Data Availability Statement

Dataset available on request from the authors.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Chen, S.; Liu, A.; Tang, F.; Hou, P.; Lu, Y.; Yuan, P. A Review of Environmental Control Strategies and Models for Modern Agricultural Greenhouses. Sensors 2025, 25, 1388. [Google Scholar] [CrossRef] [PubMed]
  2. Ouzounis, T.; Rosenqvist, E.; Ottosen, C. Spectral Effects of Artificial Light on Plant Physiology and Secondary Metabolism: A Review. HortScience 2015, 50, 1128–1135. [Google Scholar] [CrossRef]
  3. Nelson, J.A.; Bugbee, B. Economic analysis of greenhouse lighting: Light emitting diodes vs. high intensity discharge fixtures. PLoS ONE 2014, 9, e99010. [Google Scholar] [CrossRef] [PubMed]
  4. Tabaka, P.; Wtorkiewicz, J. Analysis of the Spectral Sensitivity of Luxmeters and Light Sensors of Smartphones in Terms of Their Influence on the Results of Illuminance Measurements—Example Cases. Energies 2022, 15, 5847. [Google Scholar] [CrossRef]
  5. Mõttus, M.; Sulev, M.; Frederic, B.; Lopez-Lozano, R.; Noorma, A. Photosynthetically Active Radiation: Measurement and Modeling. In Encyclopedia of Sustainability Science and Technology; Meyers, R., Ed.; Springer: New York, NY, USA, 2011; pp. 7970–8000. [Google Scholar] [CrossRef]
  6. LI-COR. LI-190R Quantum Sensor. Available online: https://www.licor.com/products/light/quantum (accessed on 22 October 2025).
  7. Zhang, X.; Zhang, F.; Li, M.; Zhang, Z.; Liu, W. Design and Applications of Multichannel Photosynthetic Photon Flux Density Sensor for Artificial Lighting. Opt. Eng. 2019, 58, 027105. [Google Scholar] [CrossRef]
  8. Zhen, S.; van Iersel, M.; Bugbee, B. Why far-red photons should be included in the definition of photosynthetic photons and the measurement of horticultural fixture efficacy. Front. Plant Sci. 2021, 12, 693445. [Google Scholar] [CrossRef] [PubMed]
  9. Apogee Instruments. MQ-610: 400–750 nm ePAR Meter. Available online: https://www.apogeeinstruments.com/mq-610-400-750-nm-epar-meter/#product-tab-description (accessed on 22 October 2025).
  10. Zhou, G.; Qi, Y.; Lim, Z.H.; Zhou, G. Single-Pixel MEMS Spectrometer Based on Compressive Sensing. IEEE Photonics Technol. Lett. 2020, 32, 287–290. [Google Scholar] [CrossRef]
  11. Real, D.; Ballester, J.; Calvo, D.; Manzaneda, M.; Moreno, A.; Albiol, F.; Alonso, L. Readout System for Multipurpose Real-Time and Portable Spectrometer. Electronics 2025, 14, 506. [Google Scholar] [CrossRef]
  12. Troscianko, J. OSpRad: An open-source, low-cost, high-sensitivity spectroradiometer. J. Exp. Biol. 2023, 226, jeb245416. [Google Scholar] [CrossRef] [PubMed]
  13. Bäumker, E.; Zimmermann, D.; Schierle, S.; Woias, P. A Novel Approach to Obtain PAR with a Multi-Channel Spectral Microsensor, Suitable for Sensor Node Integration. Sensors 2021, 21, 3390. [Google Scholar] [CrossRef] [PubMed]
  14. Rahman, M.M.; Jamil, U.; Pearce, J.M. Open-Source Photosynthetically Active Radiation Sensor for Enhanced Agricultural and Agrivoltaics Monitoring. Electronics 2025, 14, 2225. [Google Scholar] [CrossRef]
  15. AMS OSRAM. AS7341: 11-Channel Multi-Spectral Digital Sensor Datasheet. Available online: https://look.ams-osram.com/m/24266a3e584de4db/original/AS7341-DS000504.pdf (accessed on 22 October 2025).
  16. AMS OSRAM. AS7263: 6-Channel NIR Multi-Spectral Digital Sensor Datasheet. Available online: https://look.ams-osram.com/m/2f885f8e1b074032/original/AS7263-DS000476.pdf (accessed on 22 October 2025).
  17. Espressif Systems. ESP32: A Feature-Rich MCU with Integrated Wi-Fi and Bluetooth Connectivity for a Wide-Range of Applications. Available online: https://www.espressif.com/en/products/socs/esp32 (accessed on 22 October 2025).
  18. Meyers, R.A. Radiometry and Photometry. In Encyclopedia of Physical Science and Technology, 3rd ed.; McCluney, R., Ed.; Academic Press: Cambridge, MA, USA, 2003; pp. 731–758. ISBN 9780122274107. [Google Scholar] [CrossRef]
  19. He, M.; Bruening, R.J. Optical Radiation Measurements: High Pressure Sodium Discharg Lamp Characterization for Use as Standards of Geometrically Total Luminous Flux; US Department of Commerce, National Bureau of Standards: Washington, DC, USA, 1989. [Google Scholar] [CrossRef]
  20. ISO 9845-1:2022; Solar Energy—Reference Solar Spectral Irradiance at the Ground at Different Receiving Conditions—Part 1: Direct Normal and Hemispherical Solar Irradiance for Air Mass 1.5. ISO: Geneva, Switzerland, 2022.
  21. Kurucz, R.; Bell, B. Atomic Line Data. In Atomic Line Data (R.L. Kurucz B. Bell) Kurucz CD-ROM No. 23; Smithsonian Astrophysical Observatory: Cambridge, MA, USA, 1995; Volume 23. [Google Scholar]
  22. Botero-Valencia, J.S.; Mejia-Herrera, M. Modular System for UV–Vis-NIR Radiation Measurement with Wireless Communication. HardwareX 2021, 10, e00236. [Google Scholar] [CrossRef] [PubMed]
  23. Dolara, A.; Faranda, R.; Guzzetti, S.; Leva, S. Power Quality in Public Lighting Systems. In Proceedings of the 14th International Conference on Harmonics and Quality of Power (ICHQP 2010), Bergamo, Italy, 26–29 September 2010. [Google Scholar] [CrossRef]
  24. Gkillas, A.; Kosmopoulos, D.; Berberidis, K. Cost-efficient coupled learning methods for recovering near-infrared information from RGB signals: Application in precision agriculture. Comput. Electron. Agric. 2023, 209, 107833. [Google Scholar] [CrossRef]
  25. Comella, L.M.; Bregler, F.; Hager, E.; Anys, M.; Klueppel, J.; Rupitsch, S.J.; Werner, C.; Woias, P. Estimation of Leaf Area Index with a Multi-Channel Spectral Micro-Sensor for Wireless Sensing Networks. Sensors 2022, 22, 5048. [Google Scholar] [CrossRef] [PubMed]
  26. Li, L.; Guo, J.; Wang, Q.; Wang, J.; Liu, Y.; Shi, Y. Design and Experiment of a Portable Near-Infrared Spectroscopy Device for Convenient Prediction of Leaf Chlorophyll Content. Sensors 2023, 23, 8585. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Sensor array diagrams and their spectral responsivity according to AS7341 and AS7263 datasheets (provided by manufacturer [15,16]).
Figure 1. Sensor array diagrams and their spectral responsivity according to AS7341 and AS7263 datasheets (provided by manufacturer [15,16]).
Agriengineering 07 00405 g001
Figure 2. Model of the housing and block diagram of the low-cost spectrometer being developed.
Figure 2. Model of the housing and block diagram of the low-cost spectrometer being developed.
Agriengineering 07 00405 g002
Figure 3. An example of the spectrum at the output of the monochromator.
Figure 3. An example of the spectrum at the output of the monochromator.
Agriengineering 07 00405 g003
Figure 4. A typical graph of the output of the monochromator. The signal bandwidth is 30 nm. The graph is normalized to a peak intensity of 1 mW m−2.
Figure 4. A typical graph of the output of the monochromator. The signal bandwidth is 30 nm. The graph is normalized to a peak intensity of 1 mW m−2.
Agriengineering 07 00405 g004
Figure 5. Responsivity of the sensor with declared responsivity peak at the wavelength of 415 nm.
Figure 5. Responsivity of the sensor with declared responsivity peak at the wavelength of 415 nm.
Agriengineering 07 00405 g005
Figure 6. An example of the recovered spectrum of a white LED according to AS7341 and AS7263 readings.
Figure 6. An example of the recovered spectrum of a white LED according to AS7341 and AS7263 readings.
Agriengineering 07 00405 g006
Figure 7. Solar spectrum [20].
Figure 7. Solar spectrum [20].
Agriengineering 07 00405 g007
Figure 8. HPS lamp spectrum [23].
Figure 8. HPS lamp spectrum [23].
Agriengineering 07 00405 g008
Figure 9. The flowchart of the algorithm for determining the light source type. E ( 910 ) is the reading of the sensor with a peak responsivity of 910 nm, E ( λ 1 ) is the reading of the sensor with a peak responsivity in the infrared range, E ( λ 2 ) is the reading of the sensor with a peak responsivity in the far-red range ( λ 1 , λ 2 will be selected during decision tree training), C L R is the reading of the brightness sensor.
Figure 9. The flowchart of the algorithm for determining the light source type. E ( 910 ) is the reading of the sensor with a peak responsivity of 910 nm, E ( λ 1 ) is the reading of the sensor with a peak responsivity in the infrared range, E ( λ 2 ) is the reading of the sensor with a peak responsivity in the far-red range ( λ 1 , λ 2 will be selected during decision tree training), C L R is the reading of the brightness sensor.
Agriengineering 07 00405 g009
Figure 10. Instrument readings under sunlight (red lines) and sodium lamp light (blue lines).
Figure 10. Instrument readings under sunlight (red lines) and sodium lamp light (blue lines).
Agriengineering 07 00405 g010
Figure 11. Recovered spectrum of a lamp consisting of white LEDs.
Figure 11. Recovered spectrum of a lamp consisting of white LEDs.
Agriengineering 07 00405 g011
Figure 12. Recovered spectrum of a lamp consisting of white and blue LEDs.
Figure 12. Recovered spectrum of a lamp consisting of white and blue LEDs.
Agriengineering 07 00405 g012
Figure 13. Recovered spectrum of a lamp consisting of white, blue and red LEDs. The peak intensity of red LEDs occurs at a wavelength of 660 nm, which does not correspond to the high responsivity of any of the sensors; therefore, the data for the red part of the spectrum are significantly underestimated.
Figure 13. Recovered spectrum of a lamp consisting of white, blue and red LEDs. The peak intensity of red LEDs occurs at a wavelength of 660 nm, which does not correspond to the high responsivity of any of the sensors; therefore, the data for the red part of the spectrum are significantly underestimated.
Agriengineering 07 00405 g013
Table 1. Main technical characteristics of AMS-OSRAM AG photosensors.
Table 1. Main technical characteristics of AMS-OSRAM AG photosensors.
Photosensor TypeAS7341AS7263
Spectral channels number 96
Declared responsivity peaks, nm415; 445; 480; 515; 555; 590; 630; 680; 910610; 680; 730; 760; 810; 860
InterfaceUART, I2CUART, I2C
Supply voltage, V1.83.3
Operating ambient temperature, °С−30 ÷ 70−40 ÷ 85
Table 2. Refined spectral characteristics of the AMS-OSRAM AG photosensors.
Table 2. Refined spectral characteristics of the AMS-OSRAM AG photosensors.
Photosensor TypeAS7341AS7263
Spectral channels number96
Declared responsivity peaks, nm420; 450; 490; 530; 570; 600; 640; 690; 910620; 690; 740; 770; 820; 870
Table 3. PFD calculation accuracy. MAE (mean absolute error), MRPE (mean relative percentage error), and R2 (coefficient of determination) are calculated. When calculating MRPE, PFD values less than 10 µmol m−2 s−1 were not taken into account, since for such values the signal-to-noise ratio is too low, due to which the influence of noise and measurement errors. will greatly overestimate this metric; in practice, there is no need to accurately calculate such small values of radiation intensity.
Table 3. PFD calculation accuracy. MAE (mean absolute error), MRPE (mean relative percentage error), and R2 (coefficient of determination) are calculated. When calculating MRPE, PFD values less than 10 µmol m−2 s−1 were not taken into account, since for such values the signal-to-noise ratio is too low, due to which the influence of noise and measurement errors. will greatly overestimate this metric; in practice, there is no need to accurately calculate such small values of radiation intensity.
Light SourcePhoton Flux, µmol m−2 s−1
PFD-B (400 nm–500 nm)PFD-G (500 nm–600 nm)PFD-R (600 nm–700 nm)PFD-FR (700 nm–800 nm)PPFD (400 nm–700 nm)
MAEMRPER2MAEMRPER2MAEMRPER2MAEMRPER2MAEMRPER2
LED lamps6.059.89%0.967.2819.44%0.966.2213.03%0.994.2916.85%0.9314.898.29%0.98
Sodium lamps0.234.82%0.754.455.15%0.982.333.51%0.931.3410.48%0.994.562.88%0.98
Sunlight (cloud weather)1.565.4%0.990.834%0.990.842.99%0.991.434.87%0.991.221.61%0.99
Sunlight (clear weather)6.063.36%0.9920.447.84%0.9720.815.96%0.9818.533.41%0.8833.323.38%0.99
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

Dolgalev, A.P.; Smirnov, A.A.; Proshkin, Y.A.; Tikhonov, P.V.; Burynin, D.A.; Sokolov, A.V. Development of a Portable Spectroradiometer for Assessing the Light Environment in Crop Production. AgriEngineering 2025, 7, 405. https://doi.org/10.3390/agriengineering7120405

AMA Style

Dolgalev AP, Smirnov AA, Proshkin YA, Tikhonov PV, Burynin DA, Sokolov AV. Development of a Portable Spectroradiometer for Assessing the Light Environment in Crop Production. AgriEngineering. 2025; 7(12):405. https://doi.org/10.3390/agriengineering7120405

Chicago/Turabian Style

Dolgalev, Alexey P., Alexander A. Smirnov, Yuri A. Proshkin, Pavel V. Tikhonov, Dmitry A. Burynin, and Alexander V. Sokolov. 2025. "Development of a Portable Spectroradiometer for Assessing the Light Environment in Crop Production" AgriEngineering 7, no. 12: 405. https://doi.org/10.3390/agriengineering7120405

APA Style

Dolgalev, A. P., Smirnov, A. A., Proshkin, Y. A., Tikhonov, P. V., Burynin, D. A., & Sokolov, A. V. (2025). Development of a Portable Spectroradiometer for Assessing the Light Environment in Crop Production. AgriEngineering, 7(12), 405. https://doi.org/10.3390/agriengineering7120405

Article Metrics

Back to TopTop