Control System for 3D Printer Used [627471]

Control System for 3D Printer Used
PLC

Mureșan Sebastian -Mihai
Department of Automation
Technical University
Cluj-Napoca , Romania
[anonimizat] Ionuț -Dragoș
Department of Automation
Technical University
Cluj-Napoca, Romania
[anonimizat]

Abstract— through position and velocity control o f 3-axes
CNC compound with temperature control of thermoplastic
extruder represents a solution to design a 3D printer. Position
and velocity control are closely connected using impulses from a
rotary encoder . The velocity is set according to current position
in desired shape until t he tolerance error, from the difference
between current position and reference position , is fulfilled . For
melting thermoplastic material, we follow two pathways : the
first one, with a PID regulator we can control the temperature
of thermoplastic extruder and the second one, we can control
advance of melt ed material with stepper motor based on the
temperature of the melted material .
Keywords — CNC, advanced control , temperature control,
trajectory tracking .
I. INTRODUCTION
In the last 50 years, plastics has been used in a wide
variet y of products replacing other materials, such as wood,
metal, and glass. It can be formed into polyesters for use in
fabrics and textiles, polyvinylidene chloride for food
packaging, and polycarbonates for eyeglasses and compact
discs, among thousands of other uses. In this growth, plastic
is also used as working material for thermoplastic extrusion
combined with numeric control of CNC axis will result a 3D
printer . [1]
The techniques used for 3D printing are: FDM ( Fused
Deposition Modeling), SLA(Stereolit hography), SLS
(Selective Laser Sintering), DLP (Digital Light Processing),
EMB (Electron Beam Melting ). In the article [2] was
designe d a 3D printer based on DSP and FPGA because
motion control technology is enormously enhanced due to
high speed processor and programmable logic device and
these two devices have flexible structure, strong versatility ,
suitable for modular design. The authors provided closed –
loop control and the control strategies of acceleration and
deceleration for the 3 -axes has been designed with the path
planning method . Temperature for extruder heater and hot
bed heater was controlled with PWM strateg y generated by
the FPGA .
Another approach was proposed in [3] where the 3D printing
system consists of two parts: Crusher and Extruder. The
crusher is a tool where the recycled pets become working
material for melting in extrusion process. The extruder melts
the plastic and with 3D positioning ax es the desired shape is
done.
In this paper we develop ed a control system for 3 D printer
where control for 3 -axes and temperature of extruder is based
on PLC OMRON . For controlling each axis, we used a stepper motor and a rotary
encoder who transmit data through driver to the PLC .
To control the temperature, we used analog input module for
reading RTD sensor signal and after with a stepper motor
control amount of melt plastic trough extruder.
In figure 1, is represented physical system on which we desire
to implement the 3D printer.
Paper summary it’s split in the following areas : Chapter
1 summarizes some basic asp ects of modelling and
temperature control processes. Chapter 2 provides details of
hardware implementation , Chapter 3 covers software
implementation, in Chapter 4, present s our results, and finally
the last one, Chapter 5 is providing a conclusion for our work.

Fig. 1. Physical system
II. HARDWARE IMPLEMENTAT ION
In both cases, ax es control and temperature control, we
used PLC OMRON CJ2M -CPU 11.
A. CNC 3 -axes control
First, we divide d hardware components of CNC in
mechanical components ( figure 2) and electrical components
(figure 3). The mechanical part for each axis consists : ball
screw, bellows coupling , servomotor ( R7D -BP01 H). The
electrical part components includes : PLC, Servo driver
(R7D -BP01H), Input/output digital module (MD 211), rotary
encoder provides information (impulses) about current
positio n, inductive sensor for search of axes origins and two
limit sensor s on each axis ( CW and CCW) which determines
the trajectory of the end effector .

Fig.2. Mechanical part of CNC system
Fig.3. Electrical part of CNC system [4]
B. Temperature control of thermoplastic extruder
The closed -loop for temperature controlling includes the
follo wing components: PLC, analog input module ( CJ1W –
AD04U) used for reading value provided by RTD(PT1000) ,
digital output module (CJ1W -OD212) which generate PWM
waveform , for control the heating element , according of
command from numerical controller developed in next
chapter , stepper motor (17HS4401 ) which drive s the melted
material , stepper motor driver (TB6600) , solid state relay .
The model of temperature control of thermoplastic extruder
system is shown in figure 4.
C. 3D Printer
Having components presented above which constitute the
system of position and temperature control and the used
strategies of control described in next chapter, we can discuss
the idea of the 3D printer.
We used the Omron PLC processor for position controlling
because servomotor needs high level of command signal .
For temperatur e loop generally, a microcontroller is used to
control process value because is much easier to connect with
another component s like stepper motor ; but becau se we
desired a good synchronization between positioning process
and temperature process for both we use PLC.
Fig.4. Electrical model of temperature control
III. SOFTWARE IMPLEMENTATI ON
Modern manufacturing processes use high -speed
processing, which raises the following problem: the ability of
the end -effector to follow an established contour. Used control
techniques based on independent axis control of the axial
system provide performance in tracking contours only in the
case of disturbances from other axes does not affect the
controlled axis [5].
To develop software solution for implement the position
and temperature loop control we use the programming
environment provided by Omron , CX -Programmer and CX –
Designer.
A. Position and Speed Control
In numerical control with computer (CNC) usually is used
G-code for describe the trajectory of end effector.
We succeeded to implement the alternative of G -code,
especially G01 and G 02 – represent linear and circular
movement s, through the Ladder Diagram . Another instruction
in G-code developed t o help position and velocity control is
G00 that is use for movement to origin . G54 saves origin of 3 –
axes system and calculate the absolute position; G21 role is to
measure the movement in millimeters.
The loop of position and velocity control consists in a
reference point or reference shape, set by operator and process
values, represented by position and velocity .
The control method it is not a typical closed -loop because
CX-Programmer is dedicated to control Omron series of
servomotors and implementation of that is realized with
specific ladder function PLS2 ( 887). In figure 5 , is described
velocity profile while in figure 6 , its presented ladder function
to set a port, a sense of rotation for servomotor . From D0 to
D6, it’s displayed every parameter shown in figure 5, which is
saved in PLC memory.

Fig.5. Velocity profile

Fig.6. Implement ation velocity profile in ladder diagram

The position and velocity control are closely connected.
An attempt to control them separately did not provide feasible
results because in order to realize a linear and circular
interpolation we need an adjustment of velocity correlated
with desired shape.
First, we need to set an origin of 3 -axes system ; origin its
set by a ladder function like in figure 7 .

Fig.7. Implementation origin search in ladder diagram

The operation is necessary to configure the point where any
displacement (linear or circular) it’s performed in absolute
coordinates . Having set the origin, we can start control ling
velocity and position to each axis according to a desired form .
For linear movement we used linear interpolation , consisting
in position control that involves velocity control . Error signal
represent s the distance to desired position. Obviously , the
velocity it is distance dependent (the higher the distance, the
faster the velocity must be) .
For circular interpolation , we generate d series of multiple
points, which must be in the trajectory described by equation
(1), (2), (3):

(𝑥−𝑥0)2+(𝑦−𝑦0)2=𝑅2 (1)
𝑥=𝑅∙cos(𝑡) (2)
𝑦=𝑅∙sin(𝑡) (3)

x0 and y 0 are start position on the X and Y-axes, v ariable R
represent s value of radius that is set by operator; x and y are
points located on the trajectory design by the circular
interpolation.
As we mentioned above it don’t used a typical closed -loop
control . The graphed diagram purpose was to control position
and velocity according to states , every state consists the values
of velocity and position to reach.
The signal received from rotary encode r it’s represented
by impulses ; when the motion of screwball is in clockwise the
amount of impulses provide d by rotary encoder increases,
while being in opposite position it’s decreas ing. This law does
not respect for Z -axis because the movement is always below
origin point.
Conversion of impulses into millimeter units (G21) was
developed within the next equations (4), (5), (6).

𝐼𝑚𝑝𝑋 =500 ∙𝑋𝑚𝑚 (4)
𝐼𝑚𝑝𝑌 =500 ∙𝑌𝑚𝑚 (5)
𝐼𝑚𝑝𝑍 =−1225 ∙𝑍𝑚𝑚 (6)

B. Thermoplastic extruder control
The construction of 3D object is implemented with FDM
techniques (FDM – fused deposition modelling) . In the
manufacturing process, the filament is passed through a
heating element, so the material will melt. The melted
filament is then passed through a nozzle being engaged by a
piston and stored in a cavity. Then the material handling
element, on X -Y axes, traces the operator -given form with the
fused filament. At the end of the cycle, the dispensing head
rises on the Z axis to create a new layer [6].
In thermoplastic extruder process the main objective is to
maintain the value of temperature in feasible domain
according to technical datasheet of desired melt material. In
generally , a deviation domain [ -10,10 șC] for this type of
process is agreed.
To read temperature of extruder, we used an RTD sensor,
which transmit analog signal to analog input model ( AD04U) .
Signal r eceived by the PLC is in analogue units and to have
physical interpretation a scaling is required from analog units
in Celsius degree according to equation (7):

𝑦=𝑎∙𝑥+𝑏 (7)

, where a=0.37, b= -69.5, y – temperature in șC , x – analogue
units. Measurement noise is reduced by applying a sliding
medi um filter which improve the behavior of the process value
(present value of heating element). Software implementation
of this scaling is described in figure 8 .
Fig.8. Scaling sensor

System is compose d from heating element , solid state
relay and temperature sensor. To identify it we used
MATLAB toolkit: System Identification Toolbox , as result of
this toolkit we received a model of system which consist in a
transfer function who is 2nd order with time delay . Behavior of
the system and transfer function who approximate th e system
is shown in figure 9 and equation (8).

𝐻(𝑠)=0.036479
(𝑠+0.01558 ) (𝑠+0.00682 )∙𝑒−10∙𝑠 (8)

The mathematical model of temperature sensor ( PT1000) who
has a range of measurement in [0 -850 șC] is shown in
equa tion (9). From the perspective of the transfer function, the
time delay include s this element .

𝑅=𝑅0∙(1+𝑎∙𝑡+𝑏∙𝑡2) (9)

Fig.9. System response

In the heating process, measured value has a slow variation
and an “On/Off” Controller with Hysteresis can be a good
solution. We use unconventional “On/Off ” Controller because
we do not use “1” and “0” logic but we adjust the duty of
PWM in function of the temperature value received from
sensor and set point.

C. HMI – CX-Designer
Another tool is CX -Designer , used to create a human
machine interface. Demand to create a human machine
interface is justified because it’s easier to operate with a CX-
Programmer for entry level or a non -cognate person in Ladder
and Structured Text without the possibility of changing the
code . We choose CX-Designer because we achieved a better
communication based on Client -Server compared with CX –
Programmer .
Fig.10. HMI
The front -page of HMI with main functions – in above
figure.

IV. RESULT
In this chapter, we will present our results based on
theoretical knowledge mentioned in chapter 3 ( Software
Implementation ). In fig ure 11 and fig ure 12, it’s presented a
linea r interpolation and velocity. You can trace in this figure
a strong correlation : the velocity is directly proportional with
remaining distance . It can be observed an increase of ve locity
when the operation is started . In the both figures, it’s
presented the movement profile of axes when it draws a
rectangle with width 50 mm ( X-axis) and length 70 mm ( Y-
axis).

Fig.11. Position – Linear interpolation

Fig.12. Velocity – Linear interpolation

Another part of numerical control is circular
interpolation. The circular movement is achieved according
equations (1), (2), (3). The main challenge in this part was to
control the velocity in order to obtain a desired position. In
figure 13 it can be seen a circle with 15 mm radius and 30
mm diameter . To achieve the circle we set several points for
each dial. A greater number of points in each dial would
approximate much b etter a circle. We use d seven points in
each dial to approximate the circle, having a radius error –
0.09 mm on Y-axis, 0.78 mm on X-axis – and diameter error
– 0.75 mm on Y-axis, 1.5 mm on X-axis. The velocity graph
chart is the same with position profile with one observation:
X-axis of velocity is th e same with Y -axis of position and Y –
axis of velocity is the same with X-axis of position – the only
difference it is that are not the same units of measurement.

Fig.13 Position – Circular interpolation

For temperature control, the “On/Off ” Controller with
hysteresis has good results and in figure 14, it shown that the
range of temperature variation does not exceed 10℃ . The set
point for experiment is 100 ℃ and dom ain for hysteresis is [ –
2, 2℃]. In our law of control, we used three values of duty
cycle of PWM and variation who exist above and below
hysteresis is due to thermal inertia. If we add spikes, we
obtain an average value of temperature ( 98℃) close to set
point.
Fig.14. Controlled Temperature V. CONCLUSIONS
In conclusion, development of 3D printer machine is
partially implemented because exist a set of updates who this
machine can received like a software for G -code
interpretation, an advanced method for control temperature of
heating element . Based on the tests made, it can be seen that
we have a precise numerical control for axes a nd a good
control for melting temperature considering thermal inertia.

VI. REFERENCES

[1] *****, "The Statistics Portal,Global plastic production
statistics," 2018. [Online]. Available:
https://www.statista.com/statistics/282732/global –
production -of-plastics -since -1950/. [Accessed 2019].
[2] D. Younes, T. Yuegang, C. Xin, E. Alghannam and A.
Altazah, "De sign of Control System for 3D Printer
Based," Journal of Automation and Control
Engineering, vol. 6, no. 1, 2018.
[3] R. A. Victor, A. D. Witman and R. G. Avid, "Design of
a 3D Printer and Integrated Supply System," in IEEE
XXV International Conference on Electronics,
Electrical Engineering and Computing (INTERCON) ,
Lima, 2018.
[4] *****OMRON, CJ2M CPU Unit Pulse I/O Module,
2010.
[5] T. Dam and . P. Ouyang, "Contour tracking control in
position domain for CNC machines," in IEEE
International Confe rence on Information and
Automation , Shenzhen, 2011.
[6] P. Dudek, "FDM 3D PRINTING TECHNOLOGY IN
MANUFACTURING COMPOSITE ELEMENTS,"
Archives of Metallurgy and Materials, vol. 58, 2013.

Similar Posts