The scheme is based on ATmega128 single chip microcomputer and wireless communication technology. The innovation is that PC control mode and individual operation mode are adopted to control the unmanned vehicle, which greatly enhances the functionality and environmental adaptability of the unmanned vehicle. The scheme can be widely used in short distance freight transportation, emergency rescue, automatic operation in harsh environment and other fields. Intelligent unmanned vehicle is a kind of crawler mobile robot. At present, most of the unmanned vehicles in the market are controlled by single-chip microcomputer. Its advantages are small volume, low cost and simple structure. But relying on single-chip microcomputer alone can not make the unmanned vehicle adjust in time in the complex and changeable working environment, and greatly limit the expansion of its function. Based on this deficiency, this design mainly uses the wireless communication between PC and the unmanned vehicle to make the unmanned vehicle complete the functions of forward, backward, turn, strike, life value display, speed regulation and automatic driving under the wireless command of PC, and obtains the environment information of the unmanned vehicle in real time through the on-board camera to realize the remote monitoring. When carrying out the task, if the communication is interfered by the enemy vehicle, the unmanned vehicle can resist the interference signal and identify friend or foe at the same time, and make timely counterattack.

  The working principle of unmanned vehicle system is as follows:When turning on the power supply of the teaching unmanned vehicle, ATmega128 MCU makes the speaker give a start prompt through the voice module. When the upper computer wireless console and PC software are ready, the PC control software sends instructions to the wireless console MCU through the USB port to configure the wireless module related registers, and the chip enters the instruction transmission mode; The lower computer is controlled by ATmega128 single chip microcomputer. After receiving the instructions from the upper computer, it generates two PWM waves and four steering control lines through its integrated PWM peripheral module. After the motor driving module increases the driving capacity, it controls the left and right motors to produce corresponding actions. For example, when the PC sends the “left turn” command, the wireless module of the lower computer will automatically return the successful response signal after receiving it successfully. Then ATmega128 MCU controls l298p through PA port to make the left motor rotate in reverse direction and the right motor rotate in positive direction, so as to realize the function of turning left; When the PC sends out the “strike” command, ATmega128 makes the infrared transmitter send out the corresponding code system infrared attack signal through the pe5 port; When the PC sends out the “automatic driving” command, ATmega128 receives the data collected by Hall sensor and coordinates the motors on the left and right sides through corresponding algorithms, so that the tank can complete the functions of straight-line walking, turning a fixed angle and driving a fixed distance. The unmanned teaching vehicle senses the attack signal of the other unmanned vehicle through the infrared sensor connected to the pe5 port. If an infrared signal is received, the pe5 port will input a fixed code signal. At this time, the main control chip will reduce the life parameters and turn off an LED light. When all the LED lights are turned off, the main control module will inform the voice chip to send out a death prompt, and the unmanned vehicle will stop all actions.

  Circuit design of motor drive module

The motor driver module is used to drive DC motor, and l298p motor driver chip is used. L298p is a product of SGS company. It is a 20 pin special motor driver chip. It contains two H-bridge dual full bridge drivers with high voltage and high current. It receives standard TTL logic level signal and can drive stepping motor and DC motor under 46 V and 2 A. It has the characteristics of high voltage and high current. The circuit design is shown in Figure 3.

  Circuit design of unmanned vehicle control system based on ATmega128 single chip microcomputer

Figure 3 motor drive module circuit design

Enable controls the motor to stop running and connects to the pe3 and PFA ports of the single chip microcomputer. The two I / O ports generate PWM waves to control the motor to rotate. Input1-input4 controls the forward and reverse rotation of the motor, which is connected to the pa0-pa3 port of the single chip microcomputer. Two DC motors are respectively connected between out1, out2 and out3, out4.

  Design of wireless module circuit

The wireless module mainly includes nRF24L01 and ATmega128. NRF24L01 adopts FSK modulation and integrates Nordic’s own enhanced short burst protocol. It can realize point-to-point or 1-to-6 wireless communication. The wireless communication speed can reach 2.4 Gbps, and FM transmission can be realized by configuring its registers. The main control chip configures nRF24L01 register through SPI protocol to initialize the wireless module and transmit data. The SPI signal line of the wireless module is connected to four I / O ports pb0-pb3 of ATmega128, and the CE end is connected to Pe2. The integrated SPI function of ATmega128 is used for communication. The circuit design of wireless module is shown in Figure 4.

  Circuit design of unmanned vehicle control system based on ATmega128 single chip microcomputer

Figure 4 circuit design of wireless module

The effective transmission distance of wireless communication of teaching unmanned vehicle in barrier free area can reach 80-100 meters. The environment information of unmanned vehicle can be obtained in real time by using on-board camera to realize remote monitoring. The innovation is that PC control mode and individual operation mode are used to control the unmanned vehicle, which greatly enhances the functionality and environmental adaptability of the unmanned vehicle. In the actual confrontation exercise, the unmanned vehicle successfully completed the functions of cargo transportation, environmental exploration, counterattack enemy vehicles in the case of interference, and achieved good control effect. The design can be widely used in short distance freight transportation, emergency rescue, automatic operation in harsh environment and other fields.

Leave a Reply

Your email address will not be published. Required fields are marked *