1 Introduction

4D printing is an additive manufacturing (AM) technology that uses smart materials and an external stimulus to achieve shape morphing [1] or other energy conversions [2, 3]. It was first introduced by Tibbits using water-responsive material for self-assembly [4]. Further research has been conducted on material jetting and the material’s ability to shape change upon the stimuli of heat [5, 6] and moisture [4, 7]. Gladman et al. used material extrusion of composite hydrogels to achieve shape change when exposed to moisture [8]. Ge et al. demonstrated the shape morphing capabilities of stereolithography of UV-curable polymers, where the material reacts to heat [9]. Bodaghi et al. and van Manen et al. used fused deposition modeling (FDM) and thermoplastic polymers to achieve the shape change upon thermal activation [10, 11]. Compared to the other 4D printing processes, FDM is the cheapest, most adaptable and widely used [12].

The shape change in FDM 4D printing can be achieved with different procedures. Momeni and Ni introduced eight shape shifting mechanisms, of which two are relevant for FDM printing [1]. One mechanism is “constrained thermo-mechanics”, which requires a programming procedure with two temperatures and a load. First, the part is printed in the permanent shape. This part is loaded above the transition temperature \({T}_{trans}\), cooled below \({T}_{trans}\) and unloaded, resulting in the temporary shape. Subsequent reheating above \({T}_{trans}\) results in the recovery of the permanent shape as shown in the literature [6, 13]. In the context of FDM 4D printing, this mechanism can best be described as “programming after printing”. The other mechanism is “unconstrained thermo-mechanics, where only the two temperatures but no load is required. In FDM 4D printing, this means that the part is printed in its temporary shape. Therefore, upon reheating above \({T}_{trans}\) the permanent shape recovers. This mechanism can best be described as “programming during printing”. The main advantage of programming during printing is the reduction of programming as a post processing step. However, the reliability and controllability of the transformation are a challenge.

Previous research regarding FDM 4D printing investigates the use of different materials, activation methods and printing parameters to characterize the structural properties and the deformation of 4D printed parts. Polylactic acid (PLA) is mostly used due to its low cost and common applications in 3D printing [14,15,16]. Alternatives are thermo-responsive materials like acrylonitrile butadiene styrene (ABS), a combination of multiple shape memory polymers (SMP) or SMPs with conductive elements [17,18,19]. Moreover, the printing parameters show a significant influence on the structural deformation of the printed part. Higher print speed, lower temperatures of nozzle and bed or lower layer thicknesses lead to larger deformations [11, 13, 14, 16, 20,21,22]. Layer orientation, total thickness, layer width, and activation temperature also influence the transformation, showing higher deformations for thinner parts and higher activation temperatures. [11, 14, 16, 23, 24]. To predict the deformation, the residual strain and stress can be either simulated, analytically calculated or calculated based on previous measurements [17, 20, 24,25,26,27,28,29]. However, no in situ measurement of the residual strain is done yet.

In FDM 4D printing, a residual strain is programmed during printing, which causes a deformation upon thermal activation [10, 12, 30]. Figure 1a shows how the material is processed and (b) shows the respective temperature \(T\), strain \(\varepsilon\) and stress \(\sigma\) during this process. First, the material is fed to the extruder (1) and heated above its melting temperature \({T}_{melt}\) inside the nozzle (2). The hot material is deposited and strained by a programming force caused by the nozzle movement. The force equilibrium of the infinitesimal element shows that shear acts upon it. However, it is assumed that macroscopically tensional residual strain outweighs shear. As the temperature drops below the glass-transition temperature, it stores residual strain (3). When the material is well below its transition temperature \({T}_{trans}\), no further strain can be programmed in the material (4). After printing, the structure is in the temporary shape. By raising the temperature of the specimen above \({T}_{trans}\), the residual strain recovers and causes a deformation from the temporary shape to the permanent shape (5) [30].

Fig. 1
figure 1

During the printing process, the material is fed to the nozzle as a cold material (1), melted (2), extruded, strained and cooled (3), and in its printed form is a cold material containing residual strain (4). The material deforms when heated above \({T}_{Trans} (5)\). This programming step is illustrated in a side view during FDM printing (a) and in a stress–strain–temperature diagram (b), which presents the theoretical shape memory cycle. Numbers were adapted and the force equilibrium is added to the original published by [30], used under CC BY 4.0

Previous research shows that the deformation, i.e., the residual strain, is mainly determined by the material, the printing environment and the printing parameters used in the process [10, 11, 21, 30, 31]. These studies show that an increase in print speed leads to larger deformations [10, 20, 21, 32, 33]. Furthermore, increasing the nozzle or build platform temperature leads to smaller deformations [10, 21, 34] and decreasing the layer height leads to larger deformations [11, 32]. The trends, shown in these studies, are the same but the amount of deformation, i.e., residual strain differs. Even when printing with the same printer models, there are differences of 20% in residual strain [35]. These may be caused by differences in printing environment, such as nozzle wear, z-offset or cooling fan performances. Quantitative residual strains must, therefore, be determined experimentally for each printer.

In the studies described above, the residual strain is derived from the deformation. Since the residual strain is imprinted with a programming stress, it can be concluded that the residual strain increases with programming stress. At room temperature and for small strains, the relation between stress and strain is assumed linear and characterized by the material-specific young’s modulus. In FDM 4D printing, however, the temperature history must be taken into account as it stores the residual strain and prevents strain relaxation, as shown in Fig. 1b (3) [30]. Therefore, the printing parameters implicitly define the residual strain because of their effect on the programming force and the temperature history.

The residual strain state derived from the deformation lacks information about its distribution across the layer of the specimen. The layer strain is approximated to increase linearly over the specimen’s height [10, 12, 20, 36]. This allows an accurate finite element approach to simulate the real deformation. However, it does not depict to the initial residual strain distribution. In reality, each line is programmed individually. Therefore, each line has a strain that contributes to the residual strain state of the layer. Furthermore, the layer’s residual strain contributes to the global residual strain state, resulting in the deformation described above. Therefore, a force measurement during printing will provide valuable insight into the stress distribution of each line and each layer.

The primary aim of this work is to determine the influence of printing parameters on the relationship between residual strain and programming force. As discussed above, the influence of printing parameters on the deformation was shown previously. However, the printing parameters only implicitly determine the residual strain state. The actual cause of the residual strain is the load and temperature history. The secondary aim is gain new insight into the initial residual strain distribution. The initial residual strain distribution can only be predicted by simplifications. We expect the force measurement during printing to serve as a measure for the amount of residual strain. Therefore, in this study, the programming stress and the deformation will be measured to fulfill these aims.

2 Materials and methods

2.1 Measurement setup

In this project, a Prusa i3 MK3S printer with an attached multi-material unit (MMU) was used and modified. The build platform was mounted on four load cells (type: TAL221 (5N) from HT Sensor Technology Co., China), based on strain gauges, as shown in Fig. 2a. The sensors have connectors to the build platform at the top made of ABS Fusion + (BASF, Germany), and damping elements at the bottom made of Ultrafuse TPS 90A (BASF, Germany). The damping element’s purpose is to reduce the vibrations from the printer chassis. The working hypothesis was that the material is pulled by the nozzle in the print direction, causing a displacement of the build platform. Additionally, it is expected that the displacement is detected by the strain gauges of the load cells. The underlying assumption is that the flux of force only travels across the load cells and no large displacement occurs.

Fig. 2
figure 2

Measurement setup: The print platform is mounted on four load cells (a). The original, noisy signal and the filtered square-wave signal versus time and the corresponding power spectrum versus frequency with a band-pass filter from 0.2 to 10 Hz (b). The mean of the square-wave signal is derived for each layer (c). Calibration with weights gives the force values over the signal (d)

The damped signal was recorded using a universal data acquisition system (type: QuantumX MX440B from HBM, Germany). However, the signal was noisy due to printer vibrations during printing, as shown in Fig. 2b. Therefore, the signal was filtered with a band-pass filter from 0.2 to 10 Hz. The band-pass filter changes the signal in the frequency and time domain, as shown in Fig. 2b. The resulting signal is a square wave as shown in Fig. 2b, c.

The filtered signal from each layer was averaged over time, indicated by the red line in Fig. 2. The positive and negative values represented opposite print directions. The abrupt changes in print direction result in signal peaks, that were eliminated by excluding the upper and lower 10% of all data points. One sensor had a malfunction, so that we estimated the signal as the average signal of the correctly working sensors. The signals of all sensors were added to gain the sum of force.

The system was calibrated by applying the force of a known weight in the x-direction to the center of the build platform. Three weights were used for the calibration and the measurement was repeated 10 times. Figure 2d shows the result of the calibration and the calibration slope gives the relation between signal and force.

2.2 Material and 4D structure geometry

The specimens were printed with Ultrafuse PLA (BASF, Germany) with a glass-transition temperature of \({T}_{trans}=61 C\). The activation temperature must be above \({T}_{trans}\) to allow shape change. Table 1 shows an extract of the corresponding thermal properties and printing recommendations, provided by the supplier.

Table 1 Extract of the technical data sheet for Ultrafuse PLA regarding thermal properties and recommended parameters

The 4D structure is 100 mm long, 30 mm wide and 1.2 mm high, as shown in Fig. 3. It consists of 6 layers of 0.2 mm height and is based on our previous work [19, 21, 30, 35]. Layer one and two are active layers, layer three and four are passive layers and layer five and six are active layers with a gap in the hinge area to allow bending. Active layers were printed in x-direction, which was the direction of the force measurement. Passive layers were printed in y-direction, where no force was measured, due to the measurement setup.

Fig. 3
figure 3

Specimen geometry (100 mm × 30 mm × 1.2 mm) with features such as overhang, clamp and hinge area and the corresponding active and passive layers

2.3 Printing parameters and activation

The reference printing parameters, used for the reference series, are defined in Table 2. Only one parameter was varied simultaneously as shown in Table 3. Three effects were investigated. First, the print speed was investigated by varying the parameter between \(65 \,mm/s\) and \(95 \,mm/s\) for the e3D V6 hotend. Second, the nozzle temperature was varied between \(200^\circ C\) and \(220^\circ C\). Third, the melt zone length was investigated by changing the hotend to the e3D Volcano and varying the print speed again. The specimens are printed on a textured metal sheet that is powder-coated with Ultem polyetherimide (PEI). An adhesive called PrintaFix (AprintaPro GmbH, Germany) is applied to the metal sheet prior to printing to improve adhesion.

Table 2 Reference printing parameters define the operating condition
Table 3 Varied printing parameters for experimental series

Specimens in an experimental series were printed individually. The specimens were positioned in the center of the build platform. The g-code was prepared with PrusaSlicer once and used for a total of 10 specimens per series.

After printing, the specimens were immersed for 30 s in a thermostat (type: F12-MA by JULABO GmbH, Germany), filled with water at \(80^\circ C\), causing the specimen to bend. The curvature \(\kappa\) of the resulting deformation in the hinge area was optically measured by photographing it in a side view.

2.4 Stress and strain calculation

The programming stress

$$\sigma =\frac{\overline{F}}{{A }_{l}}$$

of a printed line depends on the mean force \(\overline{F }\), averaged over the layer, divided by the cross section \({A}_{l}\), determined by

$$A_{l} = h_{l} *\left( {w_{ext} - h_{l} } \right) + \pi *\left( {\frac{{h_{l} }}{2}} \right)^{2} .$$

Herein, \({w}_{ext}\) is the extrusion width of the line to be \(0.45 mm\) and \({h}_{l}\) denotes the exact layer height of one line to be \(0.2 mm\), see also Fig. 4.

Fig. 4
figure 4

Cross section of an extruded line is determined by the extrusion width and the layer height

The strain

$$\Delta \epsilon = \,\frac{2}{3}*h*\kappa$$

is calculated according to Timoshenko [37], where \(h\) is the height and \(\kappa\) is the curvature of the specimen. Here, we used the height of the hinge area and the measured curvature. The strain is actually a strain difference between the outer and inner fiber of the curvature. This strain is used in the discussion to identify the relationship between programming stress and residual strain.

3 Results

The sensor signal during printing was recorded, band-pass filtered (0.2 to 10 Hz) and the arithmetic mean was calculated for each layer of a specimen. Then, the calibration curve leads to the average force values.

The programming force over the z-height, shown in Fig. 5a is used to determine, which layer is used for subsequent evaluation of the relationship between programming stress and residual strain. Not only the programming force decreases over the z-height, but also the variance decreases, implicated by the smaller boxes and whiskers. Therefore, the programming force of the higher layer should be evaluated. However, the layers between \(0.8 \,mm\) and \(1.2 \,mm\) have a gap in the hinge area. Therefore, these layers cannot be used for the evaluation of the hinge area. In conclusion, the second layer is used for evaluation, because it is part of the hinge area and its variance is smaller than the variance of the bottom layer.

Fig. 5
figure 5

Programming force decreases with each active layer a, causing the concave deformation in the overlap area b

Higher programming force implicates more residual stress, i.e., more residual strain in the bottom layers. This is confirmed by the deformed overlap area of the activated specimen in Fig. 5b. The concave bending results from larger residual strain of the bottom layers compared to the top layers. This is thought to be caused by an increasing temperature of the structure. Our observations with an IR camera showed that the top layers have a higher temperature, i.e., cool slower than the bottom layers. While the first layer is printed on the cold build platform at room temperature, the second layer is printed on the still warm first layer. This causes two effects. First, the bottom layer is reheated allowing stress relaxation. Second, our results in Fig. 5 show that lower programming force occur in the top layers. This leads to less residual stress in the first place. We assume that the lower programming force is caused by slower cooling on a warm bottom layer. This effect can be compared to a higher build plate temperature. However, other factors might influence the programming force as well, such as the previous layer surface, the heat conduction of the filament material or the build plate material.

Previous studies have only used the deformation as an indicator to determine which effect dominates. It was shown in Bodaghi et al. that the specimen bends convex, i.e., the top layer contains more residual stress [10, 20]. Therefore, the effect of stress relaxation within the bottom layers dominates during their printing process. This leads to lower residual stress in the bottom layers after the print. However, our deformation results of the overlap area in Fig. 5b show that the specimen bends concave, i.e., the bottom layer contain more residual stress. Furthermore, we measure less programming force in the top layers, which confirms less residual stress. Therefore, the dominating effect depends on the print setup and is case specific. Constrained stress relaxation of the bottom layers causes a specimen to bend convex, while lower programming force of top layer causes the specimen to bend concave. In a future study, this effect can be further investigated to determine whether the influencing factor is the printing environment, a printing parameter, a material parameter or some other origin. For this study, the results lead to the conclusion that the layer between 0.2 mm and 0.4 mm is evaluated.

Figure 6 shows that as nozzle temperature increases, the programming force decreases. As the nozzle temperature increases, the viscosity of the melt decreases and, therefore, reduces the forces required to move the nozzle. Curvature also decreases, which complies to other studies [10, 21, 34]. It is used as an indicator for the residual strain and residual stress. The results show that a lower nozzle temperature increases the programming force and the residual strain of a 4D structure. However, it is still unclear whether the increased residual strain only originates from the increased programming force. It is hypothesized that faster cooling inhibits relaxation mechanisms and allows a greater amount of the programming force to be stored as residual stress, causing additional benefits for the deformation.

Fig. 6
figure 6

Programming force and deformation curvature decrease with increasing nozzle temperature

Figures 7, 8 show that programming force and curvature increase with increasing print speed. This is in agreement with the literature [10, 20, 21, 32, 33]. Three effects are discussed to explain the higher residual strain.

Fig. 7
figure 7

e3D V6 with a melt zone of \(12.5 \,mm\): programming force and deformation curvature increase with increasing print speed

Fig. 8
figure 8

e3D Volcano with a melt zone of \(21 mm\): programming force and deformation curvature increase with increasing print speed

First, the faster print speed leads to greater programming forces. This can be explained by the viscous melt at the nozzle outlet. The storage and loss modulus of a viscous PLA melt increase with higher shear rate. This is known from rheometry [38]. Second, faster print speeds cause less heating time inside the nozzle. This could result in a lower temperature of the melt, than expected [39]. The effect is analogous to a lower nozzle temperature which is shown in Fig. 6. We assume that the effects discussed interact and, therefore, the total set of printing parameters determines the resulting programming forces.

In addition to the print speed, the length of the melt zone was investigated by manufacturing the print speed series on two hotends. The e3D V6 has a melt zone of \(12.5 mm\) and the results are shown in Fig. 7. The e3D Volcano has a melt zone of \(21 mm\) and the results are presented in Fig. 8. The programming forces of the two hotends are similar and ranging from \(1.5 \,mN\) to \(2.6 \,mN\). However, the curvatures of the V6 specimens are greater than the curvatures of the Volcano specimens for each print speed. Therefore, the same programming force leads to more residual strain when using the V6 hotend.

The longer melt zone of the Volcano hotend heats the filament more uniformly across the diameter and possibly to a higher temperature of the melt. This results in more energy in a line and slower cooling, reducing the ability to store the residual strain. The study by Balani et al. [40] shows that high volumetric extrusion rates cause a lower temperature of the center compared to the boundary of the melt inside the nozzle. Their results suggest that a longer melt zone causes the opposite effect, resulting in higher and more homogeneous temperature of the melt and less residual strain. In conclusion, the shorter melt zone of the V6 stores the programming force more effective as residual strain than the longer melt zone of the Volcano.

4 Discussion

The general finding is that the residual strain increases with programming stress. However, Fig. 9 shows that the same programming stress can lead to different residual strain. This means that the relationship between programming stress and residual strain changes depending on the varied printing parameter. Initially, it was expected that the relationship between programming stress and residual strain would be defined by the storage modulus and therefore material dependent. This expectation is rejected. The printing parameters not only affect the programming stress but also affect the temperature history, which results in different storage of residual strain. Therefore, the printing parameters implicitly define the relationship between programming stress and residual strain.

Fig. 9
figure 9

Relationship between programming stress and residual strain varies depending on the changed printing parameter. Each specimen is represented by an unfilled symbol, the mean of each series by a filled symbol. The lines represent a linear regression

The short melt zone is more effective in storing programming force as residual strain than the long melt zone, shown in Fig. 9. The short melt zone (V6–triangles, red) achieves more residual strain with the same programming stress as the long melt zone (Volcano—circles, black) for all print speeds. Furthermore, the gradient of the linear regression is similar, but there is an offset between the red and black linear regression resulting in a lower residual strain for the long melt zone. This means that for the same residual strain, the longer melt zone requires higher programming stress. This is due to more uniform heating and more energy in one line and, therefore, slower cooling.

The regression of the nozzle temperature gives a lower gradient than that of the two print speed series, shown by the blue linear regression in Fig. 9. The lower gradient signifies that for the same increase in programming stress, the increase in strain is greater when the nozzle temperature is reduced than when the print speed is increased. In conclusion, the nozzle temperature is a more effective parameter for influencing the residual strain than the print speed. However, the nozzle temperature is limited by the material being printed and has a strong influence on the print quality. Therefore, print quality must be taken into account when using the nozzle temperature as a parameter to manipulate the residual strain.

This study is a step towards quantifying FDM 4D printing in the shape memory cycle. However, the temperature information throughout the printing process and strain in the programming step are still missing. Measuring these by embedding more sensors in the printing process or in the sample holds promise for the future construction of fully controlled FDM 4D printer. This would allow to improve 4D printing from feed-forward to feed-back shape control.