Authors: Xu Songqing, Wu Haibin, Lin Yi, Gao Hongzhang


Robot technology integrates theories and technologies of many disciplines such as machinery, electricity, sensors, computers, artificial intelligence, etc., and is a synthesis of many cutting-edge technologies today. Mobile robots are mainly used to explore some dangerous and unknown areas, such as exploring alien surfaces, detonating mines, etc., which require the use of mobile robots. Semi-autonomous remote-controlled mobile robots have broad application prospects in various fields such as industry, agriculture, and national defense due to their strong mobility and good controllability. In the control operation of the semi-autonomous remote control mobile robot, human participation is required. Therefore, it is necessary to have a human-computer interaction channel, which transmits the human’s instructions to the robot for execution, and the robot can also feed back the collected on-site information to the human. Based on the principle of mobile robot, this paper designs the hardware system of the two-wheel drive semi-autonomous mobile robot, and elaborates the design and implementation of the remote controller based on GPRS technology.

1 The composition of the remote control mobile robot system

The whole system consists of three parts: remote control platform, wireless transmission network and local robot car. DSP is the control core of the local robot car. TI’s TMS320LF2407A chip has an improved Harvard architecture, adopts pipeline technology and other advantages, and usesThe high-performance static CMOS/technology is adopted, and the operating voltage of the chip is reduced to 3.3V, which greatly reduces the power consumption of the chip. Its CPU has a high processing speed, the frequency can reach 40 MHz, and many complex algorithms are implemented in the system control. In addition, it also integrates powerful peripherals such as 32 KB flash memory, 16 pulse width modulation (PWM) channels, a CAN module, and an ultra-high-speed 500 ns 10-bit analog-to-digital converter (ADC).

The whole system takes F2407A as the core of the controller, and expands the man-machine interface (LCD display and key) module of the robot body, the environmental camera module, the drive motor module, the photoelectric encoder feedback module and the GPRS human-computer interaction module. The block diagram of the control system is shown in Figure 1.

1.1 The positioning module of the robot car

The robot positioning module is mainly composed of a motor and its driving circuit, a mechanical transmission system and a photoelectric encoder. Gear transmission is adopted between the driving wheel and the photoelectric encoder, the transmission ratio is i, the resolution of the photoelectric encoder is N (that is, the number of pulses output by the encoder per revolution), and the radius of the driving wheel is r, then the encoder outputs each time A pulse, the distance traveled by the corresponding wheel on the ground is

The motor control adopts the speed regulation mode of pulse width modulation (PWM), and the feedback information of the photoelectric encoder is collected by the quadrature encoding pulse (QEP) circuit built in the DSP, and the closed-loop PID control of the motor is carried out. Using the QEP circuit to capture the feedback signal of the photoelectric encoder can simplify the programming, and at the same time use the PID control principle, which can improve the control accuracy and stability of the system.

The schematic diagram of the motor drive is shown in Figure 2. The main driver chip is L293B, the allowable voltage range of the L293B DC motor driver chip is 4.5″36V, and there are four push-pull (double H-bridge integrated amplifier circuit) drive circuits, and the two channels can provide 1 A drive current to their respective motors. , and if the chip is overheated, the chip can be automatically turned off to ensure that the system is not damaged. When the A direction and the B direction are high, the motor A and B currents flow from pins 3 to 6 and 11 to 14 respectively. On the contrary, when the A direction and the B direction are low level, the motor current flows from the 6 pin to the 3 pin and the 14 pin to the 11 pin respectively, and the motor reverses. At this time, you can use the PWM to control the motor enable pin The speed of the motor is adjusted according to the on-off time. The F2407A DSP chip supports PWM output, so it can easily adjust the speed of the drive motor.

Because the DSP chip has its own quadrature encoder capture module, the circuit design of this part is relatively simple. The quadrature pulse signal output by the photoelectric encoder is stabilized by the NOT gate, and the QEP circuit entering the DSP chip is captured and recognized by the CPU, and the recognized information is used as the feedback input of the PID control algorithm.

1.2 LCD display and camera module

The data formats of the LCD display module and the camera module are both 8-bit, and the interface with microcontrollers such as single-chip microcomputers is flexible and simple. The camera module can output compressed JPEG format images, so the amount of data is small, which reduces the burden of data processing on the controller, and at the same time shortens the time for GPRS to transmit one frame of image, with better real-time performance. F2407A provides a wealth of I/O interfaces, and the I/O ports can be used to easily write and read data to the LCD module and camera module. Since the data of the LCD module is written, and the data of the camera module is read, the same group of I/O ports can be multiplexed in time-sharing without conflict. After design, different control lines are used to control the enabling ends of these two modules to realize time-division multiplexing, and both I/OPB0 and I/OPB7 of DSP are used as their data interfaces.

2 GPRS wireless image transmission

GPRS (General Packet Radio Selvice) is a packet-based wireless communication service. It is a new GSM data service that can provide wireless packet data access services to mobile users. GPRS mainly provides a connection between mobile users and remote data networks, thereby providing high-speed wireless IP and wireless X.25 services to mobile users.

The advantages of GPRS data transmission are:

◇High transmission rate;

◇Real-time online;

◇Charge by traffic;

◇ Not affected by distance;

◇Quick login.

2.1 GPRS networking mode

In this system, the bidirectional transmission of information is realized by using the GPRS mobile communication network. The data transmitted by the robot car to the remote monitoring platform mainly includes on-site image information and the current positioning information of the car; the remote monitoring platform mainly transmits the command information to the car.

GPRS image acquisition module consists of acquisition terminal, DSP peripheral interface, GPRS transceiver, PC interface and monitoring center software. After the image data is collected, it is transmitted to the GPRS transceiver 1 by the DSP serial port. The transceiver 1 sends the image data through the GPRS wireless network, and then the GPRS transceiver 2 transmits the received image data to the PC serial port, and then monitors the data. The central software reads the data from the serial port of the PC and finally displays it on the interface of the monitoring center to complete the real-time monitoring of the scene. The structure diagram of GPRS networking mode is shown in Figure 3.

2.2 Flow chart of image data acquisition program

The image acquisition process includes two parts: DSP serial communication initialization and image data transmission. The monitoring center sends out an image acquisition command, transmits the signal to the DSP serial port through the GPRS module, starts the interrupt service of the DSP serial port, collects the camera image data, and sends the data to the remote monitoring center through the GPRS module to complete the acquisition cycle of one frame of image. The image data acquisition program flow is shown in Figure 4.

The software design of DSP chip supports C language, assembly language and mixed programming of the two. Since this system involves image data processing, implementation of motor PID control algorithm and LCD display, etc., the program is complicated and the programming workload is large, so mixed programming is used. The method can better combine the advantages of C language and assembly language, and write high-efficiency program codes.

2.3 Data transfer protocol

The data transmission protocol is divided into two parts, one part is the control command sent by the corpse C to the DSP, and the other part is the feedback information sent by the DSP to the PC. The transmission format of data is in the form of data packets, so the data to be sent must be packaged each time. The specific data packet types are as follows;

Each unit of the data packet is defined as follows:

◇The start flag bit is a byte with a fixed value of 0x00;

◇The control word is a byte, and the value range is 0x0l”0xff. For the specific data type, see 2.3.1 and 2.3.2;

◇The data length unit is two bytes, and the value range is 0x0001″0xffff, in which the low byte is in front and the high byte is in the back, indicating the number of bytes of data to be sent;

◇The number of bytes of the data unit to be sent is indeterminate, and the content is determined by the specific data content to be sent;

◇The data check unit is a byte, and the value is obtained by the different OR of each byte of the data to be sent;

◇ The end flag is a byte with a fixed value of 0x01.

2.3.1 Data transmission protocol from PC to DSP

The data types sent by the PC to the microprocessor DSP include image acquisition instructions, given robot walking types and response feedback instructions. After the DSP receives various commands sent by the PC, it reads the data content, then XORs each byte of the data content, and then compares the value obtained by the XOR with the received check code, if they are equal Then feedback to the PC that the data is received correctly, and then transfer to the interrupt service routine of the corresponding instruction; if it is not equal, feedback to the PC that the data is received incorrectly, and apply for re-sending the instruction. Each command is defined as

listed in Table 1.

2.3.2 Data transmission protocol from DSP to PC

The data types sent by the DSP to the PC mainly include the current position feedback data of the robot, the image data, and the DSP response feedback commands. After the PC receives the data, the processing process for verification is the same as the processing process after the DSP receives the data described in the previous section. During the walking process of the robot car, the data of its current position will be sent to the PC at regular intervals to realize real-time path tracking. The received image data is sent to the PC for image display, which realizes the real information of the surrounding environment of the robot car.

3 Experimental results

The monitoring center software is compiled by Delphi high-level language. Enter 01 in the “Control Instruction” column (O1 represents the image acquisition instruction), click “Send”, and then the “Image Monitoring” column of the monitoring interface will display the remote environmental information collected by the camera.

During the experiment, the resolution of the camera is adjusted to 320 × 240, and the two GPRS transceivers are located at both ends of the room about 4 m apart. Figure 5 shows the experimental results. The experimental results show that the semi-autonomous mobile robot remote system based on GPRS mobile communication network and DSP technology has achieved the expected effect. At the same time, it is also found in the experiment that the real-time nature of GPRS data transmission is limited. Although the theoretical transmission rate is as high as 171 kb/s, it is actually affected by various factors, and the actual rate is low. One frame of 3K JPEG format is transmitted. The image takes about 3O”60s. Therefore, how to further improve the real-time performance of the system is the biggest challenge faced by this system.

Responsible editor: gt

Leave a Reply

Your email address will not be published.