1 Introduction

Since its inception, additive manufacturing (AM) has revolutionized production processes, challenging the conventional subtractive approach [1]. Thanks to its unparalleled design freedom, AM has found applications in diverse sectors, from biomedical [2, 3] and aerospace [4] to the luxury industry [5] and motor racing [6, 7]. Presently, significant efforts are dedicated to developing new materials for additive manufacturing, aiming to enhance the functionality of AM components and broaden the scope of applications for AM [8,9,10]. For instance, composite filaments incorporating graphene have been devised to create conductive materials for the fabrication of functional electronic components via AM [11, 12]. This innovation opens up a wide array of possibilities for applications, including the creation of AM parts with embedded sensing capabilities. These components can serve various purposes, such as detecting damage and predicting failure in structures [13], using strain gauges to monitor object deformation in real time [14], or developing wearable electronic devices that monitor signals related to body movements [15, 16].

When the primary goal is to monitor the structural integrity of a part under load in real-time during its use, strain gauges can be incorporated either on the surface or within the inner volume of a product through layer-by-layer fabrication, in contrast to conventional manufacturing processes. The most common strain gauge systems measure changes in two distinct electrical properties: capacitance [17, 18] or resistance [19, 20]. In both cases, the application of an external force on the sensor leads to strain, causing a proportional change in the specific electrical property based on deformation. Traditional manufacturing technologies for both types of flexible strain gauge sensors include photolithography [21] and soft lithography [22]. However, these processes have limitations: the former is time-consuming, while the latter achieves lower measurement accuracy.

For this reason, various studies have been conducted to explore new manufacturing technologies. For instance, Han et al. proposed the fabrication of a sensitive and flexible strain sensor using a micro-molding and stamping process [23]. More recently, AM has enabled the production of customized strain gauge sensors tailored to specific applications that demand a high level of accuracy and integration. One early example involved the use of an AM fabricated mold for casting graphite powder [24] or a carbon black and polydimethylsiloxane composite for the manufacturing of a low-force sensor [25]. Hinderdael et al. designed and tested a strain-sensing element consisting of a closed capillary system inside an AM tensile test sample with fluid connected to an external pressure sensor [26]. However, aside from one prior work concerning an AM produced strain sensor on polylactic acid (PLA) specimens [27], much of the existing literature has primarily focused on the AM of conductive inks for flexible substrates [28,29,30,31] or on conductive polymer-based composites [32]. Consequently, there is still a lack of investigation into the opportunity to incorporate a monitoring system directly within an inner layer or on the surface of an AM part.

Therefore, this research explores the AM production of a strain gauge system directly onto the surface of tensile specimens for real-time strain monitoring. The experimental activities involved designing and fabricating samples, co-fabricating a tensile specimen with a resistance-based strain gauge, using two different materials. A Wheatstone bridge was configured for low-cost data acquisition using an Arduino board to measure the output voltage variation of the strain gauge. Initial tensile tests were used to model the behaviour of the strain gauge according to the true deformation measured by the extensometer of the testing machine. The relationship between voltage variation and true deformation was used to live monitor the strain of other tensile specimens during the experimental tests. In addition, the strain results were supported by mapping local specimen deformations using digital image correlation (DIC). The novelty and significance of this work lie in the capability to directly manufacture strain gauges onto object’s surfaces, overcoming challenges in gauge installation. Utilizing an AM technique enables the creation of intricate geometries that conform to specific shapes, fitting into tight spaces, which would be more challenging with traditional manufacturing. The proposed approach eliminates the need for strain gauge installation on the part surface and related errors caused by improper device installation or poor adhesion. All these advantages position AM embedded sensors as an appealing alternative to traditional strain sensors.

2 Materials

The materials used for the production of the tensile specimens with the embedded strain gauges were supplied by FiloAlfa (FiloAlfa, Milano, Italy) and are described in the following subsections together with the specific geometry of the specimens and their fabrication.

2.1 Filament materials

In the experimental campaign aimed at assessing the feasibility of using an AM embedded strain gauge for live monitoring part deformations, two distinct filaments were used. The first was a polyethylene terephthalate glycol (PETG) filament, while the second was made of N-ASA material. Both materials were used for the fabrication of tensile specimens.

PETG is a type of thermoplastic polymer that combines the benefits of both PLA (Polylactic Acid) and ABS (Acrylonitrile Butadiene Styrene). PETG filament is transparent and is known for its high strength and durability, making it suitable for functional prototypes and end-use parts. It also has good chemical resistance, making it resistant to many solvents and chemicals. PETG has lower shrinkage compared to ABS, reducing the likelihood of warping during the AM process.

N-ASA filament is designed to mimic the properties of ASA (Acrylonitrile Styrene Acrylate). ASA is known for its UV resistance and durability, making it suitable for outdoor applications. It is similar to ABS (Acrylonitrile Butadiene Styrene) but has improved weather resistance, making it less prone to yellowing or degrading when exposed to sunlight.

In this preliminary study, we used a conductive Grafylon 3D filament for the strain gauge. Grafylon 3D is a commercial-grade polylactic acid-based composite reinforced with pristine graphene nanoplatelets (GNPs).

The characteristics of the three types of filaments (2.85 mm diameter) are reported in Table 1. The values of the tensile modulus and tensile strength of the Grafylon filament were derived from the ones of the PLA filament following the indications of FiloAlfa. With reference to PLA properties, for Grafylon the supplier declares an increase of 34% for the tensile modulus and 23% for the tensile strength.

Table 1 Characteristics of the filaments used for the experimental campaign

2.2 Geometry of the tensile specimens

The tensile specimens were designed with reference to the Type I specimen of the ASTM D638 standard. In this preliminary investigation, an embedded strain gauge was designed to be included on the top surface of the specimen. Another possibility is to include the strain gauge in the inner volume of the specimen within a layer when it is fabricated flat on the platform.

Considering a thickness of 3.2 mm for the tensile specimen and a layer thickness of 0.2 mm for the AM process, the strain gauge was designed with the main dimensions shown in Fig. 1. In this figure, the specimen material appears red in its outline and light gray through its thickness, while the conductive track of the strain gauge is represented in black.

Fig. 1
figure 1

CAD model of the tensile specimen with the embedded strain gauge and magnification of the strain gauge zone (dimensions in millimetres)

The entire width (13 mm) of the tensile specimen was exploited to cover a wider area with the strain gauge, which had a length of 10.7 mm. Shorter and longer lengths were also produced and tested with no significant results for the monitoring goal. A zig-zag shape was reproduced from the metallic filament of a standard foil strain gauge.

Considering the accuracy in the 0.2 mm layer, a width of 0.6 mm was assigned for the deposition of a continuous single track of the conductive filament that made the strain gauge. The continuous track develops in the zig-zag shape through seven opposite bends to separate two adjacent parallel straight segments of the gauge by 0.6 mm.

The strain gauge was fabricated with two layers of conductive filament for a total thickness of 0.4 mm. These two layers were included in the second-last (n-1) and last layer (n) of the deposition path of the specimen. Therefore, the top layer of the strain gauge is aligned to the top surface of the specimen, as shown in the magnification of the strain gauge area in Fig. 1.

Experimental testing of other versions of the strain gauge laid onto the specimen surface or embedded beneath the surface of one layer thickness (0.2 mm) was unsuccessful. A lower penetration depth and a smaller thickness of the co-produced strain gauge resulted in premature failure or detachment of the sensor from the specimen surface.

At both ends of the strain gauge track, the initial short straight segment, which moves from the sides of the tensile specimen to the beginning of the zig-zag shape, was left empty for approximately 2 mm in the final layer. This empty volume is also represented by the two dashed black segments in Fig. 2c, where the deposition path in the middle area of the tensile specimen is shown in gray for the part material and in black for the strain gauge. The void serves as a seat for placing the metallic pin at the ends of the wires used to complete the Wheatstone bridge and connect the strain gauge to the data acquisition system (Fig. 5).

Fig. 2
figure 2

PETG tensile specimen with the raft and the embedded strain gauge of Grafylon material (a); magnified detail of the Grafylon strain gauge in the PETG specimen (b); corresponding deposition path (c); N-ASA tensile specimen with embedded strain gauge of Grafylon material (d); magnified detail of the Grafylon strain gauge in the N-ASA specimen (e)

2.3 Fused filament fabrication of the samples

The CAD model of the strain gauge in Fig. 1 was saved in the STL format separately from the model of the specimen but with the same Cartesian reference frame. The two STL files were then imported into the open KISSlicer software for the slicing operation.

Within the KISSlicer software, the PETG material or the N-ASA material was assigned to the tensile sample model, while the Grafylon material was assigned to the strain gauge model. The AM technique used for producing the samples was fused filament fabrication (FFF), and an A4v3 (3ntr, Novara, Italy) was employed for sample production. Key FFF parameters are outlined in Table 2.

Table 2 Main FFF parameters for the production of the tensile specimen with the strain gauge

A raft of the main material was added at the base of the specimen to promote adhesion to the heated bed and to constrain the shrinkage of the first part layers. Figure 2 shows examples of fabricated specimen replicas. For the PETG specimen (Fig. 2a), a magnified detail of the FFF quality for the strain gauge and surrounding area is shown in Fig. 2b, whereas the corresponding deposition path of the G-code file is shown in Fig. 2c. For the N-ASA specimen (Fig. 2d), the magnification of the strain gauge area is shown in Fig. 2e.

From these images, it can be observed that the FFF quality for the continuous deposition of the Grafylon filament is excellent. This result ensures that the strain gauge is electrically conductive when two wires are connected at its opposite ends as shown in Fig. 5b.

For the experimental campaign, we fabricated seven replicas of the PETG specimen and another seven for the N-ASA sample.

3 Methods

Before performing the experimental tensile test of the samples, we designed an acquisition system for strain measurement with the embedded strain gauge. The setup of this system is as follows.

3.1 Wheatstone bridge design

The operating principle of an electrical resistance strain gauge exploits the variation in the resistance when the gauge is deformed. When a wire of a conducting material is subjected to tensile stress, its electrical resistance increases proportionally to the applied force and the resulting elongation. If the strain is not excessive, the relationship between the change in resistance and the strain is linear and reversible [33]. The resistance \(R\) of a wire of the conducting material is expressed by Eq. 1:

$$R=\rho \frac{l}{A}$$
(1)

where \(\rho\) is the resistivity of the material, \(l\) is the length of the wire, and \(A\) is its cross-sectional area [34].

Differentiating and dividing the previous equation by \(R\) we get Eq. 2:

$$\frac{\Delta R}{R}=\frac{\Delta \rho }{\rho }+\frac{\Delta l}{l}-\frac{\Delta A}{A}$$
(2)

where the term \(\frac{\Delta \rho }{\rho }\) is the relative resistivity change, \(\frac{\Delta l}{l}\) is the longitudinal deformation (\({\varepsilon }_{{\text{l}}}\)) of the wire, and \(\frac{\Delta A}{A}\) is the relative variation in its cross-sectional area.

In the case of a circular wire of diameter \(d\), the relative variation in the cross-sectional area can be expressed by Eq. 3:

$$\frac{\Delta A}{A}=\frac{2\Delta d}{d}={2\varepsilon }_{{\text{t}}}$$
(3)

where \({\varepsilon }_{{\text{t}}}\) denotes the transverse strain of the wire. For a conductor undergoing uniaxial stress along the longitudinal direction, the transverse contraction (\({\varepsilon }_{{\text{t}}}\)) is related to the longitudinal strain (\({\varepsilon }_{{\text{l}}}\)) by the Poisson coefficient (\(\nu\)) of the material, according to Eq. 4:

$${\varepsilon }_{{\text{t}}}=-\nu {\varepsilon }_{{\text{l}}}$$
(4)

Thus, by substituting Eq. 4 into Eq. 3 we obtain:

$$\frac{\Delta A}{A}=2{\varepsilon }_{{\text{t}}}=-2\nu {\varepsilon }_{{\text{l}}}$$
(5)

The substitution of Eq. 5 into Eq. 2 yields:

$$\frac{\Delta R}{R}=\frac{\Delta \rho }{\rho }+\left(1+2\nu \right){\varepsilon }_{{\text{l}}}$$
(6)

This expression shows how the variation in the relative resistance \(\frac{\Delta R}{R}\) is related to the strain \({\varepsilon }_{{\text{l}}}\) and to the variation in relative resistivity \(\frac{\Delta \rho }{\rho }\) which also depends on the longitudinal deformation. Therefore, the relationship between the resistance variation \(\frac{\Delta R}{R}\) and the longitudinal strain \({\varepsilon }_{{\text{l}}}\) is the basis for electrical resistance strain gauge devices.

To measure the small changes in resistance induced by the deformation of the strain gauge, a Wheatstone bridge circuit (Fig. 3a) was used to increase the sensitivity of the system.

Fig. 3
figure 3

Classic Wheatstone bridge with four different resistances (a) and Wheatstone bridge with three identical resistances R and a strain gauge S (b)

In a Wheatstone bridge with four resistances RI, RII, RIII and RIV, the resistance variation can be measured by reading the potential difference \(U\), called the unbalance voltage, which is generated at the unpowered ends of the bridge [35]. The relationship between the unbalance voltage U and the supply voltage V can be related to the strain and expressed by the formula in Eq. 7:

$$U=\frac{V}{4}\left(\frac{{\Delta R}_{{\text{I}}}}{{R}_{{\text{I}}}}-\frac{{\Delta R}_{{\text{II}}}}{{R}_{{\text{II}}}}+\frac{{\Delta R}_{{\text{III}}}}{{R}_{{\text{III}}}}-\frac{{\Delta R}_{{\text{IV}}}}{{R}_{{\text{IV}}}}\right)=V\frac{K}{4}\left({\varepsilon }_{{\text{I}}}-{\varepsilon }_{{\text{II}}}-{\varepsilon }_{{\text{III}}}-{\varepsilon }_{{\text{IV}}}\right)=V\frac{K}{4}{\varepsilon }_{{\text{tot}}}$$
(7)

where \(K\) is the proportionality factor [36].

If the four resistances are equal, then voltage U is zero because there is no potential difference at the output. However, if RIV is changed to the strain gauge corresponding to a value S that does not equal the other three resistances R (Fig. 3b), the bridge will become unbalanced, and a voltage U will exist at the output terminals. When no strain is applied to the strain gauge, the Wheatstone bridge is initially considered balanced. In this balanced state, the voltage output approaches zero. As strain is applied to the material with the attached strain gauge, the balance is disrupted, causing an imbalance in the bridge and leading to a measurable voltage output U [37].

The configuration of the Wheatstone bridge used in this study is illustrated in Fig. 4. A value of 120 Ω was chosen for the three R resistances, consistently with the most common applications in the literature concerning the analysis of monitoring systems [38]. To minimize the additional resistance Rc introduced by the wires connecting the strain gauge to the acquisition board, each wire was connected in series to one of the two adjacent branches of the bridge. Using this setup, the apparent deformations were eliminated, and the third violet cable was used to read the unbalance voltage U of the bridge. This third cable did not introduce errors because the voltage drop at its ends was negligible as almost no current circulated in it.

Fig. 4
figure 4

Graphical representation of the Wheatstone bridge used for the experimental campaign

3.2 Assembling and programming of the acquisition system

The entire acquisition system was created using a breadboard for electrical connections and wiring with an Elegoo UNO R3 device, which is a low-cost version of the Arduino UNO board (Fig. 5).

Fig. 5
figure 5

Graphical representation (a) and the real implementation (b) of the data acquisition system with Wheatstone bridge wiring

This board offers fourteen connectors for digital input/output (I/O), and the operation is established by special instructions programmed in the integrated development environment (IDE). The board also has six other connectors specifically dedicated to analog signal inputs. These pins are connected to an analog/digital converter (ADC). The ADC converts to 1024 discrete levels (0 to 1023) the voltage values up to a maximum of 5 V received from external sensors.

The Wheatstone bridge was powered with a V voltage of 5 V. Thus, the green and blue wires had to be connected to the Elegoo output pins labelled 5 V and GND, respectively. The yellow and purple wires are the output wires of the system, which must be connected to the analog pins A0 and A1 of the UNO board, respectively. Hence, the unbalance voltage U of the Wheatstone bridge was read as the difference in the values of the A0 input to the A1 input. Finally, the black and red wires connected the AM fabricated strain gauge to the Wheatstone bridge. The end pins of these wires were glued with cyanoacrylate to the 2 mm side seats (Figs. 1, 2) of the Grafylon strain gauge on the last layer of the tensile specimen to ensure good connection throughout handling and testing.

Because Arduino UNO cannot directly save acquired data, the PLX-DAQ web application was used for this functionality. PLX-DAQ is a Parallax microcontroller data acquisition add-on tool for Microsoft Excel. This tool can record the collected data, that is, milliseconds and voltage values, directly in an Excel spreadsheet for later analysis. For data acquisition, the Arduino code, which is also called sketch, was written starting from the open function ReadAnalogVoltage [39]. The code (Fig. 14 in the Appendix) has two main functions: setup and loop. The former is executed only once when the sketch is run to set the initial values of the variables or initialize the libraries used. The latter function indicates that the instructions contained within it are executed cyclically.

After declaring the time and voltage variables, the three lines in the setup section set the speed for serial data transmission to 9600 bits per second, clear all data and define the header labels for the Excel columns that will be filled with the data.

The first line of the loop section returns the time interval, expressed in milliseconds that elapsed since the execution of the code. The value of the bridge unbalance voltage U is then calculated as the difference between the board voltage values returned by pins A0 and A1. This difference is multiplied by the voltage (5 V) at which the bridge is powered and divided by the number of discrete levels, i.e. 1023. To appraise small variations in the unbalance voltage U of the Wheatstone bridge, the voltage difference was amplified by a factor of 105. Final code lines including “serial.print” or “serial.println” were used to transfer and display the data in the Excel file through the PLX-DAQ. The last line with the delay command pauses the code execution for 2 ms to complete the data transfer before the next acquisition.

3.3 Modelling of the strain gauge behaviour

For real-time monitoring of the deformation of the tensile specimen using the acquisition system described above, the behaviour of the FFF embedded strain gauge should be modelled and described by a mathematical equation that relates the strain of the tensile specimens with the unbalance of the Wheatstone bridge acquired by the Elegoo UNO board.

According to previous Eq. 7, there is a linear relationship between these two variables, that can be expressed as:

$$y=a x$$
(8)

where y is the strain to be monitored, x is the variation in the output voltage of the Wheatstone bridge and a is the proportionality coefficient.

To compute the experimental value of the constant a for each of the two materials, the tensile tests of four PETG specimens and four N-ASA specimens are carried out. For each material, the tensile data of the first four specimens is used as a training set and the linear relationship expressed by Eq. 8 is computed through the least square line that better fits the experimental data.

The determination coefficient R2 is then used as a measure of how well the linear regression model fits the data of the training set. The linear regression model of each material is then used to predict the strain of the remaining three specimens during the additional corresponding tensile tests.

3.4 Tensile tests

The tensile tests of the AM fabricated samples were carried out using an Aura 10 T (Easydur, Arcisate, Italy) testing machine equipped with automatic hydraulic grippers. The test speed was set at 5 mm/min, with a frequency of acquisition of load cell value of 1000 reads per second.

An extensometer was placed on the tensile specimen to measure the instantaneous elongation of the material. Tensile tests in accordance with ASTM D638 standard were carried out. Young’s modulus (E) and ultimate tensile strength (UTS) were obtained from stress–strain curve, while yield strength was determined using the 0.2% offset technique. The entire configuration of the testing equipment, including the data acquisition with Wheatstone bridge wiring, breadboard, and Elegoo Uno R3 board is shown in Fig. 6.

Fig. 6
figure 6

Configuration of the experimental setup for the tensile tests with the extensometer in blue and the breadboard for wiring of the Wheatstone bridge with connections to the Elegoo UNO R3 board

The tensile test was initially carried out for four tensile specimens with the embedded strain gauge to verify the repeatability of experimental results and to compute the linear regression for modelling the behaviour of the strain monitoring system in the case of the PETG and N-ASA materials. The tensile test was then repeated for the other three specimens of each material. The tensile data of these three specimens was used as a test set to validate the functionality of the monitoring system based on the embedded Grafylon strain gauge. The additional tensile test data also contributed to increasing the robustness of the experimental results regarding the mechanical properties of the tested materials.

3.5 Digital image correlation

To better analyze the behavior of the co-produced strain gauge during the tensile tests, the digital image correlation (DIC) method was also used for optical strain measurements. To this aim, an external USB camera was placed inside the tensile testing machine in front of the strain gauge area of the specimen. The camera has a 2 Megapixels Sony IMX322 sensor and comes with a 5–50 mm varifocal lens. Before testing the surface of the specimen pointed toward the camera was sprayed with small droplets of acrylic red paint (Fig. 12) to create a random speckle pattern for the application of the DIC method.

A video of the test was recorded at 30 fps. The frames were later exported and imported into the GOM Correlate software (GOM GmbH, Braunschweig, Germany) for DIC analysis. The DIC method works by comparing subsequent images to track changes in the pattern of the specimen surface features, which are indicative of local displacements and strains during testing. After importing the frame into the GOM Correlate environment, a timeline was processed for strain evaluation with an analysis zone centered on the strain gauge and its surroundings.

3.6 Optical microscopy

To further support the experimental analyses, some photos with magnified details of the strain gauge on the specimens were taken using a Leica S9i (Leica Camera AG, Wetzlar, Germany) stereomicroscope. This microscope has a maximum magnification of 55 × and an integrated 10 Mpixels camera for capturing full HD (1080p) images (Figs. 2b and 13).

4 Results and discussion

All experimental results of the undertaken campaign for PETG and N-ASA samples are presented and discussed in this section.

4.1 Tensile test results

The results of tensile tests on specimens with the co-produced Grafylon strain gauge are summarized in Table 3 and 4 for those produced in PETG and N-ASA, respectively.

Table 3 Tensile properties of PETG specimens: Young’s modulus (E), yield strength (σy), ultimate tensile strength (UTS), and elongation at break (eMAX)
Table 4 Tensile properties of N-ASA specimens: Young’s modulus (E), yield strength (σy), ultimate tensile strength (UTS), and elongation at break (eMAX)

Analyzing the results for PETG, the average values of the mechanical properties are consistent with previously reported studies for fabrication via FFF of PETG samples [40, 41]. All stress–strain curves exhibited a linear elastic behaviour up to a strain of about 0.0125, corresponding to an average stress of 21.8 MPa. Then, the linear behaviour is followed by a nonlinear response, where the stiffness starts decreasing until fracture occurs. Although the tensile tests were performed with displacement control, no strain softening zone was detected for any specimen. In contrast, a strain hardening response was observed for specimens 2 and 3 after the yield point, leading to higher UTS and eMAX values compared to the other specimens. For this reason, all specimens recorded comparable Young’s modulus (E) and yield strength (σy) values, whereas they exhibited higher variability in the results for the ultimate tensile strength (UTS) and elongation at break (eMAX). For example, between specimens 3 and 7, differences of 17% in the UTS and 70% in the maximum strain were observed. Since no modifications in either material composition or fabrication conditions were introduced, these variations could only be ascribed to inaccuracies in the FFF process, such as poor adhesion at the interface between the different layers or non-uniform extrusion and deposition of the material.

Considering the data presented in Table 4, the variability of mechanical properties for N-ASA sample is smaller than that of PETG, especially for the ultimate tensile strength, yield strength, and elongation at break. N-ASA sample had a rather brittle failure, in fact, after the initial zone of elastic linearity, there is a yielding, followed by a sudden fracture without any signs of strain hardening nor softening like the majority of the PETG specimens.

4.2 Strain gauge model

For each of the two PETG and N-ASA materials, the tensile test data of the first four specimens were used as a training set to model the behaviour of the monitoring system made of the Wheatstone bridge for the Grafylon strain gauge and Elegoo UNO R3 board. With the settings of the open code ReadAnalogVoltage [39] reported in the appendix (Fig. 14), the board recorded 36 voltage measurements per second.

Given the large number of values, the maximum recorded voltage value was identified for each second of measurement. Nevertheless, only the voltage peaks measured by the acquisition system were considered significant because they correspond to the imbalance of the Wheatstone bridge owing to an increase in strain. The system had a resolution of 4.88 mV and all peaks were recorded at multiples of this value, ranging from 0 to 24.43 mV. The voltage difference was calculated by subtracting the value of the output voltage U from all peaks at the start of the tensile test.

Using the data in Table 5 for modelling purposes, a relationship was identified between the voltage difference x and the maximum experimental strain y detected by the extensometer of the AURA 10 T machine within the same second for the four specimens of the PETG training set.

Table 5 Tensile test data for the strain gauge of the first four PETG specimens

The experimental data in Table 5 shows that the FFF strain gauge works correctly as the increase in the voltage difference of the Wheatstone bridge corresponds to an increase in the specimen strain.

The linear regression model computed for the training set of PETG material is reported in Eq. 9:

$${y}_{{\text{PETG}}}=4.880\cdot {10}^{-4}x$$
(9)

The value of the determination coefficient R2 was 0.944. Such a high value indicates a good correlation between the voltage difference and the strain. Figure 7a shows the experimental points for the specimens of the training set and the regression line for the PETG material.

Fig. 7
figure 7

Linear regression lines and experimental data for the tensile PETG specimens of the training set (a) and the PETG specimens of the test set (b)

The experimental data of the N-ASA training set is summarized in Table 6. The corresponding regression model is expressed in Eq. 10:

Table 6 Tensile test data for the strain gauge of the first four N-ASA specimens
$${y}_{{\text{N}}-{\text{ASA}}}=3.481\cdot {10}^{-4}x$$
(10)

The value of the determination coefficient R2 was 0.903 for N-ASA. The correlation between the linear model and the experimental data was still good, but not as high as that of the PETG material. Figure 8a shows the experimental points for the specimens of the training set and the regression line for the N-ASA material.

Fig. 8
figure 8

Linear regression lines and experimental data for the tensile N-ASA specimens of the training set (a) and the N-ASA specimens of the test set (b)

4.3 Validation of the strain monitoring system

For each of the two PETG and N-ASA materials, the corresponding regression model was then used to predict the deformations of the other three tested tensile specimens for real-time monitoring purposes. During the tensile tests, the experimental deformation of each specimen was recorded by the extensometer of the AURA 10 T machine but also estimated through the Elegoo board for each change in the voltage difference of the Wheatstone bridge.

The experimental data of the test set including specimens 5, 6 and 7 is shown in Fig. 7b for PETG and Fig. 8b for N-ASA, together with the corresponding regression line. The prediction and monitoring error of the embedded Grafylon strain gauge is summarized in Table 7 and 8 for PETG and N-ASA, respectively.

Table 7 Validation of the predictive model for monitoring the strain of the additional three PETG specimens through the AM fabricated gauge monitoring system
Table 8 Validation of the predictive model for monitoring the strain of the additional three N-ASA specimens through the AM gauge monitoring system

The linear law of the strain gauge behaviour predicted the real deformation of the PETG sample with a minimum relative error of less than ± 5% and a maximum relative error of approximately 47%. The errors were quite low for smaller deformations related to small voltage differences of 4.88 mV or 9.77 mV. However, the deviation between the estimated and real strains increases for larger deformations. The linear model tends to overestimate the real strain because the negative relative errors are small compared with the positive ones.

The linear regression model for monitoring the deformation of the test set specimens of N-ASA provided worse results than those obtained for the PETG material. The minimum unsigned relative error was less than 10%, while the maximum error reached 100% for specimen 6 at a voltage difference of 9.77 mV.

As the predictive models and related errors of the proposed strain monitoring system depend on the experimental data of the training set, an in-depth analysis of the system performance is presented in the following section.

4.4 Analysis of strain monitoring performance

The experimental results presented in the previous section depended on the data and specimens used for the training and test sets of the regression models. Therefore, to provide a thorough analysis of the performance of the proposed strain monitoring system, all different combinations of four out of the seven specimens were considered for the training set of each material.

For each combination, a new linear regression model was computed and the relative proportionality coefficient a of Eq. 8 was estimated as in the previous Sect. 4.2.

For each combination, the remaining three specimens were used as the test set, and the validation analysis described in Sect. 4.3 was repeated. The unsigned relative errors for the test set of all 35 combinations were calculated and saved for each voltage difference and the corresponding experimental strain, as shown in Table 7 and 8.

For conciseness, the results of the analysis are summarized by box plots without outliers in Fig. 9. This chart presents the statistics of the distribution of unsigned relative errors of the linear regression model of the co-produced strain gauge behaviour for both PETG and N-ASA. The relative error distribution is shown in Fig. 9 for different strain ranges with increasing intervals of 0.002. The results show that, in most cases, the linear model provides lower errors for the PETG material than for the N-ASA.

Fig. 9
figure 9

Boxplot without outliers of the unsigned relative errors of the two monitoring models for different ranges of the specimen strain

For small strain values up to 0.004, the monitoring error of the Grafylon strain gauge was quite high, with error peaks up to 120% for PETG and up to 180% for N-ASA. As the specimen strain increases, the monitoring error decreases. For strains between 0.004 and 0.010, the unsigned relative error was lower than 60% for both materials. For strains exceeding 0.010, the unsigned relative error was smaller than 30% for both PETG and N-ASA.

The stress–strain curves for the tested PETG sample are plotted in Fig. 10. Considering the 90th percentile of the data distributions in light blue in Fig. 9, colored vertical bands were added to represent the maximum unsigned relative error of the strain monitoring with the linear regression model.

Fig. 10
figure 10

Stress–strain curves of PETG sample. The colored vertical bands represent the unsigned relative error limit of the strain monitoring system with quadratic law for the 90th percentile of experimental data

Green indicates a relative error lower than 30%, yellow indicates a relative error up to 60%, orange indicates a relative error up to 90%, and red indicates that the error exceeds 100%. Therefore, the alternation of colors depends on the strain ranges and extension of the whiskers in the boxplot of Fig. 9.

The same representation of the tensile test results is provided in Fig. 11 for the N-ASA material using the 90th percentile of the data distributions in white in Fig. 9.

Fig. 11
figure 11

Stress–strain curves of N-ASA sample. The colored vertical bands represent the unsigned relative error limit of the strain monitoring system with quadratic law for the 90th percentile of experimental data

For both materials, the strain gauge had the worst performance for small deformations that are not able to induce changes in the output voltage of the Wheatstone bridge consistently with the sensitivity of 4.88 mV.

Moreover, from Fig. 10 and Fig. 11, it can be observed that, for most of the specimens, the strain could not be monitored in the plastic part of the tensile curve until failure. Hence, it can be concluded that the proposed monitoring approach works only in the elastic range and for small permanent strain of the tensile specimens.

For each specimen, this conclusion also arises from the comparison of the maximum strain emax of the tensile test in Table 3 and 4 with the maximum experimental strain yMAX corresponding to the maximum voltage difference xMAX measured by the strain gauge system in Table 5 and 7 for the PETG and Table 6 and 8 for N-ASA. The Grafylon strain gauge works better for higher values of the strain within the elastic limit of the material but fails to properly follow the deformation of the specimens in the plastic field up to failure. The coverage of the tensile test by the monitoring system was computed as the ratio between the value of the strain corresponding to the last voltage difference recorded by the Elegoo board and the final strain point provided by the extensometer of the Aura 10 T machine. The ratios for the PETG sample are summarized in Table 9.

Table 9 Monitoring coverage of the tensile test of PETG sample as the percentage ratio between the maximum strain monitored by the embedded strain gauge system and the final strain measured by the extensometer

For the PETG material, it can be observed that in the worst situation of specimens 2 and 7, the testing could be monitored for slightly more than 30% of the maximum strain eMAX. However, the coverage almost doubled to approximately 62% in the best cases.

Similar results were observed for N-ASA, as reported in Table 10.

Table 10 Monitoring coverage of the tensile test of N-ASA sample as the percentage ratio between the maximum strain monitored by the embedded strain gauge system and the final strain measured by the extensometer

In the case of N-ASA, the worst coverage is observed for specimens 3 and 7 because the testing could be monitored for less than 30% of the maximum strain eMAX. However, the coverage almost doubled to approximately 50% for specimens 4 and 5. The maximum coverage of 68% was obtained for specimen 2.

Overall, the experimental results of this study are slightly worse than the previous research by Coleman et al. [42]. These authors fabricated a strain gauge using a conductive PLA filament by Protopasta on both sides of a small strip of PLA substrate. The strain gauge had a depth of 0.2 mm and was produced with a layer thickness of 0.1 mm with an extrusion width of 1 mm. Therefore, the sensor was not embedded directly in the part, but the strip was placed on the surface of the part. However, the strip was tested alone in different configurations. In the best case of the configuration of a temperature-compensated half Wheatstone bridge, the authors obtained average strain monitoring errors lower than 10% and a maximum error of up to 20% over a working range of approximately 0.15% strain. Thus, for very small deformations, their system performed better than that proposed in this study. Nevertheless, as the strip was tested alone, issues related to strip installation and adhesion to the part surface were not considered by those authors.

4.5 Deformation analysis by digital image correlation

To explain the reason for the limited monitoring coverage, the analysis of the data retrieved by digital image correlation was carried out using the GOM Correlate software for specimen 6 of PETG material. In the four images in Fig. 12, the local deformation of the PETG material in the load direction is shown in the strain gauge area of the specimen at different stages of the tensile test after 4, 8, 16 and 20 s from the start.

Fig. 12
figure 12

Local deformation of the strain gauge of specimen 6 at different stages of the tensile test: 4 s, 8 s, 16 s, and 20 s (from left to right)

At the beginning of the test (Fig. 12a), when the applied stress was low, the strain of the specimen was less than 0.2% and was uniform. As the stress increased (Fig. 12b), bands with higher local deformation began to appear in the strain gauge area. As the test proceeded further (Fig. 12c), the strain increased to approximately 2% because of the higher applied loads. At this stage, the deformation gradient also increased as the difference in the color of the strain bands became more visible. The presence of non-uniform deformations on the strain gauge led to ineffective performance of the monitoring system. Just before specimen failure (Fig. 12d), the gradient became even more pronounced, and the strain increased more significantly at the upper and lower extremes of the strain gauge where the strain in the red areas exceeded 5%. In contrast, the strain remained lower in the center of the strain gauge. The observed variation could be attributed to the existence of U-turns in the strain gauge geometry. The Grafylon filament's longitudinal segments align with the load direction, allowing them to handle stress more effectively than the curved sections. The strain gradient induces warping and delamination of the continuous Grafylon filament from the PETG specimen's substrate.

4.6 Optical microscopy

This conclusion was also supported by optical microscopy results. The three photos of the Grafylon strain gauge in Fig. 13 were taken on broken specimen 6 of PETG material. From these images, it can be assumed that the PETG material underwent brittle fracture because a flat fracture surface is visible with minimal plastic deformation or necking of the material before the break. The location of the fracture surface corresponds to the top red stripe of the high deformation in the DIC analysis, as shown in Fig. 12d.

Fig. 13
figure 13

Optical microscopy images of the fracture zone of a FFF tensile specimen of PETG material with the embedded strain gage: side view (a); front view (b) and isometric view (c)

In Fig. 13a, the side view of the specimen shows the layers and the minimal deformation of the strain gauge after the break. From the front view of Fig. 13b, poor adhesion between the metal pins of the wires of the Wheatstone bridge and the side seats of the Grafylon material (Figs. 1 and 2) can be excluded because some portions of the strain gauge are missing at the connection points. When disconnecting the wires at the end of the tensile test, some small pieces of the Grafylon filament remained attached to the metal pins. Owing to good adhesion, the monitoring activity could be conducted properly without issues related to the electrical signal transmission through the Wheatstone bridge to the Elegoo board.

Nevertheless, the isometric view in Fig. 13c shows that the strain gauge is deformed and the Grafylon filament did not remain flat during the test because of poor interface adhesion. The previous literature largely discussed the importance of interface compatibility to achieve high mechanical performance for polymer composite materials [43], and for polymer blends [44]. Related to FFF processes, the multi-material adhesion mechanisms were investigated [45] as well as the sandwich-structured components [46, 47]. All studies highlighted the fundamental role of adhesion between different materials in achieving high resistance for AM parts. An interesting study was conducted by Stano et al. exploring different parameters, i.e., infill pattern, mesh overlapping, and annealing post-treatment, influencing the multi-material adhesion between soft and stiff materials to mimic bioinspired structures [48].

In our study, when the co-produced strain gauge warped and detached from the PETG substrate because of the non-uniform local strain mapped in Fig. 12, the data monitoring system no longer sensed the strain progress (monitoring coverage in Table 9). The final fracture of the specimen may have emphasized the deformation and detachment of the strain gauge, but the monitoring coverage did not exceed 63% in the best case. Considering the maximum monitored strain in Table 9, when the strain reached a value of approximately 0.012 (1.2%), the Grafylon gauge was already too deformed to further follow the deformation of specimen 6. Similar considerations can be drawn for N-ASA sample, as the monitoring and coverage results are in line with those of the PETG material.

5 Conclusions

This study aimed to explore the potential use of multi-material FFF technology for creating embedded Grafylon strain gauges within parts produced through AM using PETG or N-ASA material. The goal was to monitor part deformation in real time during tensile tests using a low-cost acquisition system with an Arduino UNO board.

Initially, a set of calibration specimens was employed to establish an experimental model of strain gauge behaviour. Subsequently, additional specimens were included in the test set to validate the experimental model, leading to the following conclusions:

  1. 1.

    Part deformations can be detected and real-time monitored using the embedded strain gauge produced via FFF.

  2. 2.

    The monitoring system exhibited generally lower accuracy for small deformations compared to the accuracy observed for strain values between 0.010 and 0.015.

  3. 3.

    Beyond the linear elasticity zone, particularly for deformations exceeding 0.012 for N-ASA and 0.014 for PETG, the strain gauge failed to detect specimen’s strain.

  4. 4.

    The proposed system could effectively monitor the progress of the tensile test up to a percentage value ranging from approximately 20% to 68%, depending on the selected specimen and material.

  5. 5.

    Despite initially considering the embedded strain gauge system as perfectly cohesive for all specimens, local strain maps from DIC analyses indicated higher deformation at the top and bottom areas of the Grafylon element.

These preliminary findings introduced some interesting novel insights in the field of strain monitoring, which deserve further investigation. However, a notable challenge arises from the significant variability of experimental outcomes, emphasizing the need for further investigation to improve the accuracy of the monitoring system. Addressing these aspects involves exploring the system's durability under dynamic tests, encompassing multiple loading and unloading cycles within the elastic range. Additionally, conducting fractography analyses is essential to gain a comprehensive understanding of variations in material properties. Another noteworthy limitation lies in the distinct behavior exhibited by each material when combined with the Graphylon strain gauge. The differences depend on the affinity and bond strength between the deposited materials during FFF. Hence, a meticulous examination of each material pairing becomes imperative. Furthermore, it is crucial to acknowledge that the experimental model is inherently dependent on the conditions under which it was generated, with a primary focus on the materials employed. Nevertheless, despite these considerations, the model proves valuable for specific applications, facilitating real-time monitoring of elastic deformations in AM components subjected to stress. Indeed, by interfacing Arduino with the co-produced strain gauge on the component, the model can evaluate deformation by analyzing changes in Wheatstone bridge voltage. The potential applications of this approach are promising. For example, it could prove beneficial in monitoring small deformations in AM parts to enable countermeasures aimed at preserving material integrity rather than solely detecting structural failure when it is too late. The application might be also suitable for biomedical products such as wearable AM strain sensors for motion monitoring.

In conclusion, this study sheds light on an emerging and intriguing application field for Additive Manufacturing in fabricating real-time strain monitoring systems using the strain gauge method. This approach appears to be straightforward, cost-effective, and time-saving compared to traditional foil strain gauges, which are highly reliant on sensor adhesion to the part surface.