设计要求
1.设计一个以51单片机为核心的超声波倒车雷达系统;
2.超声波测量范围在2cm~4m,测量精度3mm;
3.扩展DS18B20温度测量模块,读取环境温度和补偿超声波测距声速;
4.超声波模块测量距离和温度数据通过LCD1602液晶显示;
5.完成按键设计,用户可通过按键设置倒车预警距离,并在LCD1602上显示;
6.设置报警功能,当测量距离低于预警值时,蜂鸣器鸣叫提醒驾驶员注意;
系统概述
本课题以AT89C51单片机为核心设计一种超声波倒车雷达系统,同时兼顾车内温度测量。
系统由AT89C51控制器、HC-SR04超声波模块、DS18B20温度测量模块、声音报警电路和LCD1602显示电路组成。
汽车行进时,LCD显示车内温度以及设定的倒车预警值;倒车时,启动超声波测距,回传的声波数据经AT89C51单片机处理后显示到LCD上,如果距离小于设定值,报警电路发出鸣叫声,提醒司机注意车距。
同时,DS18B20采集到的温度值也用于超声波测距的温度补偿,来提供测距的精度。

Proteus仿真电路


原理图

仿真结果分析
首先,需要注意的是:查阅HC-SR04说明书,可知在实际应用中,其最远射程为4m;由于仿真为电脑模拟,与实物结果有一些差距。
本仿真中超声波模块最远射程为2.92M,按照仿真图或原理图做出的实物(洞洞板),超声波最大测量距离是可以达到4m的。
打开Proteus仿真文件,文件后缀名为DSN。双击单片机,加载csbcj1602.hex文件(位于C程序文件夹中),运行仿真,结果如下。

LCD显示超声波测量距离为1.57m,环境温度为17℃,倒车预警距离为0.40m,驾驶员可以继续倒车。
点击DS18B20温度传感器模块的上、下红色箭头,模拟温度值的变化;调节HC-SR04超声波模块下的滑动变阻器RV1(左右两个箭头),模拟倒车过程中距离的改变。设计咨询,作者QQ:2327603104.
例如,我们模拟倒车过程中某一刻超声波测量距离为0.97m,调节环境温度为23.8℃。

通过“功能”键和“调整”键,可以设置倒车预警距离。按下“功能”键,预警值个位闪烁,进入设置状态,通过“调整”键设置个位数值(数字0-5循环),个位数设置完成后,再次按下“功能”键,进入预警值小数点后一位数字的设置(0-9循环),依次类推。
当3位数都设置好后,按下“功能”键,退出预警值的设置。例如,我们设置预警值为0.35m,如图所示。

当超声波测量距离低于预警值时,蜂鸣器报警,提示驾驶员注意;反之,蜂鸣器关闭。

资源内容
(1)基于51单片机的超声波倒车雷达设计论文完整版;
(2)C程序;
(3)Proteus仿真文件;
(4)原理图文件;
(5)程序设计流程图;
(6)倒车雷达资料;
资源截图





