1. Introduction
The detection and quantification of analytes are essential tasks in analytical chemistry. In recent decades, there has been a growing interest in miniaturization, driven by the need for more efficient, cost-effective and portable analytical technologies [
1]. This trend aims to reduce the consumption of reagents and samples, minimize waste generation and enhance the number of analyses that can be performed.
The development of compact, affordable devices that replicate the functionality of traditional analytical instruments has made analytical tools more accessible for various applications, particularly in educational and resource-limited settings, as well as for fieldwork in industries such as food, health and environmental monitoring. Miniaturized instruments offer a reliable, accessible means of precise and rapid analysis. Thanks to the added benefit of increased automation, they can be used to conduct accurate analyses in e-resource-limited settings and can be used outside the laboratory in industries such as food [
2,
3,
4], health [
5,
6,
7], environmental monitoring [
8,
9,
10,
11], and education [
12,
13]. Examples of miniaturized devices include portable spectrophotometers, fluorimeters, potentiostats, colorimeters [
14] and other analytical tools that can be built at a fraction of the cost of their traditional counterparts.
A key factor in this trend has been the integration of microcontrollers, such as Arduino, which have simplified the construction of easy-to-build systems that bridge the gap between complex laboratory equipment and affordable tools [
12]. Arduino is an open-source electronics platform based on user-friendly hardware and software. This platform is accessible to beginners while also being flexible enough for advanced users. As a result, it is widely used for both prototyping and educational purposes at undergraduate and graduate levels.
An Arduino UNO board can be connected to a breadboard equipped with components such as inputs, sensors, lights and displays. These elements can be controlled through code developed in the Arduino development environment. The open-source nature of Arduino fosters constant customization and innovation, allowing students and researchers to continually adapt and improve their projects, saving time and resources while addressing specific needs.
Arduino-based sensors, particularly in spectrophotometry [
15], have garnered significant interest [
16]. Some examples of home-made devices for spectrometric determinations have been described. Bullis et al. described the assembly of a fluorimeter suitable for teaching [
12]. Various low-cost, home-made spectrophotometers have been developed for the determination of compounds like curcumin and Rhodamine B [
17,
18]. Adhiwibawa et al. proposed the development of a spectrophotometer to measure the absorbance of natural pigments [
19]. Di Nonno and Ulber designed a portable, low-cost Arduino-controlled photo- and fluorometer for on-site measurements [
1]. However, the existing systems are typically limited to batch processes.
In this work, we propose the design of a low-cost, educational-grade visible spectrophotometer integrated into a flow injection analysis (FIA) system for dye determination in food products. The integration of the spectrophotometer into an FIA system is a novel approach, enhancing the system capabilities by combining the strengths of both technologies. FIA is known for its high throughput, minimal sample and reagent consumption, low waste generation and potential for automation and miniaturization. By coupling it with a spectrophotometric detector, the system offers additional benefits of rapid analysis, increased precision and reproducibility, making it suitable for routine, high-efficiency testing. This detector consists of an Arduino board and low-cost optical and electronic materials, and it is capable of detecting changes in the intensity of a light source (E), which consists of an LED selected according to the absorption wavelength of the analyte and its complementary color. The signal is transmitted to a specialized software, which allows us to obtain voltage values in real time.
In order to test the operating parameters of the detector, we proposed determining the concentration of one of the most commonly used azo dyes in the food industry: tartrazine. Tartrazine is an azo dye known for its ability to provide a bright and attractive color to a variety of products. However, its toxicity has been the subject of various studies. It has been described that tartrazine may have adverse effects on some individuals, including allergic reactions, and in certain cases, it has been associated with genotoxic effects. However, food regulations in many countries permit its use within specific limits, making it one of the most commonly used dyes in food products. Tartrazine can be found in various items, such as soft drinks, sports drinks, flavored potato products, sauces and jellies, and in non-food products, including soaps, cosmetics, vitamins and medications [
20,
21,
22]. Finally, the analysis of the samples was carried out using HPLC and the results were compared using statistical tests.
2. Materials and Methods
2.1. Detector Construction
A 3D-printed black piece was designed and used for the construction of the detector using matte black polylactic acid (PLA) as material. This material proved useful in minimizing light reflection on the internal walls of the piece, thereby preventing the generation of new wavefronts that could interfere with the detector readings. The design of the piece, created in SolidWorks 2022, and its subsequent 3D printing allowed for the adjustment of the necessary dimensions for the fundamental components of the emission and detection system, ensuring precise alignment. The 3D printing piece was manufactured using the Flashforge Creator Pro 3D printer.
The process of detecting tartrazine involved the use of a blue LED (Osram Opto Semiconductors, Regensburg, Germany), which emits light at a specific wavelength, corresponding to the absorption range of tartrazine, which is yellow. This allowed for accurate measurement of the dye concentration in the samples.
The print consisted of three main sections: a cavity for placing the light source (LED), a space with the appropriate dimensions to house a microhematocrit capillary tube (1.1–1.2 × 10
−3 m D.I., length: 75 mm ± 0.5 mm) that served as the sample container and the carrier, which maintained a constant flow during the experiment, and a third section intended to read the TSL257-LF sensor for measurement (
Figure 1).
The TSL257-LF sensor (AMS Austriamicrosystems, Munich, Germany), which measures the intensity of visible light and converts it into a proportional electrical signal (voltage), was integrated into an electrical circuit that includes an Arduino UNO IDE 2.0 development board (Arduino, Ivrea, Italy), a blue LED and a 68-ohm resistor. All components were mounted on a mini breadboard (BusBoard Prototype Systems, Calgary, AB, Canada) using male-to-female and male-to-male jumper wires for the connections, which facilitated access and connection of the components, allowing for updates and modifications of the built system (see
Figure 2). For data acquisition, communication was established between the Arduino UNO and a computer using a program developed in the Arduino IDE.
2.2. FIA Manifold
The FIA manifold was constructed using a four-channel Gilson Minipuls 3 peristaltic pump fitted with two propulsion silicone tubes to transport the carrier and the sample solutions (standard PVC two-spot 0.76 mm I.D.). The tubes were then connected to a manual 4-way valve (manual sample injector Gilson 210585), which controlled the direction of the flow. The valve was connected to a reaction coil (25 cm × 0.8 mm D. I.), which was subsequently connected to the detector and waste outlet (total path length to the detector was 40 cm). This scheme is illustrated in
Figure 3. The flow rate was set at 0.5 mL min
−1, and a sample volume of 250 µL was injected every 2:30 min.
2.3. Detector Evaluation
To test the operation of the detector, the determination of tartrazine in commercial samples was proposed. The carrier, standard and sample solutions were prepared using deionized water with a resistivity of 18.2 MΩ cm. The carrier solution was composed of a sunset yellow solution (500 mg L−1, absorption wavelength 480 nm) employed to modulate the intensity emitted by the light source. Tartrazine stock solution (1 g L−1, absorption wavelength 427 nm) was prepared monthly, and standard solutions were prepared by dilution each day.
The light source of the detector was a blue LED that was selected based on the absorbance wavelength of tartrazine. The carrier solution of sunset yellow was used to modulate the intensity of the light source in order to ensure reproducibility of the analysis conditions. Subsequently, the indirect determination of tartrazine concentration was performed by passing standard or sample solutions with increasing concentrations (between 5 and 150 mg L
−1) through the flow injection analysis system (FIA). The injection of the samples was carried out every two minutes at a flow rate of 0.5 mL min
−1, observing a change in voltage (
V) due to the dilution of the carrier solution. This change in voltage is associated with the amount of light absorbed by the solution as the sample passes through the detection zone, according to Equation (1).
where
Vsample is the signal detected when the sample passes through the detector and
V0 is the signal of the blank. This relationship allows us to obtain the light transmittance, which is related to the sample
absorbance.
2.4. Method Validation
In terms of analytical parameters, the limit of detection (LOD) was calculated, and repeatability and reproducibility were determined in terms of relative standard deviation (%RSD) and evaluated at three concentration levels measured in triplicate over three days. To assess the accuracy of the determination, the results were compared with the ones obtained by analyzing the samples with HPLC-DAD (Agilent 1200, Santa Clara, CA, USA) using a previously described methodology [
21] (ZORBAX Eclipse XDB-C
18 column; mobile phase: A: a solution of 0.1% trifluoroacetic acid with its pH adjusted to 4.4 using triethylamine; solvent B: methanol; gradient: 17 to 100% B/4 min; detection: UV 254 nm; flow rate: 1 mL/ min). The results were compared using a Student
t-test (
n = 3), assuming comparable variances.
2.5. Sample Preparation
Once the calibration curve was constructed, the performance of the detector was tested using eight commercial samples that included beverages and candies. For the beverages, the samples were degassed in an ultrasonic bath when needed and filtered using a 13 mm syringe filter (Life Sciences, Acrodisc, Port Washington, NY, USA) with a 0.45 µm nylon membrane. For the standard addition calibration, 8.0 mL of the sample was added in volumetric flasks. Increasing concentrations of tartrazine, ranging from 25 to 150 mg L−1, were then added in water, and the volume was adjusted to 10 mL. For the candies, a solution was prepared by dissolving 8.0 g of candy in 100 mL of water using an ultrasonic bath. The sample was then filtered.
3. Results and Discussion
The results of this project highlight the successful development and application of a miniaturized spectrophotometer using an Arduino UNO and the TSL257-LF sensor.
The proposed Arduino-based detector was able to perform measurements of intensity (V) in real time and was applied for the determination of tartrazine concentration in real samples using an FIA system. Eight samples including beverages and candies were evaluated to demonstrate the functionality of the detector. Since the detector is based on an Arduino UNO to record voltage changes over time, it allows dynamic experiments.
3.1. Spectrophotometric Determination of Tartrazine in Food Products
Prior to the analysis, the LED color was selected among four options: bright white, orange, yellow and blue. Using the orange and yellow color of the LED according to the sample and carrier solution colors, no signal was observed from the detector. However, upon testing the analysis by selecting the complementary color, we were able to observe a signal. The intensity of the LED was modulated using a 500 mg L
−1 yellow sunset solution. The baseline was established at 1.30 V and sample injections were carried out every 2 min. When the sample passed through the detector, a change in voltage was registered. The FIAgrams obtained showed a decrease in the signal with increasing sample concentration. This relationship contributed to the proposal that the response was related to the dilution of the carrier solution (
Figure 4). In this sense, the signal was correlated with the transmittance of the solution, and thus, the absorbance. This information allowed us to construct the calibration line in terms of absorbance vs. tartrazine concentration.
In terms of analytical parameters, the detector exhibited a linear response to changes in dye intensity within the concentration range of 0 to 150 mg L
−1. This linearity is crucial for quantitative analyses, as it confirms the reliability of the measurements across the specified range. The detection limit (LOD) was calculated by considering 3.3 Se/b1 (Se: standard deviation of calibration line; b1: analytical sensitivity), resulting in a value of 3.7 mg L
−1 (see
Figure 5). The results indicate the device’s capability to identify low concentrations of dye effectively.
Repeatability and reproducibility, measured in terms of relative standard deviation (%RSD), were evaluated at three concentration levels (25, 75 and 125 mg L
−1) measured in triplicate over three days. The results for %RSD are shown in
Table 1. In all cases, the %RSD value was lower than 5.00%, indicating the detector had adequate repeatability and reproducibility.
The reproducibility information for each concentration level is represented in a box plot diagram, which clearly shows that the smallest concentration level has the highest %RSD value, as can be seen in
Figure 6.
Overall, the results demonstrate the effectiveness of the developed spectrophotometer in delivering accurate and consistent measurements, which are essential for further applications.
3.2. Sample Analysis
Quantification of tartrazine in the samples was carried out using the standard addition method, which significantly improved the sensitivity of the analytical method. This is because it allows for clearer and more precise observation of changes in the detector response, thus facilitating the detection of minimal variations in the tartrazine concentration. The analyses of 8 samples, including beverages and candies, were conducted in triplicate to ensure the reliability of the results. The average of the concentrations obtained in the replicates and the standard deviation for each sample are shown in
Table 2.
To evaluate the accuracy of the detector, these results were compared with those obtained using high-performance liquid chromatography with a diode array detector (HPLC-DAD), which is a widely accepted method for analyzing dyes in food samples. A Student
t-test (
n = 3) was performed assuming comparable variances [
23]. The values of t calculated did not exceed the critical value (2.78
⍺ = 0.05,
d.f. = 4), thus indicating there were no significant differences between the results obtained by both methods. This information is included in
Table 2.
The results of this project emphasize the potential of low-cost and accessible technologies for chemical analysis. By combining 3D printing, affordable sensors and development boards, we developed a spectrophotometer capable of delivering accurate results at a fraction of the cost of traditional equipment. This approach not only facilitates the access to analytical tools, but also reduces the gap in access to technology. Additionally, it encourages further innovation in the field of analytical chemistry.
The integration of the TSL257-LF sensor, a low-cost photodiode capable of detecting a wide range of light intensities, proved effective for measuring the concentration of tartrazine. The sensor sensitivity and precision enabled accurate measurements of absorbance. On the other hand, the employment of Arduino UNO provided a robust platform for data acquisition and processing. Its open-source nature and supportive community facilitated the development of custom software to calibrate the sensor and process the data. The simplicity of programming with Arduino allowed for efficient execution protocols and real-time data processing.
The findings suggest that the proposed spectrophotometric detector performs comparably to HPLC for tartrazine quantification. A key aspect of this study is that the proposed spectrophotometric detector is both miniaturized and low-cost compared to HPLC, making it a viable option for resource-limited laboratories or those operating in environments where high-end equipment is not accessible. Despite its low cost, the detector demonstrated excellent accuracy and reliability for the quantification of dyes in food samples. This feature makes it especially valuable for quality control applications in the food industry and for research where an economical solution for colored analyte quantification is required.
The configuration of the constructed device, which combines 3D printing and a protoboard, allows for simple and cost-effective modifications. This flexibility enhances its applicability, making it suitable for diverse settings such as field studies or remote locations. Its adaptability not only improves detector performance but also opens possibilities for broader chemical analysis applications. As the demand for fast, reliable analytical methods increases, this spectrophotometer could play a crucial role in food safety monitoring and compliance with regulatory standards.
The comparison with HPLC not only validated the effectiveness of the spectrophotometric method but also demonstrated its broader potential for applications in various fields. Additionally, the customizable nature of the device, with its modular design, allowed for further adaptation to measure different analytes by incorporating additional sensors, making it especially valuable in research where versatility is needed.
4. Conclusions
By constructing and utilizing the Arduino-based spectrophotometer, the successful completion of this experiment emphasized the significance of low-cost miniaturized instrumentation. Furthermore, the ease of building prototypes using 3D printing will open the door to new ideas that will allow access to chemical analysis at low costs when high-end equipment is not available. The versatility of the device allows it to change the LED color to perform the determination of different colored compounds according to the needs of the analysis, add a second detector for simultaneous quantification, or even determine the same color compounds employing multivariate analysis.
This experiment highlighted the effectiveness of the low-cost spectrophotometer for its potential for accurate quantification of dyes in food samples. Moreover, the obtained results were compared with those obtained using HPLC-DAD, demonstrating the reliability and accuracy of the low-cost spectrophotometer. No significant differences were observed between the results obtained from both methods.