Design of remote control robotic arm based on serial communication and microcontroller
Networked operation and remote control have become the research directions of many enterprises and scientific research institutions. To manage and control on-site equipment, it is necessary to communicate with these equipment and exchange relevant data to achieve the purpose of management, control and monitoring. Similarly, in the embedded field, in order to achieve remote monitoring, it must also be based on the network. Manipulators operating underwater or in harsh environments require remote control at certain times. It has become possible to remotely control the robot to perform operations over the network.
In remote control, communication is a technical issue worth discussing. Traditional communication is limited to communication outside the network, such as communication between two PCs, or the upper computer is a PC and the lower computer is a single-chip microcomputer. In the remote control manipulator system, remote serial communication based on the Internet is used. Remote serial communication refers to the long-distance communication between the client and the lower computer or communication object through the serial port, and traditional remote communication is only one of them. In one part, the client sends instructions to the lower computer to the control component, thereby realizing remote monitoring.
1. Basic structure and implementation of remote serial communication system
(1) Overview of basic structure
In the software system architecture, C/S and B/S are the two mainstream technologies in the development model technical architecture in today's world.
The C/S mode adopts a two-layer architecture, namely client and server. Through this architecture, the advantages of the hardware environment at both ends can be fully utilized, and tasks are reasonably allocated to the client and server. The client performs the display interface and Transaction processing, the server performs data processing and response request processing. Client software needs to be installed on the client to access the server. Not only is software upgrade inconvenient, but it also increases client load and investment costs.
The B/S (Browser/Server) structure is the browser and server structure. It is a change or improved structure to the C/S structure with the rise of Internet technology. Under this structure, the user work interface is implemented through the browser, a very small part of the transaction logic is implemented on the front end (Browser), but the main transaction logic is implemented on the server side (Server), and the data processing is performed by the database server, forming a so-called Three-tier structure. This greatly simplifies the client computer load, reduces the cost and workload of system maintenance and upgrades, and reduces the overall cost of the user. However, only in B/S mode, direct data communication with the controlled object cannot be achieved.
The remote serial communication based on the B/S mode to realize data communication with the controlled object adopts a four-layer architecture, adding a control layer. The browser side is the presentation layer, the WEB server is the functional layer, the database server is the data layer, and the control layer The layer transmits instructions to the control server through the WEB server. The control server serves as the upper computer and controls the lower computer through the serial port until the control execution component is controlled. Not only is the control layer added, but the functional layer and data layer are also expanded. This architecture not only has the excellent characteristics of the B/S mode, but also adds control service functions, makes full use of existing network resources and industrial site resources, and organically combines the two to achieve the goal of communicating with the controlled equipment. The purpose of remote communication through the serial port. The presentation layer, function layer, data layer and control layer are both interconnected and relatively independent. Each layer is connected through the Internet and communicates information through the HTTP protocol and serial communication protocol.As shown in Figure 1
(2) Functions and implementation of various components of remote serial communication
(1) Browser side: The user logs in to the web server through the browser, enters the user name and password, and after passing the verification by comparing it with the data in the database, becomes a legal user, and then enters the control data in the corresponding form. After pressing the submit button, the data is transferred to the web server. The browser side serves as the display side and can display the feedback position of the remote execution component.
(2) WEB server: It can receive the control data sent from the browser, process the corresponding data, and then send the data to the control server, or directly serve as the control server and send the data to the execution component through the serial port.
(3) Database server side: Store the username and password of legal users for verification. At the same time, when sending execution data, if specific conversion data is needed, it can also be obtained directly from the database. Implement system data processing and feed back the running results to the web server.
(4) Control server: as a host computer that directly sends commands to the execution component through the serial port, or directly by the web server itself. Receive data received by the web server from the browser. The data is sent to the lower computer through the serial communication protocol and handshake signal.
(5) Lower computer: Receives the execution data of the control server (upper computer) through the serial port communication protocol, and then drives the execution components to work through the corresponding drive circuit.
(6) Execution component: Work according to the transmitted instructions, and convert the current position and attitude of the execution component into data through the sensor, and then send it back to the control server through the serial port until it reaches the browser, so that the user is not at the scene of the execution component. Can be controlled remotely and get the effect after component execution
In the browser, after login verification, the data is transmitted to the web server through the HTTP protocol, and then to the control server. The control server serves as the host computer, opens the serial port, and sends data to the lower computer through the communication protocol. According to the communication protocol, the lower computer receives the data sent by the upper computer, starts the D/A converter, and controls the execution component. At the same time, the attitude of the execution component is fed back to the host computer through the sensor. The lower computer can be a microprocessor such as a microcontroller, DSP, or ARM.
2. Implementation of remote control robot system
Web-based remote control of the manipulator requires remote control of the manipulator to operate in harsh working environments such as high temperature and underwater. The control data is input remotely through the browser and transmitted to the main control computer through the network. The main control computer adopts an ordinary PC. The main control computer sends the data to the lower computer through the serial port. The 89C51 single-chip microcomputer is used as the direct control computer in this operating manipulator system. . At the scene, the attitude of the operating manipulator is fed back to the remote control machine through the monitoring equipment, and at the same time, the on-site data is collected through sensors and returned to the control machine. Figure 2 is a schematic diagram of the system for remote control of the operating robot.
Log in to the server served by the host computer on the browser side, and after obtaining legal identity verification, send the data. After receiving the information, the main control computer sends the data to the direct control computer 89C51 through the serial port.
(1) Hardware components of the microcontroller system
(1) Using 89C51 as the core of the microprocessor, expand RAM6254, latches, clock circuits, reset circuits, etc.
(2) Serial communication circuit: When the host computer transmits data to 89C51, serial communication is used. The commonly used serial communication bus interface is RS-232C developed by the American Electrical Association EIA. Since the serial ports TXD and RXD of the microcontroller are both TTL levels, and the PC is configured with the RS-232C standard serial interface, level conversion must be performed during application. In the work robot control system, MAX232 is used as the interface conversion chip.
(3) Digital-to-analog conversion circuit: Through the serial port, the main control computer sends the action command data of the manipulator to 89C51, and 89C51 sends the data to the D/A conversion circuit data port through the bus. In this system, the DA0832 digital-to-analog conversion chip is used. accomplish.
(4) Drive circuit: The operating power of the manipulator comes from the hydraulic system. The servo valve is used to realize the loop control of the manipulator. To drive the servo valve, a corresponding drive circuit is designed.
(5) Analog-to-digital conversion circuit: Use an angle potentiometer and a displacement sensor to collect the actual operating data of the manipulator. After the sensor is calibrated, the collected displacement and angle analog signals must be converted into digital signals and sent to the 89C51, and then sent upward. This system uses AD0809 analog-to-digital conversion chip.
(2) Implementation of main control computer and microcontroller software system
(1) Main control computer program
The main control computer is a PC. VC++ is used to develop the control interface. The serial port communication protocol is initialized through the serial port control MSComm. The data sent from the WEB to control the manipulator is extracted from the background database SQLServer to control the execution angle of each joint of the manipulator. , while waiting to receive the data sent back by 89C51. The flow chart of the software system is shown in Figure 3.
(2) 89C51 microcontroller main program
As a direct control computer, 89C51 uses C language to write the main program, initialize the serial port, allocate memory buffers to store received data, enable interrupts, and wait for external data to be sent and received in the form of interrupts. The main program flow chart of 89C51 is shown in Figure 4.
(3) 89C51 interrupt processing subroutine
In the interrupt subroutine, the interrupt flag is first cleared, and then it is judged whether the interrupt is caused by reception or transmission, and is processed according to the corresponding interrupt source. The flow chart of the 89C51 interrupt processing subroutine is shown in Figure 5.
The author's innovation in this article is to connect the 89C51 microcontroller with the operation of the manipulator, and achieve the remote control of the manipulator laboratory through network remote communication, which provides a specific example reference for the research of remote control operations. Currently, the system realizes online sending The data is sent to the main control computer and stored in the database. It is necessary to manually mobilize the data on the main control computer to control the manipulator. Being able to completely separate from human intervention and control operations directly through the network is still under further research. Experimental applications and the market have proved that in today's and future of network modernization, remote communication will definitely appear in human life in the future, which has considerable research significance and practical value.
#Design #remote #control #robotic #arm #based #serial #communication #microcontroller
- Reducing halide segregation in wide-bandgap mixed-halide perovskite solar cells using redox mediators
- Advantages and applications of Aigtek power amplifiers
- Microchip further expands its mSiC solutions with the introduction of 3.3 kV XIFM plug-and-play mSiC gate drivers,
- What is NAND type Flash memory?
- Data leaks can sink machine learning models
- What does the AC voltage regulator indicate when it is overvoltage?
- Adjustable voltage stabilized power supply circuit diagram based on LM317
- Demystifying Qualcomm Domain Controller Level 1 Power Design: Power Supply Design and Computation
- EU consumers challenge Meta paid service as privacy ‘smokescreen’
- Qualcomm Snapdragon