Robots , one of humanity's greatest inventions of the 20th century, have undergone rapid changes in just 40 years. With the development of computer technology, communication technology, sensor technology, and other technologies, interaction between robots has become a major focus of robotics technology.
This paper designs a robot chasing control system based on the Motorola MC68HC08 series microcontroller to study simple interactions between robots.
Mobile robot behavior description
In this system, we name two mobile robots "Cat" and "Mouse." When neither robot can receive a signal from the other, "Cat" moves in an S-shape, while "Mouse" swings 180 degrees in place. When "Cat" detects a signal from "Mouse," it chases after "Mouse" in a straight line, while "Mouse," simultaneously receiving the signal from "Cat," moves forward in a straight line to evade "Cat's" pursuit until it escapes "Cat's" reception range, repeating the behavior when no signal is received. If "Cat" cannot detect "Mouse" for a period of time, it sounds an alarm. Throughout the process, due to the unknown environment, both "Cat" and "Mouse" have obstacle avoidance controls, and different music can be played according to different behavioral states.
System hardware design
The circuit designs of the "cat" and "mouse" robots are basically the same, both consisting of a microcontroller system, an infrared transceiver module, a motor control module, and a voice module. The difference lies in the arrangement of the infrared transmitter and receiver arrays. The microcontroller used is the Motorola M68HC908GP32 8-bit microprocessor (42-pin package); the infrared transceiver module uses a simple infrared transceiver circuit composed of a PT2262 and an amplifier; the motor control module uses an L293D for motor drive; and the voice module uses an ISD25120 for sound playback. Additionally, the system power module uses a 12V dry cell battery.
single-chip microcomputer system
The MC68HC08 series microcontrollers are 8-bit microcontrollers launched by Motorola in 1999, featuring high speed, powerful functions, low power consumption, and low price.
The MC68HC908GP32 microcontroller we chose for our design is among the first products in the MC68HC08 series. It features abundant on-chip resources, high performance, low price, and multiple protection functions, making it suitable for various data processing platforms. Here, we primarily use it for infrared information fusion, motor control, and voice playback control.
In the design, the main ports of the microcontrollers on both robots are set up identically, as shown in Table 1. Additionally, the three contact switches for collision avoidance are PTB0, PTB6, and PTA7.
Infrared transceiver module
The infrared emitting module uses an infrared emitting circuit composed of a PT2262 and an infrared emitting diode array. The infrared receiving circuit consists of an infrared receiving diode array and an amplifier. The received signal is input to the PTB7 port of the microcontroller, and after A/D conversion, it is sent to the processor to control the robot's behavior.
Motor control module
The motor drive circuit uses the L293D integrated circuit based on bipolar H-bridge pulse width modulation (PWM). The L293D offers many advantages, such as continuous current; four-corner operation capability; micro-vibration current when the motor stops, acting as "dynamic lubrication" and eliminating static friction dead zones in both forward and reverse directions; and good low-speed stability. The L293D generates an enable signal through internal logic. The input to the H-bridge circuit can be used to set the motor's rotation direction, and the enable signal can be used for pulse width modulation (PWM). Furthermore, the L293D integrates two H-bridge circuits onto a single chip, meaning that two motors can be controlled simultaneously with a single chip.
The robot has three wheels: two motor-controlled and one omnidirectional wheel. Therefore, a single L293D chip is sufficient for control. Connect the two PWM control signals to the enable pins EN12 and EN34 for the two motor controls, respectively. Adjusting the PWM duty cycle allows for adjustment of the motor speed. Connect the forward and reverse control lines to IN1, IN2, IN3, and IN4, respectively. Writing different values controls the forward and reverse rotation of the two motors.
Voice module
To differentiate the various states of the mobile robot, we enabled it to play different sounds simultaneously with different actions. For this purpose, the voice control section uses the ISD25120 voice chip. The ISD25120 has a recording and playback time of 120 seconds and can record up to 600 segments. As long as addresses A0"A9 are assigned values before segmented recording/playback operations (at least 300 nanoseconds), both recording and playback functions will start from the set starting address.
In the design, in addition to using a microcontroller to control the reset and trigger terminals of the ISD25120, a four-bit I/O control chip is used to set the playback start address. During initialization, different information for the two robots is written to A0"A3 of the voice chip to select playback. During the operation, when the behavior changes, new information is written to change the playback selection and play different music.
System software design
The system software mainly consists of a main program module, an interrupt service routine module, a voice control module, and a motion planning module. The entire system software is written in assembly language.
in conclusion
Experiments have demonstrated that the two robots can correctly complete the chasing and running motion without external interference. This design provides an experimental platform for studying simple interactions between robots. Future research will allow for alterations to the sensor positions and internal programming, potentially changing the interaction between the two robots, such as their ability to cooperate, enabling more in-depth investigation.