Design of control system for six-degree-of-freedom robotic arm

To study the robotic arm trajectory planning and motion, the six-degree-of-freedom robotic arm control system design is proposed. In this paper, we choose a multi-joint type of robotic arm. We analyze the design of the robotic arm at home and abroad and determine the specific servomotor model and the specific robotic arm mechanism. We analyze the torque relationship of each joint and the size of the servomotor. Using SolidWorks and Robot Studios, we carry out the three-dimensional design modeling and simulation of the robotic arm, design the whole set of robotic arms, and use the Arduino Uno development board for precise control of the servo motor. The control program was written using C language, and various control tests were carried out on the robotic arm to make sure that the system could satisfy the debugging and research of trajectory planning type.


Introduction
As one of the most widely used automated mechanical devices in the field of robotics, robotic arms are still in the "neck" stage due to the late start and weak foundation of this field in China [1][2][3][4][5] .In this project, a six-degree-of-freedom robotic arm control system is designed, which is simple in operation, low in manufacturing cost, and suitable for debugging and research of trajectory planning type.Therefore, the design of a six-degree-of-freedom robotic arm control system is of great significance in solving the current situation of robots in China.
Yao et al. [6] designed a new six-degree-of-freedom service robot arm using a partially decoupled structure, which can bring the advantage of a fast inverse kinematics solution without a significant increase in volume.The D-H method is used to obtain the positive kinematics model of the robotic arm for positive kinematics solution, and a new geometric method is proposed to solve the inverse kinematics problem according to its structural characteristics.Liu et al. [7] used the Bayesian optimization algorithm based on the Random Forest Probabilistic Agent Model with the ABBIRB1410 robotic arm as the experimental object.They concluded that the Bayesian optimization algorithm improves the comprehensive effect of the robotic arm kinematic parameter optimization problem by 15% compared with the traditional algorithm.Zhang et al. [8] analyzed the fuzzy control method for the end position accuracy of an articulated hinge gap robotic arm using a spatial 3R hinge gap-containing robotic arm as a research object.Chao et al. [9] used software to optimize the topology of the arm and found that the optimized arm achieved lightweight while improving strength, stiffness, and minimum safety factor.Xie and lv [10] created a linkage coordinate system by improving the D-H method and derived the kinematic equations, which verified the feasibility and validity of the modified design and motion planning of the robotic arm.
In this paper, a six-degree-of-freedom robotic arm is designed, and the base, end-effector, large arm, and small arm of the arm are modeled using SolidWorks.The appropriate motor and servo are selected based on the torque and rotational accuracy required for the work.The control system is programmed using Arduino IDE.3D printing is used to create the arm parts and assemble them.Finally, the arm is used for experimentation and debugging to verify the feasibility of this design.

Hardware system design of six-degree-of-freedom robotic arm
The lower end of the arm is compatible with the MG996R servo.One side of the circular stretching excision can be fixed with the servo output axis of the rudder disc output to drive the movement of the arm; the other side of the excision out of a circular hole, with a removable protrusion and M3 * 8 mm self-tapping countersunk head screws fixed to play a role in supporting the rotation of the arm and facilitate the role of the installation.Because the servo is used for the single output servo in the middle of the arm plus two beams, one is convenient for the installation and support of the servo.The second can connect the active side of the servo output shaft to drive the auxiliary side of the movement.The third can reinforce the arm to avoid the problem of too much tension and low transmission efficiency.Because the design principle of the large and small arms is the same, only the design of the large arm is elaborated here.The uppermost side of the arm connected to the servo output shaft has two semi-circular stretching excision.The excision can just be stuck in the MG90S servo output shaft protruding part, the size of the servo output shaft protruding part of the half, to avoid the servo sliding due to only one screw hole fixing and other fixing unstable problems.
There are three types of end-effectors used in robotic arms: gripper, pneumatic, and magnetic endeffector.Considering the convenience and practicability, the gear-driven gripper end-effector is used, and its fittings include a "ʌ"-shaped one-piece connecting piece and an "L" shaped gripper fixing piece.The fittings include a "ʌ"-shaped one-piece connector and an "L"-shaped clamping jaw fixing.
The end of the clamping jaw is driven by a servo as the active part of the clamping jaw on one side, and the other side of the follower of the clamping jaw is driven by gear transmission to realize the function of simultaneous opening or clamping.The outermost part of the jaws has a rounded notch with a saw-like non-slip pattern near it, which is mainly designed to grip small and smooth objects such as a marker pen more firmly and to avoid slipping off when handling the objects.The assembly diagram is shown in Figure 1.

Robotic arm path planning
The MG90S servo and MG996R servo have a rotatable range of 0~180 degrees.However, the large arm, small arm, and other components can have a rotation angle much larger than 180 degrees.Thus, to make better use of the limited 180 degrees of the servo, it is necessary to carry out the assembly of software and hardware cooperation.To debug the six-degree-of-freedom robotic arm so that it can operate normally, reference to the movement of the handling robotic arm, the use of Robot Studios to make the following a complete motion path planning simulation, path planning shown in Figure 2. (2) The robotic arm is in the vertical upward state when it is not controlled.The first action is to move from the vertical upward state to the initial position at a uniform speed.The initial position is set concerning the Phome position of the robotic arm in the laboratory, i.e., the position where the robotic arm is located before the movement and after completing a set of movement processes.
(3) The robot arm rotates each servo to move the clamping jaws from the initial position to the top of the clamping position, avoiding collision with the clamped objects during the process of the clamping jaws going directly to the clamping position, which may lead to the problem of the objects' position being shifted or damaged.
(4) The clamping jaws are kept horizontal and open to drop vertically from above the clamping position to the clamping object position.The clamping function of the clamping jaws is carried out and maintained.Then, the robotic arm is allowed to clamp the object while rotating the servos so that the three servos return to the angle of rotation at the initial position.
(5) After that, the servo is rotated to make the robot arm gripper part move to the top of the object release position.The object is dropped vertically to release, and then vertically back to the top of the position, and finally back to the initial position.

Robotic arm experiment and debugging
Using 3D printing technology to print the robotic arm parts, six degrees of freedom robotic arm is assembled using for loop statements for experimentation and debugging to realize the above path planning so that the robotic arm can move according to the planned path to achieve the purpose.

Recording of fixed points and angles under trajectory planning
After the attitude adjustment, the servo angles of vertical position, initial position, off (grasping position), grasping position, off (releasing position), and releasing position are obtained for each servo in 6 positions.The servo output angle of each position is shown in Table 1.To calculate the servo output angle from the initial position to reach off (gripping position) as an example, so that the robotic arm by the trajectory planning from the initial position to reach off (gripping position): servo 1 output angle from 85 degrees to 110 degrees, servo 3 output angle from 110 degrees to 53 degrees, servo 4 output angle from 90 degrees to 100 degrees, servo 5 output angle from 65 degrees to 110 degrees The servo 6 output angle is from 90 degrees to 45 degrees, and the servo waits 15 milliseconds for every one degree of rotation to control the servo rotation speed.

Experimental debugging
Experimentation and debugging are done using an assembled six-degree-of-freedom robotic arm and a for-loop statement to implement the above path planning so that the robotic arm can move according to the planned path and thus achieve the objective.The parameter of the original initial position is that each servo is in the 90-degree position.However, in the debugging, it was found that when servo 6 was allowed to rotate in the original initial position, the whole six-degree-of-freedom robotic arm appeared to have a large degree and was visible to the naked eye of the violent jitter.It would even affect the rotation of the robotic arm.After analysis and research, it was found that it was because the position of the original initial position was biased towards the front of the arm, which generated a certain amount of radial force, thus causing the rotating platform connected to the fixed servo 5 in the base to rub against the bearings.The larger friction coefficient of the contact surface of the rotating platform resulted in more violent shaking.Therefore, today's initial position is adopted to solve the problem of jitter caused by excessive radial force.The six-degree-of-freedom robotic arm carries out the movement schematically according to the trajectory planning, as shown in Figure 3.

Conclusion
The main work accomplished in this paper is as follows: This paper is based on a six-degree-of-freedom mechanical arm to adjust the design through SolidWorks three-dimensional modeling software for the development of six-degree-of-freedom mechanical arm modeling and simulation.The use of 3D printing technology will be designed to print the mechanical arm parts.The software of the robotic arm is designed to calculate the relative coordinates of the target position, and the software is used to program and control the servo through the control development board.The simulation is carried out through the simulation software Robot Studio.The six-degree-of-freedom robotic arm is realized in the software for the movement clamping and placing functions.Through the development board to the servo position to achieve the rotation position initialization, each servo output is connected to the axis of different angles so that the six degrees of freedom robotic arm can achieve the function of arriving at any position in space.

AFigure 2 .
Figure 2. Motion path simulation diagram.(1)The vertical position is designed according to the robot arm when the robot arm is energized and can receive signals for a moment, all servos rotate to the first signal position output in the control program code at a very fast speed.If the first position signal is the initial position, the initial attitude of the robot arm is difficult to artificially adjust to the position close to the initial position, so it is designed to have a vertical position.The attitude at this time is the overall vertical of the robot arm Upwards, easy to adjust, to solve the above problem.(2)The robotic arm is in the vertical upward state when it is not controlled.The first action is to move from the vertical upward state to the initial position at a uniform speed.The initial position is set concerning the Phome position of the robotic arm in the laboratory, i.e., the position where the robotic arm is located before the movement and after completing a set of movement processes.(3)The robot arm rotates each servo to move the clamping jaws from the initial position to the top of the clamping position, avoiding collision with the clamped objects during the process of the clamping jaws going directly to the clamping position, which may lead to the problem of the objects' position being shifted or damaged.(4)The clamping jaws are kept horizontal and open to drop vertically from above the clamping position to the clamping object position.The clamping function of the clamping jaws is carried out and maintained.Then, the robotic arm is allowed to clamp the object while rotating the servos so that the three servos return to the angle of rotation at the initial position.(5)After that, the servo is rotated to make the robot arm gripper part move to the top of the object release position.The object is dropped vertically to release, and then vertically back to the top of the position, and finally back to the initial position.

AFigure 3 .
Figure 3. Schematic diagram of the trajectory of the six-degree-of-freedom robotic arm.

Table 1 .
Servo output angle for each position.