基于单片机的汽车防撞系统

 2022-10-19 08:10

论文总字数:19388字

摘 要

当今社会交通设施不断完善,经济不断发展提高,汽车也已经成为了很多家庭生活的必需品,而车祸也随之增多,对汽车防撞的需求也越来越大,本论文设计的汽车防撞系统正是通过增强车辆在路途中的主动安全性,即通过对距离的测量,当距离达到危险值时,通过报警的方式来提醒司机路况的危险性。

本文因考虑到超声波测距的方法有比较强的优越性,选择了使用超声波测距作为本系统测距的方法。对超声波测距进行了深入分析,文章所要设计的系统包括5个部分:蜂鸣器报警模块、超声波测距模块、系统主控模块、LED灯光闪烁模块、LCD1602液晶显示模块。其中,超声波的触发、接收是由超声波测距模块完成,在此条件下,单片机按照超声波传播时长,再按照对应的公式,计算得到距离,通过液晶屏显示并根据不同的距离发出不同的报警声,同时LED灯闪烁。

系统采用STC89C52单片机,系统的软件设计工作包括4个方面:超声波发射与接收控制程序设计、系统主程序设计、距离求解程序设计、显示报警程序,使用模块化的思想更有助于程序的设计。使用本系统将获得更为安全便捷的驾驶体验。

关键词 单片机 ;超声波测距 ;防撞报警;显示距离

Automobile Anti-collision System Based on Single Chip Microcomputer

Abstract

Today's social transportation facilities are constantly improving, and the economy is constantly improving. Cars have become a necessity for many family lives, and car accidents have also increased. The demand for car collisions is also increasing. The car collision system designed in this paper It is by enhancing the active safety of the vehicle on the road, that is, using a certain distance, when it reaches a dangerous situation, it will alarm to remind the relevant personnel

This research focuses on ultrasonic distance measurement, which has some advantages, and then used to carry out research. In-depth analysis of ultrasonic ranging, the system to be designed in this article includes 5 parts: buzzer alarm module, ultrasonic ranging module, system main control module, led light flashing module, LCD1602 LCD display module. Among them, the ultrasonic triggering and receiving are done by the ultrasonic ranging module. Under this condition, the single-chip computer calculates the distance according to the ultrasonic propagation time and then the corresponding formula, displays it through the LCD screen, and issues different alarms according to different distance Sound, and the LED light flashes at the same time.

The system uses stc89c52 single chip microcomputer. The software design of the system includes 5 aspects: ultrasonic transmission and reception control programming, system main programming, distance solving programming, Display alarm programming, which uses modular thinking. More conducive to the design of the program. Using this system will get a safer and more convenient driving experience.

Keywords: MCU, ultrasonic ranging, anti-collision alarm, display the distance

目 录

摘 要 I

Abstract II

第一章 绪论 1

1.1 课题研究的背景 1

1.2 课题研究的意义 2

1.3 超声波概述 2

1.4 工作内容 2

第二章 系统方案研究与设计 3

2.1系统需求分析 3

2.2系统的总体方案及功能 3

2.3系统硬件结构 3

第三章 硬件设计 5

3.1主控制模块设计 5

3.2系统时钟电路设计 5

3.3复位电路设计 6

3.4蜂鸣器模块设计 6

3.5 LCD1602显示模块设计 7

3.6 LED灯闪烁模块设计 8

3.7超声波传感器电路设计 8

3.7.1超声波传感器介绍 8

3.7.2 HC-SR04超声波测距模块的特征 9

3.7.3 HC-SR04的管脚排列 9

3.7.4 HC-SR04的电气参数 9

3.7.5超声波模块工作说明 10

3.7.6发射电路和接收电路设计 10

第四章 编程软件和烧录程序软件的介绍 12

4.1编程软件的介绍 12

4.1.1 Keil C51创建项目文件 12

4.1.2源程序文件的建立 12

4.2烧录软件介绍 16

第五章 软件设计 18

5.1主程序说明 18

5.2 距离计算功能说明 18

5.3显示报警子程序说明 19

5.4软件需完成功能 19

第六章 软硬件调试 21

6.1硬件部分的调试 21

6.2软件部分的调试 21

6.3软硬件联调 22

6.4调试总结 24

第七章 总结与展望 25

致 谢 26

参考文献 27

附 录 28

剩余内容已隐藏,请支付后下载全文,论文总字数:19388字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;