摘要 摘要 超声波是频率高于 20KHZ 声波具备指向性强,能量消耗迟缓,在介质中传输距离较远,因而超声波经惯用于距离测量,如测距仪和物位测量仪等都能够经过超声波来实现。利用超声波检测往往比较快速、方便、计算简单、易于做到实时控制,而且在测量精度方面能达成工业有用要求,所以在液位、井深、管道长度测量、移动机器人定位和避障等领域得到了广泛应用。基于此,此次设计尝试使用 AT89S52 与 HC-SR04 模块来实现超声波测量,结合外围电路模块实现距离显示及报警组成超声波测距系统。 此次超声波测距系统由单片机计时及控制电路、超声波发射接收模块、测量距离显示电路、报警电路等部分组成。详细介绍了超声波测距模块及 AT89S52 单片机测距原理。以 HC-SR04 超声波测距模块为关键实现超声波发射与接收。显示电路实行数码管以及三极管显示控制,报警电路由蜂鸣器与三极管组成。整体电路结构简单,成本低廉,工作稳定,测量精度也达成实际应用要求。 关键词:超声波 测距 单片机 HC-SR04 Abstract Abstract Ultrasound is sound waves with frequency higher than 20KHz, it has strong directivi consumes energy slowly, at the same time it spreads farther in the same medium. Therefore ultrasound is often used for distance measurement, such as the range finder and level measurement and so on can be achieved by it. Use of ultrasonic detection tends to be convenient and simple calculation, easy to do real-time control. In the measurement precan reach industry practical requirement. So in liquid level, well depth, pipe length measurement, mobile robot localization and obstacle avoidance, etc a wide range of applications. This ultrasonic ranging system consists of the single-chip microcomputer timer and circuit, ultrasound transmitting and receiving modules, the distance display circuit, alarm circuits and other components. Detailed introduces the ultrasonic ranging module and AT MCU range finder principle. HC-SR04 is the core of the ultrasonic transmitter and recei result displays w...