为了实现对机器人的实时控制,要求主控制器与各个感应机构和执行机构之间高效稳定的通信;对机器人控制系统的开发,需要设计一种满足实时性和高效性要求的多机通信系统;控制系统采用二级分布式结构,主控制器作为上位机,各传感器和电机内置的微处理器作为下位机;基于AVR单片机的主从多机通信方式,利用半双工的异步串行方式通信;这种数字化的通信方式具有高效、稳定的优点,可以大大简化控制程序的开发;实验证明,应用这种控制系统的小型机器人具有灵活性高、开发周期短且稳定性高的特点。
In order to control the robot in realtime,it demands an effective and steady communication among the main controller,the sensors and the motors.Therefore,the development of the robot control system needs to design a multi-processer communication system which could meet the demands of realtime and effective control.The control system in this paper uses the second-level distributional structure.The main controller is used as the superior processer and the microprocessors in the sensors and the moters as the lower position processers.To control the robot,the main controller communicates with the slave MCUs through the half duplex asynchronous serial ports based on master-slave multi-processer communication.This method could simplify the design of the program in the main controller and improve the development of the robot.The experiment proves that the robot with this control system has higher flexibility and stability and less develop time.