# A Real-Time Automated System for Dual-Aperture Common-Path Interferometer Phase-Shifting
## 3 Real-Time Automated Phase-Difference Retrieving from a DACPI  
Typically, in sensing DACPI applications, the determination of \(\phi(x,y)\) allows the estimation of a physical, chemical or biological quantity. Here, a measurable quantity from a transparent object placed at the probe arm can be related to the phase difference between the light beams from both arms [15; 29; 30; 31]. For practical applications, it is convenient to obtain an immediate value of \(\phi(x,y)\) to achieve real-time monitoring of the measured quantity, which also allows fast and precise calibration of the system. From Equation (2) it can be clearly noticed that the precision of the phase amount directly depends on the control of the transverse translation of the ruling, since \(u_{p}\) is a fixed parameter that depends on the ruling fabrication characteristics. As a consequence, \(u_{d}\) is the only parameter that can be tailored in order to obtain phase steps for specific applications. In most of the cases, the linear displacement of the ruling is manually performed, which increases the measurement inconsistencies due to human error. The automation of the \(u_{d}\) parameter by using an electromechanical system then improves the reliability and repeatability of the system. Figure 2 shows a schematic diagram of the automation system. In order to generate interference fringes, a transparent object is placed in the probe window B. The interfering fields, denoted in Equation (1), generate interferograms described by fringe patterns \(I_{j}(x,y)\) that are produced by the comparison between the reference and the probe wavefronts. The intensity of the fringe pattern is captured by the CCD camera and digitally recorded as 8-bit grayscale images. Then, by using controlled electromechanical rotation on the micrometrical screw, the ruling is linearly displaced (in the direction of the x-axis in Figure 1) generating a phase change \(\alpha_{j+1}\) in the interference field. Therefore, a new and consecutive grayscale pattern \(I_{j+1}(x,y)\) is obtained and then recorded. Subsequently, it can obtain as many patterns \(I_{j}(x,y)\) as there are induced phase changes \(\alpha_{j}\). A microcontroller (PIC16F877A) receives codified instructions of the image capture and processing of the jthinterferogram from the LabVIEW platform. Then, the microcontroller, aided by a power stage, delivers the 4-bit impulse sequence required for a unipolar stepper motor (Nema17) operation (see Figure 3a). The stepper motor is coupled to a PLA 3D printed spur gear system to rotate a micrometric screw (Mitutoyo Head Series 149) of an optical translation stage, as it is shown in Figure 3b. The gear transmission produces a linear displacement of a Ronchi ruling with a period of 500 lines/mm (\(u_{p}=2\upmu\)) mounted on the translation stage. In order to meet the interference condition in the object plane, the separation between the windows was set to \(x_{0}=30\) mm, considering a He-Ne laser with \(\lambda=632.8\) nm and focal length \(f=100\) mm. The micrometer screw had a nominal resolution of 0.001 inches per division (25.4 \(\upmu\)m), then, without a gear transmission system, a full turn is completed with a linear displacement of 0.025 inches (635 \(\upmu\)m). With a stepper motor resolution of 1.8\({}^{\circ}\), the ruling is transversally displaced 3.175 \(\upmu\)m per motor step. According to Equation (2), the ruling displacement generates an aggregate phase of \(\alpha=2\pi(3.175\upmu\meter)/2\upmu\approx 10\) rad to the interference pattern, which exceeds the range of \((0,2\pi)\) in which the algorithms can calculate the phase. Therefore, a gear transmission system coupled to the micrometric screw allows the decreasing of the ruling linear displacement to meet the range from 0 to \(2\pi\) rad. Figure 3c shows the designed 1:4 gear transmission system, which decreases the linear displacement of the ruling to \(u_{d}=0.793\upmu\)m, allowing theoretical phase shifts of \(\alpha\approx 2.493\) rad.