{$cfg_webname}
主页 > 电子信息 > 单片机 >

基于单片机的三维运动轨迹寻迹系统的研究与设计

来源:wenku163.com  资料编号:WK16314177 资料等级:★★★★★ %E8%B5%84%E6%96%99%E7%BC%96%E5%8F%B7%EF%BC%9AWK16314177
资料介绍

基于单片机的三维运动轨迹寻迹系统的研究与设计(任务书,开题报告,外文翻译,论文14200字)
摘要
本次设计是通过AT89C51单片机与舵机驱动的机械臂及单片机的外部电路组成的一个单片机控制系统来完成51单片机对机械臂轨迹的记录和重现。
本次设计的单片机控制系统中,用中断的编程方式产生PWM信号来驱动机械臂的舵机转动,而对舵机的控制是通过改变对PWM信号的高电平持续的时间来实现的,为此将单片机外接了一个矩阵键盘来实现人机交互。对于机械臂的轨迹数据,采用了AT24C02芯片来存储,而机械臂运动的轨迹则是通过嵌入在机械臂上的MPU6050模块对运动数据的捕捉来实现记录的。其中,AT24C02芯片和MPU6050模块都是采用IIC总线的结构来实现与AT89C51单片机的通信。单片机还接入了LCD1602液晶显示器,用来显示MPU6050捕获并处理后数据。由于MPU6050在获取加速度和角速度的原始数据会存在零点漂移和高斯噪声等误差,本次设计采用卡尔曼滤波算法来对这些原始数据进行滤波,从而获得更加准确的数据。
本次设计采用C语言编程,并用Proteus进行了除运动寻迹部分的仿真来辅助设计的完成。
关键词:AT89C51;IIC总线结构;MPU6050

Abstract
This design is based on a single-chip computer control system composed of AT89C51 single-chip microcomputer, the manipulator driven by the steering gear and the external circuit of the single-chip microcomputer to record and reproduce the track of the manipulator by the single-chip microcomputer 51.
In this designed single chip microcomputer control system, PWM signals are generated by interrupt programming to drive the steering gear of the manipulator, and the control of the steering gear is realized by changing the high level of the high level of the PWM signal. A matrix keyboard is connected to the computer to realize the interaction between the computer and the manipulator. The AT24C02 chip is used to store, and the trajectory of the motion of the manipulator is recorded by the capture of the motion data embedded in the MPU6050 module on the manipulator. Among them, the AT24C02 chip and the MPU6050 module are all IIC bus. To realize the communication with AT89C51 microcontroller. MCU also connected to LCD1602 , used to display MPU6050 captured and processed data. Due to the error of zero drift and Gao Si noise in the acquisition of acceleration and angular velocity in MPU6050, Kalman filter algorithm is used to filter the original data, so that more accurate data can be obtained.
This design uses C language programming, and Proteus to carry out part of the simulation to complete the design.

Keywords:AT89C51 ; IIC bus structure; MPU6050

本设计将AT24C02模块作为数据的存储器,存储机械臂运行轨迹的数据。
机械臂是由四个舵机控制的,每个舵机都需要PWM信号来驱动和控制,故而将单片机的P3^0、P3^1、P3^2和P3^3四个端口分别与机械臂的四个舵机的信号线相连接,为驱动和稳定舵机的旋转,需要外部引入一个5V的直流电源对其供电。
MPU6050模块是获取机械臂运动轨迹的数据,将其固定在机械臂上。MPU6050模块与单片机也是通过IIC总线进行通信的,故而将对应的数据总线和时钟总线与单片机上的相连接即可,MPU6050模块在IIC总线上的地址是0xD0。

目录
第1章 绪论    1
1.1研究背景及意义    1
1.2国内外研究现状    2
1.3技术路线    3
第2章技术原理与相关通信协议    5
2.1IIC通信协议    5
2.1.1IIC通信协议简介    5
2.1.2IIC通信协议模拟程序    7
2.2中断技术    9
2.3卡尔曼滤波理论    10
2.3.1卡尔曼滤波原理与运用    11
2.3.2卡尔曼滤波器算法    13
第3章系统设计与实现    14
3.1AT89C51单片机    14
3.2舵机    15
3.3MPU6050寻迹系统    16
3.3.1MPU6050模块寻迹设计    16
3.3.2MPU6050读写程序    18
3.4矩阵键盘系统    19
3.4.1矩阵键盘设计    19
3.4.2矩阵键盘程序    21
3.5LCD1602液晶显示器系统    22
5.5.1LCD1602液晶显示设计    22
3.5.2 液晶显示器驱动程序    23
3.6AT24C02存储系统    25
第4章 测试结果与分析    27
4.1PWM信号测试与分析    27
4.2静态角度测量与分析    28
4.3旋转角度测量与分析    29
第5章总结与展望    30
5.1总结    30
5.2展望    31
文献参考    32
致谢    33
 

推荐资料