基于STM32的防抖勺设计
基于STM32的防抖勺设计(任务书,开题报告,论文13000字)
摘 要
生活中造成手发抖的原因很多,患者会由于手抖症状,导致很难用勺子进食。对于常年因“手抖”难以自如吃饭的患者来说 ,能够防抖的勺子可以为其生活提供便利。勺子主要由以下这几个模块组成,锂电池充电电路,电路整体由其供电;电源接口以及升压电路;锂电池电量监控电路;陀螺仪与加速度传感器;舵机接口。根据四元数到欧拉角的转换可以得到笛卡尔坐标系下的姿态角,从而可知道勺子的姿势,再利用三轴加速度传感器以及陀螺仪来控制水平,从而进行消抖【1】。
单片机在检测和控制系统中得到了广泛的应用,为了给使用患者提供生活便利,我们设计并实现了一种基于加速度计和三轴传感器的人手姿态检测系统。改用三轴坐标系方法,通过MPU6050芯片上传感器得到角速度值,结合姿态解算方法对舵机角度变化值做出判断,通过卡尔曼滤波器再对得到的数据进行滤波,补偿器算法抵消干扰。通过实验做出实物,并准确测量人手姿态并对勺子进行自动防抖控制。研究单片机自动控制在生活中的应用有十分重要的意义【2】。本文主要介绍了STM32单片机使用加速度传感器MPU6050,将加速度信号经过AD转换变为数字信号作为STM32单片机的输入信号,然后基于姿态解算方法对信号进行处理,将勺子的实时恒滚动角显示在液晶屏上,本设计在描述了外围硬件电路的同时,还做了大量的软件工作,包括加速度数据进行角度计算,PID控制算法。本次设计能够有效的提高单片机在生活中的应用程度,改善了电动餐具的自动化程度,实用价值比较高。 [资料来源:www.doc163.com]
关键词:单片机;自动控制;加速度传感器;
Abstract
There are many causes of shaking hands in life. Patients may experience difficulty with a spoon due to hand-shake symptoms. For those patients who are difficult to eat because of “hand shake” all year round, spoons that can prevent shake can provide convenience for their lives. The spoon is mainly composed of the following modules: a lithium battery charging circuit; the entire circuit is powered by a power supply; a power interface and a boost circuit; a lithium battery power monitoring circuit; a gyroscope and an acceleration sensor; and a servo interface. According to the conversion from quaternion to Euler angles, the attitude angle in Cartesian coordinates can be obtained, so that the posture of the spoon can be known, and the triaxial acceleration sensor and the gyroscope can be used to control the level, so that debounce can be performed.
Microcontrollers have been widely used in detection and control systems. In order to provide convenience for the use of patients, we have designed and implemented a human hand posture detection system based on accelerometers and three-axis sensors. Using the coordinate transformation theory, the roll angle and pitch angle of the attitude are calculated by the acceleration sensor data, and then the azimuth angle is calculated by combining the acceleration sensor data, and the sensor noise and the sensor are affected by the external magnetic field. Through experiments, physical objects are made, and the posture of the human hand is measured accurately, and automatic anti-shake control of the spoon is performed. Therefore, the research on the single-chip microcomputer automatic control system has important purpose and significance. This text mainly introduces STM32 one-chip computer to use the acceleration sensor MPU6050, change the acceleration signal into the digital signal and input the one-chip computer directly, after processing by the one-chip computer, display the real-time roll angle on the liquid crystal screen. PID control algorithm. The design effectively improves the real-time performance and control accuracy of the control system and greatly improves the automation of the living appliances, and has a high practical value
[资料来源:http://www.doc163.com]
Keyword: Microcontroller; Automatic Control; Acceleration Sensor
目 录
第1章 绪论 1
1.1 研究的目的及意义 1
1.2 防抖系统的研究现状分析 1
1.2.1 用户姿态数据测量方法 1
1.2.2 用户姿态数据处理方法 2
1.3 研究内容和方向 2
1.4 预期目标 3
第2章 防抖勺总体分析与设计 4
2.1 防抖勺主控制器介绍 4
2.1.1 STM32概述与简介 4
2.1.2 内部资源 5
2.1.3 Cortex-M3内核简介 5
2.2 供电电路设计 6
第3章 防抖勺整体硬件电路设计 8
3.1 防抖勺主体电路设计 8
3.2 锂电池供电电路设计 9
3.3 目标姿态数据采集电路设计 10
4.1 Keil开发软件介绍 13
4.2 主程序 13
4.3 位置式PID环算法子程序 14
4.4 MATLAB仿真 15
第5章 实物焊接与调试 16
第6章 总结 17
参考文献 19
附录 防抖勺程序 20
致谢 26 [资料来源:http://Doc163.com]