当前位置:文档之家› 毕业设计(论文)--数字温湿度计的设计

毕业设计(论文)--数字温湿度计的设计

数字温湿度计的设计摘要温度和湿度是两个最基本的环境参数,人们生活与温湿度息息相关。

在工农业生产、气象、环保、国防、科研等部门,经常需要对环境温度与湿度进行测量和控制。

准确测量温湿度在生物制药、食品加工、造纸等行业更是至关重要的。

因此研究温湿度的测量方法和控制具有重要的意义。

本论文介绍了一种以单片机AT89C52为主要控制器件,以DHT91为数字温湿度传感器的新型数字温湿度计。

本设计主要包括硬件电路的设计和系统软件的设计。

硬件电路主要包括主控制器,测温湿控制电路和显示电路等。

主控制器采用单片机AT89C52,温湿度传感器采用盛世瑞恩半导体公司生产的DHT91,显示电路采用8位共阳极LED数码管,驱动电路用八个PNP型的小电压大电流三极管(S9012)。

测温湿控制电路由温湿度传感器和预置温湿度值比较报警电路组成,当实际测量温湿度值大于预置温湿度值时,发出报警信号(发光二极管点亮)。

软件部分主要包括主程序,测温湿度子程序,显示子程序和按键子程序等。

本次设计采用的DHT91数字温湿度传感器包括一个电容式聚合体测湿元件和一个能隙式测温元件,并与一个14位的A/D器以及串行接口电路在同一芯片上实现无缝链接,从而具有超快响应,抗干扰能力强,性价比高等优点。

用DHT91与AT89C52做的数字温湿度计不仅外围电路简单,而且测量精度比较高。

关键词:温度测量, 湿度测量,AT89C52,DHT91THE DESIGN OF DIGITALTHERMOMETERS AND HYGROMETERABSTRACTTemperature and humidity are two basic environmental parameters. people's lives are closely related to temperature and humidity. In the industrial and agricultural production, meteorology, environmental protection, national defense, scientific research, and other departments, we often need to ambient temperature and humidity measurements and control. Accurate measurement of temperature and humidity in the pharmaceutical, food processing, paper making and other sectors is essential. So the temperature and humidity control and measurement method is of great significance.This paper presents a new design of digital thermometers and hygrometer. It includes a main control device-microcontroller AT89C52 and a digital temperature and humidity sensor. This design includes hardware and system software .The hardware design includes a main controller circuit, Temperature and Humidity measurement and control circuits and show circuit. Main controller uses SCM AT89C52.temperature and humidity sensor uses DHT91 which is yielded by Sensirion (a Semiconductor Corp). Show circuit is a total of eight circuits using digital LED of the anode. Driver show circuit uses eight of the PNP small voltage high current transistor (S9012). Temperature and Humidity control circuit includes the temperature and humidity sensor and preset temperature and humidity values compared alarm circuit. When the actual measurement of temperature or humidity values is greater than the preset temperature or humidity values, the alarm signal (Light emitting diode is lit) is sent. The major software includes the main routines, temperature and humidity routines, show routines and keys routines.The digital temperature and humidity sensor (DHT91) in this designincludes a capacitive polymer sensing element for power consumption makes it the ultimate choice for even relative humidity and a band gap temperature sensor. Both the most demanding applications are seamlessly coupled to a 14bit analog to digital converter with a 14 and the A / D, as well as serial interface circuits in the same chip on the realization of a Gap link to a super-fast response, anti-interference capability and cost-effective advantages. The design of digital thermometers and hygrometer with AT89C52 and DHT91 not only has a simple external circuit, but also has a high-precision measurement.KEY WORDS: temperature measurement, humidity measurements, AT89C52, DHT91目录前言 (1)第一章设计任务要求和温湿度计的发展史 (2)§1.1设计任务及要求 (2)§1.2设计数字温湿度计的依据和意义 (2)§1.3温度计的发展史 (3)§1.4湿度计的由来 (4)§1.5露点意义 (4)第二章设计任务分析及方案论证 (5)§2.1设计总体方案及方案论证 (5)§2.2元器件的选择 (6)§2.2.1 主控制器芯片 (6)§2.2.2 数字温湿度传感器 (7)§2.2.3 驱动显示电路 (8)§2.3温湿度测量的方法及分析 (9)第三章硬件电路的设计 (10)§3.1主控制电路和测温湿控制电路 (10)§3.2驱动显示电路 (11)第四章软件设计及分析 (13)§4.1DHT91传输时序和指令集]7[ (13)§4.1.1 通讯复位时序 (13)§4.1.2 启动传输时序 (13)§4.1.3 数据传输和指令集 (14)§4.1.4 湿度的测量时序 (15)§4.1.5 输出转换为物理量 (15)§4.1.6 DHT91的DC特性。

(16)§4.2程序流程图 (17)§4.3程序的设计 (18)§4.3.1 通讯复位子程序 (18)§4.3.2 传输启动子程序 (18)§4.3.3 写一个字节子程序 (19)§4.3.4 读一个字节子程序 (20)§4.3.5 数据处理子程序 (20)§4.3.6 显示子程序 (21)§4.3.7 按键子程序 (23)§4.3.8 中断刷新显示数码管子程序 (26)§4.3.9软件在硬件上的调试分析 (27)结论 (29)参考文献 (30)致谢 (31)附录 (31)前言温度与湿度与人们的生活息息相关。

在工农业生产、气象、环保、国防、科研等部门,经常需要对环境温度与湿度进行测量及控制。

准确测量温湿度在生物制药、食品加工、造纸等行业更是至关重要的。

传统的温度计是用水银柱来显示的,虽然结构简单、价格便宜,但是它的精确度不高,不易读数。

传统湿度计采用干湿球显示法,不仅复杂而且测量精度不高。

而采用单片机对温湿度进行测量控制,不仅具有控制方便,简单和灵活等优点,而且可以大幅度提高温度控制的技术指标。

用LED数码管来显示温湿度的数值,看起来更加直观。

测量温湿度的关键是温湿度传感器。

过去测量温度与湿度是分开的。

随着技术的进步和人们生活的需要出现了温湿度传感器。

温度传感器的发展经历了3个阶段:传统的分立式温度传感器、模拟集成温度传感器、智能集成温度传感器。

目前,国际上新型温度传感器正从模拟式向数字式、从集成化向智能化、网络化的方向发展。

湿度传感器也是经历了这样一个阶段逐渐走向数字智能化。

现今国内外用的最多的温湿度传感器是SHTxx系列。

不过很多客户都反应SHTxx不方便手工焊接,很容易在焊接的时候,由于温度过高造成传感器直接损害,因此利用SHTxx传感器重新在国内封装得到了DHT 9x系列。

相关主题