## 1 Introduction  
Microfluidic devices are small-scale reaction systems fabricated using micro-technology, crucial for Industry 4.0 through integration with the internet of things (IoT) and cloud systems for real-time monitoring and optimization. These systems, ranging from nanometers to millimeters in size, are classified as nanoreactors, microreactors, and millireactors [1]. They offer several advantages over traditional laboratory equipment, including compactness, reduced material usage, and greater integration potential. Their smaller size allows for less material consumption, energy efficiency, and faster response times [2]. Moreover, the reduced scale enables the integration of multiple functional components, improving system efficiency and enhancing mass and heat transfer rates. Millireactors, capable of both batch and continuous operations, offer safer processes and improved selectivity due to shorter residence times [3]. Fabrication methods for millireactors include wet and dry etching, precision machining, laser treatment, and lithographic techniques, often in combination. Factors such as cost, precision, material selection, and reliability must guide the choice of fabrication technique [4]. Additive manufacturing is increasingly used, significantly reducing production time [5]. Additive manufacturing (3D printing) involves fabricating three-dimensional objects from CAD (computer-aided design) models by sequentially layering materials. The process begins with CAD model creation, followed by conversion to an STL file and importation into slicing software, which defines printing parameters. After slicing, the model is saved in a compatible format and uploaded to the printer. Once printed, the object is removed and cleaned, and, if necessary, support structures are eliminated [6; 7]. This technology has streamlined chemical sensor production by replacing labor-intensive fabrication steps and costly instrumentation [8]. Chemical sensors detect and quantify analytes through chemical reactions, consisting of an active surface, a transducer, and electronic components. The active surface, which may include a polymer layer or biomolecule (biosensor), interacts with the analyte, inducing a chemical change. This generates a signal that the transducer converts into an electronic output, which is then processed for analysis [9; 10]. Electromagnetic radiation interacts with matter across a broad frequency range, enabling the development of sensors based on changes in optical parameters related to substance concentration. Optical sensors can measure chemical and physical parameters by detecting variations in optical properties [11]. These sensors operate in two modes: one relies on the intrinsic optical properties of the analyte, while the other uses an indicator when the analyte lacks measurable optical properties. For example, pH can be determined by immobilizing an indicator in a support material, allowing for the detection of absorption or fluorescence changes in response to pH variations [12; 13]. Optical sensors offer advantages such as high selectivity, sensitivity, resistance to electromagnetic interference, low cost, non-destructive operation, and miniaturization, enabling multiple sensors on a single substrate for simultaneous analysis [14]. However, they are susceptible to ambient light interference and long-term instability due to the indicator leaching from the support material [15]. The sol-gel method has advanced optical sensor fabrication by enabling the entrapment of indicators within a stable three-dimensional network, enhancing sensor performance and sensitivity. This process improves stability and longevity by immobilizing indicators within the gel matrix, making sensors more effective for various applications [16]. The sol-gel process involves low-temperature reactions of inorganic precursors, typically metal alkoxides, with water, leading to hydrolysis and condensation.