You are on page 1of 9

________________________________________________________ __

TEMPERATURE CONTROL OF 3D PRINTER NOZZLE


USING PID CONTROLLER FOR METAL PRINTING

Submitted in partial fulfillment of the requirements of

BITS G540 Research Practice

By

Rohit R. Nair
Id No. 2018H1420199P

Under the supervision of:

Dr. Prateek Kala, PhD


Assistant Professor

BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE PILANI, PILANI CAMPUS


April 2019
CERTIFICATE

This is to certify that the report entitled, “Temperature Control of 3d Printer Nozzle using
PID Controller for metal printing” and submitted by Rohit R. Nair ID No. 2018H1420199P in
partial fulfillment of the requirement of BITS G540 Research Practice embodies the work done by
him/her under my supervision.

Date: Signature of the Supervisor

Dr. Prateek Kala, PhD


Assistant Professor

BITS-Pilani Pilani Campus

ii
BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE PILANI, PILANI CAMPUS

ABSTRACT

TEMPERATURE CONTROL OF 3D PRINTER NOZZLE USING PID CONTROLLER


FOR METAL 3D PRINTING

This research paper shows the temperature control of FDM based 3d printer’s extruder
using PID control. The aim of this research is to reach an effective temperature to print metals,
here Solder is used. Fused deposition modeling being a very hot topic, is mostly used for
thermoplastic materials. Though metals can be printed through other 3d printing techniques, but
they are highly expensive. Through this research, the objective is to develop a low cost 3d printer
for metals.

iii
CONTENTS
CERTIFICATE ............................................................................................................................. ii
ABSTRACT .................................................................................................................................. iii
INTRODUCTION......................................................................................................................... 1
METHOD ...................................................................................................................................... 1
EXPERIMENTATION ................................................................................................................ 2
RESULTS ...................................................................................................................................... 4
CONCLUSION ............................................................................................................................. 5
REFERENCES .............................................................................................................................. 5

LIST OF FIGURES
i. Figure 1: A block diagram of a PID controller in a feedback loop
ii. Figure 2: Experimental Setup
iii. Figure 3: Pronterface
iv. Figure 4: 300°C PID Auto tuning
v. Figure 5: Printing Solder Wire

iv
INTRODUCTION

Additive manufacturing is a process in which material is joined to form Three-dimensional objects.


3d printing is one such process where thousands of finely sliced layers of material are solidified horizontally
to get very complex shapes in a computer-controlled environment.
Fused deposition modeling (FDM) is a common 3d printing technique which is basically used to print
thermoplastic materials. Here in our research, we are focus on using FDM to print continuous filaments of
Solder wire.
The main focus of this paper is to find out ways to control the temperature of the printer’s extruder using
PID controller of the Marlin firmware, which is the base of RepRap printers that are most widely used for
low cost 3d printers.

METHOD

In this research our main objective was to determine an optimum temperature for printing Solder wire.
This was followed by controlling the temperature variations in the desired temperature using an inbuilt
proportional–integral–derivative controller in the Marlin firmware which is used in RepRap 3d printers.
From the experiments carried out in the past, details of which are provided in the references, we got to
know that the approximate temperature to melt the Solder wire was somewhere around 300°C. [1]
So, the task was to get a stable desired temperature with minimum delay and overshoot in the
temperature of hot end; this was done by PID controller.
PID Tuning:
• It refers to the adjustment in parameters of PID values to alter the algorithm to control the hot end
temperature.
• The PID controller needs to have constant values of kp, ki and kd respectively to control the nozzle
temperature. These values correct the ramping up and slowing down of temperature or swings in
values form the target value.
• Here, r (t) is the desired temperature, y(t) is the actual measured value, e(t) is the error value and
u(t) is the control variable.
• P is proportional to current value of error e(t), I seek to eliminate any historic variations in desired
value and D anticipates trends that may be leading to some sort of error based on its rate of change.
• The overall mathematical equation in this is given by:

Where kp, ki and kd values are non-negative coefficients of proportional, integral and derivative
respectively.
Figure 1: A block diagram of a PID controller in a feedback loop. (Source Wikipedia)

• In RepRap 3d printers using Marlin firmware, that run on Arduino, there is an in-built provision
for PID tuning. This tuning methodology directs the control algorithm to tune the heating behavior
for the hot ends and generates kp, ki and kd values.
• Pronterface, a 3D printing host software is used to handle the printing process. It enables the user
to interactively control the 3d printer.
• To run the PID Auto-tuning, the following G-code is entered on the Pronterface for the hot end:
- M303 E0 S200 C8
Where, M303 is the G-Code for PID tuning
E0 is the first temperature control module (usually the hot end)
S<temperature>, required temperature for PID tuning
C<cycles>, number of cycles around the target temperature

• After the PID tuning, the Pronterface will return kp, ki and kd values. These values can be entered
in the Marlin code in file, configuration.h to complete the PID control or it can be stored in
EEPROM by the command, M301 P< > I< > D< >.
• To save these permanently, M500 command is used.

EXPERIMENTATION
The setup for the experiment consists of a wooden stand, ramps 1.4, PT100 Temperature sensor, hot
end (40W, 12V), 12V-5Amps SMPS
With reference to a report on Implementation of Pt100 Temp Sensor for Ramps 1.4, changes in the
Marlin code were done in the file Configuration.h and temperature.cpp. These changes were required
for the installation of PT100 temperature sensor with MAX31865 control board. [2]
Once the required setup was done, Marlin program was loaded onto the Ramps 1.4 through Arduino
and the 3d printer board was connected via EEPROM to Pronterface.
Initially, PID Autotuning was carried out for a temperature of 200°C using the command M303 E0
S200 C8, and gradually the temperature was increased to 300°C with steps of 20°C.

2
Figure 2: Experimental Setup

The Kp, Ki and Kd values were fed into Marlin and saved using the G-codes on Pronterface.

Figure 3: Pronterface

3
Figure 4: 300°C PID Auto tuning

RESULTS

During PID tuning, ramps frequently used to shut down around 240°C and the heating was halted. The
issue was probably due to the heater and power source being less powerful to reach higher temperatures.
This caused the heater to heat up slowly and as a result, the PID Autotune used to reach timeout.

To tackle this issue, THERMAL_PROTECTION_PERIOD was increased to 40 mins from the initial
20 mins.

Figure 5: Printing Solder Wire

4
After this, the hot end was preheated to 220°C and then it was autotuned to 240°C; with new PID values
higher temperatures were reached.
Finally, when PID Autotune was finished for 300°C, Solder wire was fed into the extruder. It was found
out that at 300°C, Solder was fully melted into liquid form which was not suitable for layering for 3d
printing.
So, the temperature was reduced to 270°C which extruded solder wire in plastic form and it was found
to be perfect for making layers for 3d printing.

CONCLUSION

The PID Tuning was successfully finished and the Kp, Ki and Kd values were generated and were
saved successfully in the Marlin codes.

Initially the Solder wire was fed into the extruder which was heated at a temperature of 300°C, which
melted the solder wire completely. Later on, upon decreasing the temperature to 270°C, it was found out
that the Solder wire was melted up to a plastic state that was fit for layering as required in a 3d printing
process. The layers of Solder wire formed as shown in Figure 5, were done by manually moving the base
plate. Fine layers of metal formed proved that the Solder wire could be used in a calibrated 3d printing
setup which should have a better corrosion resistant nozzle material which can be subjected to further
research in this area.

REFERENCES

1. Developing and Configuring FDM Based 3d Printer Extruder, Aditya Mehta, BITS Pilani
2. Implementation of Pt100 Temp Sensor for Ramps 1.4, Anurag Ranjan, M.E Design, BITS Pilani
3. https://reprap.org/wiki/RepRap
4. https://github.com/MarlinFirmware/Marlin/issues/13460#issuecomment-475866133
5. Modeling and Controlling of Temperature in 3D Printer (FDM), Htin Lin, Kyaw Zaw Ye, Ye Htet
Linn, National Research University of Electronic Technology, Moscow, Russia

You might also like