摘 要
二轮自平衡小车相对于其他类型的小车来说是一种极其不稳定的小车。该系统具有多变量、非线性、参数不确定性等特性,是研究各种控制方法的理想平台。二轮自平衡小车就像以前的倒立摆一样,本身无法保持稳定的,为了使其稳定需要应用强力的控制。
本设计以51单片机为主控器。利用姿态检测电路,电机驱动电路,蓝牙模块,速度检测模块共同组成了本系统。通过单片机读取MPU-6050的数据检测小车的倾斜的方向和状态,通过51单片机运算合适的参数,驱动电机向前或向后运动,使小车达到平衡。车体平衡后使用蓝牙模块对小车发送向前或者向后的指令,使得该系统可以产生向前或者向后的移动。
关键词:二轮自平衡小车;陀螺仪;加速度计;PID控制;卡尔曼滤波
Abstract
The two-wheeled self-balancing trolley is an extremely unstable trolley compared to other types of trolleys. The system has the characteristics of multivariate, nonlinearity, parameter uncertainty, etc., and is an ideal platform for studying various control methods. The two-wheeled self-balancing trolley, like the previous inverted pendulum, cannot be stabilized by itself, and in order to make it stable, it needs to apply strong control.
This design uses the 51 microcontroller as the main controller. The system is composed of attitude detection circuit, motor drive circuit, Bluetooth module, and speed detection module. The MPU-6050 data is read by the microcontroller to detect the direction and state of the trolley's tilt, and the 51 MCU calculates the appropriate parameters to drive the motor forward or backward to make the trolley achieve balance. After the body is balanced, the Bluetooth module is used to send forward or backward instructions to the car, so that the system can produce forward or backward movements.
Key words: Two wheel self balancing trolley; gyroscope; Accelerometer; PID control; Kalman filtering
目 录
第1章 绪 论.....................................................................................
第1节 二轮自平衡小车设计的背景..............................................
第2节 二轮自平衡小车设计的目的和意义................................ 1
第3节 二轮自平衡小车设计国内外的研究状况........................ 1
第4节 二轮自平衡小车设计主要完成的内容............................ 2
第2章 二轮自平衡小车设计分析................................................... 3
第1节 系统设计思想.................................................................... 3
第2节 技术方案的比较与选择.................................................... 3
第3章 二轮自平衡小车设计方案................................................... 5
第1节 系统整体设计方案............................................................ 5
第2节 系统硬件设计.................................................................... 5
第3节 系统软件设计.................................................................... 9
第4章 二轮自平衡小车的功能与测试......................................... 12
第1节 二轮自平衡小车的功能.................................................. 12
第2节 二轮自平衡小车的测试.................................................. 12
结 论............................................................................................... 18
参考文献........................................................................................... 19
第1章 绪 论
- 二轮自平衡小车研究的背景
近年来,在欧美等国家,二轮自平衡车的研究飞速发展。提出了许多平衡控制的解决方案,验证了本系统的平衡性能和运动特性。该系统经过优化,能够迅速且容易地适用于运输、载重等多种环境。这是一个巨大的商机,一些外国企业现在正在引进已经商品化的产品,并将其推向市场。
二轮自平衡小车优点:
1.驱动功率较小,为电池长时间供电提供了可能。
2.横截面积小,可用于多种场合。
3.结构简单。
4.可实现任意半径的转向,弥补了多轮轴小车结构的缺点。
- 二轮自平衡小车研究的目的和意义
在过去的10年里,二轮平衡机器人被许多高校与科技爱好者所研究。研究出来许多自平衡的解决方案。自平衡体系先后面世。对此,国外的研究比较先进,一些典型的机器人已经研制成功。