1、粮库温度自动检测系统的设计 摘 要 本设计以 AT89S51 单片机为核心的温度控制系统的工作原理和 设计方法。温度信号由温度芯片 DS18B20 采集,并以数字信号的方式 传送给单片机。文中介绍了该控制系统的硬件部分,包括:温度检测 电路、 温度控制电路、 PC 机与单片机串口通讯电路和一些接口电路 。 单片机通过对信号进行相应处理,从而实现温度控制的目的。文中还 着重介绍了软件设计部分,在这里采用模块化结构,主要模块有:数 码管显示程序、键盘扫描及按键处理程序、温度信号处理程序、继电 器控制程序、超温报警程序。 关键词:AT89S51 单片机 DS18B20 温度芯片 温度控制 DESIG
2、N OF GRAIN DEPOT TEMPERATURE AUTOMATIC TEST SYSTEM Abstract This design take at89S51 monolithic integrated circuit as core temperature control systems principle of work and design method. The temperature signal by the temperature chip DS18B20 gathering, and transmits by digital signals way for the m
3、onolithic integrated circuit. In the article introduced this control systems hardware part, including: Temperature examination electric circuit, temperature-control circuit, PC machine and monolithic integrated circuit serial port communication channel and some interface circuit. The monolithic inte
4、grated circuit through carries on corresponding processing to the signal, thus realizes the temperature control goal. In the article also emphatically introduced the software design part, uses the modular structure in here, the main module includes: Nixietube display sequence, keyboard scanning and
5、pressed key disposal procedure, temperature signal processing procedure, black-white control procedure, excess temperature warning procedure. Keywords : AT89S51 Monolithic Integrated Circuit ; DS18B20 Temperature Chip;Temperature Control; 目 录 第一张 绪论 5 1.1 背景 .5 1.2 国内外研究状况和相关领域研究成果 .5 1.2.1 粮仓温湿度检测发
6、展状况.5 1.2.2 单片机历史.6 1.3 研究内容和研究方法 .7 第二章 系统的总体设计.8 2.1 系统的组成 .8 2.2 系统工作流程 .8 2.3 系统的功能介绍 .9 第三章 系统的硬件设计 .9 3.1 AT89C51 单片机功能介绍.9 3.1.1 芯片简介.9 3.1.2 AT89C51 各引脚在设计中的定义 .9 3.1.3 上电手动复位电路 11 3.1.4 振荡电路12 3.2 模数转换器 .12 3.2.1 模数转换器的选择.12 3.2.2 AD 转换器 ICL7109 的特点 .13 3.2.3 I CL7109 芯片引脚说明及外部连接 13 3.2.4 ICL7109 与 89C51 单片机的硬件接口设计 16 3.3 温度采集系统 .18 3.3.1 集成温度传感器的选择.18 3.3.2 AD590 的性能特点 .18 3.3.3 温度采集电路.19 3.4 湿度检测 .20 3.4.1 湿度传感器的选择.20 3.4.2 HS1101 的性能特点.20 3.4.3 湿度测量电路.21 3.5 键盘及显示接口扩展 .23 3.5.1 芯