基于51单片机的超声波测距仪之倒车雷达作品设计毕业论文

基于单片机的超声波测距 电子烧友会

基于51单片机的超声波测距仪 之倒车雷达作品设计毕业论文

摘要: 超声波具有指向性强,能量消耗缓慢,传播距离较远等优点,所以,在利用传感器技术和自动控制技术相结合的测距方案中,超声波测距是目前应用最普遍的一种,他广泛应用于防盗、倒车雷达、水位测量、建筑施工工地以及一些工业现场。

本课题详细介绍了超声波传感器的原理和特性,以及STC公司的STC89C52的单片机的性能和特点,并在分析了超声波测距的原理的基础上,指出了设计测距系统的不足并加以改进,将温度引起的误差考虑在内并且加以修正,给出了以STC89C52单片机为核心的低成本、高精度、液晶显示超声波测距系统的硬件电路和软件设计方法。该系统电路设计合理、工作稳定、性能良好、检测速度快、计算简单并且做到了可设计报警范围的功能,在测量精度方面能达到工业使用的要求。

关键词:单片机;液晶显示;报警;测距

I

基于单片机的超声波测距 电子烧友会

Ultrasonic distance measurement based on single chip

Abstract: Ultrasound has a strong point, the energy consumption of the slow

spread of the advantages of distance, so the use of sensor technology and automatic control technology, the program combines distance, ultrasonic distance measurement is the most common one, and he widely used in security, parking sensor, water level measurement, construction sites and some industrial sites.

This subject introduces the principles and characteristics of ultrasonic sensors, and microcontroller STC89C52 STC's performance and characteristics, and the analysis of the ultrasonic distance measurement based on the principle that the lack of design ranging system and make improvements, will into account the error due to temperature and should be amended to STC89C52 given low-cost microcontroller as the core, high-accuracy, liquid crystal display ultrasonic ranging system of hardware and software design methods. The system circuit design is reasonable, stable, good performance, fast detection of simple calculation and can be designed to achieve the alarm range of functions to achieve precision in the measurement requirements for industrial use.

Keywords: microcontroller; LCD display; alarm; ranging

基于单片机的超声波测距 电子烧友会

目 录

1 绪 论 ............................................................................................................. 6

1.1 研究的背景 ............................................................................................................. 6 1.2研究的主要内容 ...................................................................................................... 6 1.3应解决的关键问题 .................................................................................................. 6

2 电路方案论证 ............................................................................................... 6

2.1方案比较 .................................................................................................................. 6

2.1.1 激光测距.......................................................................................................................... 6 2.1.2 超声波测距 ...................................................................................................................... 7

2.2电路总体方案 .......................................................................................................... 7

3单片机概述 .................................................................................................... 8

3.1 STC89C52主要性能 ............................................................................................... 8 3.2 STC89C52外部结构及特性 ................................................................................... 8 3.3 STC89C52内部组成 ............................................................................................... 9

4 超声波测距模块 ......................................................................................... 11

4.1 超声波传感器介绍 ............................................................................................... 11 4.2 HC-SR04超声波测距模块的性能特点 ............................................................... 12 4.3 HC-SR04的管脚排列和电气参数 ....................................................................... 13

4.3.1 管脚简介........................................................................................................................ 13 4.3.2 HC-SR04的电气参数 .................................................................................................... 13

4.4超声波时序图 ........................................................................................................ 13

5系统硬件电路设计 ...................................................................................... 15

5.1单片机最小系统 .................................................................................................. 15

5.1.1 STC89C52芯片 .............................................................................................................. 15 5.1.2 复位电路........................................................................................................................ 15 5.1.3 晶振电路........................................................................................................................ 16

5.2 驱动显示电路及报警电路 ................................................................................... 17

5.2.1 1602LCD液晶显示屏 ................................................................................................. 17 5.2.2 蜂鸣器报警 .................................................................................................................... 18

5.3 HC-RS04超声波测距原理 ................................................................................... 19 5.4 5V稳压电路 .......................................................................................................... 20 5.5温度检测电路 ........................................................................................................ 20

5.5.1 温度检测方案的分析 .................................................................................................... 20 5.5.2 数字温度传感器DS18B20简介 .................................................................................. 20

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4