当前位置:文档之家› 基于51单片机的位移测量系统的设计

基于51单片机的位移测量系统的设计

摘 要

在现代工业生产过程中,常常需要测量很多不同的位移量。与此同时对位移量进行较为精确地检测,是提高控制精度的基础。因此之前所普遍采用的传统位移测量装置已经不能适应时代发展的潮流。在此情况下通过科研人员的不断努力终于研制出了数字式光电编码器,它的输入量是角位移量其输出量是相应的电脉冲,并且它有体积小,精度高的优点。故而,这次毕业设计选用的是光电编码器 。

本次毕业设计是以AT89C51单片机为核心,用光电编码器来实现对位移量的精确测量,再将测量结果显示在LCD液晶显示器上。其中本次设计中所选用的是输出电压为5V的光电编码器。

本文由浅入深先介绍了一些关于位移测量的基本原理,进而阐述了各个模块的设计思路,工作过程以及显示效果。本文借鉴了一些当前较为流行的设计思想,例如硬件软件化,很好的满足了设计要求。

关键词:位移, 测量,光电编码器,单片机,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

目 录

第一章 绪论·················································

1.1位移测量及其传感器简介··································

1.2光栅位移测量技术简介··································

第二章 原理及方案说明···································

2.1 方案选择及原理··········································

2.1.1鉴相原理·············································

2.1.2脉冲的鉴相和计数的软件实现方法···························

2.1.3脉冲的鉴相和计数的硬件实现方法···························

2.1.4用单片机内部计数器实现可逆计数·······················

2.2位移测量参数及电路参数分析······························

2.2.1MCS-51的定时器/计数器简介····························

2.2.2定时器模式选择位·····································

第三章 系统电路的设计 ········································

3.1 硬件电路的设计···········································

3.1.1 单片机的选择 ·········································

3.1.2 AT89C51的介绍········································

3.1.3 1XP8001-1简介········································

3.2 软件的设计···············································

第四章 显示部分···············································

4.1 LCD显示器 ················································

4.2 LCD分类及特点 ······································

4.3 LCD1602液晶显示器································

第五章 仿真实现················································

5.1 PROTEUS仿真软件简介·······································

5.2 KEIL软件的简介··································

结论······························································

致谢······························································

参考文献··························································

第一章 绪论

1.1位移测量及其传感器简介

位移包括线位移和角位移。在工业生产过程中需要大量的位移检测,而且位移检测还是测量诸如力、扭矩、速度、加速度、流量等参数的基础。

位移是矢量,其不仅具有大小,而且还具有方向。在实际测量中,应使二者方向重合,这样才可以得到比较满意的测量结果。若二者的方向不重合,则会使测量结果产生较大的误差。

在具体测量时,要依据测量对象的不同,而灵活选择测量点、方向与系统。位移传感器,放大电路以及显示器组成了位移测量系统。其中选用合适的位移传感器是本次设计的关键。

应用场合不同,所选用的传感器也不同。表1.1-1中是一些主要位移传感器的性能与特点的介绍。

表1.1-1 常用位移传感器一览表

型式 测量范围 精确度 直线性 特点

式 滑线式 线位移 1~300mm ±0.1% ±0.1% 分辨力较好,可静态或动态测量。机械结构不牢固 角位移 0~360° ±0.1% ±0.1%

变阻器式 线位移 1~1000mm ±0.5% ±0.5% 结构牢固,寿命长,但分辨力差,电噪声大 角位移 0~60r ±0.5% ±0.5%

式 非粘贴的 ±0.15%应变 ±0.1% ±1% 不牢固

粘贴的 ±0.3%应变 ±2%~3% 使用方便,需温度补偿

半导体的 ±0.25%应变 ±2%~3% 满刻度 ±20% 输出幅值大,温度灵敏性高

式 自感式 变气隙型 ±0.2mm ±1% ±3% 只宜用于微小位移测量

螺管型 1.5~2mm 测量范围较前者宽,使用方便可靠,动态性能较差 特大型 300~2000mm 0.15

%

~1%

相关主题