毕业设计(论文)
题 目: 超声波测距仪
成都电子机械高等专科学校毕业设计(论文)
摘 要
超声波具有指向性强,能量消耗缓慢,传播距离较远等优点,所以,在利用传感器技术和自动控制技术相结合的测距方案中,超声波测距是目前应用最普遍的一种,它广泛应用于防盗、倒车雷达、水位测量、建筑施工工地以及一些工业现场。
本课题详细介绍了超声波传感器的原理和特性,以及Atmel公司的AT89C51单片机的性能和特点,并在分析了超声波测距的原理的基础上,指出了设计测距系统的思路和所需考虑的问题,给出了以AT89C51单片机为核心的低成本、高精度、微型化数字显示超声波测距仪的硬件电路和软件设计方法。该系统电路设计合理、工作稳定、性能良好、检测速度快、计算简单、易于做到实时控制,并且在测量精度方面能达到工业实用的要求。
关键词:超声波 单片机 测距 AT89C51
1
成都电子机械高等专科学校毕业设计(论文)
Abstract
Ultrasonic wave has strong pointing to nature ,slowly energy consumption ,propagating distance farther ,so, in utilizing the scheme of distance finding that sensor technology and automatic control technology combine together ,ultrasonic wave finds range to use the most general one at present ,it applies to guard against theft , move backward the radar , water level measuring , building construction site and some industrial scenes extensively。
This subject has introduced principle and characteristic of the ultrasonic sensor in detail ,and the performance and characteristic of one-chip computer AT89C51 of Atmel Company ,and on the basis of analyzing principle that ultrasonic wave finds range ,the systematic thinking and questions needed to consider that have pointed out that designs and finds range ,provide low cost , the hardware circuit of high accuracy , ultrasonic range finder of miniature digital display and software design method taking AT89C51 as the core ,this circuit of system is reasonable in design, working stability, performance good measuring speeding soon , calculating simple , apt to accomplish real-time control ,and can reach industry's practical demand in measuring the precision 。
Key Words: Ultrasonic wave; One-chip computer; Range finding; AT89C51
2
成都电子机械高等专科学校毕业设计(论文)
目 录
摘 要 .................................................................................................................................................. 1 ABSTRACT ............................................................................................................................................ 2 目 录 ............................................................................................................................................ 3 第1章 超声波测距系统设计 ......................................................................................................... 5 1.1 超声波测距的原理 ............................................................................................................. 5 1.2超声波测距系统电路的设计 ................................................................................................ 5 1.2.1 总体设计方案 ............................................................................................................. 5 1.2.2发射电路的设计 ............................................................................................................ 6 1.2.3接收电路的设计 ............................................................................................................ 7 1.2.4显示模块的设计 ............................................................................................................ 8 1.3超声波测距系统的软件设计 ................................................................................................ 9 1.4本章小结 ............................................................................................................................. 11 第2章 绪论 .................................................................................................................................... 12 2.1 课题背景,目的和意义 ..................................................................................................... 12 2.2两种常用的超声波测距方案 .............................................................................................. 12 2.2.1基于单片机的超声波测距系统................................................................................... 12 2.2.2基于CPLD的超声波测距系统 .................................................................................. 13 2.3课题主要内容 ..................................................................................................................... 14 第3章 超声波传感器..................................................................................................................... 15 3.1超声波传感器的原理与特性 .............................................................................................. 15 3.1.1原理 .............................................................................................................................. 15 3.1.2特性 .............................................................................................................................. 16 3.2超声波传感器的检测方式 .................................................................................................. 17 3.3超声波传感器系统的构成 .................................................................................................. 18 3.4本章小结 ............................................................................................................................. 19 第4章 AT89C51单片机简介 ....................................................................................................... 20 4.1单片机基础知识 ................................................................................................................. 20 4.1.1单片机的内部结构 ...................................................................................................... 20 4.1.2单片机的基本工作原理 .............................................................................................. 22 4.2单片机的分类及发展.......................................................................................................... 23 4.3单片机AT89C51的特性 .................................................................................................... 24 4.4本章小结 ............................................................................................................................. 27 第5章 电路调试及误差分析 ......................................................................................................... 28 5.1电路的调试 ......................................................................................................................... 28 5.2系统的误差分析 ................................................................................................................. 28 5.2.1声速引起的误差 .......................................................................................................... 28 5.2.2单片机时间分辨率的影响 .......................................................................................... 29 5.4本章小结 ............................................................................................................................. 30
3
成都电子机械高等专科学校毕业设计(论文)
结论 .................................................................................................................................................. 31 致谢 .................................................................................................................................................. 32 参考文献 .......................................................................................................................................... 33 附录1 ............................................................................................................................................... 34 附录2 ............................................................................................................................................... 39 附录3 ............................................................................................................................................... 40
4