1 Introduction

Various parts of automobiles, aviation, etc. are processed using various types of machine tools such as CNC lathes, milling, and grinding. In order to increase the productivity of machine tools, it is necessary to automatically load a workpiece before machining and unload the workpiece after machining. There is a way to automatically load and unload a workpiece by installing a 6-axis industrial robot [1,2,3,4,5,6,7] on the front of the machine tool. Another method is to install and use a gentry robot [8,9,10,11,12,13] on top of a machine tool. Since the 6-axis industrial robot is composed of 6 actuators, it has the disadvantage of being expensive. In addition, since the gentry robot is integrally attached to the machine tool, it has a disadvantage of causing vibration. This may deteriorate processing precision. Visioli [14] studied the trajectory of the manipulator of SCARA robot, which is most used in industry. It estimated the dynamic model of the manipulator considering proportional-integral-derivative-based sliding mode controller, distributed controller, classical calculated torque controller, and neural network-based controller. Voglewede [15] studied how to utilize polynomial chaos theory (PCT) for manipulator dynamic analysis and controller design in a 4-DOF selective compliance assembly robot arm type manipulator with variations in both link mass and payload of a SCARA robot. Ibrahim [16] developed a CAD model for a SCARA robot arm using SolidWorks software, and then designed a proportional-integral-derivative (PID) based controller in a simulation environment using the Matlab/Simulink platform. Lin [17] conducted a study to design a powerful control law to guarantee the performance of the manipulator under the unknown load applied to the manipulator of the SCARA robot and the uncertainty of manipulator dynamics. Er [18] studied the design and simulation of a neural network-based controller for a manipulator from the perspective of tracking a predetermined motion trajectory in the joint space of a SCARA robot. Kim [19] and Yang [20] performed simulation and design of a 4-axis SCARA robot for loading and unloading of machine tools. This robot is composed of 4 axes by attaching a rotary gripper (1 axis) to a 3 axis SCARA robot. The rotating gripper consists of two pieces to hold the workpiece horizontally and vertically (90°), and this gripper can rotate 180° to change the position of the horizontal and vertical workpiece. This robot has the advantage of lowering the cost of the robot by using three actuators, but the position of the gripper can only be moved horizontally and cannot be moved vertically. Therefore, the robot cannot control the vertical position of the workpiece according to the height of the machine tool. Therefore, in order to compensate for the disadvantages of the SCARA robot, the new SCARA robot requires that the robot's first joint not only be able to move up and down, but also be able to move horizontally so that the gripper can grab a workpiece and put it into a CNC lathe or something.

In this paper, we simulated and designed a 5-axis robot in the form of a SCARA that can load and unload workpieces on an automatic machine tool. Modeling, kinematics analysis, and simulation of the 5-axis robot were conducted, robot parts were designed through structural analysis, and the 5-axis robot was manufactured based on the design results. Then, a characteristic test of the manufactured 5-axis robot was conducted.

2 Design of a 5-Axis Robot

2.1 Modeling of a 5-Axis Robot

Figure 1 shows a conceptual diagram of a 5-axis robot for loading and unloading workpieces, which includes a robot body, a vertical movement actuator, a vertical movement mechanism, a joint 1 actuator, a link 1, an elbow, a joint 2 actuator, a link 2, a joint 3 actuator, Consists of elbow 2, rotation gripper, etc. The robot body consists of an upper part and a lower part. Four LM guides (SBI30 SLL) are attached to the inside of the upper part of the body for vertical movement of the vertical movement mechanism, and an actuator for vertical movement of the vertical movement mechanism is attached to the lower part of the body. The vertical movement actuator is model APMC-FCL08AMK2 (LS MECAPION, AC220 V), controls the position to move the vertical movement mechanism up and down, and is fixed with the vertical fixture of the Joint 1 actuator. The power of the vertical movement actuator is 750 W, the rated torque is 2.39 Nm, and the rated rotational speed is 3000 rpm. Joint 1 actuator is used to rotate clockwise and counterclockwise, its model is MR32 (SBB Tech, DC12 V), its reduction ratio is 100:1, number of revolutions is 25 rpm, torque is 18 N m, weight is 7.3 kg. Joint 2 actuator has the same specifications as Joint 1 actuator, Joint 3 actuator has model MR20 (SBB Tech, DC12 V), reduction ratio 100:1, rotation speed 30 rpm, torque 5.3 N m, weight 2.7 kg. Link 1 is fixed to both ends of the joint 1 actuator and the horizontal fixture of elbow 1, and the vertical fixture of elbow 1 is fixed to the vertical fixture of the joint 2 actuator. Both ends of the link 2 are fixed to the horizontal fixtures of the joint 2 actuator and the joint 3 actuator, respectively.

Fig. 1
figure 1

Conceptual diagram of 5-axis robot

The vertical fixture of elbow 2 is fixed with the joint 3 actuator, and its horizontal fixture is fixed with the rotary gripper. The rotation gripper consists of a horizontal gripper and a vertical gripper, which are positioned at 90° to each other, and when rotated 180°, the positions of the horizontal and vertical grippers are reversed. The 5-axis robot consists of a vertical movement mechanism and joint 1 ~ 3 actuators. The vertical movement mechanism determines the height by vertically moving the end position of the workpiece fixed to the vertical gripper and the end position of the workpiece fixed to the horizontal gripper, and the joint 1 to 3 actuators rotate to determine the horizontal position. Therefore, a 5-axis robot can load/unload workpieces into the chuck of a CNC lathe.

2.2 Kinematic Analysis of 5-Axis Robot

Figure 2 shows the structure and coordinates of the 5-axis robot for kinematics analysis. For kinematics analysis, the fixed coordinate at the lower center of the vertical motion actuator is 0, the coordinate at the joint 1 actuator is 1, the coordinate at the joint 2 actuator is 2, the coordinate at the joint 3 actuator is 3, and the coordinate at the center end of the horizontal workpiece is 4 ', the coordinates at the central end of the vertical workpiece are marked with 4″, respectively.

Fig. 2
figure 2

Structure and coordinates of 5-axis robot for kinematic analysis

In order to simulate and control a 5-axis robot, the forward kinematics and inverse kinematics must be derived. Table 1 shows the DH parameters for deriving the constant kinematic equations representing the end position of the center of the horizontal workpiece and the end position of the center of the vertical workpiece.

Table 1 DH parameters of 5-axis robot for forward kinematics

Using the DH parameters in Table 1, the homogeneous transformation matrix, which is the forward kinematic equation of the 5-axis robot, is derived as follows.

$$\begin{aligned} T_{1}^{0} & = \left[ {\begin{array}{*{20}c} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & {a_{1} } \\ 0 & 0 & 0 & 1 \\ \end{array} } \right] \\ T_{2}^{1} & = \left[ {\begin{array}{*{20}c} {\cos \alpha_{1} } & { - \sin \alpha_{1} } & 0 & {b_{1} \cos \alpha_{1} } \\ {\sin \alpha_{1} } & {\cos \alpha_{1} } & 0 & {b_{1} \sin \alpha_{1} } \\ 0 & 0 & 1 & {a_{2} } \\ 0 & 0 & 0 & 1 \\ \end{array} } \right] \\ T_{3}^{2} & = \left[ {\begin{array}{*{20}c} {\cos \alpha_{2} } & { - \sin \alpha_{2} } & 0 & {b_{2} \cos \alpha_{2} } \\ {\sin \alpha_{2} } & {\cos \alpha_{2} } & 0 & {b_{2} \sin \alpha_{2} } \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{array} } \right] \\ T_{4^{\prime}}^{3} & = \left[ {\begin{array}{*{20}c} {\cos \alpha_{3} } & { - \sin \alpha_{3} } & 0 & {b_{3}^{\prime } \cos \alpha_{3} } \\ {\sin \alpha_{3} } & {\cos \alpha_{3} } & 0 & {b_{3}^{\prime } \sin \alpha_{3} } \\ 0 & 0 & 1 & { - a_{3}^{\prime } } \\ 0 & 0 & 0 & 1 \\ \end{array} } \right] \\ T_{4^{\prime\prime}}^{3} & = \left[ {\begin{array}{*{20}c} {\cos \alpha_{3} } & { - \sin \alpha_{3} } & 0 & {b_{3}^{\prime \prime } \cos \alpha_{3} } \\ {\sin \alpha_{3} } & {\cos \alpha_{3} } & 0 & {b_{3}^{\prime \prime } \sin \alpha_{3} } \\ 0 & 0 & 1 & { - a_{3}^{\prime \prime } } \\ 0 & 0 & 0 & 1 \\ \end{array} } \right] \\ \end{aligned}$$
(1)

When the position of the workpiece gripped by the gripper of the 5-axis robot is horizontal, the homogeneous transformation matrix expression \(T_{{4^{\prime } }}^{0}\) (forward kinematic equation) can be derived using Eq. (1) as follows.

$$\begin{aligned} T_{{4^{\prime}}}^{0} & = T_{1}^{0} T_{2}^{1} T_{3}^{2} T_{{4^{\prime}}}^{3} = \left[ {\begin{array}{*{20}c} {r_{11} } & {r_{12} } & 0 & {x^{{\prime }} } \\ {r_{21} } & {r_{22} } & 0 & {y^{{\prime }} } \\ 0 & 0 & 1 & {z^{{\prime }} } \\ 0 & 0 & 0 & 1 \\ \end{array} } \right] \\ & = \left[ {\begin{array}{*{20}c} {c_{123} } & { - s_{123} } & 0 & {b_{1} c_{1} + b_{2} c_{12} + b_{3}^{{\prime }} c_{123} } \\ {s_{123} } & {c_{123} } & 0 & {b_{1} s_{1} + b_{2} s_{12} + b_{3}^{{\prime }} sc_{123} } \\ 0 & 0 & 1 & {a_{1} + a_{2} - a_{3}^{{\prime }} } \\ 0 & 0 & 0 & 1 \\ \end{array} } \right] \\ \end{aligned}$$
(2)

When the position of the workpiece gripped by the gripper of the 5-axis robot is vertical, the homogeneous transformation matrix expression \(T_{{4^{\prime \prime } }}^{0}\) (forward kinematic equation) can be derived using Eq. (1) as follows.

$$\begin{aligned} T_{{4^{{{\prime \prime }}} }}^{0} & = T_{1}^{0} T_{2}^{1} T_{3}^{2} T_{{4^{\prime\prime}}}^{3} = \left[ {\begin{array}{*{20}c} {r_{11} } & {r_{12} } & 0 & {x^{{{\prime \prime }}} } \\ {r_{21} } & {r_{22} } & 0 & {y^{{{\prime \prime }}} } \\ 0 & 0 & 1 & {z^{{{\prime \prime }}} } \\ 0 & 0 & 0 & 1 \\ \end{array} } \right] \\ & = \left[ {\begin{array}{*{20}c} {c_{123} } & { - s_{123} } & 0 & {b_{1} c_{1} + b_{2} c_{12} + b_{3}^{{^{{{\prime \prime }}} }} c_{123} } \\ {s_{123} } & {c_{123} } & 0 & {b_{1} s_{1} + b_{2} s_{12} + b_{3}^{{^{{{\prime \prime }}} }} sc_{123} } \\ 0 & 0 & 1 & {a_{1} + a_{2} - a_{3}^{{^{{{\prime \prime }}} }} } \\ 0 & 0 & 0 & 1 \\ \end{array} } \right] \\ \end{aligned}$$
(3)

Figure 3 is a geometric representation of the robot motion to derive the inverse kinematic equation. By calculating the center end position and orientation of the horizontal and vertical workpieces using the forward kinematics of Eqs. (2) and (3) and Fig. 3, the inverse kinematics for calculating the angle of each joint can be derived.

Fig. 3
figure 3

Geometric representation of robot motion (2D)

First, deriving the inverse kinematic equation when the workpiece is in a horizontal position is as follows. The equations for obtaining c2 and s2 of are as follows.

$$\begin{aligned} \cos \alpha_{2} & = \frac{{ - b_{1}^{2} - b_{2}^{2} + \left( {x^{\prime } - b_{3}^{\prime } \cos \phi } \right)^{2} + \left( {y^{\prime } - b_{3}^{\prime } \sin \phi } \right)^{2} }}{{2b_{1} b_{2} }} \\ \sin \alpha_{2} & = \pm \sqrt {1 - \cos^{2} \alpha_{2} } \\ \end{aligned}$$
(4)

The equation for obtaining the angle α2 of joint 2 can be expressed as follows.

$$\alpha_{2} = a\tan 2(\sin \alpha_{2} , \cos \alpha_{2} )$$
(5)

In Fig. 3, the joint points of the third \(\left( {b_{1} c_{1} + b_{2} c_{12} ,b_{1} s_{1} + b_{2} s_{12} } \right)\) can be written as follows if obtained from Eq. (2).

$$\begin{aligned} x^{\prime } - b_{3}^{\prime } c\phi & = b_{1} c_{1} + b_{2} c_{12} \\ y^{\prime } - b_{3}^{\prime } s\phi & = b_{1} s_{1} + b_{2} s_{12} \\ \end{aligned}$$
(6)

The equation for obtaining the angle α1 of joint 1 can be expressed as follows.

$${\upalpha }_{1} = 2{\text{atan}}\frac{{2{\text{b}}_{1} \left( {{\text{y}}^{{\prime }} - {\text{b}}_{3}^{{\prime }} {\text{s}}\phi } \right) \pm \sqrt {\begin{array}{*{20}c} {\left\{ {2{\text{b}}_{1} \left( {{\text{x}}^{{\prime }} - {\text{b}}_{3}^{{\prime }} {\text{c}}\phi } \right)} \right\}^{2} + \left\{ {2{\text{b}}_{1} \left( {{\text{y}}^{{\prime }} - {\text{b}}_{3}^{{\prime }} {\text{s}}\phi } \right)} \right\}^{2} - } \\ {\left\{ {\left( {{\text{x}}^{{\prime }} - {\text{b}}_{3}^{{\prime }} {\text{c}}\phi } \right)^{2} + \left( {{\text{y}}^{{\prime }} - {\text{b}}_{3}^{{\prime }} {\text{c}}\phi } \right)^{2} + {\text{b}}_{1}^{2} - {\text{b}}_{2}^{2} } \right\}^{2} } \\ \end{array} } }}{{2{\text{b}}_{1} \left( {{\text{x}}^{{\prime }} - {\text{b}}_{3}^{{\prime }} {\text{c}}\phi } \right) + \left( {{\text{x}}^{{\prime }} - {\text{b}}_{3}^{{\prime }} {\text{c}}\phi } \right)^{2} + \left( {{\text{y}}^{{\prime }} - {\text{b}}_{3}^{{\prime }} {\text{c}}\phi } \right)^{2} + {\text{b}}_{1}^{2} - {\text{b}}_{2}^{2} }}$$
(7)

Since the end orientation ϕ center of the workpiece is equal to the sum of Joint 1, Joint 2, and Joint 3, it can be expressed as \(\phi = \upalpha _{1} + \upalpha _{2} + \upalpha _{3}\), and from this equation, the angle α3 of Joint 3 can be written as the following equation.

$$\upalpha _{3} = \phi - \left( {\upalpha _{1} + \upalpha _{2} } \right)$$
(8)

The equation for obtaining the length a1 of link 1 can be derived as follows.

$$a_{1} = z^{{\prime }} - a_{2} + a_{3}^{{\prime }}$$
(9)

Deriving the inverse kinematic equation when the workpiece is in a vertical position is as follows. The equations for obtaining c2 and s2 of are as follows.

$$\begin{aligned} \cos \alpha_{2} = \frac{{ - b_{1}^{2} - b_{2}^{2} + \left( {x^{{{\prime \prime }}} - b_{3}^{{{\prime \prime }}} \cos \phi } \right)^{2} + \left( {y^{{{\prime \prime }}} - b_{3}^{{{\prime \prime }}} \sin \phi } \right)^{2} }}{{2b_{1} b_{2} }} \\ \sin \alpha_{2} = \pm \sqrt {1 - \cos^{2} \alpha_{2} }\end{aligned}$$
(10)

The equation for obtaining the angle α2 of joint 2 can be expressed as follows.

$$\alpha_{2} = {\text{a}}\tan 2(\sin \alpha_{2} , \cos \alpha_{2} )$$
(11)

In Fig. 3, the joint points of the third (\(b_{1} c_{1} + b_{2} c_{12} ,b_{1} s_{1} + b_{2} s_{12}\)) can be written as follows if obtained from Eq. (2).

$$\begin{aligned} x^{\prime \prime } - b_{3}^{\prime \prime } c\phi & = b_{1} c_{1} + b_{2} c_{12} \\ y^{\prime \prime } - b_{3}^{\prime \prime } s\phi & = b_{1} s_{1} + b_{2} s_{12} \\ \end{aligned}$$
(12)

The equation for obtaining the angle α1 of joint 1 can be expressed as follows.

$${\upalpha }_{1} = 2{\text{atan}}\frac{{2{\text{b}}_{1} \left( {{\text{y}}^{{{\prime \prime }}} - {\text{b}}_{3}^{{{\prime \prime }}} {\text{s}}\phi } \right) \pm \sqrt {\begin{array}{*{20}c} {\left\{ {2{\text{b}}_{1} \left( {{\text{x}}^{{{\prime \prime }}} - {\text{b}}_{3}^{{{\prime \prime }{^{\prime}}}} {\text{c}}\phi } \right)} \right\}^{2} + \left\{ {2{\text{b}}_{1} \left( {{\text{y}}^{{{\prime \prime }}} - {\text{b}}_{3}^{{{\prime \prime }}} {\text{s}}\phi } \right)} \right\}^{2} - } \\ {\left\{ {\left( {{\text{x}}^{{{\prime \prime }}} - {\text{b}}_{3}^{{{\prime \prime }}} {\text{c}}\phi } \right)^{2} + \left( {{\text{y}}^{{{\prime \prime }}} - {\text{b}}_{3}^{{{\prime \prime }}} {\text{c}}\phi } \right)^{2} + {\text{b}}_{1}^{2} - {\text{b}}_{2}^{2} } \right\}^{2} } \\ \end{array} } }}{{2{\text{b}}_{1} \left( {{\text{x}}^{{{\prime \prime }}} - {\text{b}}_{3}^{{{\prime \prime }}} {\text{c}}\phi } \right) + \left( {{\text{x}}^{{{\prime \prime }}} - {\text{b}}_{3}^{{{\prime \prime }}} {\text{c}}\phi } \right)^{2} + \left( {{\text{y}}^{{{\prime \prime }}} - {\text{b}}_{3}^{{{\prime \prime }}} {\text{c}}\phi } \right)^{2} + {\text{b}}_{1}^{2} - {\text{b}}_{2}^{2} }}$$
(13)

Since the end orientation ϕ center of the workpiece is equal to the sum of Joint 1, Joint 2, and Joint 3, it can be expressed as \(\upalpha _{3} = \phi = \upalpha _{1} + \upalpha _{2} + \upalpha _{3}\), and from this equation, the angle α3 of Joint 3 can be written as the following equation.

$$\upalpha _{3} = \phi - \left( {\upalpha _{1} + \upalpha _{2} } \right)$$
(14)

The equation for obtaining the length a1 of link 1 can be derived as follows.

$$a_{1} = z^{{{\prime \prime }}} - a_{2} + a_{3}^{{{\prime \prime }}}$$
(15)

2.3 Simulation of a 5-Axis Robot

Figure 4 shows the motion position and simulation results of the 5-axis robot, which was performed using the derived forward kinematics and inverse kinematics (2)–(13). Figure 4a is the operation position of the 5-axis robot, and the workpiece input/loading device is located on the left side of the 5-axis robot, the CNC lathe chuck is located in the middle, and the workpiece discharging/loading device is located on the right side of the 5-axis robot. The operation sequence of the robot moves from position ① of the workpiece input/loader (the position of the workpiece before processing) to the chuck position of the lathe, and moves from the chuck position of the lathe to position ① of the workpiece discharge/loader (position of the workpiece after processing). In addition, the order in which the robot moves the workpiece from the workpiece loading/unloading device and the workpiece discharging/loading device is from ① to ② in a row and from ① to ③ in a column. Figure 4b shows the simulation results of the 5-axis robot, and the simulation was conducted by applying the forward kinematics and inverse kinematics according to the motion sequence of the robot. For the simulation, the length of each link was b1 = 400 mm, b2 = 350 mm, and b3 = 110 mm, and the height, respectively, a1 = 1052 mm, a2 = 153 mm, and a3 =  − 338 mm, and b3 was the distance to the center point of the vertical workpiece to adjust the position of the loading device.

Fig. 4
figure 4

Motion position and simulation result of 5-axis robot

Table 2 shows the simulation results of the 5-axis robot, which shows each joint angle of the robot and the position of the gripper when the robot gripper is at the position ①, ②, ③, ④ of the input loading device and the discharge loading device, respectively. Also, each joint angle of the robot and the position of the gripper are shown when the gripper of the robot puts the workpiece into the lathe chuck. These are values calculated using Eqs. (2)–(13). As a result of the simulation, it was confirmed that the robot operated very accurately. Figure 5a is when the LM guide angle is 0° and the vertical movement mechanism length is 0 mm, (b) is when the LM guide angle is 0° and the vertical movement mechanism length is 300 mm, (c) is when the LM guide angle is 45° and the vertical movement mechanism is When the length is 0 mm, (d) shows the case when the LM guide angle is 45° and the length of the vertical movement mechanism is 300 mm.

Table 2 Simulation results of 5-axis robot
Fig. 5
figure 5

Stress analysis results of a 5-axis robot according to the LM guide installation angle and the length of the vertical movement mechanism

2.4 Structural Analysis of 5-Axis Robot

Structural analysis of the 5-axis robot was conducted using software (SOLIDWORKS) so that the deflection in the y direction between the central end position of the horizontal workpiece and the central end position of the vertical workpiece was within 0.2 mm. The length of the robot arm is 400 mm from joint 1 to joint 2, 350 mm from joint 2 to joint 3, 100 mm from joint 3 to 4 (4〃) point, and 100 mm from point 4 to 4’. The structural analysis conditions are Link 1 length 242 mm, diameter 146 mm, elbow 1 length 148 mm, height 163.5 mm, width 148 mm, link 2 length 186 mm, diameter 146/116 mm, elbow 2 length 124 mm, height 103 mm, width 138 mm, And the material of all links and elbows is AL6061 (yield strength: 110.03 MPa). Through structural analysis, the thickness of each part is determined. And the vertical movement mechanism can adjust the height of the 5-axis robot, its maximum height is 1188 mm and it can be reduced to 300 mm, which was determined based on the height of the CNC lathe. The length of the axis of the vertical movement mechanism is 390 mm, the diameter is 147 mm, the length of the vertical movement mechanism housing is determined to be 451 mm and the diameter is 272 mm, and the material of the axis of the vertical movement mechanism and the housing of the vertical movement mechanism is SM45C (yield strength: 585 MPa). The thickness of these is determined. The size of the horizontal workpiece and the vertical workpiece is 100 mm in diameter, 100 mm in length, and has a mass of about 4 kg. Structural analysis was conducted by setting each part of the robot to act as its own weight, and having the horizontal and vertical workpieces act as payload. Structural analysis was repeated several times while comparing the yield strength of each part material and changing the thickness of each part so that the displacement of the vertical workpiece's y-axis was within 0.2 mm and the strength of each part was safe. Figure 5 shows the stress analysis results of the 5-axis robot according to the LM guide installation angle and the length of the vertical movement mechanism.

Table 3 shows the displacement of the central end position of the horizontal workpiece and vertical workpiece of the 5-axis robot according to the LM guide installation angle and the length of the vertical movement mechanism. As expected, the displacement of the y-axis occurred the most within − 0.18 mm, the displacement of the x-axis was within − 0.4 mm, and the displacement of the z-axis was very small, within 0.03 mm. LM guides were installed at 90° intervals. When the length direction of the arm of the 5-axis robot was 0° (coincident) or 45° with the LM guide, it appeared similar according to the length of the vertical movement mechanism, respectively, and appeared larger when the length of the vertical movement mechanism was 300 mm than when it was 0 mm. As a result of structural analysis, each part of the 5-axis robot was designed so that the displacement of the horizontal and vertical workpieces was within 0.2 mm.

Table 3 Displacement of the central end position of the horizontal workpiece and vertical workpiece of a 5-axis robot according to the LM guide installation angle and the length of the vertical movement mechanism

Figure 6 shows the stress analysis results of the 5-axis robot (part “A” in Fig. 1) according to the angle of the LM guide and the length of the vertical movement mechanism. The lengths indicated by stress analysis are on the lower center line of Link 1 (Length: 242 mm), Elbow 1 (Length: 148 mm), and Link 2 (Length: 186 mm). It is “A” part in the Fig. 1, its total length is 576 mm. Figure 5a shows the stress in the x direction, and the stress is almost the same when the longitudinal direction of the robot arm and the LM guide are 0° (coincident)/45°, and when the position of the vertical movement mechanism is 0 mm and 300 mm, and the maximum stress at this time was within − 2.79 MPa. Figure 6b shows the stress in the y direction, and the maximum stress was within − 0.088 MPa. Figure 6c shows the stress in the z direction, and the maximum stress was within − 0.54 MPa. The safety factor of the link and elbow was 39.4 times larger than the yield strength of AL6061 (110.03 MPa). The reason why the safety factor is so large is because the thickness of each part is thick, and this is because the y-direction deflection of the workpiece fixed by the vertical gripper and the horizontal gripper is designed to be within 0.2 mm.

Fig. 6
figure 6

Stress analysis results of the 5-axis robot (part “A” in Fig. 1) according to the angle of the LM guide and the length of the vertical movement mechanism

Table 4 shows the dimensions of the 5-axis robot parts designed from the structural analysis results, and the thickness was determined through structural analysis while the length, diameter, height, and width of each part were determined. The determined thicknesses of link 1, link 2, elbow 1, elbow 2, axis of vertical movement mechanism (V.M.S.), and housing of vertical movement mechanism (V.M.H.) were 13.5 mm, 22 mm, 24.5 mm, 20 mm, 39.5 mm, and 30 mm, respectively.

Table 4 Dimensions of 5-axis robot parts designed from structural analysis results

3 Manufacturing of 5-Axis Robot

Figure 7 represents a manufactured 5-axis robot, and 5 axes include 1 axis of vertical movement, 3 axes of horizontal rotation, and 1 axis of rotating gripper. The 5-axis robot consists of a robot body, vertical movement actuator, vertical movement mechanism axis, vertical movement mechanism housing, joint 1 actuator, link 1, elbow 1, joint 2 actuator, link 2, joint 3 actuator, elbow 2, rotation gripper, etc. This robot has a maximum height of 1188 mm and can be reduced by 300 mm, so it can be adjusted to fit the height of the machine tool's chuck. It is possible to load and unload the workpiece before and after machining on the chuck of the machine tool.

Fig. 7
figure 7

Manufactured 5-axis robot

4 Experiment and Discussion of 5-Axis Robot

Figure 8 shows the experimental device of the 5-axis robot, which consists of a 5-axis robot, a robot control device, a workpiece input/loading device and control device, and an air compressor. The 5-axis robot was manufactured in this paper, and the robot control device was designed and manufactured using DSP, but the design and manufacturing process is not explained in this paper. It controls each actuator of joints 1 to 3 and the vertical movement actuator through RS422 communication, and controls the operation of the rotary gripper by controlling the air compressor. The workpiece input loading device provides a place to load the workpiece before processing in this experiment. The air compressor (ULT340) compresses the air and provides it to the rotating gripper.

Fig. 8
figure 8

Experiment equipment for 5-axis robot

Figure 9 shows the control flow chart of the 5-axis robot, and the program was created to control the 5-axis robot using the inverse kinematic Eqs. (3)–(6) derived in this paper. When the power switch of the robot is turned on, the program sequence is as follows: First, the 5-axis robot is initialized and moved to the first pre-processing position of the loading device. Second, after checking whether the door of the machine tool is open, if it is open, it moves to the chuck position of the machine tool. Third, after processing, the workpiece is grabbed and ejected using a chuck, and the rotary gripper is rotated 180° to move the workpiece to the input position in the chuck before processing. Fifth, it moves to the position of the workpiece before the second machining. The 5-axis robot repeats this process until there is no workpiece before machining.

Fig. 9
figure 9

Control flow chart of 5-axis robot

Figure 10 shows the experimental results of the motion characteristics of the 5-axis robot in the workpiece loading device before processing, (a) shows the robot grabbing the workpiece before processing at the position ①, and (b) shows the way the robot grabs the workpiece before processing at the position ②, (c) shows the state of holding the workpiece before machining at the position of ③, and (d) shows the state of holding the workpiece before machining at the position of ④. Figure 11 shows the results of the characteristic experiment in which the 5-axis robot puts the workpiece into the chuck of the machine tool. This shows the process in which the 5-axis robot grabs the pre-processing workpiece located on the loading device of Fig. 10 and puts it into the chuck of the machine tool. Figure 11a shows the front position of the chuck, and (b) shows the position inserted into the chuck. The 5-axis robot designed and manufactured in this paper was confirmed to operate normally as a result of carrying out a characteristic test of the process of holding the pre-processing workpiece at the position of the loading device and accurately inserting it into the chuck of the machine tool.

Fig. 10
figure 10

Characteristics test result of 5-axis robot in workpiece loading device before processing

Fig. 11
figure 11

Characteristic test result of 5-axis robot inserting workpiece into chuck of machine tool

5 Conclusions

In this paper, a 5-axis robot capable of loading and unloading workpieces on machine tools was designed and manufactured. Kinematic analysis was performed to control the 5-axis robot, and motion simulation of the 5-axis robot was performed using the analysis equation. As a result, it was judged that it would be possible to load and unload the workpiece before and after machining on the machine tool. For the 5-axis robot, structural analysis was conducted for the safety of the robot parts and deflection at the end of the center line of the horizontal and vertical workpieces. As a result, the maximum deflection at the end of the center line of the horizontal workpiece and the vertical workpiece was within − 0.180 mm and − 0.134 mm, respectively, which satisfied the design goal of 0.2 mm. The maximum stress of the designed part was within − 2.79 MPa and the safety factor was 39.4 times. Therefore, each link and elbow designed by structural analysis is judged to be safe. Based on the design results, a 5-axis robot was manufactured, and its characteristics were tested. As a result, it was confirmed that the 5-axis robot loads the workpiece into the virtual machine tool before machining. Therefore, it is judged that the 5-axis robot developed in this paper can be usefully used for loading and unloading workpieces before and after machining on machine tools such as CNC lathes. Future research is to conduct a characteristic experiment applying the 5-axis robot developed in this paper to a CNC lathe.