目 录
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 稳压电路...........................................................................................................19
5.5 温度检测电路.........................................................................................................20
5.5.1 温度检测方案的分析.....................................................................................................20
5.5.2 数字温度传感器 DS18B20 简介 ...................................................................................20