Liquid level sensor based on dynamic Fabry–Perot interferometers in processed capillary fiber

In this work, a novel optical fiber sensor capable of measuring both the liquid level and its refractive index is designed, manufactured and demonstrated through simulations and experimentally. For this, a silica capillary hollow-core fiber is used. The fiber, with a sensing length of 1.55 mm, has been processed with a femtosecond laser, so that it incorporates four holes in its structure. In this way, the liquid enters the air core, and it is possible to perform the sensing through the Fabry–Perot cavities that the liquid generates. The detection mode is in reflection. With a resolution of 4 μm (liquid level), it is in the state of the art of this type of sensor. The system is designed so that in the future it will be capable of measuring the level of immiscible liquids, that is, liquids that form stratified layers. It can be useful to determine the presence of impurities in tanks.

Optical fiber sensors (OFSs) have traditionally been used in multiple application fields, such as biology, industry, communications, chemistry, or clinical procedures in medicine. The possibility of discriminating different physical, chemical or biological parameters in complex or inaccessible environments makes its presence very relevant today, with a great capacity of improvement. In recent years, what is known as lab-in-fiber (LIF) has begun to take on a notable importance. A LIF sensor is characterized by providing a wide functionality by integrating in relatively small dimensions a large number of sensor elements [1][2][3][4] . Typically, these are optical structures that allow small volumes (μL, nL) of biological fluids and liquids to be interrogated 1,3,5 . In an optical fiber, this type of optofluidic structures are favored by the presence of the fiber core as a waveguide that allows the different elements to be optimally interconnected.
Typically there are two options for sensing fluids located around the fiber: by guiding the light to the cladding 6,7 (or by modifying the geometry of the fiber 8,9 ), or by entering the fluid inside the fiber 1,3,10,11 . The latter notably improves sensitivity, and has been achieved through the manufacture of microchannels or microfluidic reservoirs 1 . However, it is also possible to use optical fibers whose characteristics allow to dynamically introduce fluids into the core, such as hollow-core fibers (HCFs). This type of fiber, which has been used mostly in applications such as fiber lasers 12 , or non-linear optics 13 , is also a very useful platform for use as a sensor 14,15 . There are multiple types of HCFs, among which are hollow-core photonic band gap fiber 16 , hole-assisted dualcore fiber 17 , two-core hollow eccentric fiber 18 , single hole twin eccentric cores fiber 19 , or silica capillary, among others. This last fiber type is cheaper than the rest of the fibers aforementioned and allows splicing without collapsing air regions.
Within the large number of parameters that can be measured, the detection of the liquid level with optical fibers is a really useful application in corrosive environments (such as car batteries or chemical processing), or with flammable liquids (such as fuel tanks). Table 1 lists the most relevant works in the literature regarding liquid level detection.
Although it is possible to use structures such as long period gratings (LPGs) 20 or fiber Bragg gratings (FBGs) 21 to perform the liquid level sensing, it is common to use HCFs to perform this type of sensing, due to the advantages that they present with regard to the handling of liquids, mentioned above. Photonic crystal fibers (PCFs) www.nature.com/scientificreports/ have been used 22 , as well as more special fibers based on reflection originated by Bragg resonance 23 , with sensitivities in both cases of 1.1 dB/mm (power variation in transmission). In recent years, silica tubes have been used, with different air core diameters, and sensing lengths between 1 and 2 cm. Likewise, the use of antiresonant (AR) mechanism 24,25 for detection has been common in such works. Liu et al. developed in 2019 the first liquid level sensor whose resolution was below μm ( ∼ 0.7 µm), with a sensing length of 4.73 mm 26 . The sensor, also based on AR mechanisms, uses power variations in transmission for its detection.
To the best of the author's knowledge, this work contains the first liquid level sensor that features a reflection detection mode, and uses Fabry-Perot mechanisms to perform sensing. For this, a silica capillary is used. By creating four holes with a femtosecond laser, it is possible for the liquid to enter the air core. Although the sensing length is shorter than in other reported works, a resolution of 4 μm is achieved, and it allows simultaneously determining both the liquid level and its refractive index. However, it is important to note that the Fabry-Perot dual-cavity (air-liquid) concept is mentioned by Lee et al. in 29 .

Sensor structure and manufacturing parameters
The designed sensor is schematically depicted in Fig. 1. It is based on a 1.55 mm long hollow-core fiber attached at its ends to individual sections of single-mode fiber (SMF). The HCF has been processed with a femtosecond laser in order to locate different holes that communicate the hollow-core with the surrounding medium. It should be noted that the HCF has a 60 μm diameter hollow-core.
First, to perform the splice between HCF and SMF, the electric arc is not performed at the intersection, but slightly offset towards the side of the SMF ( d ≃ 100 μm in Fig. 2), and with the ends of both fibers practically together. Likewise, the electric arc is shorter (1 s) and less intense (18% of maximum current) than a normal splice, in order not to collapse the hollow-core. The result of the splice can be seen in Fig. 2. The contact surface of the hollow-core with the SMF core is flat, so losses are significantly reduced.
Next, the four holes that communicate the hollow-core with the surrounding medium are manufactured. These holes are located as shown in Fig. 1. It can be seen that the separation between each hole and the ends of the HCF is unique. This fact is important, as will be explained later in "Operating principle" section. For its manufacture, a commercial femtosecond Fiber Laser Chirp Pulse Amplifier (FLCPA) from CALMAR laser is used 30,31 . It operates at 1030 nm, and the pulses are tightly focused by a Mitutoyo objective lens ( ×50 , NA= 0.42 ). The sample, placed on an XYZ motor stage from Aerotech, is illuminated in transmission and displayed by a CMOS camera.
The holes have dimensions of 25 × 25 μm (square shape) (Fig. 3a), going from the outside of the fiber to the hollow-core, so they have a depth of ∼ 32.5 μm (Fig. 3b). For its manufacture, a laser pulse energy ( E p ) of 2.77 μJ is used, as well as a pulse repetition rate (PRR) of 60 kHz. The inscription process outlined in Fig. 3c is followed: the square shape of the hole is based on the inscription of 8 lines of 25 μm each, and 3.125 μm separated from each other. The writing speed is v = 2μm/s, so 30, 000 pulses ( PRR/v ) are deposited for each μm of the fiber. Once the 8 lines have been inscribed, which define the plane located on the outer surface of the fiber, the laser inscription is repeated in a plane located 2 μm below, and so on until the inscription of 20 planes is made. The result obtained is shown in Fig. 3a and b. The separation between planes has been defined in such a way that the focal volume of the focused laser beam allows the material existing between both planes to be ablated. Given the objective lens used ( NA = 0.42 ), the Rayleigh length of the Gaussian beam focus (using the paraxial approximation 32 ) is y 0 = 2.7μm. Consequently, the successive planes are arranged so that they are 2 μm apart, causing the focal volumes in both positions to be slightly overlapping.  Fig. 4. In the latter case, the incident light that goes through the SMF core is reflected by the three surfaces present in the hollow-core fiber: core SMF −air HCF , air HCF −liquid HCF , and liquid HCF −core SMF . Consequently, there are three cavities, corresponding to the different combinations offered by these three existing surfaces in the HCF. These optical paths recombine in reflection, resulting in the interference pattern given by the next equation: AR and other contributions where n air = 1, L HCF = 1550 µm, L HCF = L air + L liquid , n HCF = t air t air + t liquid n air + t liquid t air + t liquid n liquid , t air = 2 · L air n air c , t liquid = 2 · L liquid n liquid c .  www.nature.com/scientificreports/ I 1 , I 2 and I 3 correspond to the light intensities reflected by the three mentioned surfaces, is the wavelength of the incident light, L air , L liquid and L HCF are the length of the cavities corresponding to the cavities formed in the HCF (air, liquid, and combination, respectively) ( 2L _ is the difference of optical paths), and n air , n liquid and n HCF are the refractive indices of the cavities. n HCF , effective refractive index of the cavity that forms the complete HCF (with air and liquid), must be computed taking into account the time that the light is in air ( t air ) and liquid ( t liquid ). c is the speed of light in vacuum. The last term refers to intensity contributions whose importance is not relevant in this case. Fundamentally, it corresponds to the antiresonant mechanisms that take place in a structure such as SMF-HCF-SMF when hollowcore fiber has a length greater than what is known as the critical length ( L c ) 24,25 . In this work, only Fabry-Perot mechanisms will be used.
It is important to note that the final section of the SMF is cleaved at an angle, as depicted in Fig. 1, thus avoiding unwanted reflections that could lead to other cavities. Consequently, the free spectral range (FSR) of the three dominant interference patterns corresponds to the following expression: These FSR values, and therefore the refractive index of the liquid and its level (length of the cavities), can be obtained from the higher-order modes of the fast Fourier transform (FFT) of the spectral signal. To do this, it is essential to start from a known state. Hence, in the design, the holes have been made so that if there is liquid up to the level of each hole, the cavities that they create have unique lengths for each hole. However, HCF is typically considered to be liquid free in the initial state. The liquid filling process is noticeably slower than the spectra capture frequency, making it possible to track from the reference spectrum.

Results and discussion
Experimental setup. The experimental measurement setup must be such as to ensure a resolution of μm in the liquid level of the HCF. For this, a syringe pump manufactured by 3D printing and controlled by an Arduino platform is used 33 . The vision system consists of a CCD camera and a ×10 Mitutoyo objective lens. Figure 5 depicts the complete setup used. With the syringe used (10 mL), the minimum volume of liquid that the stepper motor can move is 1μL, and with the beaker and the vision system used, that μL of liquid displacement in the syringe causes a movement of 0.65 μm in the liquid level of the beaker. Consequently, filling the 1.55 mm of the HCF implies a liquid displacement of 2.37 mL from the syringe. Moreover, the reflection spectra are obtained using a broadband light source (HP 83437A) and an optical spectrum analyzer (OSA) (Anritsu MS9740A, 30 pm resolution). The only consideration to take into account in choosing the light source is that it offers a power density such that the interfering signal reflected by the sensor is above the noise level, with a relatively high optical signal-to-noise ratio (OSNR). For this, it is important to highlight that, based on simulations carried out using the finite element bidirectional beam propagation method (bidirectional BPM) of RSoft software, there is a ∼ 11.6% back-coupling efficiency from the silica capillary back to SMF (LP 01 guided mode). Experimental and simulated results. As mentioned above, the designed and manufactured sensor allows not only to determine the liquid level in the structure, but also the refractive index of the liquid. Consequently, the experimental results carried out, which are shown below, comprise two large groups. First, for different water levels, the real liquid level has been compared with the estimated one. Second, both the liquid level and the refractive index have been determined for different liquids. In both cases, simulations have been carried  www.nature.com/scientificreports/ out using bidirectional BPM of RSoft software. The sensor does not measure temperature and, therefore, is not able to compensate for deviations in its value. Consequently, the experiments must be carried out at a constant temperature from the first reference measurement. The spectral characterization of the manufactured structure is presented in Fig. 6. In Fig. 6a, the spectral response of the HCF without holes is depicted (Fig. 2), as well as the response when HCF has been processed with the fs laser (four holes inscribed). It can be seen that making holes causes an increase in losses, and a reduction in the amplitude of the interference pattern. Likewise, in both cases, in addition to the Fabry-Perot cavity corresponding to the HCF, the presence of an interferometric contribution with a lower frequency component, associated with AR mechanisms, is deduced. Figure 6b depicts the FFT amplitude of the spectra in Fig. 6a, as well as the one corresponding to the simulation of the structure. The realization of the holes does not modify the spatial frequency but only the amplitude of the spectral contribution of the Fabry-Perot cavity. The dominant spatial frequency has a value of 1.3 nm −1 , which corresponds to a cavity length of ∼ 1550 μm (real HCF length). Figure 7 depicts the experimental spectra for different levels of liquid in the HCF (200, 700 and 1200μm) (Fig. 7a), as well as the resulting FFT spectra for liquid levels of 100, 400, 700, 1000 and 1300 μm (Fig. 7b). The liquid is water, with a refractive index of 1.318. It is important to note that during the filling of the HCF, it is necessary to wait approximately ∼ 90 seconds ( 25 × 25 μm hole) in order to stabilize the liquid and thus obtain a stable spectral pattern. Larger holes cause faster filling 34 , but greater degradation in the amplitude of the interference spectral signal. Moreover, a filled contour plot of the spatial frequency corresponding to liquid levels between 100 and 1400 μm measured experimentally (Fig. 8a) or by simulation (Fig. 8b) is depicted.
In the FFT spectra, the presence of three large contributions can be observed, corresponding to the air, water, and joint cavities (complete HCF), as previously indicated in Eq. (1). In this work, unlike those indicated in the introduction, the spatial frequency shift is evaluated, and not the power variation due to the uncertainty that this parameter may present. The sensitivities determined for the experimental and simulation measurements are: −8.89 · 10 −4 nm −1 /µm and −8.19 · 10 −4 nm −1 /µm (air cavity), 11.3 · 10 −4 nm −1 /µm and  Figure 6. (a) Reflection spectra of the no-hole HCF (Fig. 2), and the 4-hole HCF (Fig. 3b). (b) FFT amplitude from the spectra of (a), as well as the one corresponding to the simulated structure. www.nature.com/scientificreports/ 10.9 · 10 −4 nm −1 /µm (water cavity), and 2.28 · 10 −4 nm −1 /µm and 2.75 · 10 −4 nm −1 /µm (both cavities), respectively. From Eqs. (1) and (2), it is possible to determine the length of the cavity in each case. If the refractive index of the liquid is known, as in this case, the lengths of the air and liquid cavities can be obtained directly. In Fig. 9, the cavity lengths extracted from the spatial frequency are depicted, as well as the relative error committed, both for the experimental and simulation results. The slope corresponding to the real-estimated water level curve takes values γ = 1.027 (experimental) and γ = 0.9951 (simulation). Likewise, the relative error made in estimating the liquid level in experimental measurements is always less than 2.5% , so the results can be considered correct. The resolution, in this case, depends exclusively on the OSA, since the span and the number of points in the measurements determine the frequency spacing in the FFT spectrum. For the configuration used, the frequency resolution obtained is 0.00333 nm −1 , which corresponds to a resolution of 4 µ m in the liquid level. Although the spectral resolution of the OSA is the most important contribution regarding the calculation of the detection limit (DL) 35 , two types of noise contributions have to be taken into account 36 : amplitude noise (shot and thermal noise of the photodetector, and light source relative intensity noise), and spectral noise (thermal variation, and thermal-induced fluctuations because of the liquid in the capillary fiber), the second being the most important in this case. Considering water as a liquid, as well as a N (25,9) temperature distribution during the measurements, the DL obtained is 4.42 µ m (compared to the value of 2.95 µ m in the absence of noise). On the other hand, sensor repeatability is adequate. The relative error made between the values obtained by increasing and   Figure 9. (a) Estimated cavity length (air and water) and relative error for different real water levels. (b) Estimated cavity length (air and water) and relative error for different simulated water levels. www.nature.com/scientificreports/ decreasing the liquid level, as well as by complete liquid removal and re-injection is less than 2% , with respect to the values in Fig. 9a. Subsequently, experimental measurements have been carried out with Cargille liquids of refractive indices between 1.3 and 1.4 (increment of 0.01), in order to determine both parameters (liquid level and RI) simultaneously. The liquid levels where the measurements have been made are 300 and 1300 µ m. The resulting FFT spectra for those liquid levels are depicted in Fig. 10.
It can be seen that, in both cases, the frequency corresponding to the air cavity remains fixed. The change of liquid in the cavity only affects the two remaining contributions. For detection, the air cavity length is first determined from its spatial frequency. Subsequently, the length of the liquid cavity is deduced by knowing the HCF length. For the cases presented, liquid cavity lengths of 287.25 µ m (it should be 300 µ m) and 1327.29 µ m (it should be 1300 µ m) have been determined, which offer relative errors of 4.25% and 2.1% , respectively.
Once the length of the liquid cavity is known, it is possible to extract the refractive index of the cavity from the corresponding spatial frequency (Eq. 2). Figure 11 depicts the estimated refractive index, as well as the absolute error made, for the two cases presented in Fig. 10. The sensitivities of the spatial frequency corresponding to the liquid cavity are 0.2296 nm −1 /refractive index unit (RIU) (liquid level of 300 µ m) and 1.1099 nm −1 /RIU ( 1300 µm). The absolute error made is always lower than the order of the measurement step, so the sensor can be valid to offer an indicative measure of the liquid whose level is being evaluated. In any case, the precision in detecting the liquid level or the refractive index will be significantly higher when the other parameter is known. In this case, the worst scenario has been presented, in which none of the parameters are known.  Figure 11. (a) Estimated refractive index of the HCF liquid whose level is at 300 µ m. (b) Estimated refractive index of the HCF liquid whose level is at 1300 µm.