Anda di halaman 1dari 17

3D Printer Part Remover

Ling Li Tianyi Li Zhaoxing Deng


Department of Mechanical Engineering Department of Mechanical Engineering Department of Mechanical Engineering
University of California, Los Angeles University of California, Los Angeles University of California, Los Angeles
Los Angeles, California Los Angeles, California Los Angeles, California
llzwy@ucla.edu henry3g@outlook.com dengzhao47602@g.ucla.edu

Abstract— The field of additive manufacturing, especially methods are similar, which utilize the relative motion between
3D printing, has gained growing attention in the research and the barrier and the stage to knock the part off the stage.
commercial sectors in recent years. One of the factors that limit
the speed of 3D printing is that majority of the 3D printer
systems do not have automatic part removers. And those which
have simple removers are not capable of removing thin or
delicate printed parts without damages. This work developed
and demonstrated a 3D printer part remover with different
working modes designed to quickly, safely and precisely remove
small, sticky, and brittle 3D printed objects.

Keywords—3D Printer, automatic, part remover, robotic arm,


thin, fragile

I. OVERVIEW
Additive manufacturing (AM), widely known as 3D
printing, is a process of building parts from 3D CAD models
on a layer-by-layer basis. In general, there are seven major
forms of AM techniques: Vat Photopolymerization by using
UV light to solidify photopolymers, Powder Bed Fusion by
melting material powder through heat sources (like laser and
electron beam), Fused Deposition Modeling (FDM) by
extruding molten material through a nozzle, Material Jetting
by depositing material droplets, Binder Jetting by bonding Fig. 1.1 Moving Hard Stage & Static Barrier [2].
material powder through implementation of binders, Sheet
Lamination by cutting and bonding material in sheets form,
and Directed Energy Deposition by depositing material
through heat sources [1]. Among most of these methods,
printed parts are attached to the stage of the machine when the
printing is finished. Removal of the 3D printed parts off stage
must be done before next printing starts. Automation of part
removal can increase yields, save labor cost, and change the
economics of production.
There are three types of approaches which have been used
to automatically remove the printed part from the stage. The
first one (as shown in Fig. 1.1) composes of a moving hard
stage and a static bar barrier which is fixed with the frame of
the printer. The second on in Fig. 1.2 has a moving belt
conveyor and a static blade barrier which stands close to the
curved edge of the conveyor. And the one in Fig. 1.3 has a
hard barrier which is attached to its printhead and use the
relative motion between the printhead and the stage to take the
part off the stage. The working principles of above three

XXX-X-XXXX-XXXX-X/XX/$XX.00 ©20XX IEEE


Fig. 1.2 Moving Belt Conveyor & Static Barrier [3]. Fig 2.1 Workflow chart of the 3D printer part remover.
The proposed 3D printer part remover works in the
following steps (as shown in Fig. 2.1):
• Collect the location and information (such as
geometry, dimensions, and material properties) of the
part from the 3D printer to calculate the active
working area in xy-plane;
• Choose the most appropriate working mode based on
the geometry and material strength of the part and
plan the trajectory of the end-effector properly;
• Control the motion of the end-effector accurately to
make fast and smooth movement during the part
removing process;
• Completely remove any residual from the stage to
make the printer be ready for the next printing job.
III. METHODS
A. System Setup
Fig 1.3 Static Hard Stage & Moving Barrier [4]. The system setup of the 3D printer part remover is shown
in Fig. 3.1. The following sections describe the specifications
However, all of these methods can hardly remove thin of each component and the reasons they were used in this
parts with relatively small height compared to its width and project.
length (such as business cards, cup lids, and coasters) or
delicate/fragile parts (like a small Eiffel Tower model) with
fine features as shown in Fig. 1.4.

(a)

Fig 1.4 Parts are difficult to be removed using currently available methods
[5-6].

Thus, we built a 3D printer part remover which mimicked


the action of human gently shoving parts from the stage by
using a stiff/flexible scraper in three modes of motion control.
II. OBJECTIVES
(d)
(b)

(c)

Fig. 3.1 System setup: (a) 6DOF aluminum robot arm; (b) breadboard; (c)
Elegoo Mega 2560 board; (d) DC voltage regulator and 7.4V LiPo battery
(not shown in the picture).
1) ROT3U 6DOF Aluminum Robot Arm Since the running current of each servo is 900 mA at 6 V
The 6DOF robot arm (as shown in Fig. 3.2(a)) is made of and five motors will be used in the arm, the total current is 4.5
aluminum alloy and can clamp objects. The 3D printer part A which is too high for a microcontroller board to provide.
remover should be able to move in the xy-plane and has a Thus, a 7.4V Li-polymer rechargeable battery (as shown in
rotational end-effector which can shovel the interface of the Fig. 3.3) was used as a power supply. And one battery can be
part and the stage in any direction. So at least 3 degree of used for 20 min when the robot is continuously working.
freedoms were required and this 6DOF robot arm not only
satisfied the demands but also provided more possibilities to
achieve more complicated trajectories.
Here are its selected specifications [7]:
• Radius of gyration: 355 mm.

• Height: 460 mm (holder closed).

Fig 3.3 Hosim 7.4V 1500mAh 15C T-Connector Li-polymer Rechargeable


Fig. 3.2 a) Diymore Black ROT3U 6DOF Aluminium Robot Arm [7]. (b) Battery and Balance Charger [9].
Longruner 10 x MG996R Metal Gear Torque Digital Servo Motor [8].
4) DROK 180057 LM2596 Analog DC Voltage Regulator
2) MG996R Metal Gear Torque Digital Servo Motor The output voltage of the Li-polymer battery drops when
MG996R Micro Servo motors (as shown in Fig. 3.2(b)) are its power is low. The varying input voltage influences the
updated from the SG90 Micro Servo and the MG90S micro operating speed of the servos. Thus, a DC voltage regulator
servo motor with more advanced features such as more (as shown in Fig. 3.4) was used to maintain the output voltage
accurate and smoother shell and faster speed. of the battery at 6 V.
Here are the selected specifications [8]:
• Maximum angle: 180 °

• Weight: 56 g
• Operating Speed : 0.17 sec / 60 degrees (4.8 V no
load)

• Operating Speed : 0.13 sec / 60 degrees (6.0 V no


load)
• Torsional moment: 12 kg/cm(6 V)

• Temperature range: 0 °C to 55 °C Fig 3.4 DROK 180057 LM2596 Analog Control Buck Converter DC-DC 4-
32V to 1.25-30V [10]
• Operation Voltage : 4.8 - 6 Volts

• Gear Type: All Metal Gears


• Running Current: 500 mA – 900 mA (6V)
3) Hosim 7.4V 1500mAh 15C T-Connector Li-polymer
Rechargeable Battery and Balance Charger
Fig. 3.5 Elegoo Mega 2560 Microcontroller Board [11].

5) Elegoo Mega 2560 Rev3 Board



Elegoo Mega 2560 Board (as shown in Fig. 3.5) was used
to control the servos mentioned above by providing pulse-
width modulation signals using some of the digital outputs. It
was also used to receive the voltage feedback signals of the
servos using the analog inputs. Besides, this microcontroller
board provided computations of the PID controller. Fig. 3.6 Two wires (the leftmost red cable and the rightmost black cable)
were soldered to the potentiometer inside the servo to get voltage feedback
Here are its selected specifications [11]: signals.

• Operating Voltage: 5V Position feedback signals were calibrated by measuring


the voltage output of the potentiometer for three times using
• Input Voltage (recommended): 7-12V the analog inputs of the Mega 2560 board when the servo is
working under zero load and fitting the averaged data to the
• Input Voltage (limit): 6-20V inputs 𝑦 (degrees) of the servos. The readings of the analog
• Digital I/O Pins: 54 (of which 15 provide PWM inputs 𝑥 are in the range of 0 – 1023 corresponding to 0 –
output) analog input reference voltage you provide (default is 5 V
when nothing is connected). And the outputs of all three
• Analog Input Pins: 16 measurements of the feedback signals of each servo were
consistent and the differences were no larger than 2 degrees.
• DC Current per I/O Pin: 20 mA The coefficients of the fitted linear relationships 𝑦 = 𝑘𝑥 + 𝑏
and their coefficient of determination 𝑅 + of each motor are
• DC Current for 3.3V Pin: 50 mA shown in Table 3.1.
• Flash Memory: 256 KB of which 8 KB used by TABLE 3.1 COEFFICIENTS OF LINEAR LEAST SQUARES REGRESSION
bootloader FITTINGS

• SRAM: 8 KB Servo # 𝒌 𝒃 𝑹𝟐
1 0.5104 - 57.508 0.9998
• EEPROM: 4 KB 2 0.4768 - 59.954 0.99961
• Clock Speed: 16 MHz 3 0.4868 - 58.956 0.99973
4 0.4926 - 58.561 0.99978
• LED_BUILTIN: 13 5 0.515 - 58.764 0.99969

6) Custom Build Encoders B. Assumptions


The MG996R servo motor doesn’t have an encoder with it
but it has a small rotational potentiometer inside which is A decentralized position feedback controller was
connected to the servo arm. To get position feedback signal of implemented in this project based on the assumptions that:
those servos, two wires (as shown in Fig. 3.6) were soldered • The gear reduction ratios of all five MG996R servos
to the potentiometer [12] and their output signal was linearly are high (~320 for each element in Kr) [13].
proportional to the input of the servo.
• All servos are high efficient with small armature
resistances. Specific armature resistance value of
MG996R could not be found and those of fine and
expensive servos (such as ASD-A2-0221-M and
ASD-A2-0121-M) are less than 10 Ohm [14,15].
• The joint actuation torques are relatively small since 𝑎34 = 𝐿1 + 𝐿3 𝑠+ + 𝐿4 𝑠+3 + 𝐿5 𝑠+34 − 𝐿6 𝑐+34 − 𝑑1 𝑐+34
the robot is made of aluminum which has low density + 𝑑+ 𝑠+34 𝑐5
compared to ferroalloys and the end-effector force
will be maintained at a low value by properly planning 3) Jacobian Matrices
its trajectories and limiting the its interaction with the Using the iterative recursive equations, we can calculate
environment. Jacobian Matrix of the robot according to the tool frame.
𝑗11 𝑗12 𝑗13 𝑗14 0 0
C. Kinematics and Dynamics of the robot 𝑗21 𝑗22 𝑗23 𝑗24 d2 0
Kinematics and dynamics analysis is necessary and 6 𝑗31 𝑗32 𝑗33 𝑗34 0 0
𝐽 θ 6 =
important for the robot design. We apply DH parameters, 𝑗41 s5 s5 s5 0 0
transform matrices, Jacobian Matrices, and inverse dynamics 𝑗51 c5 c5 c5 0 0
for accurately and flexibly controlling the remover.
−c234 0 0 0 1 1
1) DH parameters
The remover has five degrees of freedom. For accurately 𝑗11 = −s5 L+ + L4 c+3 + L3 c+ + L5 c+34 + L6 s+34 + d1 s+34
locate the end-effector, we assume a rigid joint at the end. The 𝑗1+ = c5 (L6 + d1 + L3 s34 + L4 s4 )
DH parameters are shown in Table. 3.2
𝑗13 = c5 (L6 + d1 + L4 s4 )
TABLE 3.2 DH PARAMETERS OF THE REMOVER
𝑗14 = (L6 + d1 )c5
I a α d θ
1 0 0 𝐿1 𝜃1
𝑗+1 = −c5 L+ + L4 c+3 + L3 c+ + L5 c+34 + L6 s+34 − d+ c+34
2 𝐿+ π/2 0 𝜃+ 𝑗++ = −s5 (L6 + d1 + L3 s34 + L4 s4 )
3 𝐿3 0 0 𝜃3
4 𝐿4 0 0 𝜃4 𝑗+3 = −s5 (L6 + d1 + L4 s4 )
5 𝐿5 π/2 𝐿6 +𝑑1 𝜃5 𝑗+4 = −(L6 + d1 )s5
6 𝑑+ 0 0 0
𝑗31 = d+ s5 s+34
After measurement by hand, we have the values below,
𝑗3+ = −L3 c34 − L4 c4 − L5 − d+ c5
L1 = 0.093 𝑚; L+ = 0.021 𝑚; L3 = 0.1045 𝑚;
𝑗33 = −L5 − L4 c4 − d+ c5
L4 = 0.097 𝑚; L5 = 0.022 𝑚; L6 = 0.070 𝑚;
𝑗34 = −L5 −d+ c5
𝑑1 = 0.03𝑚; 𝑑+ = 0.05𝑚
𝑗41 = s+34 c5
2) Transform Matrices
𝑗51 = −s+34 s5
According to DH parameters, we can calculate all five
transform matrices and the transform matrix from the base to
the end-effector.
With the help of the transform matrix, The Jacobian matrix
a11 a1+ a13 a14 according to the base frame can be calculated.
D a +1 a ++ a +3 a +4
6𝑇 = a 𝐽 𝜃 6 = D6𝑇 6𝐽 𝜃 6
0
31 a 3+ a 33 a 34
0 0 0 1 4) Inverse Kinematics
𝑎11 = 𝑠1 𝑠5 + 𝑐1 𝑐+34 𝑐5 For calculating angles of each joint during the operation,
inverse kinematics is required. The original posture of the
𝑎1+ = 𝑠1 𝑐5 − 𝑐1 𝑐+34 𝑠5 robot is shown in Fig. 3.7.
𝑎13 = 𝑐1 𝑠+34
𝑎14 = 𝑐1 𝐿+ + 𝐿3 𝑐+ + 𝐿4 𝑐+3 + 𝐿5 𝑐+34 + 𝐿6 𝑠+34 + 𝑑1 𝑠+34
+ 𝑑+ 𝑐+34 𝑐5 + 𝑑+ 𝑠1 𝑠5
𝑎+1 = −𝑐1 𝑠5 + 𝑠1 𝑐+34 𝑐5
𝑎++ = −𝑐1 𝑐5 − 𝑠1 𝑐+34 𝑠5
𝑎+3 = 𝑠1 𝑠+34
𝑎+4 = 𝑠1 𝐿+ + 𝐿3 𝑐+ + 𝐿4 𝑐+3 + 𝐿5 𝑐+34 + 𝐿6 𝑠+34 + 𝑑1 𝑠+34
+ 𝑑+ 𝑐+34 𝑐5 − 𝑑+ 𝑐1 𝑠5
𝑎31 = 𝑠+34 𝑐5
𝑎3+ = −𝑠+34 𝑠5 Fig. 3.7 original posture of the remover.
𝑎33 = −𝑐+34
For more stable postures of our end-effector, we keep the axyz{ = 𝐿4 𝑐3 + 𝐿3
last link perpendicular to the ground. As shown in Fig. 3.8.
cxyz{ = −𝐿4 𝑠3
dxyz{ = K1
exyz{ = 𝐿4 𝑠3
fxyz{ = 𝐿4 𝑐3 + 𝐿3
g xyz{ = K1
θ+ = 𝑎𝑡𝑎𝑛2((𝑎XU|T 𝑔XU|T − 𝑑XU|T 𝑒XU|T ) , (𝑑XU|T 𝑓XU|T
− 𝑐XU|T 𝑔XU|T ))
Then
θ4 = 𝐾 − θ+ − θ3
Now, we can find out θ1 , θ+ , θ3 𝑎𝑛𝑑 θ4 according to the
position of Joint 5, we will control joint 5 (θ5 ) independently.
D. Trajectory Generation
Fig. 3.8 last link perpendicular to the ground. During the trajectory generation process, workspace
generation is required firstly. After checking the range
So that θ1 + θ+ + θ3 = K (normally K = 0) required, two different methods were used to generate
trajectories according to different requirements.
After simplification, we don't need to consider 𝑑1 , 𝑑+ and
θ5 The working space is actually a 3-dimension space.
However, only the ground plane is meaningful for the robot
Therefore, we only need to write down the position of the
operation. So the workspace at z = 0 (the ground plane) is
joint 5.
shown in Fig. 3.9.
𝑥STUVWXYSZW[ = 𝑐1 𝐿+ + 𝐿3 𝑐+ + 𝐿4 𝑐+3 + 𝐿5 𝑐+34 + 𝐿6 𝑠+34
𝑦STUVWXYSZW[ = 𝑠1 𝐿+ + 𝐿3 𝑐+ + 𝐿4 𝑐+3 + 𝐿5 𝑐+34 + 𝐿6 𝑠+34
𝑧STUVWXYSZW[ = 𝐿1 + 𝐿3 𝑠+ + 𝐿4 𝑠+3 + 𝐿5 𝑠+34 − 𝐿6 𝑐+34
We set θ3 < 0 for getting a unique nonsingular solution.
So
θ1 = 𝑎𝑡𝑎𝑛2(𝑦STUVWXYSZW[ , 𝑥STUVWXYSZW[ )
Assuming
K1 = (𝑥STUVWXYSZW[ − 𝑐1 (𝐿+ − 𝐿5 𝑐+34 − 𝐿6 𝑠+34 ))/ 𝑐1
(if 𝑐1 = 0,
K1 = (𝑦STUVWXYSZW[ − 𝑠1 (𝐿+ − 𝐿5 𝑐+34 − 𝐿6 𝑠+34 ))/ 𝑠1 )
Fig. 3.9 Workspace on the ground plane.
K + = (𝑧STUVWXYSZW[ − 𝐿1 − 𝐿5 𝑠+34 + 𝐿6 𝑐+34 )
We have One redundant degree of freedom can make the workspace
larger when the length of each link is limited. Because of
K1 = 𝐿3 𝑐+ + 𝐿4 𝑐+3 restriction of the base, our effective range along the X-axis is
10 mm-28 mm. According to the workspace of the robot, the
K + = 𝐿3 𝑠+ + 𝐿4 𝑠+3
object was put on (22 mm, 0, 0).
Combining the two equations,
We have different modes and complicated trajectories in
K1 + + K + + = 𝐿3 + + 𝐿4 + + 2𝐿3 𝐿4 𝑐3 this project. So that two functions of MATLAB were written
to generate trajectories. After typing in the original point, the
Then final point, time, frequency, and the theta5 which is
θ3 = cos v1 ((K1 + + K + + − 𝐿3 + − 𝐿4 + )/2𝐿3 𝐿4 ) independent of the location of end-effector. Via points can be
generated automatically for all joints.
(Choose θ3 < 0)
1) Operational Space
Then we take
For straight-line trajectories, we need to calculate all via
points and their velocities in the operational space and then
use Jacobian matrices to map into the joint space. So this
method needs more calculation time.
2) Joint Space
For saving calculation time, we just need to transfer the
original and final points from the operational space into the
joint space and then calculate via joint angles of each joint.
For both of the methods mentioned above, the velocities
of one step should be designed for smooth motion. As shown
in Fig. 3.10.

Fig. 3.12 'One direction' Mode.

2) Shovel and Push


The 'Shovel and Push' mode is designed for high and
sticky objects. Based on the first mode, ‘Push’ action was
added to push away the object. Realize continuous operation
can be realized by this mode. The process is shown in Fig.
3.13.
The first three figures show the 'shovel' action. And then,
a 'push' action is added in order to push away the object.
Fig. 3.10 Velocities design sample.

As you can see from the upper figure, the velocity is zero
at the very beginning and also zero at the end. So that all
motions are more smooth and stable, which also helps to
reduce the damping caused by inertia.
The combination of different steps can lead to velocities
shown in Fig. 3.11.

Fig. 3.13 'Shovel and Push' Mode.

3) Three Directions
For wide, brittle and sticky objects, shoving from three
different directions is necessary. The process is shown in Fig.
3.14.

Fig. 3.11 Velocities of different joints.

E. Working Modes
For different requirements and conditions, three modes
were designed for the robot.
1) One direction
The 'One direction' mode is mainly for small and sticky
objects. It is from one direction. The process is shown in Fig.
3.12.
signal to avoid sudden disturbance. The key function
feedback() is shown in Fig .3.17

Fig. 3.14 'Three Directions' Mode. Fig. 3.16 Output based on the feedback signal.

F. Controller design requirement


From simulation in Matlab, we get sequences of joint
angle values in time series. By using control method, every
servo will move to the designed angles accurately at each time
point. If the time interval is small enough, the average velocity
of the two position approaches the instantaneous velocity.
Thus, our goal is to achieve both position control and velocity
control.
G. Feedback compensation control
1) Principle
The principle of this feedback control is to compensate the
error near the end of every time interval so that at the real end
of the interval the servo motor will reach the desired angular
position more accurately. To accomplish this, a
straightforward idea is to take the analog signal from the
encoder, compare with the desired position and compute the
compensated value, as shown in Fig.3.15. The key point here
is how to compute the compensated value given the feedback
signal and desired value. A useful method is to compute the Fig. 3.17 code segments of feedback().
difference between the feedback signal and desired value,
round it to the nearest integer, and add the output to the actual H. PID Control
position. This method will cause the system to move a little 1) Theory
faster, but accurate enough. PID control is a classic and widely used control method.
It calculates an 'error' value as the difference between a
measured actual input and the desired setpoint and attempts to
minimize the error by producing an output signal which will
actuate the plant.
The output u(t) consists of three parts, as shown below[16]
t de(t )
u (t ) = kPe + kI ò e(t )dt + k D
t0 dt
where kP, kI, kD are called proportional parameter, integral
Fig. 3.15 Feedback compensation control. parameter, derivative parameter, respectively.
The according controller transfer function has the form
2) programming
In this feedback controller, we use a function to round the kI
difference between desired angles and feedback signals to the D( s ) = k P + + kD s
s
nearest integer, as shown in Fig .3.16. The outputs are then Those parameters have important effects on the output
sent to the servo motors to make the adjustments. Sometimes, performance of the system. Those effects can be summarized
the feedback signal will get very large abruptly and that is as the following:
obviously incorrect. A threshold is placed on the feedback
• kP: Faster response PIDx library is based on Arduino own PID library but has
significant improvement and is more geared to our
• kI: Better steady-state response application. The functions in this library are briefly described
• kD: Faster convergence below.

To understand the property of PID controller, consider a • PIDx(): Create a PIDx controller linked a specified
typical second order system with the plant transfer function: Input, Output, Setpoint, and kp, ki, kd parameters.
Also set on the initial value to many important
A variables.
G ( s) =
s + a1s + a2
2
• Compute(): Compute the output signal based on the
• Proportional Control (P) Input, Output, Setpoint, and kp, ki, kd parameters.
The P-Control is used to have a faster response. In this This is the most important part in the library and has
case, the controller transfer function is many calculation techniques. A detailed description
will be described below.
D( s ) = k P
• SetSampleTime(): Set the frequency of PID output
The corresponding characteristic function is computing.
1 + k PG ( s ) = 0 • SetTunings(): Set user-defined kp, ki, kd.

s 2 + a1s + (a2 + Ak P ) = 0 • SetOutputLimits(): Set the upper bound and lower


bound to the output.
The constant term in this equation can be designed, so
natural frequency can be changed. But the damping of the • SetInputChangeLimits(): Set limits to the input
equation cannot be controlled. In fact, when the response is change in an given interval to avoid the adverse
faster, there will be more oscillations for convergence. But it influence of feedback signal disturbance.
has no effect on settling time.
• Proportional and Derivative Control (PD) 3) PID algorithms:
The discrete mathematical form for PID is [17]
This type of control is widely used in robotics control for
its quick response and fast convergence. In this case, the dError
controller transfer function is output = kP * error + kI * errSum + kD *
dt
D( s ) = k P + k D s where errSum is the discrete form of integral, dErr is the
discrete form of derivative, as shown in Fig. 3.18.
The corresponding characteristic function is
1 + (kP + kD s)G( s) = 0
s 2 + (a1 + Ak D ) s + (a2 + Ak P ) = 0
The kD term here can increase damping in the system,
which will result in faster convergence. This control method
has good regulation performance but can’t reject persistent
disturbance. In general, it has good transient but a bad steady
state. Fig.3.18 PID control.
• Proportional, Integral and Derivative Control (PID)
In PIDx library, we use some calculation techniques to
This is the most popular control method in the industry. In build an efficient, robust PID controller.
this case, the controller transfer function is
• Sample Time
k
D( s ) = k P + I + k D s The Compute() function is called repeatedly in every time
s interval between two setpoints time series. When the function
The corresponding characteristic function is is called, its own variable will record the time at this moment.
kI Then it will compare the time change between this moment
1 + (k P + + kD s)G( s) = 0 and last time when Compute() is called. If the time change is
s
larger or equal to the sample time, it will calculate the output
s 3 + (a1 + Ak D ) s 2 + (a2 + Ak P )s+ Ak I = 0 and return “true”, which means the output is already
This equation has three free parameters so the roots can be computed. These details are in Fig.3.19. The default sample
determined arbitrarily. We can tune these parameters to get time is 1 second, which will simplify the calculation. The
good transient and steady state performance. sample time can be adjusted by SetSampleTime() function.
2) Overview of PIDx library
k I ò edt = ò k I edt » k I n en + k I n-1 en -1 + ...
Thus, when Compute() is called, we multiply the error by
the new Ki, and add it the Ki term. The complete equation for
PID algorithm in nth time interval is
output = k P * error + [k In en + k In-1 en-1 + ...] - k D * dInput
• Output Limits
Since the Arduino only accepts PWM value from 0-255,
an upper bound and lower bound is needed. Otherwise, the
controller will produce higher and higher output value without
limits.
• Input Change Limits
Due to disturbance of the Input signal, in small sample
time, the derivative of incorrect Input will cause serious
impact on the output. One method to avoid disturbance impact
is to set input change limits. When the input change is beyond
those limits, this input can be regarded as incorrect. Then we
can eliminate those incorrect Input values.
• First Time call
Fig.3.19 code segments in Compute().
If the Compute() is called for the first time, it should record
• Derivative Kick this time, and don’t compute any Output. This is important
The original derivative part is because if we first construct PIDx objects and then run other
statements before Compute(), the time and output will be
dError dSetpoint dInput incorrect unless we reinitialize the time variables, as shown in
= - Fig.3.21.
dt dt dt
When Setpoint is changing, in such a small time-change,
the derivative of Setpoint will become too large. This
phenomenon is called Derivative Kick. The problem can be
solved by simply regarding the Setpoint as a constant and
eliminate the derivative of Setpoint. The Kd part then becomes
dError dInput Fig.3.21 First time call condition.
=-
dt dt
Because the Setpoint is changing when servo motors move 4) Programming structure
from one desired position to another, we initiate Ki term and From Matlab, we can get 5 servo motor’s time series of
Output to ensure the process between two Setpoints is joint angles. Thus, we construct 5 PIDx controller objects. In
independent and the Setpoint can be regarded as a constant., every time interval of two succeeding Setpoints, using PID
which is shown in Fig.3.20. controllers to compute the according Outputs, as shown in
Fig.3.22. The Outputs are sent to another function to drive the
servo motors to the specific angles. By tuning the Kp, Ki, Kd
parameters and sample time, we can get fast and stable
position and velocity control of the robot.

Fig.3.20 Setpoint adjustments.

• Tuning Changes
The ability to change tuning parameters Kp, Ki, Kd is very
important in PID algorithm. The original integral part is

k I ò edt » k I n [en + en -1 + ...]


If Ki is changed suddenly, then all the previous errSum
will be changed, which will cause much inaccuracy in output.
One solution is to divide the summation to one element at
every time interval and compute the different elements one by
one. The equation can then be written as
Mode 1 Joint Angle Errors

Angle (degree)
0
Joint 1 Errors
-50

-100
0 1 2 3 4 5 6 7 8
×104

Angle (degree)
0
Joint 2 Errors
-50

-100
0 1 2 3 4 5 6 7 8
×104

Angle (degree)
50
Joint 3 Errors
0
Fig.3.22 Controller function for servos.
-50

IV. RESULTS -100


0 1 2 3 4 5 6 7 8
First, the 3D printer part remover was running without ×104

Angle (degree)
implementing any feedback control and the feedback signals 50
Joint 4 Errors
were acquired to see how large errors were caused by the 0
inertial and gravity of the system. Then, the PID controllers -50
were applied to the four servo motors and gains were carefully
tuned to optimize the system performance. One thing to note -100
0 1 2 3 4 5 6 7 8
is that only one out of five servo motors, the end-effector Time(ms) ×104
servo, didn’t have feedback signals due to poor contact of
Fig 4.2 Joint angle errors of Mode 1.
inside electronics.
A. Open-loop System Mode 2 Joint Angles
80
Angle (degree)

The system was tested in all three modes without using 70 Joint 1 Desired
Joint 1 Feedback
PID controllers. Fig. 4.1-4.6 shows the desired positions, 60
feedback/real positions, and position errors of four joints in
50
each working mode.
40
0 1000 2000 3000 4000 5000 6000 7000
Mode 1 Joint Angles
Angle (degree)

150 150
Angle (degree)

Joint 1 Desired Joint 2 Desired


100 Joint 1 Feedback
100 Joint 2 Feedback
50
50
0
0 1 2 3 4 5 6 7 8 0
×104 0 1000 2000 3000 4000 5000 6000 7000
Angle (degree)

150 200
Angle (degree)

Joint 2 Desired Joint 3 Desired


100 Joint 2 Feedback Joint 3 Feedback
150
50
100
0
0 1 2 3 4 5 6 7 8 50
×104 0 1000 2000 3000 4000 5000 6000 7000
Angle (degree)

200 150
Angle (degree)

Joint 3 Desired Joint 4 Desired


150 Joint 3 Feedback Joint 4 Feedback
100
100
50
50
0 1 2 3 4 5 6 7 8 0
×104 0 1000 2000 3000 4000 5000 6000 7000
Time(ms)
Angle (degree)

150
Joint 4 Desired
100 Joint 4 Feedback Fig 4.3 Desired and feedback/real joint angles of Mode 2.
50
0
0 1 2 3 4 5 6 7 8
Time(ms) ×104

Fig 4.1 Desired and feedback/real joint angles of Mode 1.


Mode 2 Joint Angle Errors Mode 3 Joint Angle Errors
0 50

Angle (degree)
Angle (degree)

Joint 1 Errors Joint 1 Errors


-10
0
-20
-50
-30
-40 -100
0 1000 2000 3000 4000 5000 6000 7000 0 2000 4000 6000 8000 10000 12000 14000
50 50
Angle (degree)

Angle (degree)
Joint 2 Errors Joint 2 Errors
0 0

-50 -50

-100 -100
0 1000 2000 3000 4000 5000 6000 7000 0 2000 4000 6000 8000 10000 12000 14000
50
Angle (degree)

50

Angle (degree)
Joint 3 Errors Joint 3 Errors
0 0

-50 -50

-100 -100
0 1000 2000 3000 4000 5000 6000 7000 0 2000 4000 6000 8000 10000 12000 14000
50
Angle (degree)

50

Angle (degree)
Joint 4 Errors Joint 4 Errors
0 0
-50 -50
-100 -100
0 1000 2000 3000 4000 5000 6000 7000 0 2000 4000 6000 8000 10000 12000 14000
Time(ms) Time(ms)

Fig 4.4 Joint angle errors of Mode 2. Fig 4.6 Joint angle errors of Mode 1.

Mode 3 Joint Angles From Fig. 4.1-4.6, the feedback angular position signals
150
Angle (degree)

Joint 1 Desired followed the trend of the corresponding desired joint angle
Joint 1 Feedback
100 input signals although lots of periodic large error peaks were
50 observed during the whole working process in all three modes.
In the beginning, the intuitive was that those errors were
0
0 2000 4000 6000 8000 10000 12000 14000 caused by the inertia and gravity effect of the robot structure,
especially for servo #1-#4 as shown in Fig. 4.7. The
150
Angle (degree)

Joint 2 Desired connections between the servo arms and their shells were
100 Joint 2 Feedback loose which caused the slight oscillation of the robot arm
50
when it moved. The same issue became the worst for
joint/servo #1 whose stability was poor when the robot arm
0
0 2000 4000 6000 8000 10000 12000 14000
reached the far end. Thus, the PID controllers were introduced
to the system to minimize or eliminate the position errors.
250
Angle (degree)

Joint 3 Desired
200 Joint 3 Feedback
150
100 #3
50
0 2000 4000 6000 8000 10000 12000 14000
150
#2
Angle (degree)

Joint 4 Desired
#4
100 Joint 4 Feedback
#1 #5
50

0
0 2000 4000 6000 8000 10000 12000 14000
Time(ms)
Fig 4.7 Servo motors in the robotic arm.
Fig 4.5 Desired and feedback/real joint angles of Mode 3.

B. Closed-loop System With PID Controllers


1) Tuning Gains of A PID Controller With A Step
Response
The tuning process of gains (𝐾• , 𝐾‚ , and 𝐾ƒ ) followed a
National Instrument tutorial [19]. A step response input signal
was used to tune each servo individually.
• Set all gains to zero.
• First, tuned 𝐾• starting from 1. Double 𝐾• value until
the output of the step response had continuously
oscillation with slightly damping as shown in Fig.
4.8(a).
• Second, tuned 𝐾‚ starting from 1. Double or half 𝐾‚
value until the output of the step response had no
oscillation and damped to a steady state in a short
period of time but still not reached the critical damped
state as shown in Fig. 4.8(b).
• Third, tuned 𝐾ƒ starting from 1. Double or half 𝐾ƒ
value until the steady state offset of the output of the Fig 4.10 Output of the step response of servo #4 at 𝐾• = 1.25, 𝐾‚ = 0.0009,
𝐾ƒ = 0.
step response had been minimized as shown in Fig.
4.8(c).

(a) (b) (c)

Fig. 4.8 Tuning gains of the PID controllers.

Using the tuning method mentioned above, the gains 𝐾• ,


𝐾‚ , and 𝐾ƒ of the PID controller for the servo #4 were 1.25,
0.0009, and 0.005 correspondingly. Fig. 4.9-11 shows the
Arduino Serial Plotter output of the step response during the
tuning process using a different set of gains. The vertical axis
is the joint angle errors in degrees and the horizontal axis is Fig 4.11 Output of the step response of servo #4 at 𝐾• = 1.25, 𝐾‚ = 0.0009,
the number of the sample point. 𝐾ƒ = 0.005.

At this point, one thing to note is that the feedback signal


was not smooth and had lots of noisy peaks. And the effects
of this issue were quite large which will be carefully discussed
in section V later.
2) Tuning Gains of Four PID Controllers With Designed
Trajectories
Generally speaking, the gains of the PID controllers of
different trajectories are different. As shown in Fig. 3.11, the
designed trajectories of three working modes were quite
complicated and tuning gains for all three settings would be
tedious and time-consuming. Thus, the sampling frequency of
each trajectory was decreased and a universal set of PID
controllers was used to track and ensure all servos to move to
the desired joint angles in a specific period of time. In this way,
only one set of gains were required but the motion was slower
Fig 4.9 Output of the step response of servo #4 at 𝐾• = 1.25, 𝐾‚ = 0, 𝐾ƒ = than those using unique sets of gains for different trajectories.
0. The set of gains of the universal PID controllers is shown in
Table 4.1.

(a) TABLE 4.1 SET OF GAINS OF THE UNIVERSAL PID CONTROLLERS


Servo # 𝑲𝑷 𝑲𝑫 𝑲𝑰
1 1.15 0.0005 0.005
2 1.25 0.0005 0.005 designed sampling time of the PID controller which is usually
3 1.20 0.0005 0.005 100-200 ms. Fig. 5.1 shows the effect of different delays
4 1.30 0.0005 0.005 between readings to the measured feedback signals. The
vertical axis is the joint angle errors in degrees and the
And the joint angle errors of four servos of Mode 1 were horizontal axis is the number of the sample point.
plotted in the Arduino Serial Plotter as shown in Fig 4.12. The
vertical axis is joint angle errors in degrees. The horizontal
axis is the number of the sampling point.

#1 #2 #3 #4

(a)

(b)
Fig 4.12 Joint angle errors of four servos in Mode 1.
Fig. 5.1 Joint angle errors at sampling time = 100 ms with (a) no delay and
(b) 10 ms of delay between reading.
By comparing Fig 4.11 and 4.12, the periodic noisy peaks
still existed but with various amplitudes due to the A specific period of delay between reading did help reduce the
modification by the PID controllers. If all noisy peaks are noise of feedback signals. However, choosing the right
eliminated, only partial curves of servo #1-3 have zero or amount of time for delays could be tricky since delays vary
close-to-zero values. The errors of servo #4 were large in the with sampling time and are also affected by other factors.
beginning but became smaller due to unknown reasons. The
results of applying PID controllers to the 3D printer part Other reasons caused the noisy feedback signals could be
remover system were not ideal due to noisy feedback signals.
• The Arduino IDE Serial function is conflicted with
V. DISCUSSION the Servo Library regarding the priority of timer
issues.
As mentioned in Section III, the calibration of the servos’
custom encoders showed the feedback signals had good • Electric connections were poor due to lack of long
consistency and linearity. Thus, we assumed the feedback wires.
signals were accurate and trustful in PID controller tuning
process. However, as mentioned in Section IV, not only the • Feedback wires should be separate from the power
feedback signals of the open-loop system but also the supply wires to avoid electric interferences.
feedback signals of the PID controller under the step response VI. FUTURE PLAN
were very noisy. Then, we calibrated the encoders again and
the feedback signals were still very precise with errors no In the future, high-quality encoders with steady and
larger than 1 degree. All programs were written in the Arduino accurate performance will be used instead of those custom
IDE. By comparing those codes, we found that the timing of build encoders for better performance. Decentralized position
reading analog feedback signals was different. When we and velocity feedback control can be achieved by using the
calibrated the encoders, the program waited 1 sec before same system setup and modifying the controller. Direct force
reading the second value. In the open-loop system, the period control can be achieved by attaching a force sensor to the end
of reading was various and always less than 100 ms. In the of the end-effector which will enhance the performance of the
PID controlled system, the period of reading was less than the 3D printer part remover on delicate and fragile parts.
Furthermore, machine learning could be implemented in the
system to realize functions like smart trajectory planning and
dynamic removing.

ACKNOWLEDGMENT
The authors would like to thank Professor Veronica Santos
for great guidance, counseling, suggestions, and feedback on
our project proposal and presentation. The authors also
appreciated the Teaching Assistant Lionel Zhang for the great
patience, help, and far-sighted and experienced answers to our
questions.
REFERENCES
[1] Thompson, A., Maskery, I., Leach, R.K., 2016. X-ray computed
tomography for additive manufacturing: A review. Meas. Sci. Technol.
27. https://doi.org/10.1088/0957-
0233/27/7/072001https://www.youtube.com/watch?v=gnme8Tx00bg
[2] https://www.youtube.com/watch?v=Oc8mmL5F794

[3] https://www.youtube.com/watch?v=lra0YW3hG6Q

[4] www.cnccookbook.com/check-out-our-new-high-resolution-dlp-3d-
printer-page/
[5] https://www.ikeahackers.net/category/hacks/3d
[6] https://www.amazon.com/gp/product/B01LVVEP8K/ref=oh_aui_deta
ilpage_o00_s01?ie=UTF8& psc=1
[7] https://www.amazon.com/gp/product/B01MTW06IU/ref=oh_aui_det
ailpage_o00_s00?ie=UTF8& psc=1

[8] https://www.amazon.com/gp/product/B076WVF881/ref=oh_aui_detai
lpage_o03_s00?ie=UTF8&psc=1
[9] https://www.amazon.com/DROK-180051US-Numerical-Regulator-
Adjustable/dp/B01MT8BBC1/ref=sr_1_5?ie=UTF8&qid=152878730
2&sr=8-5&keywords=Voltage+Regulator
[10] https://www.amazon.com/gp/product/B01EWNUUUA/ref=oh_aui_de
tailpage_o08_s01?ie=UTF8&psc=1
[11] http://forums.trossenrobotics.com/tutorials/how-to-diy-128/get-
position-feedback-from-a-standard-hobby-servo-3279/
[12] https://www.autobotic.com.my/servo-motor-mg90s-metal-gear
[13] https://www.aliexpress.com/item/ECMA-C10602RS-ASD-A2-0221-
M-Delta-AC-Servo-Motor-Drive-kits-0-64NM-3000r-
min/32242644652.html
[14] https://www.aliexpress.com/item/ECMA-C10401GS-ASD-A2-0121-
M-Delta-AC-Servo-Motor-Drive-kits-0-32NM-3000r-
min/32242604802.html
[15] K. Elissa, “Title of paper if known,” unpublished.
[16] Gene F. Franklin, J. David Powell, Abbas Emami-Naeini. Feedback
Control of Dynamic Systems. Prentice Hall, 2009.
[17] http://brettbeauregard.com/blog/2011/04/improving-the-beginners-
pid-introduction/
[18] R. Nicole, “Title of paper with only first word capitalized,” J. Name
Stand. Abbrev., in press.
[19] Y. Yorozu, M. Hirano, K. Oka, and Y. Tagawa, “Electron spectroscopy
studies on magneto-optical media and plastic substrate interface,” IEEE
Transl. J. Magn. Japan, vol. 2, pp. 740–741, August 1987 [Digests 9th
Annual Conf. Magnetics Japan, p. 301, 1982].
[20] M. Young, The Technical Writer’s Handbook. Mill Valley, CA:
University Science, 1989.
[21] http://www.ni.com/product-documentation/2923/en/
APPENDIX. A TEAM MEMBERS’ CONTRIBUTIONS APPENDIX. B LIST OF CUSTOM CODES
A. Ling Li’s contributions to this projects include: A. Anything Related To Trajectory Generation
• Provided several ideas from which the project topic
was chosen
• Did the research on existing methods and systems
• Made a list of the required components of the system
and placed orders
• Modified the servo motors by soldering two wires to
the inside potentiometer and got feedback signals.
Measured and calibrate the feedback signals of 5
motors.
• Wrote MATLAB, Python and Arduino programs to
send mass data of trajectories of five joints from PC
to the microcontroller via the serial port.
B. Anything Related To Data Transmission
• Provided the access to necessary tools to set up the
system.
• Designed and built the end-effector in different
materials. 3D printing was used to made solid plastic
end-effector. A stiffer copper sheet end-effector and a
flexible plastic sheet end-effector were made by hand.
C. Anything Related To Robotic Control
• Tuned gains (Kp, Kd, and Ki) of four servo motors
and finally diagnosed the issues of the feedback signal.
• Filmed all videos and edited them for better
presentations.
B. Tianyi Li’s contributions to this projects include:
• Calculated direct kinematics, inverse kinematics, and
dynamics of the 5 DOF robot including DH
parameter, transfer matrices, and Jacobian matrices.
• Generated trajectories both in the joint space and
operational space and optimized them for simplifying
of computation and better performance of the robot.
• Designed and generated trajectories of all three
working modes.
• Assembled the robot from pieces and adjusted the
rotational horn position on each servo to make sure
every servo was in the 0-180º working range.
• Set up the robot system.
C. Zhaoxing Deng’s contributions to this projects include:
• Designed two kinds of controllers: feedback
compensation control and PID control.
APPENDIX. C BILL OF COST
• Wrote PIDx library to implement efficient and robust
PID algorithms for PID controller. Model # / Vendor Quantity Cost
Longruner 10 x MG996R Metal Gear Torque 1 49.99
• Wrote Arduino programs to achieve feedback control Digital Servo Motor For RC Model Car Boat
Helicopter LKY62 / Amazon
and PID control for all three working modes
Diymore Black ROT3U 6DOF Aluminium 1 38.99
respectively. Robot Arm Mechanical Robotic Clamp Claw
Kits for Arduino / Amazon
• Tested the working performance of robot arms and
Elegoo EL-KIT-008 Mega 2560 Project The 1 59.99
tuned the Kp, Kd, and Ki parameters of four servo Most Complete Ultimate Starter Kit w/
motors. TUTORIAL for Arduino UNO Nano / Amazon
Mallofusa Servo Arm Horn Metal Aluminum 2 8.99
25t Silvery for Rc Car Helicopter Round Mg945
Mg995 Mg996 / Amazon
Allytech 10 x 100mm Length Dean's T Plug 1 7.99
Tamiya MINI Female to Male Connector
Adapter / Amazon
Hosim 2pcs 7.4V 1500mAh 15C T Connector 1 32.99
Li-polymer Rechargeable Battery Pack and 1pcs
Balance Charger, Safe & Fast Charging, Best for
RC Evader BX Car RC Truck RC Truggy RC
Airplane UAV Drone FPV / Amazon
DROK 180057 LM2596 Analog Control Buck 2 8.89
Converter DC-DC 4-32V to 1.25-30V Step-
down Regulator Module 24V 12V to 5V 3A
Power Inverter Volt Stabilizer with Red LED
Display / Amazon
Total 225.91

Anda mungkin juga menyukai