当前位置:首页 > 基于AT89S52单片机DS18D20温度湿度传感器的设计毕业论文
仰恩大学毕业设计(论文)
基于AT89S52单片机DS18D20温度湿度传感器的设计
摘 要
在现代冶金、石油、化工及电力生产过程中,温度是极为重要而又普遍的热工参数之一,在环境恶劣或温度较高等场合,为了保证生产过程正常安全地进行,提高产品的质量和数量,以及减轻工人的劳动强度、节约能源,要求对加热炉炉温进行测、显示、控制,使之达到工艺标准。如何更快、更准确的控制所需的温度是温度控制技术的关键。本设计按照设计要求,采用功能齐全的protel DXP作为绘制原理图工具,PCB板作为开发板的温度检测器。
本系统采用现在流行的AT89C52单片机,配以湿度传感器,温度传感器,通过A/D模数转换等进行系统控制。
本设计还加入了常用的数码管显示及状态灯显示灯常用电路,使得整个设计更加完整,更加灵活。该设计整体结构小巧,便于携带。
关键字:AT89S52单片机;DS18D20温度传感器;继电器;湿度传感器
I
仰恩大学毕业设计(论文)
Multi-function Temperature Detector
Abstract
In modern metallurgy, petroleum, chemical and power production process, the temperature is extremely important and universal thermal parameters of the environment or in high temperature and so on, in order to ensure normal production process carried out safely, improve product quality and the number, as well as reduce the labor intensity, energy conservation, the requirements for measuring the temperature of the furnace, display, control, to meet the standards process. How to faster and more accurate temperature control required for temperature control technology is the key. In accordance with the design requirements of the design using full-featured protel DXP as a schematic drawing tools, PCB board as a development board temperature detectors.
The present system is popular single-chip AT89C52, with DS18B20 temperature sensor, A/D converter module, single-chip control of the control system. Through their own temperature settings, and compare the actual temperature, which determine whether to start the relay, relay start, to determine whether to activate the heater.
This design also joined the common LED status lights and display lights show common circuit design making the whole more complete, more flexible. The design of the overall structure of the compact, easy to carry.
Key word: AT89S52 Single Chip; AD590 Temperature Sensor; Relays
II
仰恩大学毕业设计(论文)
目 录
摘 要…………………………………………………………………………………….I Abstract…………………………………………………………………………………...II 引 言…………………………………………………………………………………….1 1系统的设计任务…………………………………………………………………………..2
1.1温度检测系统设计的基本任务…………………………………………………2
1.1.1主要性能指标 .......................................................................................... 2 1.2温度检测系统设计的扩展任务…………………………………………………2
1.2.1主要性能指标 .......................................................................................... 2
2总体设计…………………………………………………………………………………..3
2.1总设计框图………………………………………………………………………3 2.2技术特点…………………………………………………………………………3
2.2.1 AT89C52单片机 ..................................................................................... 3 2.2.2 ADC0809 A/D 转换器 ............................................................................ 3
3单片机概述………………………………………………………………………………..4
3.1 单片机名称的由来……………………………………………………………...4 3.2 单片机的特点…………………………………………………………………...4
3.2.1 高性能、低价格 ..................................................................................... 4 3.2.2 体积小、可靠性高 ................................................................................. 4 3.2.3 低电压、低功耗 ..................................................................................... 4 3.3 单片机的应用…………………………………………………………………...5 4芯片介绍…………………………………………………………………………………..5
4.1 芯片AT89S52……………………………………………………………………5
4.1.1 功能特性描述 ......................................................................................... 5 4.1.2 引脚功能描述 ......................................................................................... 6 4.1.3 存储器结构 ............................................................................................. 8 4.1.4 编程方法 ................................................................................................. 9 4.2芯片ADC0809…………………………………………………………………….9
4.2.1 基本知识 ................................................................................................. 9 4.2.2 ADC0809应用说明 ........................................................................... 11 4.3 LED七段数码管………………………………………………………………..12 4.4 74LS138译码器………………………………………………………………..13
III
仰恩大学毕业设计(论文)
4.5温度传感器DS18B20…………………………………………………………...15 4.6湿度传感器XR61TDR…………………………………………………………...18 5方案论证与硬件设计……………………………………………………………………18
5.1温度电路的设计………………………………………………………………..18
5.1.1 温度采样部分的方案论证……………………………………………18 5.1.2 温度电路 ............................................................................................... 18 5.1.3 A/D转换电路 ........................................................................................ 19 5.2水泵控制电路…………………………………………………………………..19 5.3单片机控制部分………………………………………………………………..20
5.3.1单片机控制部分的方案论证 ................................................................ 20 5.3.2单片机控制电路 .................................................................................... 20 5.4数字显示部分…………………………………………………………………..21 5.5湿度采样和转换电路部分……………………………………………………..22
5.5.1 A/D转换电路 ........................................................................................ 22 5.5.2 湿度传感器XR61TDR的电路设计 ................................................... 22
6软件系统设计……………………………………………………………………………22
6.1端口设置………………………………………………………………………..22 6.2各模块软件设计………………………………………………………………..23
6.2.1 DS18B20程序 ....................................................................................... 23 6.2.2 LED显示程序 ....................................................................................... 25 6.2.3继电器控制 ............................................................................................ 26 6.3程序流程图……………………………………………………………………..26
6.3.1即时湿度显示 ........................................................................................ 26 6.4总设计程序……………………………………………………………………..28 结 论…………………………………………………………………………………...35 参 考 文 献……………………………………………………………………………….36 致 谢…………………………………………………………………………………...36 附 录…………………………………………………………………………………...37
IV
共分享92篇相关文档