Team2 Report Formatted

  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Team2 Report Formatted as PDF for free.

More details

  • Words: 7,295
  • Pages: 17
3D Printer Part Remover Ling Li Department of Mechanical Engineering University of California, Los Angeles Los Angeles, California [email protected]

Tianyi Li Department of Mechanical Engineering University of California, Los Angeles Los Angeles, California [email protected]

Abstract— The field of additive manufacturing, especially 3D printing, has gained growing attention in the research and 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.

Zhaoxing Deng Department of Mechanical Engineering University of California, Los Angeles Los Angeles, California [email protected]

methods are similar, which utilize the relative motion between the barrier and the stage to knock the part off the stage.

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 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.1 Moving Hard Stage & Static Barrier [2].

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

Fig 1.3 Static Hard Stage & Moving Barrier [4].

However, all of these methods can hardly remove thin parts with relatively small height compared to its width and 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. System Setup The system setup of the 3D printer part remover is shown in Fig. 3.1. The following sections describe the specifications of each component and the reasons they were used in this project.

(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 (b)

(d)

(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 The 6DOF robot arm (as shown in Fig. 3.2(a)) is made of aluminum alloy and can clamp objects. The 3D printer part remover should be able to move in the xy-plane and has a rotational end-effector which can shovel the interface of the part and the stage in any direction. So at least 3 degree of freedoms were required and this 6DOF robot arm not only satisfied the demands but also provided more possibilities to achieve more complicated trajectories.

Since the running current of each servo is 900 mA at 6 V and five motors will be used in the arm, the total current is 4.5 A which is too high for a microcontroller board to provide. Thus, a 7.4V Li-polymer rechargeable battery (as shown in Fig. 3.3) was used as a power supply. And one battery can be used for 20 min when the robot is continuously working.

Here are its selected specifications [7]:



Radius of gyration: 355 mm.



Height: 460 mm (holder closed).

Fig. 3.2 a) Diymore Black ROT3U 6DOF Aluminium Robot Arm [7]. (b) Longruner 10 x MG996R Metal Gear Torque Digital Servo Motor [8].

2) MG996R Metal Gear Torque Digital Servo Motor MG996R Micro Servo motors (as shown in Fig. 3.2(b)) are updated from the SG90 Micro Servo and the MG90S micro servo motor with more advanced features such as more accurate and smoother shell and faster speed.

Fig 3.3 Hosim 7.4V 1500mAh 15C T-Connector Li-polymer Rechargeable Battery and Balance Charger [9].

4) DROK 180057 LM2596 Analog DC Voltage Regulator The output voltage of the Li-polymer battery drops when its power is low. The varying input voltage influences the operating speed of the servos. Thus, a DC voltage regulator (as shown in Fig. 3.4) was used to maintain the output voltage 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



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.4 DROK 180057 LM2596 Analog Control Buck Converter DC-DC 432V to 1.25-30V [10]

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 pulsewidth 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. Here are its selected specifications [11]:

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 signals.



Operating Voltage: 5V



Input Voltage (recommended): 7-12V



Input Voltage (limit): 6-20V



Digital I/O Pins: 54 (of which 15 provide PWM output)



Analog Input Pins: 16



DC Current per I/O Pin: 20 mA



DC Current for 3.3V Pin: 50 mA



Flash Memory: 256 KB of which 8 KB used by bootloader

TABLE 3.1 COEFFICIENTS OF LINEAR LEAST SQUARES REGRESSION



SRAM: 8 KB

Servo #

𝒌

𝒃



EEPROM: 4 KB

1

0.5104

- 57.508

𝑹𝟐 0.9998

2

0.4768

- 59.954

0.99961

0.4868

- 58.956

0.99973

Position feedback signals were calibrated by measuring the voltage output of the potentiometer for three times using the analog inputs of the Mega 2560 board when the servo is working under zero load and fitting the averaged data to the inputs 𝑦 (degrees) of the servos. The readings of the analog inputs 𝑥 are in the range of 0 – 1023 corresponding to 0 – analog input reference voltage you provide (default is 5 V when nothing is connected). And the outputs of all three measurements of the feedback signals of each servo were consistent and the differences were no larger than 2 degrees. The coefficients of the fitted linear relationships 𝑦 = 𝑘𝑥 + 𝑏 and their coefficient of determination 𝑅 + of each motor are shown in Table 3.1. FITTINGS



Clock Speed: 16 MHz

3



4

0.4926

- 58.561

0.99978

LED_BUILTIN: 13

5

0.515

- 58.764

0.99969

6) Custom Build Encoders The MG996R servo motor doesn’t have an encoder with it but it has a small rotational potentiometer inside which is connected to the servo arm. To get position feedback signal of those servos, two wires (as shown in Fig. 3.6) were soldered to the potentiometer [12] and their output signal was linearly proportional to the input of the servo.

B. Assumptions A decentralized position feedback controller was implemented in this project based on the assumptions that: •

The gear reduction ratios of all five MG996R servos are high (~320 for each element in Kr) [13].



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 the robot is made of aluminum which has low density compared to ferroalloys and the end-effector force will be maintained at a low value by properly planning its trajectories and limiting the its interaction with the environment.

C. Kinematics and Dynamics of the robot Kinematics and dynamics analysis is necessary and important for the robot design. We apply DH parameters, transform matrices, Jacobian Matrices, and inverse dynamics for accurately and flexibly controlling the remover. 1) DH parameters The remover has five degrees of freedom. For accurately locate the end-effector, we assume a rigid joint at the end. The DH parameters are shown in Table. 3.2 TABLE 3.2 DH PARAMETERS OF THE REMOVER I 1 2 3 4 5 6

a 0 𝐿+ 𝐿3 𝐿4 𝐿5 𝑑+

α 0 π/2 0 0 π/2 0

d 𝐿1 0 0 0 𝐿6 +𝑑1 0

θ 𝜃1 𝜃+ 𝜃3 𝜃4 𝜃5 0

After measurement by hand, we have the values below, L1 = 0.093 𝑚; L+ = 0.021 𝑚; L3 = 0.1045 𝑚; L4 = 0.097 𝑚; L5 = 0.022 𝑚; L6 = 0.070 𝑚; 𝑑1 = 0.03𝑚; 𝑑+ = 0.05𝑚 2) Transform Matrices According to DH parameters, we can calculate all five transform matrices and the transform matrix from the base to the end-effector. a11 a1+ a13 a14 a +1 a ++ a +3 a +4 D 6𝑇 = a 31 a 3+ a 33 a 34 0 0 0 1 𝑎11 = 𝑠1 𝑠5 + 𝑐1 𝑐+34 𝑐5 𝑎1+ = 𝑠1 𝑐5 − 𝑐1 𝑐+34 𝑠5

𝑎34 = 𝐿1 + 𝐿3 𝑠+ + 𝐿4 𝑠+3 + 𝐿5 𝑠+34 − 𝐿6 𝑐+34 − 𝑑1 𝑐+34 + 𝑑+ 𝑠+34 𝑐5 3) Jacobian Matrices Using the iterative recursive equations, we can calculate Jacobian Matrix of the robot according to the tool frame. 𝑗11 𝑗12 𝑗13 𝑗14 0 0 𝑗21 𝑗22 𝑗23 𝑗24 d2 0 𝑗31 𝑗32 𝑗33 𝑗34 0 0 6 𝐽 θ 6 = 𝑗41 s5 s5 s5 0 0 𝑗51 c5 c5 c5 0 0 −c234

0

1

1

𝑗1+ = c5 (L6 + d1 + L3 s34 + L4 s4 ) 𝑗13 = c5 (L6 + d1 + L4 s4 ) 𝑗14 = (L6 + d1 )c5 𝑗+1 = −c5 L+ + L4 c+3 + L3 c+ + L5 c+34 + L6 s+34 − d+ c+34 𝑗++ = −s5 (L6 + d1 + L3 s34 + L4 s4 ) 𝑗+3 = −s5 (L6 + d1 + L4 s4 ) 𝑗+4 = −(L6 + d1 )s5 𝑗31 = d+ s5 s+34 𝑗3+ = −L3 c34 − L4 c4 − L5 − d+ c5 𝑗33 = −L5 − L4 c4 − d+ c5 𝑗34 = −L5 −d+ c5 𝑗41 = s+34 c5 𝑗51 = −s+34 s5 With the help of the transform matrix, The Jacobian matrix according to the base frame can be calculated. 𝐽 𝜃 6 = D6𝑇 6𝐽 𝜃 6 4) Inverse Kinematics For calculating angles of each joint during the operation, inverse kinematics is required. The original posture of the robot is shown in Fig. 3.7. 0

𝑎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 𝑎33 = −𝑐+34

0

𝑗11 = −s5 L+ + L4 c+3 + L3 c+ + L5 c+34 + L6 s+34 + d1 s+34

𝑎13 = 𝑐1 𝑠+34

𝑎3+ = −𝑠+34 𝑠5

0

Fig. 3.7 original posture of the remover.

axyz{ = 𝐿4 𝑐3 + 𝐿3

For more stable postures of our end-effector, we keep the 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.

Fig. 3.8 last link perpendicular to the ground.

So that θ1 + θ+ + θ3 = K (normally K = 0) θ5

After simplification, we don't need to consider 𝑑1 , 𝑑+ and

Therefore, we only need to write down the position of the joint 5.

D. Trajectory Generation During the trajectory generation process, workspace generation is required firstly. After checking the range required, two different methods were used to generate trajectories according to different requirements. The working space is actually a 3-dimension space. However, only the ground plane is meaningful for the robot operation. So the workspace at z = 0 (the ground plane) is 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 ) K + = (𝑧STUVWXYSZW[ − 𝐿1 − 𝐿5 𝑠+34 + 𝐿6 𝑐+34 ) We have K1 = 𝐿3 𝑐+ + 𝐿4 𝑐+3 K + = 𝐿3 𝑠+ + 𝐿4 𝑠+3 Combining the two equations, K1 + + K + + = 𝐿3 + + 𝐿4 + + 2𝐿3 𝐿4 𝑐3 Then θ3 = cos v1 ((K1 + + K + + − 𝐿3 + − 𝐿4 + )/2𝐿3 𝐿4 ) (Choose θ3 < 0) Then we take

Fig. 3.9 Workspace on the ground plane.

One redundant degree of freedom can make the workspace larger when the length of each link is limited. Because of restriction of the base, our effective range along the X-axis is 10 mm-28 mm. According to the workspace of the robot, the object was put on (22 mm, 0, 0). We have different modes and complicated trajectories in this project. So that two functions of MATLAB were written to generate trajectories. After typing in the original point, the final point, time, frequency, and the theta5 which is independent of the location of end-effector. Via points can be generated automatically for all joints. 1)

Operational Space

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.

Fig. 3.10 Velocities design sample.

The first three figures show the 'shovel' action. And then, a 'push' action is added in order to push away the object.

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 difference between the feedback signal and desired value, round it to the nearest integer, and add the output to the actual position. This method will cause the system to move a little faster, but accurate enough.

Fig. 3.17 code segments of feedback().

H. PID Control 1) Theory 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

u (t ) = kPe + kI ò e(t )dt + k D t0

Fig. 3.15 Feedback compensation control.

2) programming In this feedback controller, we use a function to round the difference between desired angles and feedback signals to the nearest integer, as shown in Fig .3.16. The outputs are then sent to the servo motors to make the adjustments. Sometimes, the feedback signal will get very large abruptly and that is obviously incorrect. A threshold is placed on the feedback

de(t ) dt

where kP, kI, kD are called proportional parameter, integral parameter, derivative parameter, respectively. The according controller transfer function has the form

D( s ) = k P +

kI + kD s s

Those parameters have important effects on the output performance of the system. Those effects can be summarized as the following:



kP: Faster response



kI: Better steady-state response



kD: Faster convergence



PIDx(): Create a PIDx controller linked a specified Input, Output, Setpoint, and kp, ki, kd parameters. Also set on the initial value to many important variables.



Compute(): Compute the output signal based on the Input, Output, Setpoint, and kp, ki, kd parameters. This is the most important part in the library and has many calculation techniques. A detailed description will be described below.



SetSampleTime(): Set the frequency of PID output 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.



SetInputChangeLimits(): Set limits to the input change in an given interval to avoid the adverse influence of feedback signal disturbance.

To understand the property of PID controller, consider a typical second order system with the plant transfer function:

G ( s) = •

PIDx library is based on Arduino own PID library but has significant improvement and is more geared to our application. The functions in this library are briefly described below.

A s + a1s + a2 2

Proportional Control (P)

The P-Control is used to have a faster response. In this case, the controller transfer function is

D( s ) = k P The corresponding characteristic function is

The constant term in this equation can be designed, so natural frequency can be changed. But the damping of the equation cannot be controlled. In fact, when the response is faster, there will be more oscillations for convergence. But it has no effect on settling time. •

Proportional and Derivative Control (PD)

This type of control is widely used in robotics control for its quick response and fast convergence. In this case, the controller transfer function is

D( s ) = k P + k D s The corresponding characteristic function is

3) PID algorithms: The discrete mathematical form for PID is [17]

output = kP * error + kI * errSum + kD *

dError dt

where errSum is the discrete form of integral, dErr is the discrete form of derivative, as shown in Fig. 3.18.

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. •

Proportional, Integral and Derivative Control (PID)

This is the most popular control method in the industry. In this case, the controller transfer function is

k D( s ) = k P + I + k D s s

The corresponding characteristic function is 1 + (k P +

kI + kD s)G( s) = 0 s

s 3 + (a1 + Ak D ) s 2 + (a2 + Ak P )s+ Ak I = 0

This equation has three free parameters so the roots can be determined arbitrarily. We can tune these parameters to get good transient and steady state performance. 2) Overview of PIDx library

Fig.3.18 PID control.

In PIDx library, we use some calculation techniques to build an efficient, robust PID controller. •

Sample Time

The Compute() function is called repeatedly in every time interval between two setpoints time series. When the function is called, its own variable will record the time at this moment. Then it will compare the time change between this moment and last time when Compute() is called. If the time change is larger or equal to the sample time, it will calculate the output and return “true”, which means the output is already computed. These details are in Fig.3.19. The default sample time is 1 second, which will simplify the calculation. The sample time can be adjusted by SetSampleTime() function.

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. Fig.3.19 code segments in Compute().



Derivative Kick

The original derivative part is dError dSetpoint dInput = 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 =dt dt Because the Setpoint is changing when servo motors move from one desired position to another, we initiate Ki term and Output to ensure the process between two Setpoints is independent and the Setpoint can be regarded as a constant., which is shown in Fig.3.20.

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



First Time call

If the Compute() is called for the first time, it should record this time, and don’t compute any Output. This is important because if we first construct PIDx objects and then run other statements before Compute(), the time and output will be incorrect unless we reinitialize the time variables, as shown in Fig.3.21.

Fig.3.21 First time call condition.

4) Programming structure From Matlab, we can get 5 servo motor’s time series of joint angles. Thus, we construct 5 PIDx controller objects. In every time interval of two succeeding Setpoints, using PID 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.

Angle (degree) Angle (degree) Angle (degree)

First, the 3D printer part remover was running without implementing any feedback control and the feedback signals were acquired to see how large errors were caused by the inertial and gravity of the system. Then, the PID controllers were applied to the four servo motors and gains were carefully tuned to optimize the system performance. One thing to note is that only one out of five servo motors, the end-effector servo, didn’t have feedback signals due to poor contact of inside electronics.

Angle (degree)

0

1

2

3

4

5

6

7

8 ×104

Joint 2 Desired Joint 2 Feedback

100 50 0

0

1

2

3

4

5

6

7

8

×104

200 Joint 3 Desired Joint 3 Feedback

150 100 50

0

1

2

3

4

5

6

7

8

×104

150 Joint 4 Desired Joint 4 Feedback

100 50 0

0

1

2

3

4

5

6

Time(ms) Fig 4.1 Desired and feedback/real joint angles of Mode 1.

7

8 ×104

2

3

4

5

6

7

8 ×104

Joint 2 Errors

-100

0

1

2

3

4

5

6

7

8 ×104

50 Joint 3 Errors

0 -50 -100

0

1

2

3

4

5

6

7

8 ×104

50 Joint 4 Errors

0 -50 -100

0

1

2

3

4

Time(ms)

5

6

7

8 ×104

Fig 4.2 Joint angle errors of Mode 1.

Mode 2 Joint Angles

80

Joint 1 Desired Joint 1 Feedback

70 60 50 40

Angle (degree)

50

1

-50

150

Angle (degree)

Joint 1 Desired Joint 1 Feedback

0

0

Mode 1 Joint Angles

100

0

-100

200

Angle (degree)

Angle (degree)

150

Angle (degree)

150

Angle (degree)

A. Open-loop System The system was tested in all three modes without using PID controllers. Fig. 4.1-4.6 shows the desired positions, feedback/real positions, and position errors of four joints in each working mode.

Angle (degree)

IV. RESULTS

Joint 1 Errors

-50

Angle (degree)

Fig.3.22 Controller function for servos.

Mode 1 Joint Angle Errors

0

150

0

1000

2000

3000

4000

5000

6000

7000

Joint 2 Desired Joint 2 Feedback

100 50 0

0

1000

2000

3000

4000

5000

6000

7000

Joint 3 Desired Joint 3 Feedback

150 100 50

0

1000

2000

3000

4000

5000

6000

7000

Joint 4 Desired Joint 4 Feedback

100 50 0

0

1000

2000

3000

4000

Time(ms)

5000

6000

Fig 4.3 Desired and feedback/real joint angles of Mode 2.

7000

-30 -40

0

1000

2000

3000

4000

5000

6000

7000

50 Joint 2 Errors

0 -50 -100

0

1000

2000

3000

4000

5000

6000

7000

50 Joint 3 Errors

0 -50 -100

0

1000

2000

3000

4000

5000

6000

7000

50 Joint 4 Errors

0 -50 -100

0

1000

2000

3000

4000

Time(ms)

5000

6000

7000

Angle (degree)

150

Angle (degree)

150

Angle (degree)

250

Angle (degree)

Fig 4.4 Joint angle errors of Mode 2.

150

Mode 3 Joint Angles Joint 1 Desired Joint 1 Feedback

50 0

2000

4000

6000

8000

10000

12000

14000

Joint 2 Desired Joint 2 Feedback

100 50 0

0

2000

4000

6000

Mode 3 Joint Angle Errors

50

Joint 1 Errors

0 -50 -100

0

2000

4000

6000

8000

10000

12000

14000

50 Joint 2 Errors

0 -50 -100

0

2000

4000

6000

8000

10000

12000

14000

50 Joint 3 Errors

0 -50 -100

0

2000

4000

6000

8000

10000

12000

14000

50 Joint 4 Errors

0 -50 -100

0

2000

4000

6000

8000

Time(ms)

10000

12000

14000

Fig 4.6 Joint angle errors of Mode 1.

100

0

Angle (degree)

-20

Angle (degree)

-10

Angle (degree)

Joint 1 Errors

Angle (degree)

Angle (degree) Angle (degree) Angle (degree) Angle (degree)

Mode 2 Joint Angle Errors

0

8000

10000

12000

14000

From Fig. 4.1-4.6, the feedback angular position signals followed the trend of the corresponding desired joint angle input signals although lots of periodic large error peaks were observed during the whole working process in all three modes. In the beginning, the intuitive was that those errors were caused by the inertia and gravity effect of the robot structure, especially for servo #1-#4 as shown in Fig. 4.7. The connections between the servo arms and their shells were loose which caused the slight oscillation of the robot arm when it moved. The same issue became the worst for joint/servo #1 whose stability was poor when the robot arm reached the far end. Thus, the PID controllers were introduced to the system to minimize or eliminate the position errors.

Joint 3 Desired Joint 3 Feedback

200 150

#3

100 50

0

2000

4000

6000

8000

10000

12000

14000

Joint 4 Desired Joint 4 Feedback

100

#2 #1

#4 #5

50 0

0

2000

4000

6000

8000

Time(ms)

10000

12000

Fig 4.5 Desired and feedback/real joint angles of Mode 3.

14000

Fig 4.7 Servo motors in the robotic arm.

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 step response had been minimized as shown in Fig. 4.8(c).

(a)

(b)

Fig 4.10 Output of the step response of servo #4 at 𝐾• = 1.25, 𝐾‚ = 0.0009, 𝐾ƒ = 0.

(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 the number of the sample point.

Fig 4.11 Output of the step response of servo #4 at 𝐾• = 1.25, 𝐾‚ = 0.0009, 𝐾ƒ = 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.

Fig 4.9 Output of the step response of servo #4 at 𝐾• = 1.25, 𝐾‚ = 0, 𝐾ƒ = 0.

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 than those using unique sets of gains for different trajectories. 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

3

1.20

0.0005

0.005

4

1.30

0.0005

0.005

And the joint angle errors of four servos of Mode 1 were 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.

designed sampling time of the PID controller which is usually 100-200 ms. Fig. 5.1 shows the effect of different delays between readings to the measured feedback signals. The vertical axis is the joint angle errors in degrees and the horizontal axis is the number of the sample point.

#1 #2 #3 #4

(a)

Fig 4.12 Joint angle errors of four servos in Mode 1.

By comparing Fig 4.11 and 4.12, the periodic noisy peaks still existed but with various amplitudes due to the modification by the PID controllers. If all noisy peaks are eliminated, only partial curves of servo #1-3 have zero or close-to-zero values. The errors of servo #4 were large in the beginning but became smaller due to unknown reasons. The results of applying PID controllers to the 3D printer part remover system were not ideal due to noisy feedback signals.

(b) Fig. 5.1 Joint angle errors at sampling time = 100 ms with (a) no delay and (b) 10 ms of delay between reading.

A specific period of delay between reading did help reduce the noise of feedback signals. However, choosing the right amount of time for delays could be tricky since delays vary with sampling time and are also affected by other factors. Other reasons caused the noisy feedback signals could be •

The Arduino IDE Serial function is conflicted with the Servo Library regarding the priority of timer issues.



Electric connections were poor due to lack of long wires.



Feedback wires should be separate from the power supply wires to avoid electric interferences.

V. DISCUSSION As mentioned in Section III, the calibration of the servos’ custom encoders showed the feedback signals had good consistency and linearity. Thus, we assumed the feedback signals were accurate and trustful in PID controller tuning process. However, as mentioned in Section IV, not only the feedback signals of the open-loop system but also the feedback signals of the PID controller under the step response were very noisy. Then, we calibrated the encoders again and the feedback signals were still very precise with errors no larger than 1 degree. All programs were written in the Arduino IDE. By comparing those codes, we found that the timing of reading analog feedback signals was different. When we calibrated the encoders, the program waited 1 sec before reading the second value. In the open-loop system, the period of reading was various and always less than 100 ms. In the PID controlled system, the period of reading was less than the

VI. FUTURE PLAN In the future, high-quality encoders with steady and accurate performance will be used instead of those custom build encoders for better performance. Decentralized position and velocity feedback control can be achieved by using the same system setup and modifying the controller. Direct force control can be achieved by attaching a force sensor to the end of the end-effector which will enhance the performance of 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]

[2] [3] [4] [5] [6] [7] [8] [9]

[10] [11] [12] [13]

[14]

[15] [16] [17] [18] [19]

[20] [21]

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/09570233/27/7/072001https://www.youtube.com/watch?v=gnme8Tx00bg https://www.youtube.com/watch?v=Oc8mmL5F794
 https://www.youtube.com/watch?v=lra0YW3hG6Q
 www.cnccookbook.com/check-out-our-new-high-resolution-dlp-3dprinter-page/ https://www.ikeahackers.net/category/hacks/3d https://www.amazon.com/gp/product/B01LVVEP8K/ref=oh_aui_deta ilpage_o00_s01?ie=UTF8& psc=1 https://www.amazon.com/gp/product/B01MTW06IU/ref=oh_aui_det ailpage_o00_s00?ie=UTF8& psc=1
 https://www.amazon.com/gp/product/B076WVF881/ref=oh_aui_detai lpage_o03_s00?ie=UTF8&psc=1 https://www.amazon.com/DROK-180051US-Numerical-RegulatorAdjustable/dp/B01MT8BBC1/ref=sr_1_5?ie=UTF8&qid=152878730 2&sr=8-5&keywords=Voltage+Regulator https://www.amazon.com/gp/product/B01EWNUUUA/ref=oh_aui_de tailpage_o08_s01?ie=UTF8&psc=1 http://forums.trossenrobotics.com/tutorials/how-to-diy-128/getposition-feedback-from-a-standard-hobby-servo-3279/ https://www.autobotic.com.my/servo-motor-mg90s-metal-gear https://www.aliexpress.com/item/ECMA-C10602RS-ASD-A2-0221M-Delta-AC-Servo-Motor-Drive-kits-0-64NM-3000rmin/32242644652.html https://www.aliexpress.com/item/ECMA-C10401GS-ASD-A2-0121M-Delta-AC-Servo-Motor-Drive-kits-0-32NM-3000rmin/32242604802.html K. Elissa, “Title of paper if known,” unpublished. Gene F. Franklin, J. David Powell, Abbas Emami-Naeini. Feedback Control of Dynamic Systems. Prentice Hall, 2009. http://brettbeauregard.com/blog/2011/04/improving-the-beginnerspid-introduction/ R. Nicole, “Title of paper with only first word capitalized,” J. Name Stand. Abbrev., in press. 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]. M. Young, The Technical Writer’s Handbook. Mill Valley, CA: University Science, 1989. http://www.ni.com/product-documentation/2923/en/

APPENDIX. A TEAM MEMBERS’ CONTRIBUTIONS A. Ling Li’s contributions to this projects include: • 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.



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.



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.

APPENDIX. B LIST OF CUSTOM CODES A. Anything Related To Trajectory Generation

B. Anything Related To Data Transmission

C. Anything Related To Robotic Control

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.



Wrote PIDx library to implement efficient and robust PID algorithms for PID controller.



Wrote Arduino programs to achieve feedback control and PID control for all three working modes respectively.



Tested the working performance of robot arms and tuned the Kp, Kd, and Ki parameters of four servo motors.

APPENDIX. C BILL OF COST Model # / Vendor Longruner 10 x MG996R Metal Gear Torque Digital Servo Motor For RC Model Car Boat Helicopter LKY62 / Amazon Diymore Black ROT3U 6DOF Aluminium Robot Arm Mechanical Robotic Clamp Claw Kits for Arduino / Amazon Elegoo EL-KIT-008 Mega 2560 Project The Most Complete Ultimate Starter Kit w/ TUTORIAL for Arduino UNO Nano / Amazon

Quantity 1

Cost 49.99

1

38.99

1

59.99

Mallofusa Servo Arm Horn Metal Aluminum 25t Silvery for Rc Car Helicopter Round Mg945 Mg995 Mg996 / Amazon Allytech 10 x 100mm Length Dean's T Plug Tamiya MINI Female to Male Connector Adapter / Amazon Hosim 2pcs 7.4V 1500mAh 15C T Connector 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 Converter DC-DC 4-32V to 1.25-30V Stepdown Regulator Module 24V 12V to 5V 3A Power Inverter Volt Stabilizer with Red LED Display / Amazon Total

2

8.99

1

7.99

1

32.99

2

8.89

225.91

Related Documents