## 2 Hardware Design and Implementation
### Fiber Optic Temperature Sensor  
Fiber optic sensor has several advantages over conventional sensors: immunity to electromagnetic interference, ability to operate in harsh environments and potential for multiplexing. It has high sensitivity and is widely used in the demanding measurements of various physical quantities, such as temperature, strain, pressure, refractive index, displacement, vibration, _etc_. It is an excellent candidate to use on the oil storage tank where electric charge and discharge are strictly prohibited as even a tiny spark can light the flammable gas and causing disasters. Therefore, the application of fiber optic sensors not only allow for high precision but also minimize the risk of fire hazard caused by monitoring system. In this study, we used a miniaturized fiber inline FP interferometer temperature sensor fabricated by femtosecond laser. As shown in Figure 7a-c, an open cavity was formed by one-step micromachining a micro notch in a single-mode optical fiber using a femtosecond laser. The device has an all-glass structure and does not involve the assembly of multiple components. As a result, we expect that the device will survive very high temperatures which make it suitable for temperature monitoring in the oil storage tank. The device fabrication was carried out using a home-integrated fs laser 3D micromachining system. The repetition rate, center wavelength, and pulse width of the femotosecond (fs) laser (Legend-F, Coherent, Inc. Santa Clara, CA, USA) were 1 kHz, 800 nm, and 120 fs, respectively. The maximum output power of the fs laser was approximately 1 W. We used the combination of waveplates and polarizers to reduce the laser power to about 20 mW, and then used several neutral density (ND) filters to further reduce the laser power to desirable values. The attenuated laser beam was directed into an objective lens (Olympus UMPLFL 20X) with a numerical aperture (NA) of 0.45 and focused onto the single mode optical fiber (Corning SMF 28) mounted on a computer-controlled five-axis translation stage (Aerotech, Inc. Pittsburgh, PA, United States) with a resolution of 1 mm. During fabrication, the interference signal of the fiber FP device was continuously monitored. A tunable laser source (HP 8168E) was connected to one of the input ports of the 3 dB fiber coupler. The output port of the coupler was connected to the device under fabrication. Controlled by the  
Figure 7: Schematic structure and SEM images of fiber inline FPI device fabricated by femtosecond laser ablation and corresponding response to temperature variation. (**a**) Structural illustration; (**b**) Top view; (**c**) Cross-section; (**d**) Temp. _vs._ Cavity Length. computer, the tunable laser continuously scanned through its wavelength range (1475-1575 nm) at the rate of 1 nm per step. The signal reflected from the device at each wavelength step was recorded by an optical power meter (Agilent 8163A). The fabrication was stopped after a well-formed interference pattern was recorded. The interference signal is interrogated based on the two-beam optical interference equation as follows:  
\[I=I_{1}+I_{2}+2\sqrt{I_{1}I_{2}}\cos(\frac{4\pi L}{\lambda}+\Phi_{0}) \tag{1}\]  
where \(I\) is the intensity of the interference signal, \(I\), and \(I\), are the reflections at the cavity surfaces, respectively, \(\Phi_{0}\) is the initial phase of the interference, \(L\) is the optical length of the cavity, and \(\lambda\) is the optical wavelength. According to Equation (2), the two adjacent interference minimums have a phase difference of 2\(\pi\). That is  
\[\left(\frac{4\pi L}{\lambda_{1}}+\varphi_{0}\right)-\left(\frac{4\pi L}{ \lambda_{2}}+\varphi_{0}\right)=2\pi \tag{2}\]  
where \(\lambda_{1}\) and \(\lambda_{2}\) are the wavelengths of two adjacent valleys (Figure 3) in the interference spectrum. The optical length of the FP cavity can thus be found as \(L\) = 0.5\(\lambda_{1}\lambda_{2}\) / (\(\lambda_{2}-\lambda_{1}\)).