Design and implementation of mobile robot based on DSP
Abstract: intelligent transportation system is the development direction of urban transportation in the 21st century. As a main part of the experimental platform of intelligent vehicle control system, mobile robot is of great significance to the research of key technologies of intelligent transportation system. This paper introduces the composition and structure of sjtnc-1 mobile robot for intelligent transportation system, and describes in detail the design and implementation of the control system based on digital signal processor TMS320LF2407A
key words: intelligent transportation system mobile robot digital signal processor
the concept of intelligent transportation system (ITS) was proposed by the American Intelligent Transportation Society in 1990. It comprehensively applies advanced information technology, communication technology, automatic control technology, electronic technology and computer processing technology to the entire transportation management system, and coordinates and manages transportation through the collection, transmission and processing of traffic information, Establish a real-time, accurate and efficient comprehensive transportation management system, so as to improve traffic efficiency and safety, and realize intelligent transportation service and management
the research on the key technologies of intelligent transportation system, such as navigation and positioning of intelligent vehicles, automatic driving and control, early warning and anti-collision of vehicles, has attracted more and more attention at home and abroad in recent years, and has achieved fruitful results. However, there are few real experimental studies, and basically only simulation experiments have been carried out. In view of the fact that the theoretical simulation and practical application may be far from each other, the vehicle type mobile robot with the advantages of intelligence, scalability and mobility is selected as the main part of the research platform of its key technology - vehicle simulator
the mobile robot sjtnc-1 described in this paper is proposed for its. Considering that a large number of calculations are needed in the research of key technologies, such as fuzzy control, Kalman filter and path guidance, and the system has high requirements for real-time data, digital signal processor (DSP) is used as the main CPU of mobile robot
1 introduction to TMS320LF2407A
tms320lf2407a (hereinafter referred to as f2407) is designed by TI company for digital motor control based on TMS320 series DSP. In addition to the improved Harvard structure, multi bus structure and pipeline structure of general DSP, it also adopts high-performance static CMOS technology, and the voltage is reduced from 5V to 3.3V, reducing power consumption. And the instruction execution speed is increased to 40mips, and almost all instructions can be completed in a single cycle of 25ns. Such a high operation speed makes it possible to improve the performance of the system by using advanced control algorithms such as fuzzy control, Kalman filter and state control. Moreover, it has necessary peripherals for motor control applications, such as 32K on-chip flash, 2K single access ram, serial peripheral interface (SPI), serial communication interface (SCI), two event management modules, 16 channel double 10 bit a/d converter and can controller module
2 mobile robot's motion mechanism
considering that the mobile robot is oriented to its, it adopts the vehicle structure (four-wheel structure). The first two wheels are connected with the steering motor through a gear reduction mechanism with a reduction ratio of 8:1 to realize the steering function of the mobile robot; The latter two wheels are connected with the driving motor through a gear reduction mechanism with a reduction ratio of 6:1 to realize the driving of the mobile robot. Small stepping motor or small DC motor can be selected according to the actual situation. The DC motor produced by Swiss minimotor company is selected here, which has the characteristics of small size and large torque
3 mobile robot control system
the control system takes the controller f2407 as the core, and is composed of wireless communication, motor drive, speed sensor, digital compass, differential GPS (DGPS) receiver and 4-turn-1 serial port communication module, as shown in Figure 1. The wireless communication module receives the planned path information from the upper computer according to the self agreed communication protocol. The whole control system makes the mobile robot track the path by controlling the drive motor and steering motor. The motor adopts PWM speed regulation mode, in which the driving motor adopts double closed-loop (speed and current) PID control strategy, while the steering motor uses the heading information of the digital compass as the feedback of steering to carry out PID control. The whole control system takes the position information of DGPS receiver as the position feedback information of the system to complete the position closed-loop control of the whole system
3.1 wireless communication module
mc35 is a redevelopable dual band GSM module supporting GPRS produced by Siemens in Germany, which can be connected to PC through standard serial port. This system uses MC35 as the communication module between mobile robot and host computer. It has all the advantages brought by GPRS technology, such as providing high-speed and cheap data transmission services. The features of the product are as follows:
· support dual band: egsm900/gsm1800
· support GPRS Class8 protocol
· support data, voice, SMS and fax services
· adopt circuit switching mode, and the maximum transmission rate is 14.4kbps
· support voltage range: 8V ~ 30V
· adopt standard industrial interface
· weight: 130g
3.2 drive module
the drive motor and steering motor have the same drive principle, both of which adopt pulse width modulation (PWM) mode for speed regulation, and the PWM signal is generated by f2407. The drive circuit adopts h full bridge mode, which is composed of four Darlington tubes (two TIP132 and two TIP137), four in4001 diodes and NAND gates. The circuit schematic diagram is shown in Figure 2. When pwm2 and pwm4 are at low level and pwm1 and pwm3 are at high level, T1 and T4 are saturated and conductive, T2 and T3 are cut off, the current changes from T1 → motor → T4, and the motor rotates forward; On the contrary, when pwm1 and pwm3 are at low level and pwm2 and pwm4 are at high level, T2 and T3 are saturated, T1 and T4 are cut off, and the current is from T2 → motor → T3, and the motor is reversed
in order to prevent T1, T3 or T2, T4 from conducting at the same time, forming a short circuit and breaking down the device, a pair of non overlapping PWM outputs should be used to correctly open and close these two tubes. Add a dead time between the shutdown of one pipe and the opening of another pipe, so that the other pipe has been completely shut down before one pipe is opened. F2407 has a dead time control unit, which is a major feature of f2407. Therefore, software can be used to ensure that the opening intervals of the upper and lower bridge arm switching elements of the power circuit do not overlap, simplifying the hardware circuit design and improving the reliability
3.3 4-turn-1 serial port communication module
because DGPS receiver, magnetic compass, odometer and MC35 communication module all adopt RS-232 asynchronous serial communication, while f2407 has only one serial port, so the serial port communication with f2407 must be completed by converting the four serial port data. Therefore, a 4-to-1 serial communication module based on time-sharing multiplexing method is developed. When f2407 needs the data of a sensor (or wireless communication module), it will gate the sensor through the circuit and occupy the f2407 serial port for communication; When the data of another sensor or wireless communication module is required, turn off the gating of the last sensor and gate the sensor or wireless communication module at the same time. The 4-to-1 serial port communication module is composed of a decoder 74LS138, a three state output four bus buffer gate 74ls125, and a level converter MAX232. Its circuit schematic diagram is shown in Figure 3
3.4 positioning sensor
3.4.1 DGPS receiver
gps (Global Positioning System) is a satellite based radio navigation system, which provides a cheap and practical tool that can determine position, speed and time on a global scale. GPS consists of 24 satellites (21 working stars and 3 backup stars). The constellation is distributed on six orbital planes with an inclination of 55 ° to the equatorial plane of the earth. Its operation cycle is 11 hours and 58 minutes, the orbital radius is 20200km, and the included angle of each orbital plane is 60 °. Each satellite transmits L-band ultra-high continuous wave to the earth and modulates two kinds of pseudo-random codes (military high-precision secret P code and civil c/a code). This distribution ensures that users can continuously receive navigation signals from at least four satellites at any place and at any time on the earth, so as to calculate the three-dimensional coordinates of the receiver and the time offset between the receiver and GPS simultaneously. The three-dimensional coordinate system adopts ECEF Cartesian coordinate system or geodetic coordinate system, such as WGS84
although the U.S. government canceled the optional protection of civil c/a code in May 2001, the single point real-time positioning accuracy of civil navigation GPS receiver can only reach about 25m, which can not meet the positioning and navigation requirements of the system. With real-time differential GPS (DGPS), the positioning accuracy can reach 2 ~ 5m, which can meet the requirements of system positioning and navigation
for this purpose, a single base station DGPS (srdgps) system is developed, and its structural block diagram is shown in Figure 4. The reference station is composed of allstar base GPS receiver, antenna, MDS radio transmitter and antenna, and the mobile station is composed of superstar GPS receiver, antenna, mdx radio receiver and antenna. Among them, the reference station is installed on the roof of the first floor of teaching in Xujiahui campus of Shanghai Jiaotong University. The reference station can cover a radius of 30 kilometers, and the mobile station is installed on the vehicle unit
3.4.2 digital compass and speed sensor
HMR 3300 digital compass of Honeywell company is used as the direction detection sensor of mobile robot. Its main technical indicators are: (1) 1 degree heading accuracy, 0.1 degree resolution; (2) 0.5 degree repeatability; (3) ± 60 degree tilt and pitch range; (4) 15Hz response time; (5) -40 ± 85 ℃ working temperature; (6) 6 ~ 15V DC voltage
at the same time, the Hall speed sensor for Volkswagen Santana 2000 car is used as the speed sensor of mobile robot. Its working principle is that the hall sensor is used as the conversion element to convert the mechanical rotation into electrical pulse signal output. The main technical indicators are: (1) the output waveform is rectangular pulse, and the duty cycle is 50%; (2) Generate 6 pulses per revolution; (3) The rated voltage is 12V
4 power module
the power module needs to supply power to each sensor, DSP chip, other chips and motor respectively. Among them, after the magnetic compass, code disk and DG are amplified by high-speed amplifier, the PS receiver uses 12V DC voltage, the DSP chip uses 3.3V DC voltage, other chips use 5V DC voltage, and the motor power supply uses 12V DC voltage. Therefore, a 12V DC battery (4ah) is used, and the DC 5V is realized by the l7805 of St semiconductor company and the power tube for current expansion. The 3.3V power supply for DSP chip is realized by the 1smb5913bt3 of on semiconductor company. When f2407 works normally, all power pins are 3.3V; When writing flash memory, vccp pin supplies 5V power; During reset, the reset circuit will generate a 10 μ The continuous low level of s width resets the chip
5 controller program structure
dsp program is composed of five functional modules, including system initialization module, serial port communication module, path guidance module, drive motor control module and steering motor control module. Ti provides CC and CCS platforms for C language development. The platform includes ANSI C optimization compiler, which can be developed and debugged at the source program level. This method greatly improves the development speed and readability of the software, and facilitates the modification and transplantation of the software. However, in some cases, the efficiency of the code cannot be compared with the efficiency of manually written assembly code. In addition, using C language to realize some hardware control of the chip is not as convenient as assembler, and some can't even be realized in language. In order to make full use of chip resources and give better play to C language and assembly language
Copyright © 2011 JIN SHI