# A Novel Low-Cost DIC-Based Residual Stress Measurement Device
## 2 Device Design
The complete architecture for the measurement device is shown in Figure 2.  
To perform the drilling, a variable-speed, 130 W off-the-shelf high-speed drill was used, with speeds ranging between 10,000 and 32,000 revolutions per minute. This range was selected to accommodate the wide range of samples, such as titanium or carbon fibre, and the varying sizes of holes. The drill was used in combination with an inverse cone drill bit, which ensured the flatness of the hole increment drilled, in accordance with hole-drilling theory [54; 55]. Figure 1: (a) CAD representation of the measurement device, with key components highlighted. (b) Image of the device with key components highlighted. Grbl, an open-source CNC software [56], was used to implement well-defined and reliable milling cycles, that were customisable for the test requirements. In addition, Grbl allowed the device to be programmed in g-code with an easy-to-use GUI, which was simpler than a low-level programming implementation. This allowed for the implementation of a semi-automatic mode where the user can run the milling cycle, capture and assess the images and continue the milling until the desired depth is achieved. The pseudocode for the measurement cycle is shown in Table 3 (The code can be found at the following link: [[https://github.com/earabul-sudo/RES-DIC-HD](https://github.com/earabul-sudo/RES-DIC-HD)]([https://github.com/earabul-sudo/RES-DIC-HD](https://github.com/earabul-sudo/RES-DIC-HD)) (accessed on 17 July 2022)). To image the hole, a high resolution, 48 MP industrial microscope was used, in combination with a 100\(\times\) C-mount lens, selected based on a target speckle-pattern density of 3-7 pixels [57]. This allowed the user to capture uncompressed, TIF format images as well as providing easy-to-use software that can capture a stack of images. For homogenous illumination of the measurement area, a ring light was used. In addition to the 2-axis actuation, the device featured adjustable spacers to accommodate multiple samples. These spacers connected to an optomechanical breadboard, where machined and 3D printed clamps could be mounted. This allows for adaptability, where custom experiment setups could be easily prototyped and used. \begin{table}
\begin{tabular}{c} \hline \hline
**Semi-Automatic Mode** \\ \hline
1: G28.1; Set the absolute home position \\ \hline
2: M8; Start chip blower \\ \hline
3: G1 X position Z position F feed rate; Move to the predefined drilling position, defined by the user \\ \hline
4: G91; Switch to incremental drilling mode \\ \hline
5: G30.1; Redefine the current position as the secondary home position \\ \hline
6: G1 Z position; Lower drill over the hole based on the zero-point measurement \\ \hline
7: G1; Drill the increment, allowing for dwell to ensure the hole is formed \\ \hline
8: G30; Move the drill back to the secondary home position \\ \hline
9: G28; Return to the absolute home position, align the DIC camera over the sample \\ \hline
10: M0; Wait for user input to continue drilling, once the satisfactory images are captured \\ \hline
11: Repeat steps 3–10 process until the desired hole depth is achieved \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Measurement cycle for the semi-automatic operation of the device. Figure 2: System architecture for the measurement device. The device can also be used for large samples or use 'in the field' as it can be mounted to a sample using the suction cups. The electronics box contains all the additional electronics for increased durability required for this application. As for the packaging of the device, the design relies on low-cost, durable laser cut, machined and 3D printed parts. Additional functionalities include probing functionality for accurate zero-point depth detection and an onboard chip blower. The key components used in the device along with their costing are listed below in Table 4.  
The operating principles of the measurement device are summarised in Figure 3. The DIC hole-drilling measurements start by applying the speckle patterns to a sample.