基于 51 单片机的超声波测距系统设计 摘要:基于传统的方法在很多特别场合:如带腐蚀的液体,强电磁干扰,有毒等恶劣条件下,测量距离存在不可克服的缺陷,超声波测距能很好的解决此类的问题。本论文主要对单片机超声波测距系统的原理,单片机的应用等进行了分析;对超声波的发生电路和接收电路,DS18B20 温度采集电路,LCD 显示电路,硬件制作和软件设计;对系统进行误差分析。关键词:51 单片机,超声波测距系统,DS18B20 温度补偿,误差分析Abstract: In many special occasions, traditional methods based on the existence of insurmountable distance measuring defects, such as the measurement of corrosion in the liquid with strong electromagnetic interference, toxic and other adverse conditions, the ultrasonic range can be a very good solution to the problem of such . In this paper, focused on single-chip microcomputer-based ultrasonic ranging system, namely the principle of ultrasonic distance measurement, the occurrence of ultrasonic circuit, echo receiver, data acquisition, LCD data show the principle of single-chip applications, system hardware, DS18B20 the temperature compensation ,software design and production were discussed.Key words: 51 single-chip, ultrasonic ranging,DS18B20 the temperature compensation, error analysis. 目录第一章 引言…………………………….……………………....................... 4 1.1 单片机系统概述…………….………………….................................5 1.2 超声波测距系统概述…………….…………………..........….......... 6 1.3 本设计任务主要内容…………….…………………..........….......... 7第二章 超声波测距的原理…………………….……………........…........... 8 2.1 超声波的基本理论…………………….…………….........…........... 7 2.2 超声波测距系统原理…………………………………....................10第三章 系统主要硬件设计……………………………………......……….12 3.1 方案论证与比较……………………………………….......................