TCP/IP-based remote control of a seven-DOF robotic arm
2026-04-06 07:57:02··#1
Abstract: To address the need for remote control of a seven-DOF robotic arm, a control system based on a TCP/IP network was constructed. First, a microcontroller system was designed to implement local control. Then, a TCP/IP-based remote control program was created using the WinSockets class, enabling any client connected to the Internet to remotely control the robotic arm. Combined with a video network server, real-time monitoring of the robotic arm was achieved. Keywords: Robot arm; TCP/IP; Tele-control; video network server Abstract: A tele-control system for a 7-DOF robot arm based on TCP/IP network is created. AVR singlechip is adopted to build a local control system. In order to link clients and the server in the Internet web, WinSockets class is applied to program using Visual C++. It is convenient to observe tele-operation combined with video network server in real time. KeyWords: Robot arm; TCP/IP; Tele-control; video network server The Rhino XR-2 robot [1] is a typical mechatronics product. It simulates the human upper limb. The shoulder joint can rotate from -45 to +135 degrees; the elbow joint can rotate from -135 to 90 degrees; the wrist can rotate up and down 90 degrees and left and right 170 degrees. It is a robotic arm system with 7 degrees of freedom. By properly adjusting each joint, the robot can grasp small objects from a specified position. In order to achieve remote control, a remote control system for a 7-DOF robotic arm based on TCP/IP network was constructed, as shown in Figure 1. Through this system, any client connected to the Internet can log in to the designated server to obtain operation permissions and realize remote control of the seven-degree-of-freedom robotic arm, and monitor the operation results of the robotic arm in real time through the video network server. [align=center] Figure 1 Remote control system for a seven-degree-of-freedom robotic arm[/align] 1. Design of local control system First, design the local controller. Since each joint is driven by a Brevel motor, it is only necessary to realize the individual control of each motor, including start, stop and speed adjustment, at the local end. 1.1 Local control based on ZLG7289B ZLG7289B[2] is a digital tube display driver and keyboard scanning management chip designed by Zhou Ligong Microcontroller Development Co., Ltd. It can directly drive an 8-bit common cathode digital tube (or 64 independent LEDs), and can also scan and manage up to 64 keys. ZLG7289B contains a display decoder, which can directly receive BCD code or hexadecimal code, and has two decoding methods. The ZLG7289B uses an SPI serial bus to interface with the microcontroller, occupying only a few I/O lines. In this example, an AVR mega128 microcontroller is used as the microcontroller. The ZLG7289B is used to operate the keyboard, thereby triggering different actions of eight motors to control the robotic arm. The AVR high-end chip MEGA128 has 53 I/O outputs, 8 PWM outputs, 8 external interrupts, and two 16-bit timers and two 8-bit timers. It uses a single instruction cycle, has a fast processing speed, and is sufficient to meet the computational requirements of motor control while satisfying I/O requirements. The microcontroller generates eight PWM signals, which are then used to drive the eight motors through two L298N driver modules. Each L298N driver module contains two L298N motor driver chips, 16 protection diodes, four power supply filter capacitors, two input signal logic processing units, and four motor control output sockets. Since each L298N chip controls two motors, each driver module can control four motors, as shown in Figure 2. [align=center]Figure 2 L298N Driver Module[/align] For ease of operation, an LCD module LCMxxZK is used. Its drawing display provides a 64*256 dot drawing area, has a wide power operating range (2.7V to 5.5V), and its low-power design meets the product's power-saving requirements while offering a highly flexible interface with the microcontroller. As shown in Figure 3, using the designed microcontroller control system, the robotic arm can be controlled via keyboard operation based on the prompts on the LCD screen. The operation results are also fed back to the operator through the LCD screen. [align=center]Figure 3 LCD Screen and Keyboard[/align] 1.2 Host Computer Control Based on Serial Communication To build a remote control system based on a TCP/IP network, a local server controller needs to be established. In this example, a PC is used as the remote control server and also as the host controller of the microcontroller control system. This host computer system uses a DB9-RS232 serial cable as the data bus to establish communication with the lower-level machine through serial communication. The PC transmits information such as bit selection, direction, and speed to the lower-level microcontroller AVR Mega128 via the data bus. The corresponding motor direction is controlled by setting the I/O port to 1 or clearing it, and the speed is controlled by changing the duty cycle of the PWM signal. Due to the use of the data bus, each part is independent of the others and only needs to comply with the same data transmission protocol to work, making it very easy to expand the function. Sometimes, it is not even necessary to reprogram the chip or make major modifications to the circuit board. Only some modules need to be replaced to achieve functional upgrade. The host computer control program was written using the serial port class in the Visual C++ 6.0 environment [3]. Through this program, the control of the robotic arm can be achieved using a personal PC. 2. Remote control based on TCP/IP network After designing the local control system, the speed control of each joint of the seven-degree-of-freedom robotic arm can be realized locally, so as to realize the robotic arm moving to the appropriate position to grasp the object and transfer it to another position. In order to realize remote control, a remote control system needs to be designed. Remote control based on TCP/IP Ethernet is a good choice. In this example, a remote control system based on a C/S (Client/Server) architecture is constructed. This system includes a server and a client. After receiving data from the client program, the server processes the data and then issues corresponding instructions to control the main microcontroller through serial communication, thereby controlling the corresponding actions of each joint. The functions of the server program are as follows: (1) Create a listening Socket to listen. When a client requests a connection, a new receiving Socket is established to handle the sending and receiving of data from this client; (2) Receive data sent by the client and return corresponding information to the client; (3) Process the received data and then send control commands to the lower-level microcontroller. The functions of the client program are as follows: (1) Establish a connection with the server program; (2) Send data information to the server program and receive information returned from the server program; (3) Close the connection with the server program. In the Visual C++ 6.0 environment, the WinSockets class is used to write a remote control program based on TCP/IP. The server listening program is as follows. if (Accept(*pSocket)) { pDlg->m_pAcceptList.AddTail(pSocket); CString strAddr,strAddr1; UINT unPort,unPort1; pSocket->GetPeerName(strAddr1,unPort1); //Get remote IP address and port number pSocket->GetSockName(strAddr,unPort); //Get local IP address and port number pDlg->m_strNetMsg.Format("Local IP %s port %d connected to remote client IP %s port %d", strAddr,unPort,strAddr1,unPort1); pDlg->UpdateMsgData(); } else { delete pSocket; } CSocket::OnAccept(nErrorCode); Part of its interface is shown in Figure 4: [align=center] Figure 4 Server-side interface[/align] As shown in Figure 4, the server-side control program allows operators to control the seven-degree-of-freedom robotic arm locally by clicking buttons in the figure, or it allows the client to send relevant information and the server to automatically call the corresponding function to control the robotic arm. 3. Remote Control Based on a Video Network Server To monitor the operation results of the remote control of the seven-degree-of-freedom robotic arm, a video network server is used to transmit real-time images of the robotic arm's movement to the client via the Internet. A video network server is a dedicated device that encodes and processes video data and completes network transmission. It converts the analog signals input from the camera into digital signals and then transmits them via the Internet. The client can then view the images from anywhere by accessing the Internet. It has the function of independently completing transmission, does not require a separate computer, and can achieve simple IP networking, which is impossible with traditional analog monitoring. In this example, a RILAN-F1004 four-channel video network server is used to transmit real-time images via Ethernet. This server uses an advanced operating system and video compression algorithm, making image transmission smoother and display clearer and more detailed; the system has high scheduling efficiency, stable and reliable operation, and supports remote image access via an Internet browser. Since the addresses of the server used for operation control and the video server are independent, the login for both servers is integrated into a single client interface for convenient remote operation and monitoring. After the server starts, the client can first log in to the video network server via an Internet browser. As shown in Figure 5, four video images located at different positions of the robotic arm are displayed in real-time on the left side of the interface. At this point, a request can be sent to the control server. After the server responds, it returns a signal allowing operation. The operator can then remotely control the seven-degree-of-freedom robotic arm using the control panel on the right, and simultaneously observe the robotic arm's movements in real time. The figure shows the robotic arm grasping a small object and preparing to release it. [align=center] Figure 5 Client Interface[/align] 4. Conclusion The author's innovation lies in proposing two different methods to realize local control of a seven-degree-of-freedom robotic arm using a high-end ARV microcontroller and a PC. A remote control system based on a C/S (Client/Server) structure, integrating serial port objects and WinSockets objects, was constructed. Through video information fed back from the video network server, remote control of the seven-degree-of-freedom robotic arm was effectively realized. References : 1. http://www.rhinorobotics.com [EB/OL] 2. http://www.zlgmcu.com/philips/hotic/ZLG7289.asp [EB/OL] 3. Zhu Peiwu, Xiong Guangming, Peng Bo, Gong Jianwei. LCD Chinese Character Display Method for Wireless Dispatch System Based on Rabbit 2000. Microcomputer Information. 2005, Vol. 21, No. 8