1、I 两轮自平衡小车的设计 摘要 最近这几年来,自平衡电动车的研发与商用获得了快速发展。自平衡车具有 体积小, 运动十分灵活,便利,节能等特点。本文提出了一种双轮自平衡小车的设计方案,机械结 构采用了双轮双马达驱动;控制主要采用的是反馈调节,为了使车体更好的平衡,使用了 PID调节方式; 硬件上采用陀螺仪GY521 MPU-6050来采集车体的旋转角度以及旋转角加速 度,同时采用了加速度传感器来间接测量车体旋转角度。采用意法半导体ST公司的低功耗 控制器芯片stm32作为主控, 采集上述传感器信息进行滤波, 分析等操作后进而控制马达的 驱动,从而达到反馈调节的闭环,实现小车的自动平衡。系统设计,
2、调试完成后,能够实 现各个功能部件之间协调工作,在适度的干扰情形下仍然能够保持平衡。同时,也可以使 用手机上的APP通过蓝牙与小车通信控制小车的前进和后退以及转弯。 关键词:关键词:自平衡小车 陀螺仪传感器 滤波 APP II Design of Two-Wheel Self-Balance Vehicle Abstract In the last few years, with the development of commercial self balancing electric vehicle was developed rapidly. Self balancing vehicle
3、has the advantages of small volume, the movement is very flexible, convenient, energy saving etc This paper presents a two wheeled self balancing robot design, mechanical structure adopts double motor drive; controlled mainly by the feedback regulation, in order to make the balance of the body bette
4、r, with the PID regulation; hardware using gyroscope GY521 mpu-6050 to collect the rotation angle of the car body and the rotation angle acceleration. At the same time, acceleration sensor to measure indirectly body rotation angle. St, the low power consumption controller STM32 chip used as the main
5、 control, collecting the sensor information filtering, analysis backward and control motor drive, so as to achieve close loop feedback regulation, the realization of the car automatic balance. System design, debugging is completed, the coordination between the various functional components can be ac
6、hieved, in the case of moderate interference can still maintain a balance. At the same time, you can also use the APP on the mobile phone with the car to control the cars forward and backward and turning. Key Words: Self balancing car gyroscope sensor filter APP III 目 录 1.绪论 1 1.1 研究背景与意义 . 1 1.2 自平衡小车的设计要点 . 1 1.2.1 整体构思 1 1.2.2 姿态检测系统 1 1.2.3 控制算法 2 1.3 本文主要研究目标与内容 . 2 1.4 论文章节安排 . 错误错误!未定义书签。未定义书签。 2. 系统原理分析4 2.1 控制系统要求分析 . 4 2.2 平衡控制原理分析 . 4 2.3 自平衡小车数学模型 . 5 2.3.1 两轮自平衡小车受力分析 5 2.4