*2.2. PLA Matrix and NiTi Wires*

PLA is a thermoplastic material that has been widely used in components produced by AM, especially in Material Extrusion (MEX), due to the low melting point, good tensile stiffness and final surface quality. These properties potentiate the use of PLA as a matrix for the production of composite by MEX.

NiTi ribbons (cross-section 3 <sup>×</sup> 1 mm2), were previously processed by localized heat-treatment at 400 ◦C during 10 min along a 20 mm segment, using Joule effect (21 A current). Previously, the NiTi ribbon was coated with black ink in order to establish an emissivity of around 0.95. All temperature measurements were performed with the infrared camera Fluke Ti400. After the local heat-treatment, these ribbons and the sensors were impregnated in the PLA matrix during the AM process as described in the next section.

#### *2.3. Experimental Setup*

In order to assess the temperature and strain variations in samples of PLA matrix and verify the microstructural heterogeneity along NiTi wires, composed by heat-treated regions (marked in red) and the transition zones to the non-heat-treated zone, the experimental setup illustrated in Figure 2 with OFS was used.

PLA samples were produced with the commercial BQ Prusa i3 3D printer, having a design comprising a cavity at the half-thickness in order to incorporate the NiTi wire and the optical fiber. After the fabrication, the model was sliced in the open-source software CURA. The feedstock was PLA and the print core had a nozzle with 1.2 mm of diameter. The layer height was set to have 0.5 mm, infill to 100%, and the print speed was 7 mm/s. At the half-thickness, the print was paused and the NiTi wire with the optical fiber 1 was incorporated in the PLA matrix. This process was repeated to embed the fiber 2 in the sample.

Two sets of samples of PLA + NiTi ribbon + sensors were prepared: One for the experiments on thermal cycling (no external mechanical load applied) and the other for the tensile tests (mechanical loading/unloading without any external thermal excitation).

**Figure 2.** Experimental setup, sample cross-section view. Fiber 1 was embedded in the sample together with NiTi wire, while the 3D printing process was stopped for a few seconds. The same procedure was adopted to embed in the PLA matrix the cascaded sensor, recorded on fiber 2.

The FBGs (length of ~3.0 mm each) were recorded in a photosensitive SMF (GF1, Thorlabs Inc., Newton, MA, USA), by the phase mask method. The inscribing system consists of focusing UV (266 nm) laser pulses originated by a pulsed Q-switched Nd:YAG laser system (LOTIS TII LS-2137U Laser, Minsk, Belarus) onto the SMF core by a plano-convex cylindrical lens (working length of 320 mm), passing through a phase mask.

During the inscription of the FBGs, as well as throughout the experiments, the Bragg wavelengths were monitored by a single channel optical interrogator (sm125-500, Micron Optics Inc., Atlanta, GA, USA), operating at 1 Hz and wavelength accuracy of 1.0 pm. To read all the optical data at the same time, a 3 × 1 coupler was used.

Fiber 1 with the two FBGs were maintained strain-free, so they could detect temperature shifts of both heat-treated (FBG1) and non-heat-treated regions (FBG2). The cascaded sensor on fiber 2 simultaneously detected strain and temperature shifts on the PLA matrix. Externally, fiber 3, which has 2 FBGs (FBG3 and FBG room), was also placed in direct contact with the PLA sample surface to monitor external temperature shifts. The FBG room sensor was used out of the sample to monitor the room temperature variations, eliminating any possible external fluctuations.

The tensile tests were performed in a Shimadzu NG50KN, using a 50 kN load cell, a crosshead speed of 5 and 10 mm/min, and the maximum stroke of 6 % of the gauge length.

#### *2.4. Optical Fiber Sensing Calibrations*

FBG1, FBG2, and cascaded optical sensors integration on the NiTi wire and in the PLA matrix, respectively, were done during the 3D manufacturing process. In this case, the fibers were fully embedded in the sample, thus presenting a more accurate response towards strain and temperature, when compared to external sensing devices. Before being embedded in the material, the fiber coatings were removed to minimize the intrusiveness of the sensing structures, presenting a total thickness of only 125 μm.

Previous calibration of each sensing head towards each parameter was performed. Figure 3a,b shows the spectral response of the cascaded sensor and the FBGs after and before being embedded on the polymeric sample, and under two different temperatures, respectively. It is possible to observe the induced strain on the fiber sensors by the surrounding materials and a higher spectral change in the cascaded sensors, comparatively with the FBGs. Similar to other FBGs, the cascaded sensor (embedded in the PLA matrix) suffer higher induced strains.

**Figure 3.** (**a**) Spectral response of the OFS after and before embedded in the polymeric sample. (**b**) Response of the cascaded optical sensor and FBGs after embedded on the sample at two different temperatures (25.0 ◦C and 50.0 ◦C).

Table 1 presents the strain and temperature sensitivities of the sensors before and after embedding in the PLA matrix and NiTi wire. From the internal strain and temperature calibrations, and according to the matrixial method (Equation (5)), a determinant value of 8.23 was obtained for the cascaded optical sensor embedded in the PLA matrix.


**Table 1.** Temperature and strain sensitivities of the cascaded optical sensor and FBGs obtained before and after embedding in the PLA matrix and NiTi wire, respectively.

The thermal calibrations after and before the sensors' integration in the sample were performed in a thermal chamber (Model 340, Challenge Angelantoni Industrie, Massa Martana, Italy), between 15.0 ◦C and 60.0 ◦C, in steps of 5.0 ◦C. The strain characterization was performed using a micrometric translation stage between 0 με and 1000 με, in steps of 50 με.

### **3. Results and Discussion**
