文档介绍:摘要
本设计采用以单片机为核心的系统对汽车发动机进行温度采集、显示和控制。单片机负责控制温度采集、显示和继电器等。通过温度传感器组成的测控系统,单片机接受汽车温度传感器采集的所有数据,并进行判断缓存,再将处理过的数据经数码管显示。温度显示模块实时显示温度传感器采集的温度数据及其变化值。报警模块对超限的温度进行报警。继电器控制模块对发动机的开关进行控制。此外设有按键控制模块,负责对预设温度及继电器输出进行控制。自动与手动控制相结合,实现温度控制与发动机控制。总体程序设计和调试是本次设计的重点。实际运行表明该设计的系统配置方案、软件设计思想和程序结构是合理有效的。
关键词: 单片机;温度传感器;控制
ABSTRACT
This design uses a puter,as the core microcontroller, to acquire display and control temperature of automotive engine. MCU is responsible for controlling and displaying collected temperature, controlling relay and so on. It accepts all of the collected datas by automotive temperature sensor through the system and juges and caches these datas, and then processes and displays them on the digital tube. The temperature display module shows the data that collected by temperature sensors and changes in value. Alarm module will tell the limit temperature. Relay-control module determines whether or not starting automative engine. In addition, the key-control module is responsible for pre-set temperature and relay output. Combination of automatic and manual controls achieves determination of temperature and engine’s work. It focused on the overall program design and debugging. Actual operation shows that the thought of the software design and the procedure structure of the system is reasonable and effective.
Key Words: MCU; temperature sensor; control
目录
1 引言 1
2 课题任务及方案论证 3
设计要求 3
方案的选择与论证 3
温度传感器的选择 3
单片机的选择 4
方案的确定 5
3 系统总体设计 6
背景 6
系统主要设计思想及方框图 6
4 系统硬件电路设计 9
单片机 9
数字温度传感器DS18B20 10
继电器 13
硬件电路图 13
5 系统软件设计 20
6 Protel DXP设计原理图 24
7 硬件电路制作 25
8 系统调试 27
结论 28
参考文献 29
附录:程序清单 31
致谢 39
1 引言
随着“信息时代”的到来,作为获取信息的手段——传感器技术得到了显著的进步,其应用领域越来越广泛,对其要求越来越高,需求越来越迫切。传感器技术已成为衡量一个的重要标志之一。因此,了解并掌握各类传感器的基本结构、工作原理及特性是非常重要的。
温度是一个基本的物理量,自然界中的一切过程无不与温度密切相关。温度传感器是最早开发,应用最广的一类传感器。温度传感器的市场份额大大超过了其他的传感器。从17世纪初人们开始利用温度进行测量。在半导体技术的支持下,本世纪相继开发了半导体热电偶传感器、PN结温度传感器和集成温度传感器。与之相应,根据波与物质的相互作用规律,相继开发了声学温度传感器、红外传