基于单片机的超声波测距仪设计
基于单片机的超声波测距仪设计(任务书,开题报告,论文16000字)
摘要
现在生活中私家车越来越多,随之而来的一个问题便是驾驶员总是由于盲区而产生碰撞。为了提高人们的生活品质,一种超声波测距报警仪器应运而生。随着计算机科学技术的不断发展,单片机得到了广泛的应用。本文正是基于单片机设计了一种超声波测距兼报警的仪器,可以显示离障碍物的距离,也可以在到达警戒距离的时候报警。
本设计在硬件设计中以STC89C52为主控芯片,利用超声波对距离的检测,将前方物体的距离探测出来,然后单片机处理运算,与设定的报警距离值进行比较判断,当测得距离小于设定值时,STC89C52发出指令控制蜂鸣器报警。在软件上主要使用KEIL软件编程,并对整个系统制作了实物模型。模型测试结果表明,系统工作正常,具有十分广阔的应用空间。
关键词:超声波测距 单片机 STC89C52 传感器
Design of ultrasonic range finder based on single chip microcomputer
Abstract
Nowadays,there is a growing number of private cars which brings a promble that the drivers always have lots of collision because of the blind. To improve the quality of people’s daily lives ,an distance measurement alarm equipment of ultrasonic was invented .With the development of computer science and technology,MCU has been widely applied .In this article this design is based on a MCU to design of ultrasonic distance measurement instruments and alarms,You can display the distance from the obstacle, which also can reach the warning alarm when the distance is in danger.
[来源:http://www.doc163.com]
The design use the STC89C52 as the main chip in the hardware .Measuring the distance from the object ahead by ultrasonic,then MCU doing operations, and set alarm distance values which are compared to the realistic distance,if the measured distance is less than the set distance ,STC89C52 issue commands to control the buzzer alarm. KEIL software programming is mainly used in the software,and the physical model of the entire system is been produced as well.Model test results show that the system is working properly, thus having a very broad application way.
Key words:
ultrasonic ranging ;microcontroller ;STC89C52 ;sensors
[资料来源:http://Doc163.com]
目 录
摘要 1
Abstract 2
第一章 绪论 3
1.1 项目研究背景及意义 3
1.2 本课题的内容 3
1.3 本课题所做的主要内容 3
1.4 本文章节安排 4
第二章 超声波传感器 5 [资料来源:Doc163.com]
2.1 超声波的特性 6
2.2 超声波传感器的原理 7
2.3 超声波测距的盲区 8
2.4 超声波测距仪的算法分析 8
第三章 系统的硬件结构分析 9
3.1 总体方案设计 9
3.2 超声波测试模块 10
3.3 52系列单片机系统 11
3.4 电源设计 15
3.5 声音报警电路的设计 15
3.6 按键电路的设计 16
3.7 显示模块的设计 17
第四章 软件设计及仿真 19
4.1 KEIL软件介绍 19
4.2 系统流程 20
4.3 PROTEOS仿真 21
第五章 调试与解决问题 24
5.1 超声波的选择 24
5.2 解决超声波测距盲区的问题 24
第六章 结论 25
致谢 25
参考文献 26
[资料来源:http://Doc163.com]
附录:超声波测距的程序 27 [资料来源:https://www.doc163.com]