1 Introduction

Additive manufacturing (AM) is the process of joining materials layer by layer to build three-dimensional (3D) objects [1], and its applications have been introduced in various engineering areas. One of the most widely used AM processes is fused deposition modelling (FDM) [2]. The FDM machine fabricates 3D parts that were first modelled using computer-aided design (CAD) software, then converted into a STereoLithography format (.stl) with surface geometry parameters. During the FDM process, a filament material is fed into the heater block where it melts and extrudes onto a build platform via controlled three axis stage. This forms a thin cross-sectional layer of a part, and the process repeats by forming all cross-sectional layers until the part is fully fabricated. FDM filaments are commonly made of thermoplastics, for example, acrylonitrile butadiene styrene (ABS), polylactic acid (PLA), polyurethane (PUR), and others. The applications of the FDM technology have been explored in various areas, such as education [3, 4], rapid prototyping [5, 6], robotics [7, 8], scientific tools [9, 10], and tissue engineering [11, 12]. However, current FDM 3D printed parts have lower reliability standards in comparison with other consumer products [13]. Previous studies estimated about 20% failure rate during FDM 3D printing by inexperienced users [14]. This is mainly because FDM 3D printing has number of challenges, such out of filament extruder [15], print head misses the printing platform [15], extrusion stops mid-print [15], print does not stick to the platform [15], print bows out at bottom [15], print peels away from the platform or warps [15], extruder over-extrudes or under-extrudes [15], print has inaccurate dimensional accuracy [16,17,18] or too weak structure [19, 20].

Process monitoring in FDM is essential for tracking the quality of the print during the fabrication before any print failure happens. Previous research has established that it can be possible to detect extreme print failures during 3D printing using various sensors, which are discussed below.

Several vision-based techniques were capable to monitor 3D printed part during fabrication using cameras or laser profile sensors, track the geometry using digital image processing techniques, and compare 3D printed geometry with the CAD model to detect various print errors. For example, geometry of each layer was tracked to detect under-extrusion or over-extrusion defects [21]. Moreover, detection of local area defects, such as a blob of filament, and global defects, such as low flow in 3D printed parts were studied [22]. In addition, monitoring of such defects as incomplete 3D print, blocked nozzle, loss of filament for different object geometries and filament colours were presented using low-cost camera system [23, 24]. Monitoring layer height inconsistencies and overall 3D printed part geometry was performed using high resolution laser profile sensors [25,26,27].

Other AM process monitoring methods using various types of sensors, such as vibration sensors, acoustic emission sensors, and temperature sensors were reported in literature. Accelerometers, thermocouples, infrared temperature sensor, video borescope were used to monitor the quality of 3D printed parts, and most optimal parameters of feed/flow ratio, extruder temperature, and layer height were recommended for better dimensional accuracy and surface roughness [28, 29]. Acoustic emission monitoring technique was used to detect such 3D printing process errors as semi-blocked extruder, completely blocked extruder, and run out of the material [30], and filament breakage [31]. Orientation, motion, hygrometry, temperature, and vibration sensors were utilised to track printing and not printing conditions in FDM [32].

It can be noted that the above-mentioned works concentrated on advanced signal processing and machine learning techniques to analyse the data gathered from various sensors, paying less attention to the physics of the AM process. Due to this, the print errors were detected only after they accumulated and actually happened, which can cause extreme print failures.

One of the main challenges in monitoring in AM is tracking the print errors long before they cause extreme print failures. For addressing this challenge, there is a need in fundamental understanding of the FDM process dynamics. FDM is a recent manufacturing process compared to conventional processes, and in FDM material goes through rolling, melting, and extrusion processes involving number of multi-physical parameters. Due to this complexity of the process, there are little detailed investigation of the FDM process dynamics in literature.

A physics model-based process monitoring technique using vibration sensors was developed by Bukkapatnam and Clark [33], where a layered AM machine was theoretically modelled as a lumped mass system with a system of process forces and accelerometers were placed on the machine frame and on the extruder head to track defects as under-extrusion and over-extrusion. Although the above-mentioned study derived theoretical formulations of the dynamics of the extrusion-based AM system, several assumptions were made that paid less attention to the relatively small forces resulting from filament extrusion and filament flow in the nozzle.

To the authors knowledge, there are no reliable theoretical models that can relate the current of the extruding motor to the nozzle effective diameter and the use of such model to monitor precise nozzle clogging conditions in FDM 3D printing.

Therefore, the main objective of the current study is to propose a theoretical model that represents FDM process forces in relation to the effective nozzle diameter and the use of this model for current-based nozzle condition monitoring in FDM. FDM process modelling and nozzle condition monitoring was performed by two steps. First, the theoretical equations of feed rolling forces and flow-through-nozzle forces were derived. After, the influence of the effective nozzle diameter on the current of the filament extruding motor was identified. Second, based on the proposed model, current-based nozzle condition monitoring method was proposed. Next, sets of experiments on FDM machine using PLA material were carried out to verify the proposed theoretical model, and the results were analysed and evaluated.

This study provides an opportunity to advance the knowledge of FDM process monitoring, because it is based on a theoretical model that relates extruding motor current with nozzle clogging conditions. Thus, more detailed information of the nozzle clogging condition can be tracked before extreme blockage or print failure happens, allowing to pause/stop/control the 3D printing process. Moreover, it can be possible to place a sensor more accurately because the proposed model includes a direct relationship between the process error—nozzle clogging, and the monitoring parameter—filament extruding motor’s current.

The remaining part of the paper is organised as follows. The Sect. 2 presents the methods used for this work. The Sect. 3 analyses the results, following by the discussions. The Sect. 5 shows the conclusion and recommendations.

2 Methods

2.1 Theoretical modelling of FDM process

One of the main challenges in FDM 3D printing development is a limited understanding of the physics of the process [34]. Models of the FDM process describing the dynamics of material extrusion and melt are essential for intelligent monitoring and control for AM machines. Deriving the relationships between FDM process parameters and nozzle clogging conditions are important for monitoring the quality of 3D printed parts in terms of geometrical accuracy and mechanical strength. To model the process relationships, let us consider direct FDM extruder of Makerbot Replicator 1 3D printer presented in Fig. 1. As can be seen, it consists of two main blocks, namely filament feeding mechanism and filament melting mechanism. The filament feeding mechanisms has a gear, and a roller pushed towards the gear via spring-loaded lever. The filament melting mechanism consists of a heating block and a nozzle. Thus, the two main elements of FDM process are filament feed dynamics and filament melt dynamics. The forces acting on the filament along the vertical direction are:

$$F_{y} = F_{\text{GF}} - F_{\text{R}} - F_{\text{BP}} ,$$
(1)

where \(F_{\text{GF}}\) is gear-feed force, \(F_{\text{R}}\) is rolling friction between roller and filament, \(F_{\text{BP}}\) is backpressure force. Derivation of these forces is discussed in the following subsection.

Fig. 1
figure 1

FDM extruder with a spring-lever mechanism

2.1.1 Filament extrusion dynamics

Commercially available extrusion mechanisms in FDM 3D printers are designed to feed thermoplastic polymer filaments with diameters ranging from 1.5 to 3 mm through a heated liquefier and then extrude onto a build platform. The filament is inserted into a guide tube and pushed towards a heater via gear-roller extrusion mechanism, as shown in Figs. 1 and 2. An extruding gear is powered by a stepper motor and a roller is pushed by a spring via lever to create a pressure on the filament to avoid slippage. The filament is in tension above the gear-roller mechanism and pulls the material from the spool. After the filament enters the gear-roller mechanism, it is in compression and pushed through a heated liquefier towards the nozzle. The gear-roller extrusion feed rate is controlled to keep the volumetric flow rate of filament constant. The gear-feed force and the rolling friction between roller and filament are opposite to each other, and the resultant of these two forces is pushing the filament into the liquefier. The derivation of these two forces is presented as follows. First, gear-feed force depends on the torque of the extruding stepper motor:

$$F_{\text{GF}} = \frac{{T_{\text{extr}} }}{{r_{\text{gear}} }},$$
(2)

where \(T_{\text{extr}}\) is extruding torque, \(r_{\text{gear}}\) is radius of extruding gear. Second, friction force between roller and filament is rolling friction:

$$F_{\text{R}} = \mu_{\text{R}} N_{\text{R}} ,$$
(3)

where \(\mu_{\text{R}}\) is coefficient of rolling friction between roller and filament, \(N_{\text{R}}\) is normal force between roller and filament. The normal force \(N_{\text{R}}\) depends on the spring characteristics and the lever geometry of an extruder:

$$N_{\text{R}} = F_{C} \cos \delta = F_{A} \frac{AB}{BC}\cos \delta = F_{A} \frac{AB}{BC}\cos \left( {90 - \beta } \right),$$
(4)

or

$$F_{\text{R}} = \mu_{\text{R}} F_{A} \frac{AB}{BC}\cos \left( {90 - \beta } \right),$$
(5)

where \(F_{C}\) is a force exerted by a spring via lever at point \(C\) and it is perpendicular to \(BC\), \(\delta\) is angle between \(F_{C}\) and \(N_{\text{R}}\), \(F_{A}\) is a vertical force exerted by a spring at point \(A\), \(AB\) and \(BC\) lever geometrical distances illustrated in Fig. 2, \(\beta\) is angle between \(AB\) and \(BC\). In summary, the filament extrusion dynamics includes:

  1. 1.

    Gear-feed force, which is a function of a stepper motor and an extruder gear parameter; and

  2. 2.

    Rolling friction force, which is a function of a roller friction coefficient and lever-spring characteristics.

Fig. 2
figure 2

Layout and process forces in FDM extruder

2.1.2 Filament melt dynamics

In FDM-based 3D printers a filament is melted in a heated liquefier before it extrudes from the nozzle. The heated liquefier is generally a block machined from a metal with a guide channel for the filament to go through. The heating of the liquefier is performed by a resistive cartridge heater inserted into the metal block to maintain a certain temperature. The temperature is controlled using a thermocouple/thermistor which is also inserted into the heated liquefier. Heat flux is generated by the temperature increase which leads to the decrease in the viscosity of the filament melt. This allows the molten part of the filament to be pushed by the solid part of the filament from top to flow through the nozzle. The rate of the flow through liquefier and nozzle is limited by a pressure drop. The pressure drop inside the FDM nozzle can be estimated according to its shape as presented in Fig. 3, such as: cylindrical, conical, and then cylindrical, divided to regions \(L_{1}\), \(L_{2}\), and \(L_{3}\), respectively. Several assumptions made in the current modelling are: (a) melt is incompressible; (b) flow is fully developed and laminar; (c) walls of the nozzle have no-slip boundary condition. Hence, pressure drop in the nozzle can be identified as a sum of all three pressure drops in the nozzle [35, 36, 37]:

$$\Delta P = \Delta P_{1} + \Delta P_{2} + \Delta P_{3} ,$$
(6)

where \(\Delta P\) is overall pressure drop in the nozzle, \(\Delta P_{1}\), \(\Delta P_{2}\), \(\Delta P_{3}\) are three pressure drops according three regions in the nozzle \(L_{1}\), \(L_{2}\), \(L_{3}\), respectively. Each of the pressure drop values can be derived as [35,36,37]:

$$\Delta P_{1} = 2L_{1} \left( {\frac{v}{\chi }} \right)^{{\frac{1}{q}}} \cdot \left( {\frac{q + 3}{{R_{1}^{q + 1} }}} \right)^{{\frac{1}{q}}} ,$$
(7)
$$\Delta P_{2} = \frac{2q}{{3\tan \left( {\alpha /2} \right)}} \cdot \left( {\frac{1}{{R_{1}^{{\frac{3}{q}}} }} + \frac{1}{{R_{2}^{{\frac{3}{q}}} }}} \right) \cdot \left( {\frac{{vR_{2}^{2} \left( {q + 3} \right)}}{\chi }} \right)^{{\frac{1}{q}}} ,$$
(8)
$$\Delta P_{3} = 2L_{3} \left( {\frac{v}{\chi }} \right)^{{\frac{1}{q}}} \cdot \left( {\frac{{\left( {q + 3} \right)R_{1}^{2} }}{{R_{2}^{q + 1} }}} \right)^{{\frac{1}{q}}} ,$$
(9)

where \(v\) is flow mean velocity, \(\chi\) is flow consistency index, \(q\) is flow behavior index, \(R_{1} , R_{2}\) are nozzle radius values at the entry and at the outer regions, respectively, \(L_{1} , L_{3}\) are nozzle length values at the regions 1 and 3, respectively, \(\alpha\) is inside angle of a nozzle. By taking into consideration the Arrhenius Law for the temperature dependence [35,36,37]:

$$H\left( T \right) = {\text{e}}^{{\psi \left( {\frac{1}{T} - \frac{1}{{T_{0} }}} \right)}} ,$$
(10)

where \(\psi\) is activation energy, \(T\) is operating temperature, \(T_{0}\) is reference temperature. Thus, total temperature dependent pressure drop is:

$$\Delta P_{T} = \Delta P \cdot {\text{e}}^{{\psi \left( {\frac{1}{T} - \frac{1}{{T_{0} }}} \right)}} = \left( {\Delta P_{1} + \Delta P_{2} + \Delta P_{3} } \right) \cdot {\text{e}}^{{\psi \left( {\frac{1}{T} - \frac{1}{{T_{0} }}} \right)}} .$$
(11)

After estimating the total temperature dependent pressure drop values, it can be possible to derive the backpressure force:

$$F_{\text{BP}} = \left( {\Delta P_{1} + \Delta P_{2} + \Delta P_{3} } \right) \cdot {\text{e}}^{{\psi \left( {\frac{1}{T} - \frac{1}{{T_{0} }}} \right)}} \cdot A_{\text{fil}} ,$$
(12)

where \(A_{\text{fil}}\) is cross-sectional area of the filament. After substituting Eqs. (7)–(9) into (12) the backpressure force can be written as:

$$F_{\text{BP}} = \left[ {\left( {2L_{1} \left( {\frac{v}{\chi }} \right)^{{\frac{1}{q}}} \cdot \left( {\frac{q + 3}{{R_{1}^{q + 1} }}} \right)^{{\frac{1}{q}}} } \right) + \left( {\frac{2q}{{3\tan \left( {\alpha /2} \right)}} \cdot \left( {\frac{1}{{R_{1}^{{\frac{3}{q}}} }} + \frac{1}{{R_{2}^{{\frac{3}{q}}} }}} \right) \cdot \left( {\frac{{vR_{2}^{2} \left( {q + 3} \right)}}{\chi }} \right)^{{\frac{1}{q}}} } \right) + \left( {2L_{3} \left( {\frac{v}{\chi }} \right)^{{\frac{1}{q}}} \cdot \left( {\frac{{\left( {q + 3} \right)R_{1}^{2} }}{{R_{2}^{q + 1} }}} \right)^{{\frac{1}{q}}} } \right)} \right] \cdot {\text{e}}^{{\psi \left( {\frac{1}{T} - \frac{1}{{T_{0} }}} \right)}} \cdot A_{\text{fil}}$$
(13)
Fig. 3
figure 3

Layout of the nozzle zones in FDM extruder

2.1.3 Total force dynamics

After modelling the filament extrusion dynamics and filament melt dynamics, the total force dynamics can be estimated. After substituting Eqs. (2), (5), (13) into (1), the forces acting on the filament along vertical direction can be derived as:

$$F_{y} = \left\{ {\frac{{T_{\text{extr}} }}{{r_{\text{gear}} }}} \right\} - \left\{ {\mu_{\text{R}} \left( {F_{A} \frac{AB}{BC}\cos \left( {90 - \beta } \right)} \right)} \right\} - \left\{ {\left[ {\left( {2L_{1} \left( {\frac{v}{\chi }} \right)^{{\frac{1}{q}}} \cdot \left( {\frac{q + 3}{{R_{1}^{q + 1} }}} \right)^{{\frac{1}{q}}} } \right) + \left( {\frac{2q}{{3\tan \left( {\alpha /2} \right)}} \cdot \left( {\frac{1}{{R_{1}^{{\frac{3}{q}}} }} + \frac{1}{{R_{2}^{{\frac{3}{q}}} }}} \right) \cdot \left( {\frac{{vR_{2}^{2} \left( {q + 3} \right)}}{\chi }} \right)^{{\frac{1}{q}}} } \right) + \left( {2L_{3} \left( {\frac{v}{\chi }} \right)^{{\frac{1}{q}}} \cdot \left( {\frac{{\left( {q + 3} \right)R_{1}^{2} }}{{R_{2}^{q + 1} }}} \right)^{{\frac{1}{q}}} } \right)} \right] \cdot {\text{e}}^{{\psi \left( {\frac{1}{T} - \frac{1}{{T_{0} }}} \right)}} \cdot A_{\text{fil}} } \right\}.$$
(14)

2.1.4 Relationship between extruding torque and effective nozzle diameter

To identify the relationship between the extruding torque and the effective nozzle diameter, the Eq. (1) was written as:

$$F_{\text{GF}} - F_{E} = F_{\text{BP}} ,$$
(15)

where \(F_{\text{GF}}\) is a function of extruding torque \(T_{\text{extr}}\), and \(F_{\text{BP}}\) is a function of nozzle effective radius \(R_{2}\) or diameter \(D_{2}\). Because extruding torque is a function of stepper motor current:

$$T_{\text{extr}} = k_{t} I,$$
(16)

where \(k_{t}\) is stepper motor torque constant, \(I\) is stepper motor current. After writing extruding torque as in Eq. (16) in terms of stepper motor current and substituting Eqs. (2), (5), (13) to Eq. (15) and changing nozzle radiuses \(R_{1}\) and \(R_{2}\) to diameters \(D_{1}\) and \(D_{2}\) the relationship can be written as:

$$\begin{aligned} & \left[ {\left( {\frac{\chi }{{v\left( {q + 3} \right)}}} \right)^{{\frac{1}{q}}} \cdot \left( {\frac{1}{{{\text{e}}^{{\psi \left( {\frac{1}{T} - \frac{1}{{T_{0} }}} \right)}} A_{\text{fil}} R_{\text{gear}} }}} \right)k_{t} } \right]I \\ & \quad \; - \;\left[ {\left( {\frac{{2L_{1} }}{{2^{{\left( { - \frac{q + 1}{q}} \right)}} D_{1}^{{\left( {q + 1} \right)}} }}} \right) - \left( {\mu_{\text{R}} \left( {F_{A} \frac{AB}{BC}\cos \left( {90 - \beta } \right)} \right)\left( {\left( {\frac{\chi }{{v\left( {q + 3} \right)}}} \right)^{{\frac{1}{q}}} \cdot \left( {\frac{1}{{{\text{e}}^{{\psi \left( {\frac{1}{T} - \frac{1}{{T_{0} }}} \right)}} A_{\text{fil}} }}} \right)} \right)} \right)} \right] \\ & \quad = \left[ {2^{{ - \frac{2}{q}}} \left( {\frac{2q}{{3\tan \left( {\frac{\alpha }{2}} \right)2^{{ - \frac{3}{q}}} D_{1}^{{\frac{3}{q}}} }}} \right)} \right]D_{2}^{{\frac{2}{q}}} + \left[ {2^{{\frac{1}{q}}} \left( {\frac{2q}{{3\tan \left( {\frac{\alpha }{2}} \right)}}} \right)} \right]D_{2}^{{ - \frac{1}{q}}} \\ & \quad \; + \;\left[ {\left( {2^{{ - \left( {\frac{ - q - 1}{q}} \right)}} } \right)\left( {2^{{ - \frac{2}{q}}} } \right)\left( {2L_{3} D_{1}^{{\frac{2}{q}}} } \right)} \right]D_{2}^{{\frac{ - q - 1}{q}}} . \\ \end{aligned}$$
(17)

To simplify the Eq. (17), several terms from (17) can be re-written as:

$$\varPhi = \left[ {\left( {\frac{\chi }{{v\left( {q + 3} \right)}}} \right)^{{\frac{1}{q}}} \cdot \left( {\frac{1}{{{\text{e}}^{{\psi \left( {\frac{1}{T} - \frac{1}{{T_{0} }}} \right)}} A_{\text{fil}} R_{\text{gear}} }}} \right)k_{t} } \right].$$
(18)
$$\prod = \left[ {\left( {\frac{{2L_{1} }}{{2^{{\left( { - \frac{q + 1}{q}} \right)}} D_{1}^{{\left( {q + 1} \right)}} }}} \right) - \left( {\mu_{\text{R}} \left( {F_{A} \frac{AB}{BC}\cos \left( {90 - \beta } \right)} \right)\left( {\left( {\frac{\chi }{{v\left( {q + 3} \right)}}} \right)^{{\frac{1}{q}}} \cdot \left( {\frac{1}{{{\text{e}}^{{\psi \left( {\frac{1}{T} - \frac{1}{{T_{0} }}} \right)}} A_{\text{fil}} }}} \right)} \right)} \right)} \right].$$
(19)
$$\varOmega_{1} = \left[ {2^{{ - \frac{2}{q}}} \left( {\frac{2q}{{3\tan \left( {\frac{\alpha }{2}} \right)2^{{ - \frac{3}{q}}} D_{1}^{{\frac{3}{q}}} }}} \right)} \right].$$
(20)
$$\varOmega_{2} = \left[ {2^{{\frac{1}{q}}} \left( {\frac{2q}{{3\tan \left( {\frac{\alpha }{2}} \right)}}} \right)} \right].$$
(21)
$$\varOmega_{3} = \left[ {\left( {2^{{ - \left( {\frac{ - q - 1}{q}} \right)}} } \right)\left( {2^{{ - \frac{2}{q}}} } \right)\left( {2L_{3} D_{1}^{{\frac{2}{q}}} } \right)} \right].$$
(22)

Therefore, Eq. (17) can be rewritten as:

$$\varPhi \cdot I - \varPi = \varOmega_{1} \cdot D_{2}^{{\frac{2}{q}}} + \varOmega_{2} \cdot D_{2}^{{ - \frac{1}{q}}} + \varOmega_{3} \cdot D_{2}^{{\frac{ - q - 1}{q}}} ,$$
(23)

which is the relationship between extruding stepper motor current \(I\) and the effective nozzle diameter \(D_{2}\). As can be seen, the changes in the effective nozzle diameter \(D_{2}\) affect the extruding stepper motor current, thus it can be possible to track any nozzle clogging conditions by monitoring the current of the extruding stepper motor.

2.2 Current-based nozzle condition monitoring

To verify the above mentioned theoretical model, the current-based nozzle condition monitoring technique in 3D printing was developed. According to the proposed model, when the nozzle starts to clog during 3D printing, its effective nozzle diameter decreases, and the current of extruding motor will change. Thus, the monitoring technique was required to track the current of extruding motor in FDM 3D printer during fabrication for identifying the nozzle clogging conditions. The block diagram of the process monitoring board used for the current study is presented in Fig. 4. As can be seen, it consists of:

Fig. 4
figure 4

Block diagram of the process monitoring board

  • Microcontroller ATSAMD21G18A-MF, ARM Cortex-M0 + processor running at up to 48 MHz with up to 256 KB Flash and 32 KB of SRAM;

  • Stepper motor driver A4954 dual full-bridge DMOS PWM driver with current sensing;

  • Encoder AS5047D magnetic rotary position sensor.

The assembly of the above-mentioned elements on a PCB board is shown in Fig. 5. The NEMA17 Nano Zero Stepper board was manufactured by The Island of Misfit Electronics. Diametrically Magnetized NdFeBr magnet was glued to the back of the extruding motor shaft. The magnet was mounted accurately in the centre and was calibrated later to correct minor misalignments. Next, the process monitoring board was mounted by bolts to the back of the extruding motor so that the magnet was right under the encoder at the distance of 1–2 mm. In addition, standard stepper driver used for FDM 3D printer’s extruding motor was removed from the controller board, and A4954 motor driver was connected to the control board instead. The attachment of the process monitoring board to the extruding motor of FDM 3D printer is shown in Fig. 6.

Fig. 5
figure 5

Front and back side of the process monitoring board

Fig. 6
figure 6

Attachment of the process monitoring board to the extruding motor of FDM 3D printer

The working principle of the current-based nozzle condition monitoring method is as follows. The extruding feed rate is commonly set before any FDM 3D printing operation by the user, and it keeps constant until part is fully fabricated. Therefore, process monitoring board was set to operate in a velocity mode. While the extruder maintained the constant feed rate set by the user, the position of the extruding motor’s shaft was tracked by the encoder. When the nozzle started to clog, the filament extrusion started to become more difficult, resulting in position error of the extruding motor shaft. Next, the position error of the motor shaft was sent to the microcontroller. To keep the feed velocity constant, the microcontroller sent corrective signals to the motor driver, by increasing the current to overcome the difficulty in extrusion. This current increase was monitored by a Yageo PT1206FR-070R2L current sensing resistor, and the real-time data were sent to the computer via USB port.

2.3 Experimental setup, materials, and process parameters

Makerbot Replicator 1 FDM 3D printer and polylactic acid (PLA) filament with diameters of 1.75 mm and tolerances of ± 0.05 mm were used for experiments in the present study. The filament was stored in a dry container after opening the package for minimising the effect of moisture absorption. The printing platform was heated to 50 °C and covered with a Kapton tape. Print parameters were controlled via MakerWare software. The main process parameters are listed in Table 1.

Table 1 Process parameters

The experimental and theoretical methodology of nozzle condition monitoring were carried out in four main steps, which are discussed as follows:

  1. 1.

    Experimental: 3D printing using 3 different nozzles sizes: 0.4 mm, 0.3 mm, 0.2 mm in diameter. This was the initial step of simulating nozzle clogging for proof-of-concept purposes. Theoretical: calculating extruding motor current \(I\) from Eq. (23) using three different values of effective nozzle diameter \(D_{2}\): 0.4 mm, 0.3 mm, 0.2 mm according to three different nozzle sizes.

  2. 2.

    Experimental: 3D printing during severe part warping which caused no room for extrusion and complete blockage of the nozzle. Theoretical: deriving extruding motor current \(I\) from Eq. (23) using two different values of the effective nozzle diameter \(D_{2}\): 0.4 mm and 0 mm according to the normal 3D printing and 3D printing with completely blocked extruder due to part warping.

  3. 3.

    Experimental: reducing the chamber temperature from 25 to 15 °C which caused partial nozzle clogging by placing a fan near to the nozzle during 3D printing. Theoretical: estimating extruding motor current \(I\) from Eq. (23) using two different values of the chamber temperature from Eq. (10): 25 °C and 15 °C according to the 3D printing with partially clogged nozzle due to decreased chamber temperature.

  4. 4.

    Experimental: 3D printing for a long period of time until nozzle became partially clogged. 3D printing extrusion process was recorded via JVC TK-C1480BE video camera with Navitar 121-50504 lens at the layer height of 0.2 mm. The images of the filament extrusion were extracted from the 25 frames per second video with the size of 1280 × 720 pixels and the resolution of 3 microns per pixel. After processing the recorded images using MATLAB software, 50 measurements were taken for each of the 6 partial nozzle clogging conditions. Next, the mean values were estimated for each of the 50 measurements of the effective nozzle diameter. In particular, 6 stages of partial nozzle clogging conditions were identified, with the effective nozzle diameter values \(D_{2}\) as: 0.4 mm, 0.396 mm, 0.390 mm, 0.381 mm, 0.365 mm, 0.345 mm. Theoretical: calculating extruding motor current \(I\) from Eq. (23) using the 6 different values of the effective nozzle diameter \(D_{2}\): 0.4 mm, 0.396 mm, 0.390 mm, 0.381 mm, 0.365 mm, 0.345 mm according to the 6 stages of partial nozzle clogging measurements from the video camera.

The theoretical values of extruding motor current during nozzle clogging were calculated using the process parameters listed in Table 1.

3 Results

The results of the current study are reported as follows. First, theoretical and experimental values of extruding motor current during 3D printing using three different nozzles of 0.4 mm, 0.3 mm, 0.2 mm in diameter are shown in Fig. 7. The experimental error bars represent the results during measuring the current of the motor, and 50 measurements were recorded for each nozzle size, resulting in 150 values of current data. For 0.4 mm in diameter nozzle the theoretical current value was 545 mA with 3.6% error during experiments. For 0.3 mm nozzle the theoretical current value was 770 mA with 6% error during experiments. For 0.2 mm nozzle the theoretical current value was 1000 mA with 7% error during experiments. As can be seen, the reduction in nozzle size increased the amount of current exerted by the extruding motor, as it was calculated using the proposed dynamic model.

Fig. 7
figure 7

Theoretical and experimental values of extruding motor current during 3D printing with three different nozzle sizes: 0.4 mm, 0.3 mm, 0.2 mm in diameter

Second, theoretical and experimental results of extruding motor current during 3D printing with completely clogged nozzle due to part warping are shown in Figs. 8 and 9. The current signal was recorded with respect to time, and a window of 2 s during part warping is illustrated. As can be seen from Fig. 8, the signal is fluctuating for the value of ± 2 mA during normal 3D printing, and there is a sharp increase of current signal during nozzle clogging due to part warping. During normal 3D printing, the current values were around 545 mA, but during part warping with no room for extrusion which resulted in completely clogged nozzle the current values rose up to the maximum of 1000 mA. This increase in the current values during nozzle clogging from part warping were monitored real-time, as the data were send to the computer via USB port. 50 experimental sets of part warping have been performed, and the variability of the current signal values are illustrated as error bars in Fig. 9. The experimental results varied from the theoretical calculations by 8%. As previously, the completely clogged nozzle caused rapid increase of the current.

Fig. 8
figure 8

Theoretical and real-time experimental results of extruding motor current versus time during 3D printing with completely clogged nozzle due to part warping

Fig. 9
figure 9

Theoretical and experimental results of extruding motor current versus effective nozzle diameter during 3D printing with completely clogged nozzle due to part warping

Third, theoretical and experimental results of extruding motor current during 3D printing with partial clogged nozzle due to decrease in chamber temperature are illustrated in Figs. 10 and 11. The current values were measured with respect to time, and a window of 2 s during chamber temperature decrease is presented. As can be seen from Fig. 10, the signal is fluctuating for the value of ±3 mA during normal 3D printing, and there is an increase of current signal during nozzle clogging due to decreased chamber temperature. For normal 3D printing with chamber temperature of 25°C the current of extruding motor was 545 mA. However, when the fan started to blow the cool air towards the extrusion region, by decreasing the chamber temperature to 15°C, the extruding current was monitored real-time and increased to 560 mA. 50 experimental sets of nozzle clogging due to chamber temperature decrease have been performed, and the variability of the current signal values are illustrated as error bars in Fig. 11. Differences in the results between theoretical and experimental results were in the region of 2%.

Fig. 10
figure 10

Theoretical and real-time experimental results of extruding motor current versus time during 3D printing with partial clogged nozzle due to decrease in chamber temperature

Fig. 11
figure 11

Theoretical and experimental results of extruding motor current versus temperature during 3D printing with partial clogged nozzle due to decrease in chamber temperature

Fourth, theoretical and experimental results of extruding motor current during 3D printing for a long period of time until nozzle became partially clogged is presented in Fig. 12. The 3D printer was running for 6 weeks continuously to cause a clogged nozzle and the effective nozzle diameter was monitored continuously. In total, there were 50 sets of current signals recorded for each value of the effective nozzle diameter. The variations of these experimental data of the current values are shown as error bars in Fig. 12. The current values were monitored during 6 different stages of the effective nozzle diameter \(D_{2}\): 0.4 mm, 0.396 mm, 0.390 mm, 0.381 mm, 0.365 mm, 0.345 mm according to the 6 stages of partial nozzle clogging measurements from the video camera. For normal 3D printing the extruding current values were near 545 mA, but when the nozzle started to clog partially, the current values started to rise slowly until a certain point, and later increased sharply. As an example, when the nozzle just started to clog partially with effective nozzle diameters of 0.396 mm, 0.390 mm, and 0.381 mm the current values stayed below 590 mA. But when the nozzle clogged even further with effective nozzle diameters of 0.365 mm and 0.345 mm, the current values increased to 670 mA and 750 mA, respectively. In other words, up to 4% decrease in the effective nozzle diameter caused only up to 8% increase in extruding motor current; but 8% and 13% decrease in the effective nozzle diameter sharply increased the current values to 23% and 38%, respectively. Experimental results varied from the theoretical calculations by 6%, and the current values increased during partial nozzle clogging, as it was estimated from the proposed model.

Fig. 12
figure 12

Theoretical and experimental results of extruding motor current versus effective nozzle diameter during 3D printing with partially clogged nozzle

4 Discussions

This study proposed a theoretical model for current-based nozzle condition monitoring technique in 3D printing. As presented in previous section, the theoretical modelling of FDM 3D printing process showed a very accurate correlation with the experimental tests. It was found that the proposed theoretical model can efficiently estimate the current of the extruding motor during nozzle clogging in FDM 3D printing. The findings of this study indicate that the nozzle clogging decreases the effective nozzle diameter, makes the extrusion more difficult and affects the current of the extruding motor. When the extruding mechanism is fitted with a current-based monitoring system, the nozzle clogging conditions can be tracked relatively accurately using the proposed theoretical model.

The proposed model and the current-based nozzle condition monitoring method is in contrast to the earlier works [21, 27, 32], where the AM process monitoring methods were purely empirical. On the other hand, the results of the present research are similar to the study developed by Bukkapatnam and Clark [33], where they introduced a theoretical model-based vibration monitoring in 3D printing. The difference between the present work and their study is focussing on the extrusion process and the nozzle clogging, but their work focussed more on the severe vibrations of the 3D printer machine structure.

The significance of the present work is the ability to predict the nozzle clogging conditions in FDM 3D printing before any serious process failure might happen. The overall differences between the theoretical estimations and the experimental results are in the range of 8%. The present method is based on theoretical dynamics of FDM extrusion process, and it can be very promising for developing nozzle condition monitoring and control techniques in FDM 3D printing.

There are several limitations of the present study. First, theoretical calculation results of the extruding motor current were slightly different from the experimental results in the maximum range of 8%. This is because the theoretical model treats the filament diameter as ideally constant value. However, the actual diameter of the filament tends to vary due to the manufacturing limitations and tolerances, for example, tolerance of filaments used in present study was ± 0.05 mm. To overcome this limitation, the actual diameter of the filament can be measured at the location before it enters the heated liquefier. The actual filament diameter measurement can be achieved using computer vision system, similar as in work presented by Greeff and Schilling [38], where they measured the filament width using a low-cost USB microscope video camera and image processing. Then, the actual filament radius values \(R_{1}\) should be placed in Eqs. (7)–(9) and subsequently used for estimating the current of extruding motor. Second, the present model is based on most common FDM system based on a wire feeding mechanism and a heated liquefier. For other types of systems, for example, with pressurised material heating tank, the model can be applied similarly. For example, the additional pressure in the pressure tank can be written as \(\Delta P_{4}\) and added into Eq. (12). The remaining calculations can be done similarly as in the model proposed in this study. As a result, to have a reliable and good 3D printing results with the pressurised tank, the pressure is to be maintained constant in the material heating tank. If the pressure in the tank is constant, the decrease in effective nozzle diameter (or nozzle clogging) has a direct effect on the current of extruding motor.

Future work might be focussed on the usage of the proposed model for nozzle condition monitoring and control in FDM 3D printing for avoiding process failures. In addition, the proposed dynamic model would be tested with a PEEK polymer to evaluate the effect of temperature on results.

5 Conclusion

Nozzle clogging is one of the significant process errors in FDM 3D printing, because it has a direct effect on the quality of 3D printed part in terms of mechanical strength and geometrical accuracy. This work proposed a dynamic model for current-based nozzle condition monitoring in FDM 3D printing, and it is based on a theoretical relationship between the extruding motor current and the nozzle clogging condition. To summarise the results of the present study, the following recommendations are suggested.

  • When the nozzle starts to clog, its effective diameter decreases, which increases the backpressure. The backpressure increase makes the filament extrusion more difficult, and to maintain the constant extruding velocity, the current (and the torque) is increased.

  • Thus, nozzle clogging in FDM 3D printing can be monitored by sensing the current of the filament extruding motor.

  • Theoretical and experimental results show that the nozzle clogging in FDM 3D printing directly affects the current of the extruding motor, which increases non-linearly with nozzle blockage.

  • Theoretical estimations of the current of the extruding motor during nozzle clogging varied from the experiments by the maximum error of 8%.

In conclusion, the findings of the current work can be one step towards developing nozzle condition monitoring and control in FDM 3D printing for avoiding process failures as the study is based on the fundamental relationships between FDM process parameters and the nozzle clogging.