期刊文献+

基于STC单片机的两轮平衡车设计 被引量:1

Design of Two-Wheel Balancing Car Based on STC Single Chip
下载PDF
导出
摘要 本项目代码基于C语言开发,选用宏晶科技有限公司的8位单片机STC8A8K64S4A12作为主控制器,采用重力加速度陀螺仪传感器MPU-6050获取重力加速度和角度数据,通过互补滤波对获取的数据进行数据融合从而得到小车姿态。经过PID算法处理后,系统输出PWM(脉冲宽度调制)控制信号到电机驱动芯片BTN7971B,以控制小车的两个电机的正反转和转速,使小车保持平衡状态。同时,使用旋转编码器获取小车的速度信息,通过PID算法将PWM输出并加以融合,从而实现小车的速度与方向控制。 The code of this project is developed based on C language,the 8-bit single-chip microcomputer STC8A8K64S4A12 from STC MCU Limited is selected as the main controller,and the gravity acceleration gyroscope sensor MPU-6050 is used to obtain the gravity acceleration and angle data,and the obtained data is fused through complementary filtering to obtain the car attitude.After PID algorithm processing,the system outputs PWM(Pulse Width Modulation)control signal to the motor drive chip BTN7971B,in order to control the forward and reverse rota⁃tion and speed of the two motors of the trolley,so that the trolley maintains a balanced state.At the same time,the ro⁃tary encoder is used to obtain the speed information of the trolley,and the PWM output is combined through the PID algorithm to realize the speed and direction control of the trolley.
作者 戴庆 DAI Qing(School of Management Science and Engineering,Anhui University of Finance&Economics,Bengbu Anhui 233030)
出处 《河南科技》 2021年第9期15-17,共3页 Henan Science and Technology
关键词 STC8A8K64S4A12 角度检测 PID算法 互补滤波 STC8A8K64S4A12 angle detection PID algorithm complementary filtering
  • 相关文献

参考文献4

二级参考文献28

共引文献27

同被引文献6

引证文献1

二级引证文献2

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部