Share this

Robotic arm control based on microcontroller

2026-04-06 03:41:25 · · #1

Abstract: Robotic arms are an inevitable product of industrial production, mimicking some functions of the human upper limb. This paper develops the application of a microcontroller controller in the positioning control of a robotic arm, based on a teaching robot. The arm joints of the robotic arm were tested and calculated, and their mathematical model is presented. Based on this, a method using a 51 microcontroller is proposed to improve the positioning accuracy of the robotic arm. Simulation results show that this method can overcome the dead zone and overshoot inherent in using only a 51 microcontroller, significantly reducing system output overshoot and improving positioning accuracy.

Keywords : microcontroller; robotic arm; position control

Intermediate Classification Number : TP9 Document Identification Code: B

0 Introduction

Since the 1980s, robot technology has developed rapidly and has been widely used in the field of machine manufacturing[1]. Robot technology involves various knowledge such as mechanics, mechanical engineering, information science, and graphics. It is a typical mechatronics product. At present, research in this area has also been carried out in China and certain results have been achieved.

Robotic arms are an inevitable product of industrial production. They are automated technological devices that mimic some functions of the human upper limbs, transporting workpieces or holding tools according to predetermined requirements. They play a vital role in realizing industrial automation and promoting further industrial development. Therefore, they possess strong vitality and are widely valued and welcomed. Practice has proven that industrial robotic arms can replace heavy manual labor, significantly reducing workers' labor intensity, improving working conditions, and increasing labor productivity and automation levels. Robotic arms are effective for handling heavy workpieces and performing long-term, frequent, and monotonous operations in industrial production. Furthermore, they can operate under high temperature, low temperature, deep water, space, radioactive, and other toxic or polluted environments, further demonstrating their superiority and promising broad development prospects. Hydraulic robotic arms have advantages such as speed and efficiency. These robotic arms are hydraulically driven, controlling the extension and retraction of the arm, the rotation of the wrist, and the grasping and releasing movements of the hand; the up-and-down movement is controlled by a motor.

To meet the needs of robotics education, this paper takes educational robots as the research object and conducts pedagogical research. The main characteristics of educational robots are:

(1) Structurally, it is a five-joint robotic manipulator.

(2) All joints are controlled by DC torque motors and rotary transformers to achieve phase-modulated closed-loop control.

(3) The system control units all use analog discrete devices.

(4) The transmission system of the joint adopts a spur gear and toothed belt structure.

In practical teaching and research, the JJR-1 teaching robot, due to its control section employing analog discrete components in its electronic circuitry, exhibits varying degrees of zero drift and instability, introducing errors into the system's positioning accuracy. This paper first designs a fully digital DC servo control system based on an 80C51 microcontroller to meet higher control requirements, and then conducts further research based on this design.

1. The working process of a robotic arm

The robot designed in this paper is tasked with moving a workpiece from the left worktable to the right worktable, as shown in Figure 1.

Figure 1 Schematic diagram of the robotic arm

Working process: When the robot arm is in the initial position (upper left position), after pressing the start button, the robot arm moves down to the left worktable, clamps the workpiece, and then moves back up to the origin; then it moves to the right, moves down to the right worktable after it is in position, puts down the workpiece, and then moves up and left to return to the initial position, completing one action cycle.

The operation modes of robotic arms are divided into inching, single-step, single-cycle, and continuous operation.

(1) Jog operation : The operation buttons control each displacement movement of the robot arm individually. For example, when the up-down movement mode is selected, pressing the start button will raise the robot arm; pressing the stop button will lower the robot arm. When the left/right movement mode is selected, pressing the start button will move the robot arm to the left; pressing the stop button will move the robot arm to the right. When the clamping/releasing movement mode is selected, pressing the start button will clamp the robot arm; pressing the stop button will release the robot arm.

(2) Single-step operation

Each time the start button is pressed, the robotic arm will automatically stop after completing one movement.

(3) Single-cycle operation

Starting from the initial position, pressing the start button will automatically complete one cycle of motion and then stop, representing one transport operation. Pressing the stop button during operation will halt the robot's movement. To restart, the robot must be moved back to its original position using a jog operation, and then the start button must be pressed again to begin a new single-cycle operation.

(4) Continuous operation

Starting from the initial position, pressing the start button will automatically (continuously and cyclically cycle, i.e., continuous automatic transport) the robotic arm will begin its operation. Pressing the stop button during operation will halt the robotic arm's movement. To restart, the robotic arm must be manually moved back to its origin, and then the start button must be pressed again to resume continuous operation. Pressing the reset button during operation will cause the robotic arm to complete one cycle of movement before automatically returning to its initial position and stopping.

2-arm telescopic mechanism design

The arm is the main actuator of a robotic arm. Its function is to support the wrist and hand and drive them in spatial movement. The purpose of the arm's movement is generally to deliver the hand to any point within the spatial range of motion. From the perspective of the forces acting on the arm, it directly bears the dynamic and static loads of the wrist, hand, and workpiece during operation, and its own movement is also quite significant, making the force distribution relatively complex.

The precision of a robotic arm ultimately manifests in the positional accuracy of its hand. Therefore, selecting appropriate guiding devices and positioning methods is of paramount importance.

1. The right arm cavity flow rate can be obtained using the following formula:

Q=sv

2. The working pressure in the right arm cavity can be obtained from the following formula:

P=F/S

In the formula: F — the total weight of the workpiece and the moving parts of the arm.

3. The working parameters of the drawing mechanism are shown in Table 1:

Table 1 Mechanism Operating Parameters

3. Composition of the control system

The all-digital DC servo control system designed in this paper consists of a two-level structure, as shown in Figure 2. A PC is used as the host computer to realize trajectory planning for joint movements, command transmission, and joint position information feedback; the slave computer uses an 80C51 microcontroller as the closed-loop control core for the robot's joint positioning.

The microprocessor-based control system mainly realizes information exchange with the host computer, obtains joint motion command information, and promptly feeds back the position information to the host computer; in addition, the system also performs joint motion control, that is, compares the obtained joint motion commands with the feedback information obtained from the position detector port, thus forming a closed-loop control system.

Figure 2 Control system structure diagram

Under the regular action of the controller, the torque motor is positioned and controlled by the output (voltage) signal after D/A conversion. The system structure is shown in Figure 3. In Figure 3, θ represents the angle rotated by the robot arm; θg represents the given angle; and θf represents the feedback angle.

Figure 3 Arm joint control model

For robotic arms, the focus is on positioning accuracy rather than speed; therefore, a single closed-loop control system is used in this system. Taking the arm joint as an example, its mathematical model is determined as follows: In the robotic arm joint object, the DC torque motor model is generally simplified with two inertial elements, and its expression is:

In the formula: Tm is the electromagnetic time constant; Tl is the motor time constant; K is the combined value of the amplification factor of the drive circuit and the reduction ratio of the motor reducer; S is the integral element.

This design uses a proximity switch to detect the presence or absence of a workpiece on the worktable. A microswitch serves as the horizontal axis.

This is a hardware limit detection device for the vertical axis. The proximity switch has three connecting wires (red, blue, and black). The red wire is connected to the positive terminal of the power supply, the black wire is connected to the negative terminal, and the blue wire is the output signal. When the device approaches the stop, the output level is low; otherwise, it is high. Its principle is shown in Figure 4.

Figure 4. Schematic diagram of proximity switch

4 Design Advantages

(1) Multiple control methods

It features inching, single-step, single-cycle, and continuous control modes.

(2) Transmission system

The design employs a combined transmission method, with the arm using electric drive and the gripper using pneumatic drive.

(3) Clamping mechanism

To prevent damage to the clamped object, the clamping force must be limited to a certain range and equipped with soft pads, elastic linings, or an automatic centering structure. A self-locking mechanism can also be included to prevent the clamped object from falling due to a sudden power outage. This design employs a mechanical clamping mechanism, with the pneumatic gripper's clamping force controlled by a solenoid valve.

(4) Arm

The arm uses a stepper motor to drive a lead screw and nut to achieve telescopic and lifting movements. A programmable logic controller (PLC) sends pulse signals to control the rotation of the stepper motor, which in turn drives the ball screw to rotate, completing the arm's movement. Changing the number of pulses controls the distance the arm's two axes move, and limit switches are added to both ends of each axis to limit movement. The lead screw and nut transmission structure is characterized by easy self-locking, high positional accuracy, and high transmission efficiency.

5. Conclusion

For control systems employing microcontrollers, when the error is large, the primary task of the control system is to eliminate the error, which requires a larger weighting of the error in the control rules. Conversely, when the error is small and the system is close to steady state, the primary task of the control system is to stabilize the system as quickly as possible and reduce overshoot, which requires a larger weighting of the error rate of change in the control rules. This achieves self-adjustment of the control rules. Experimental results show that the system overshoot is significantly reduced, and the control accuracy is improved.

6 References

[1] Yan Xuegao. Principles of Robotics [M]. Nanjing: Southeast University Press, 1992.

[2]JackRH.MeasuringrobotrepeatabilityaapplicationofISOandANSIstandards[J].AdvancedRobotics,1996,10(5):503-520.

[3] Zhou Xizhang, Zhou Quan, et al. How to correctly select an electric motor [M]. Beijing: Machinery Industry Press, 2004.

[4] Zhang Guixiang, Graduation Design Guide for Mechanical and Electrical Engineering Majors [M]. Beijing: China Machine Press, 2005.

[5] Liu Sheng, Chen Jie, Gong Zhihao, et al. Fuzzy control strategy based on dynamic lookup table and its application [J]. Journal of Beijing Institute of Technology, 2002, (3): 48-50.

[6] Liu Quanzhou, Xie Gang, Xie Keming, et al. Research on self-adjusting fuzzy control system based on GA correction factor [J]. Journal of Taiyuan University of Technology, 2003, (1): 20-22.

[7] Cai Zixing. Robotics [M]. Beijing: Tsinghua University Press, 2000.

[8]MurrayRM,LiZX,SastrySS.Amathematicalintroductiontoroboticmanipulation[M].CRC Press,1994.

Read next

CATDOLL 128CM Cici Silicone Doll

Height: 128 Silicone Weight: 21kg Shoulder Width: 30cm Bust/Waist/Hip: 57/52/63cm Oral Depth: N/A Vaginal Depth: 3-15cm...

Articles 2026-02-22