摘 要: 针对传统四轮移动机器人的环境适应性、行走灵活性和功能扩展性较差的问题,设计提出一套基于STM32嵌入式单片机和FreeRTOS实时操作系统的四轮移动机器人控制系统。以STM32F405RGT6单片机为底层控制主控芯片,搭载MPU6050传感器获取位姿。使用BQ7692003PWR芯片模块获取磷酸铁锂电池电芯的电压,并运用开路电压法和安时积分法精确计算电池的剩余电量,运用PI(比例积分控制)算法控制四轮速度。软件系统基于FreeRTOS实时操作系统开发,可满足软件多任务运行。实验结果表明,该控制系统具有较高的稳定性和可靠性,实现了对四轮移动机器人速度的精准控制和剩余电量的实时监控。 |
关键词: STM32;FreeRTOS;PI算法;开路电压法;安时积分法 |
中图分类号: TP249
文献标识码: A
|
|
Design of Control System for Mobile Robot Based on FreeRTOS |
CAO Jun, CHEN Jinjie
|
(School of Mechanical Engineering, Shanghai University of Technology, Shanghai 200082, China)
1228627728@qq.com; 2502526194@qq.com
|
Abstract: Aiming at the problems of poor environmental adaptability, walking flexibility and functional expansion of traditional four-wheel mobile robots, this paper proposes to design a four-wheel mobile robot control system based on STM32 embedded MCU (Micro Control Unit) and FreeRTOS real-time operating system. This control system uses STM32F405RGT6 MCU as the main control chip of bottom control, and is equipped with MPU6050 sensor to obtain the pose. The BQ7692003PWR chip module is used to obtain the voltage of the lithium iron phosphate battery cell, and the open circuit voltage method and the ampere-hour integral method are used to accurately calculate the remaining power of the battery. The PI (Proportional Integral Control) algorithm is used to control the speed of the four wheels. The software system is developed based on the FreeRTOS real-time operating system, which can meet the multi-tasking operation of the software. The experimental results show that the control system of the four-wheel mobile robot has high stability and reliability, achieving precise speed control and real-time monitoring of the remaining power of the four-wheel mobile robot. |
Keywords: STM32; FreeRTOS; PI algorithm; open circuit voltage method; ampere-hour integral method |