1、 1 摘要 二十一世纪是高科技时代,科技正在发展,一些传统的测控方式也会随着科 技的发展而改革更新。 现代的工业、 农业的生产中不仅要求液位控制系统更精准, 更稳定,还要求其更新自动化程度快和性价比高。基于单片机的液位控制系统具 有测量精准度高、性能稳定可靠、能量消耗低而使用寿命较长的特点,将科学与 液位测量相结合,而达到合理调配资源,降低能源消耗的目的。 超声波能在不同媒质中传播,且方向性强,传播距离远,消耗能量缓慢,碰 到障碍物会产生反射,形成反射回波。所以超声波常常被用于测量距离。本设计 采用超声波模块测量液面的高度, 并把数据传送给 AT89C51 单片机。 单片机处理 数据信息后判断
2、是否开启水泵抽水来实现水位的基本控制功能。本系统由 LCD1602 显示器、键盘、传感器、电源和水泵组成。 关键词关键词:单片机;超声波;LCD1602;传感器 2 Abstract 21st century is the era of high technology, technology is being developed, some of the traditional measures will be updated with the development and reform of science and technology. Modern industry and agric
3、ulture requires not only a more intuition and stable performance, but also fast update automation and high cost-effective with the cost in reducing production equipment requirements. Liquid level control system based on microcontroller with its high control accuracy, reliable performance, low energy
4、 consumption and long working life set to be applied to the liquid level system characteristics of the control. Combine science with liquid level measurement to achieve a reasonable allocation of resources and reduce the purpose of energy consumption. Ultrasonic propagation in different media, and s
5、trong direction, transmission distance, slow energy, obstacles will produce reflection to form echo. Ultrasound is often used to measure distance. This design uses ultrasonic to measure the height of liquid level, then sent the data to AT89C51 microcontroller. Microcontroller determines whether to o
6、pen the pump after processing the data from ultrasonic wave distance measurement module to achieve the basic level control. The system consists of LCD1602 monitor, keyboard, sensors, power supply and water pump. Keywords: AT89C51 Ultrasonic wave LCD1602 sensor I 目目 录录 1 绪论 . 1 1.1 选题的背景和意义 1 1.2 国内外发展形势 1 1.3 本系统主要完成的任务 2 2 系统硬件设计 . 3 2.1 系统硬件结构 . 3 2.2 AT89C51 单片机模块 3 2.3 超声波测距模块 . 5 2.3.1 超声波简介 . 5 2.3.2 HC-SR04 超声波传感器 . 6 2.3.3 HC-SR04 超声波传感器测距原理 . 7 2.3.4 HC-SRO4 超声波模块电路图 . 8 2.4 LCD1602