基于STC89C52的超声波测距系统设计.docVIP

  • 101
  • 0
  • 约2.67万字
  • 约 61页
  • 2021-12-04 发布于浙江
  • 举报
摘要 摘 要 由于超声波指向性强,能量消耗慢,在介质中传播的距离较远,因而超声波经常用于距离的测量。本作品利用51单片机实现了利用超声波测量距离的目的。本系统主要由单片机模块、显示模块、超声波发送模块、超声波接受模块等四部分组成,单片机模块采用的是STC89C52,超声波产生电路由单片机直接产生,通过功率放大电路加到超声波换能器的发送端,超声波接受电路采用红外芯片CX20216A接受回波。通过三位数码管能清晰稳定的显示所测得距离。经过反复测试,本系统在2M的测量距离内所产生的误差小于1CM,所测得范围为18CM—450CM左右,能较好的完成测量任务。本作品成本低,可抗性高,测得的距离能够清晰稳定的显示在数码管上,且小巧轻便,有良好的应用前景。 关键词:单片机 STC89C52 超声波测距 ABSTRACT ABSTRACT Because of the strong point of ultrasonic energy consumption, slow, medium of communicationinthedistance,whichareoftenusedforultrasonicdistancemeasurement. This work using 51 single-chip realization of the use ofultrasonicdistance measurement purpose. This system is mainly composed of single-chip module, display module, an ultrasonic transmitting module, ultrasonicreceivingmoduleis composed of four parts, a single chip module is usedinSTC89C52,anultrasonic wave generating circuit is composed of asinglechipcomputerisproduceddirectly, throughthe poweramplificationcircuitisaddedtothesendendofultrasonictransducer, ultrasonic receive circuit using infrared chip CX20216A acceptecho.Bythree digital tube can clearly display the measured distance stability. Afterrepeated testing the system on 2M measurement distance within the resultingerrorisless than1CM, the measured range for18CMabout450CM,andbetterabletocomplete the task of measuring. This work can be low cost, highresistance,themeasured distance can be stable in the digital tube display, and portability, and hasagood application prospect. Keywords: SingleChipMicrocomputer STC89C52 UltrasonicRanging 目录 目录 目 录 TOC \o 1-3 \h \z \u 第一章 绪 论 1 1.1超声波测距的背景 1 1.2超声波测距的目的和意义 1 1.3超声波简介 2 1.4 超声波测距功能描述 3 第二章 总体方案设计 5 2.1方案设计 5 2.1.1结构要求 5 2.1.2功能要求 5 2.2 STC89C52芯片的引脚结构 6 第三章 硬件设计 9 3.1 硬件电路 9 3.1.1单片机系统及显示电路 9 3.1.2超声波发射电路 9 3.1.3超声波检测接收电路 10 3.2复位电路 11 3.3显示电路 12 3.4驱动电路 12 3.5 74LS04反相器 13 3.6总体硬件电路设计 13 第四章 软件设计 15 4.1延时程序 15 4.2 中断系统 15 4.2.1中断的概述 17 4.2.2 中断响应的一般过程 17 4.2.

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档