盐城工学院毕业设计
摘 要
在控制领域中,经常需要进行各种位移量的测量。在实际的工业位置控制领域中,为了提高控制精度,准确地对控制对象进行检测是十分重要的。传统的机械测量位移装置已远远不能满足现代生产的需要,而数字式传感器光电编码器,能将角位移量转换为与之对应的电脉冲输出, 主要用于机械位置和旋转速度的检测,具有精度高,体积小等特点,因此本设计决定采用光电编码器进行位移检测。
本设计为采用光电编码器来实现位移测量及其仿真,实现测量来自外部的不同的位移值及显示。具体应用AT89C51单片机为核心,光电编码器进行位移测量,同时以LCD液晶显示模块显示。本设计采用的光电编码器输出电压为5V,输出信号经四倍频电路处理后送入单片机进行计数处理,最后送入LCD模块显示。
本文从位移测量原理入手,详细阐述了位移测量系统的工作过程,以及硬件电路的设计、显示效果。本文吸收了硬件软件化的思想,实现了题目要求的功能。
关键词:位移测量,光电编码器,单片机,LCD显示模块
盐城工学院毕业设计
Abstract
In the control field, a variety of displacement measurements often need to be carried out. In actual industry position control domain, to increase the control precision, carries on the examination to the controlled member is accurately very important.The traditional machinery survey displacement installs has not been able to satisfy the modern production by far the need, but the digital sensor electro-optic encoder, can transform the angular displacement into with it correspondence electricity pulse output, mainly uses in the mechanical position and the velocity of whirl examination, has the precision to be high, volume small and so on characteristics, therefore this design decided that uses the electro-optical encoder to carry on the displacement to examine.
This design to use the electro-optical encoder to realize the displacement survey and the simulation, realizes the survey from the exterior different displacement value and the demonstration. Makes concrete using at89C51 monolithic integrated circuit is the core, the electro-optical encoder carries on the displacement to survey, simultaneously by LCD liquid crystal display module demonstration. This design uses the electro-optical encoder output voltage is 5V, the output signal after four doubling circuit processing sends in the monolithic integrated circuit to carry on counting processing, finally sends in the LCD module demonstration.
In this paper, detailed working process of displacement measurement system is started with principle of displacement measurement, and hardware circuit design and display. This paper has absorbed the idea of hardware and software to achieve with the subject required functionality.
Key words: The displacement surveys, electro-optical encoder, microcontroller, LCD display
module
盐城工学院毕业设计
目 录
第一章 绪论2222222222222222222222222222222222222222222222222
1.1位移测量及其传感器简介2222222222222222222222222222222222 1.2国内外位移测量技术简介2222222222222222222222222222222222 第二章 原理说明及方案选择22222222222222222222222222222222222
2.1 位移测量理论的简要介绍2222222222222222222222222222222222 2.2 方案选择及原理222222222222222222222222222222222222222222 2.2.1鉴相原理222222222222222222222222222222222222222222222 2.2.2用软件实现脉冲的鉴相和计数222222222222222222222222222 2.2.3用硬件实现脉冲的鉴相和计数222222222222222222222222222 2.2.4用单片机内部计数器实现可逆计数22222222222222222222222 2.3 位移测量参数及电路参数分析222222222222222222222222222222 2.3.1MCS-51的定时器/计数器简介2222222222222222222222222222 2.3.2定时器模式选择位2222222222222222222222222222222222222 第三章 系统电路的设计 2222222222222222222222222222222222222222
3.1 硬件电路的设计2222222222222222222222222222222222222222222 3.1.1 单片机的选择 22222222222222222222222222222222222222222 3.1.2 AT89C51的介绍2222222222222222222222222222222222222222 3.1.3 光电编码器的选择 2222222222222222222222222222222222222 3.1.4 1XP8001-1简介2222222222222222222222222222222222222222 3.2 软件的设计22222222222222222222222222222222222222222222222 第四章 显示部分22222222222222222222222222222222222222222222222
4.1 LED显示器 222222222222222222222222222222222222222222222222 4.2 LCD显示器 222222222222222222222222222222222222222222222222 4.2.1 LCD的分类及特点 22222222222222222222222222222222222222 4.2.1笔段式LCD液晶显示器的驱动22222222222222222222222222222 4.2.2 LCD显示模块LCDM(LIQUID CRYSTAL DISPLAY MODULE)222222 4.3 LCD显示器的驱动接口 22222222222222222222222222222222222222 第五章 仿真实现222222222222222222222222222222222222222222222222
5.1 PROTEUS仿真软件简介222222222222222222222222222222222222222 5.2 KEIL与PROYEUS的联合使用2222222222222222222222222222222222 结论22222222222222222222222222222222222222222222222222222222222222 谢辞22222222222222222222222222222222222222222222222222222222222222 参考文献2222222222222222222222222222222222222222222222222222222222 附录一 系统电路原理图22222222222222222222222222222222222222222222 附录二 程序清单22222222222222222222222222222222222222222222222222 附录三 仿真电路图222222222222222222222222222222222222222222222222
盐城工学院毕业设计
第一章 绪论
1.1位移测量及其传感器简介
位移是线位移和角位移的统称。位移测量在机械工程中应用很广,在机械工程中不仅经常要求精确地测量零部件的位移和位置,而且力、扭矩、速度、加速度、流量等许多参数的测量,也是以位移测量为基础的。
位移是向量,除了确定其大小之外,还应确定其方向。一般情况下,应使测量方向与位移方向重合,这样才能真实地测量出位移量的大小。如测量方向和位移方向不重合,则测量结果仅是该位移在测量方向的分量。
位移测量时,应当根据不同的测量对象,选择适当的测量点、测量方向和测量系统。位移测量系统是由位移传感器、相应的测量放大电路和终端显示装置组成。位移传感器的选择恰当与否,对测量精度影响很大,必须特别注意。
针对位移测量的应用场合,可采用不同用途的位移传感器。表1.1-1中列出了较常见的位移传感器的主要特点和使用性能。
表1.1-1 常用位移传感器一览表
型式 滑线式 线位移 电 阻 式 变阻器式 角位移 线位移 角位移 测量范围 1~300mm 0~360° 1~1000mm 0~60r ±0.15%应变 ±0.3%应变 ±0.25%应变 变气隙型 螺管型 ±0.2mm 1.5~2mm 精确度 ±0.1% ±0.1% ±0.5% ±0.5% ±0.1% ±2%~3% ±2%~3% ±1% 直线性 ±0.1% ±0.1% ±0.5% ±0.5% ±1% 特点 分辨力较好,可静态或动态测量。机械结构不牢固 结构牢固,寿命长,但分辨力差,电噪声大 不牢固 使用方便,需温度补偿 满刻输出幅值大,温度灵非粘贴的 应 变 式 半导体的 粘贴的 度 ±20% 敏性高 ±3% 只宜用于微小位移测量 测量范围较前者宽,使用方便可靠,动态性能较差 分辨力好,受到磁场干扰时需屏蔽 电 感 式 自感式 ±0.5% 0.15 % ~1% 特大型 300~2000mm 差动变压器 ±0.08~75mm ±0.5%
盐城工学院毕业设计
±1 涡电流式 ±2.5~±250mm % ~3% 同步机 360° ±0.1°~±7° ±1% ±0.5% <3% 分辨力好,受被测物体材料、形状、加工质量影响 可在1200r/min转速工作,坚固,对温度和湿度不敏感 ±0.05% 非线性误差与变压比±0.1% 和测量范围有关 受介电常数因环境温微动同步器 旋转变压器 电 容 式 变面积 ±10° ±60° ±0.005% 10~10mm -33±1% 度、湿度而变化的影响 分辨力很好,但测量变间距 10~10mm -30.1% 范围很小,只能在小范围内近似地保存线性 霍尔元件 ±1.5mm 0.5% 2.5μm 结构简单,动态特性好 模拟和数字混合测量感应 直线式 同步 器 旋转式 10~10mm -34~ 250mm 系统,数字显示(直线式感应同步器的分辨力可达1μm) 0~360° o±0.5° 3μm 计量 光栅 长光栅 10~10mm -33~ 1m 同上(长光栅分辨力可达1μm) 圆光栅 0~360° o±0.5” 5μm 磁尺 长磁尺 10~10mm -34~ 1m 测量时工作速度可达12m/min 圆磁尺 角度 接触式 编码 光电式 器 0~360° o±1” 10rad -60~360° o0~360° o10rad -6 分辨力好,可靠性高 本设计使用了其中可直接转换成数字量的角度编码器中的光电编码器。光电编码器是一种高精度的角位移传感器。它在角度测量、位移测量和速度测量中有着广泛的应用。因其具有直接输出数字量、响应快、精度高、抗干扰能力强、分辨率高、输出稳定等特点,其应用范围不仅仅局限于角位移,角速度测量等场合,在直线位移,尤其是大位移测量领域也越来越广泛的应用。本课题即是用单片机与光电编码器来实现大位移的测量。