基于单片机的高精度温度测量系统设计
2011-06-30何宗虎,张德祥,张玲君
何宗虎, 张德祥, 张玲君
摘 要:提出采用单总线数字式温度传感器DS18B20 和单片机组成的新型高精度温度测量仪的设计。介绍了温度传感器DS18B20的结构、特点和工作原理,设计了DS18B20和AT89S52单片机的温度测量系统硬件电路和软件编程,主要包括温度采集、温度显示及报警控制等功能。整个系统具有结构简单,测量精度高,传输距离远,抗干扰能力强,温度读取方便和造价低等一系列优点,适用于生产生活及科学研究中对温度的测量,应用前景十分广阔。
关键词:温度测量; 单片机; DS18B20; 数码管显示
中图分类号:TN876-34
文献标识码:A
文章编号:1004-373X(2011)09-0130-03
Design of High-accuracy Temperature Detecting System Based on Single Chip Microcomputer
HE Zong-hu, ZHANG De-xiang, ZHANG Ling-jun
(Institute of Electrical Engineering and Automation, Anhui University, Hefei 230039, China)
Abstract: A new high-accuracy temperature detecting system based on single-bus digital temperature sensor DS18B20 and single chip microcomputer (SCM) is proposed. In this paper, the structure, characteristics and working principle of temperature sensor DS18B20 is introduced. Hardware circuit and software programming (including temperature acquisition, temperature display and alarm control functions) of the temperature measurement system are designed based on DS18B20 and AT89S52 SCM. The whole system has a series of advantages of simple structure, high detection accuracy, long transmission distance, strong anti-interference ability, easy to read temperature and low cost. It has a bright application future in daily life and scientific research for temperature measurement.
Keywords: temperature measurement; SCM; DS18B20; nixie display
0 引 言
温度是工业生产过程和实验过程中比较重要的一个参数,精确的温度测量和及时的显示温度是很重要的。目前温度测量系统种类繁多,功能参差不齐。单片机具有体积小,价格便宜,通用性和灵活性强的特点,利用单片机设计温度测量系统,既可以满足功能要求,又经济实惠。数字温度测量传感器DS18B20是单一总线的高精度测量器件,它克服了以前模拟式传感器与微机接口时需要的A/D转换器及其他复杂外围电路的缺点[1]。本文就是运用单片机及其接口和集成单总线温度传感器DS18B20构建一个高精度的温度测量和显示系统,并且通过开关进行温度上限的设置,如果温度超过设定值就会报警或进行相应的控制命令。设计的电路简单,易于实现,而且还具有一定的扩展功能,可以扩展成多点采集和更复杂的功能。
1 系统硬件设计……p>
