摘要
为了响应节能环保、绿色出行倡议,缓解城市交通拥挤状况,提出一种基于STM32F103C8T6芯片控制的两轮平衡小车设计方案。以MPU-6050作为小车姿态传感器获取小车车体倾角和角速度,基于卡尔曼滤波算法对姿态传感器采集到的的数据进行滤波融合,利用霍尔编码器测量小车车轮转向和转速,运用PID算法对控制要求和采集的数据信息进行计算分析并输出控制PWM,经由TB6612电机驱动模块驱动电机,实现小车自主平衡并具备一定的抗干扰能力。另外小车通过蓝牙模块与手机APP通信,可通过手机端控制小车前进、后退、转弯等动作。
In order to response to the initiatives of energy conservation and environmental protection,green travel,and alleviate the ur⁃ban traffic congestion,this paper introduces the design of self-balancing two-wheeled vehicle based on STM32F103C8T6 chip control.Sensors with MPU-6050 is used to obtain car attitude angle and velocity of the vehicle body.The Kalman filter algorithm is used to fil⁃ter and fuse the data collected by the attitude sensor.The Hall encoder is used to measure the steering and rotation speed of the trolley,and the PID algorithm is used to calculate and analyze the control requirements and collected data information and output the control PWM.The motor is driven by the TB6612 motor drive module to realize the autonomous balance of the trolley which has certain anti-in⁃terference ability.In addition,the car communicates with the mobile APP via bluetooth module,and the car’s forward and backward movements,turn and other actions can be controlled through the mobile end.
作者
陈昱
沈林涛
王凯
CHEN Yu;SHEN Lin-tao;WANG Kai(Shanghai Publishing and Printing College,Shanghai 200093,China;School of Optical-Electrical and Computer Engineering,University of Shanghai for Science and Technology,Shanghai 200093,China)
出处
《软件导刊》
2020年第8期117-121,共5页
Software Guide
基金
国家自然科学基金项目(61074087)。