摘 要
随着现代化工业的发展,超声波液位检测技术已经获得越来越广泛的应用。超声波测距是一种非接触式检测技术,该技术把超声波能够定向发射以及良好的指向性能,与诸如微电子技术的电子技术相结合而完成。它能不受如光线、电磁波和尘埃等因素的影响,信息处理简单、成本底并且测量速度快。该技术在机器人与自动化应用,避障,车辆定位和导航,液位测量等中得到了广泛应用。
本文设计了一套超声波液位检测系统,该系统是一种基于AT89C51 单片机的超声波测距系统,它根据超声波在空气中传播的反射原理, 以超声波传感器为接口部件, 应用单片机技术和超声波在空气中的时间差来测量距离。测距系统主要由控制器模块、超声波发射模块、超声波接收检测模块、显示模块和温度补偿模块构成。AT89C51单片机的程序,使用Keil编译器进行设计和完成调试。在硬件电路中增加了温度补偿电路用于改善测量精度。AT89C51驱动传感器发出一个40kHz的方波信号,反射回来的超声波信号,经过放大和整形电路进入单片机,比较调试后确定其对应的距离,完成测距。这个数值通过液晶显示器实现实时显示功能。
本文介绍了超声波的特性及其测距原理、硬件电路原理、软件设计及可靠性设计。
关键词:超声波;液位检测;单片机; LCD显示单元
Abstract
With the development of modern industry, the ultrasonic detection technology has been increasingly and widely used. The ultrasonic Distance Measurement is a non-contact detection which is using a directional can be fired, point of the good features, combined with electronic technology such as micro-electronics technology to achieve. It can not be affected by factors such as light, electromagnetic waves and dust. The information processing is simple, low cost and fast. It’s widely used by robotic and automatic applications, the obstacle avoidance, vehicle positioning and the navigation, liquid level measurement and so on.
This article introduces an ultrasonic liquid level detection system based on the AT89C51 MCU(Micro Controller Unit). According to ultrasound’s reflection principles of the dissemination in the air, the system uses the ultrasound sensor as interface components and the application of the distance measure based by MCU technology, the margin of time that ultrasound transmit in air, thereby make out the final test result. The system is mainly composed by the controller module, the ultrasonic transmission module, the ultrasonic reception examination module, the display module and temperature compensation module. The program of AT89C51 MCU is designed in keil and debugged by using keil compiler. The module of temperature compensation circuit has been added to hardware circuit to improve the precision. AT89C51 drive transducer sent a 40kHz square wave signal, the reflected signal enter the 51 after the enlargement and feedback circuit, and the system will complete the range finder by debugging the corresponding distance. The ranging value is real-time displayed through the LCD.
The article introduces the characteristic of ultrasonic, the ranging principle, the hardware circuitry, the software design and dependability design.
Key words: Ultrasonic;MCU;Distance Measurement;LCD Display Unit