“The automatic tracking module in this design is mainly composed of a single-chip microcomputer and its external circuits, infrared tracking circuit, and DC motor control circuit. During normal operation, the single-chip microcomputer cyclically detects the output signal of the infrared tracing circuit, and generates a DC motor control signal based on this. When the system detects a change in the working mode, the system enters the corresponding mode. The principle block diagram is shown in Figure 1 and Figure 2.
1 System principle
1.1 System principle of automatic tracking module
The automatic tracking module in this design is mainly composed of a single-chip microcomputer and its external circuits, infrared tracking circuit, and DC motor control circuit. During normal operation, the single-chip microcomputer cyclically detects the output signal of the infrared tracing circuit, and generates a DC motor control signal based on this. When the system detects a change in the working mode, the system enters the corresponding mode. The principle block diagram is shown in Figure 1 and Figure 2.
Figure 1 Block diagram of the automatic tracking module
Figure 2 Block diagram of automatic tracking module
1.2 The system principle of the six-degree-of-freedom manipulator module
The design of the system adopts a modular approach, dividing the machine into four parts: base, arm, wrist, and hand. The controller is based on MSP430 single-chip microcomputer, and the specific control block diagram is shown in Figure 3.
Figure 3 Block diagram of the six-degree-of-freedom module
2 System design
2.1 Hardware design of automatic tracking module
1) Basic SCM system
The control core of the tracing robot system is generally based on the basic hardware resources of the MSP430 single-chip microcomputer, and some external devices can be expanded when necessary. The control that needs to be completed in this design is relatively simple, and it can be completely realized with the basic hardware resources of the single-chip microcomputer, so there is no need for expansion.
2) Amplify the signal circuit
It is controlled by LM324. LM324 is a four-op-amp integrated circuit. It adopts a 14-pin dual-in-line plastic package. It contains four groups of operational amplifiers of the same form. In addition to power sharing, the four groups of operational amplifiers are independent of each other.
3) Motor drive circuit
The selected motor is an ordinary DC motor. Under the control of the MSP430 microcontroller, a motor drive chip can be connected or the motor can be rotated through some other originals. In order to simplify the design, this system uses other methods to replace the circuit driver chip.
2.2 Hardware design of six-degree-of-freedom manipulator module
The six-degree-of-freedom manipulator is a robotic arm driven by six servo motors. In addition to the 4 joints constituting the arm and 1 joint of the wrist, together with the clamping of the hand, the mechanical structure of a manipulator is realized.
The control module uses a 5 V DC power supply to power the motors of the single-chip microcomputer and the robotic arm. The circuit includes a manual reset circuit, a crystal oscillator circuit, a matrix keyboard, an independent keyboard to control the corner of the single-chip microcomputer, and a servo motor access port. The screen displays the identification number of the selected motor and the angle of rotation of the motor.
3 software design
The software design of this system is hardware-oriented, and C language programming is selected. The most important part is that the single-chip microcomputer controls the motor rotation (including forward and reverse rotation), time delay and PID algorithm. The specific design flow chart is shown in Figure 4 and Figure 5.
Figure 4 Control flow chart of automatic tracking module
Figure 5 Flow chart of the six-degree-of-freedom module
4 System debugging
1) After the program is compiled, carefully check the code line by line. Check the code for errors, establish your own code checklist, and check the frequently error-prone areas. Check whether the code conforms to the programming specification.
2) Debug the program to see if it can be simulated, and if it runs normally, then program the debugged program in the compiler to the microcontroller.
3) When connecting the power supply, observe whether the overall circuit operates as expected, whether the motor is rotating forward, whether the motor is rotating backward, etc. According to the operation of the circuit, the wrong part of the program can be inferred. After the program is modified, it is debugged by the compiler and burned to the single-chip microcomputer, and the test is repeated until it can work normally.