基于单片机的空调温度控制器的设计
- 格式:doc
- 大小:507.00 KB
- 文档页数:45
基于单片机的空调控制器设计空调控制器是一种智能设备,通过对空调的控制和调节,实现对室内温度和湿度的控制,提高室内舒适度,节约能源。
现代空调控制器大多采用单片机作为控制核心,具有较快的响应速度和较高的精确度。
首先是硬件设计。
空调控制器需要使用传感器来感知室内温湿度,并将其转换为数字信号供单片机处理。
常用的温湿度传感器有DHT11、DHT22等,可以通过数字接口与单片机连接。
此外,还需要设计电路来控制空调的开关、风速和温度,可以使用继电器来实现。
接口设计方面,需要考虑与用户交互的按键和显示屏,通过选用合适的按键和液晶显示屏可以方便用户对空调进行操作和了解当前状态。
其次是软件设计。
在算法设计方面,可以根据室内温度和湿度来调节空调的制冷和制热功能,使室内保持在一个舒适的温度范围内。
控制逻辑设计可以根据用户的设定和当前环境条件来进行自动控制,比如根据室内温湿度和外部温度自动开关空调和调节风速。
用户界面设计可以通过液晶显示屏和按键来实现,用户可以通过按键来设定目标温度、风速等参数,并实时显示当前的温湿度和空调状态。
在实际应用中,空调控制器还可以考虑其他功能,比如定时开关、远程控制等。
定时开关可以通过单片机的时钟模块来实现,用户可以设定定时开关的时间和周期,方便根据自己的需求来控制空调的开关。
远程控制可以通过无线模块和互联网来实现,用户可以通过手机或者电脑远程控制空调的开关和调节。
总体而言,基于单片机的空调控制器设计需要考虑硬件和软件两个方面,通过合理设计电路和算法来实现对空调的精确控制和智能管理。
在实际应用中,可以根据用户需求和环境条件来添加其他功能,提高空调控制器的智能化水平。
成都理工大学工程技术学院毕业论文空调机的温度控制系统设计空调机的温度控制系统设计摘要本设计以AT89S51单片机为核心的温度控制系统的工作原理和设计方法。
温度信号由温度芯片DS18B20采集,并以数字信号的方式传送给单片机。
文中介绍了该控制系统的硬件部分,包括:温度检测电路、温度控制电路、PC机与单片机串口通讯电路和一些接口电路。
单片机通过对信号进行相应处理,从而实现温度控制的目的。
文中还着重介绍了软件设计部分,在这里采用模块化结构,主要模块有:数码管显示程序、键盘扫描及按键处理程序、温度信号处理程序、继电器控制程序、超温报警程序。
空调机的温度控制对于工业和日常生活等工程都具有广阔的应用前景。
本文将传统控制理论与智能控制理论相结合应用于温度控制的实际工程中。
首先,设计出系统的硬件构成,然后,从热力学的角度对温度对象的特性做了较深入的分析,从理论上推导出温度对象的常用的一阶带纯滞后的近似数学模型,并给出了数学模型中各参数的含义。
在此基拙上,本文分析了现有空调机控制方法的利弊,并针对它们各自的优、缺点,对具有纯滞后特性的温度对象提出一种改进的模糊控制方法。
该方法将模糊控制、PID控制结合起来。
通过数字仿真表明该方法对空调机温度的控制具有超调小(可达到无超调)、调节时间短、鲁棒性好等优点。
在此基拙上,用阶跃信号做激励,辨识出系统的数学模型。
本文的最后,通过对实物实验结果可以看出,本文所提出的改进的模糊控制算法对非线性、具纯滞后环节对象的控制是很有效的。
温度控制系统的软件采用汇编语言编制,控制算法部分采用C与汇编混合编程。
该软件基于Windows20000/xp平台,人机界面友好,易于用户操作。
具有在线修改采样时间、控制算法、控制参数、图形显示及数据保存和打印功能。
设计的空调机温度控制的精确性,使用方便,功能齐全。
空调机的温度控制系统关键词:PWM控制模型辨识模糊控制 PID控制AbstractThe thesis studies the Plant of temperature. Firstly,the systeml5 designed and realized. Then the characteristics of temperature of Plant are analyzed inall details from thermodynamics. The approximate mathematics model of temperature plant with one order and dead time is reduced and the meaning of every parameter of this model are expressed, Which is used often and practically in the paper. In addition tot his, we identify the model of the system and the result demonstrated the method is effective for it.Secondly we analyzed advantages and disadvantages of present control method of temperature. One kind of improved Fuzz-Dahlin control method is presented for Temperature Plant with long dead time and non-linearity. The Dahlin control method, The fuzzy control method are combined in this improved method It is demon strated By digital simulation that the improved Fuzzy-Dahlin makes the extra-regulation more small(even zero), the regulation time more short, and the robustness better for the temperature controlled Plant. It is demonstrated by physical experimentation that improved Fuzzy-Dahlin method presented in this Paper is effective for temperature plant with dead time and non-linearity.The control software is compiled with visualc++ and matlab .It's easy to use and friendly to the interface of person and machine on the basis of window2000/xpplatform.There are some functions as modify sample time or modify controller's parameters online, display and copy data of temperature curve, and so on. The control hardware is easy to use and its functions are self contained.Keywords:Intelligent control, model identify, Dahlin control, Fuzzy control, PID control目录摘要 (I)Abstract................................................................................................... - 3 - 目录........................................................................................................... - 4 - 前言........................................................................................................... - 5 - 1MCS-51单片机简介.............................................................................. - 8 -1.1芯片的引脚描述.......................................................................... - 8 -1.2 MSC-51单片机中央处理器..................................................... - 15 -2 温度控制系统的实现......................................................................... - 17 -2.1总体设计.................................................................................... - 17 -2.2信号采样电路设计.................................................................... - 18 -2.2.1温度采样电路设计.......................................................... - 18 -2.2.2单片机最小系统的设计.................................................. - 20 -2.3 A/D转换电路设计.................................................................... - 22 -2.3.1 A/D转换的常用方法...................................................... - 22 -2.3.2 A/D转换器的主要技术指标........................................... - 23 -2.3.3 ADC0809的主要特性和内部结构.................................. - 23 -2.3.4 ADC0809管脚功能及定义.............................................. - 24 -2.3.5 ADC0809与8031的接口电路........................................ - 26 -2.4软件系统的初始化程序............................................................ - 26 -2.5软件程序的主循环框架............................................................ - 27 -2.6校准程序.................................................................................... - 29 -3 控制算法的研究................................................................................. - 31 -3.1 PID算法的研究......................................................................... - 31 -3.2模糊控制系统设计.................................................................... - 31 -3.2.1模糊控制算法.................................................................. - 32 -3.2.2模糊控制的基本概念...................................................... - 33 -3.2.3模糊控制过程.................................................................. - 34 - 总结......................................................................................................... - 39 - 致谢......................................................................................................... - 52 - 参考文献................................................................................................. - 53 -空调机的温度控制系统前言控制菌种生长环境的设施和设备由功能简单、单一的气候箱发展成现在控制复的人工气候室,这对于研究在人工模拟自然生态环境中生长因素对菌种生长的提供了必要的条件和能够继续深入研究的基础。
毕业论文-基于AT89C51单片机的空调控制系统设计精品1总体方案设计随着人们生活水平的提高,人们对空调的舒适性和空气品质的要求越来越高,分体式空调已不能满足人们的要求,户式中央空调得到了迅猛的发展。
就室内居住环境而言,恒温环境并非是卫生和舒适的。
因为除了温度外,还有湿度、空气流速、空气洁净度等诸多因素影响到舒适的程度。
而传统的中央空调靠设置机械温控开关来实现房间的恒温控制。
这种控制方法,一方面操作不方便;另一方面温度波动范围大,不但影响人的舒适感,而且会造成一定的能量损耗。
采用单片机温度控制系统控制的户式中央空调系统,可以根据室内的环境因素,调节风机的转速,为人们创造一个舒适的室内环境,同时又节省电。
随着电子技术的发展,特别是随着大规模集成电路的产生,给人们的生活带来了根本性的变化,如果说微型计算机的出现使现代的科学研究得到了质的飞跃,那么单片机技术的出现则是给现代工业控制测控领域带来了一次新的革命。
目前,单片机在工业控制系统诸多领域得到了极为广泛的应用。
特别是其中的C51系列的单片机[3]的出现,具有更好的稳定性,更快和更准确的运算精度,推动了工业生产,影响着人们的工作和学习。
而本次设计就是要通过以C51系列单片机为控制核心,实现空调机温度控制系统的设计。
1.1方案一选用AT89C51单片机为中央处理器,通过温度传感器DS18B20对空气进行温度采集,将采集到的温度信号传输给单片机,由单片机控制显示器,并比较采集温度与设定温度是否一致,然后驱动空调机的加热或降温系统对空气进行处理,从而模拟实现空调温度控制单元的工作情况。
在整个设计中,涉及到温度检测电路、驱动控制电路、显示电路、键盘电路以及电源的设计等电路。
其中单片机的控制程序是起到各个电路之间的相互协调,控制各个电路正常工作的至关重要的作用。
其方框图如下:图1-1 方案一设计图框该图控制简单,思路清晰,各单元模块的相互衔接较简单,同时成本低廉,用的各种器件都是常用器件,更具有使用性。
基于单片机的温度控制系统设计与应用温度控制系统是一种常见的自动控制系统,用于维持设定温度范围内的温度稳定。
本文将介绍基于单片机的温度控制系统的设计与应用。
一、系统设计1.功能需求:(1)温度检测:获取环境温度数据。
(2)温度显示:将检测到的温度数据以数字方式显示。
(3)温度控制:通过控制输出信号,自动调节温度以维持设定温度范围内的稳定温度。
2.硬件设计:(1)单片机:选择适合的单片机,如51系列、AVR系列等,具有较强的计算和控制能力。
(2)温度传感器:选择适当的温度传感器,如DS18B20、LM35等,能够准确检测环境温度。
(3)显示屏:选择适当的数字显示屏,如LCD显示屏、数码管等,用于显示温度数据。
(4)执行机构:根据具体需求选择合适的执行机构,如继电器、风扇等,用于控制温度。
3.软件设计:(1)温度检测:通过单片机采集温度传感器的模拟信号,并通过数字转换获得温度数据。
(2)温度显示:将获取到的温度数据进行处理,通过数字显示屏显示。
(3)温度控制:通过控制执行机构,如继电器等,根据温度数据的变化进行调节,将温度维持在设定范围内。
二、系统应用1.家居温控系统:家庭中的空调、暖气等设备可以通过单片机温度控制系统实现智能控制。
通过温度传感器检测室内温度,并将温度数据显示在数字显示屏上。
通过设定温度阈值,当室内温度超出设定范围时,系统控制空调或暖气进行启停,从而实现室内温度的调节和稳定。
这不仅提高了居住舒适度,还能节约能源。
2.工业过程控制:在工业生产过程中,一些特定的应用需要严格控制温度,以确保产品质量或生产过程的稳定。
通过单片机温度控制系统,可以实时检测并控制生产环境的温度。
当温度超过或低于设定的阈值时,系统可以自动调整控制设备,如加热器、冷却器等,以实现温度的控制和稳定。
3.温室农业:温室农业需要确定性的环境温度来保证作物的生长。
通过单片机温度控制系统,可以监测温室内的温度,并根据预设的温度范围,自动启停加热或降温设备,以维持温室内的稳定温度。
IMCU-based air-conditioning control systemABSTRACTAs a result of global climate warming and national people's living standards, air-conditioning will be in people's lives gradually become an indispensable part. Micro-computer control system for air conditioners by the task instructions and in accordance with 89S52 room temperature, indoor heat exchanger temperature, outdoor temperature heat exchangers, compressors, etc. to control the status of the operation of air conditioners. Specifically, is to control the compressor, outdoor fan, indoor fan, indoor wind motor and the actual set temperature and room temperature liquid crystal display with LCD display. Main function is based on room temperature and temperature difference, and considering other conditions, and then on the indoor and outdoor compressors and fans running for intelligent control.The control system uses a single chip AT89S52 data collection, data processing to achieve the temperature control system of regulation and control. The main process is as follows: use of temperature sensor DS18B20 collecting temperature signal and then the signal is converted to non-power electrical signal, electrical signal and then converted into the A / D converter into a digital transmitted to the single-chip microcomputer for data processing, and output control signal peripherals. Loss single-chip, and then displayed by the single-chip control, and compare the acquisition of the temperature and the temperature settings are consistent, and then drive the heating or air conditioning to cool the air to deal with the cycle in order to achieve the regulation of indoor temperature in the entire design, related to the temperature detection circuit, driver control circuit, display circuit, the keyboard circuit and power circuit design. LCD charged by the real-time display of temperature and set temperature, in line with the use of C language and assembly language programming to enable software conversion air-conditioning temperature of the basic functions of intelligence. Low cost of this control circuit, functional and practical, is easily to operate, a certain degree of practical value.This paper discusses three aspects, first of all is the description of the hardware circuit; then the software part of the design; the final is the realization of function.KEY WORDS:Temperature Control,89S52, DS18B20 ,LCD liquid crystal displayII基于单片机的空调控制系统摘要由于全球气候的变暖和国内人民生活水平的提高,空调将逐渐成为人们生活中不可缺少的一部分。
基于单片机的温控系统设计与实现温控系统是一种可以根据环境温度自动调节设备工作状态的系统。
基于单片机的温控系统是一种利用单片机计算能力、输入输出功能及控制能力,通过传感器获取环境温度信息并实现温度控制的系统。
下面将对基于单片机的温控系统的设计与实现进行详细介绍。
一、系统设计和功能需求:基于单片机的温控系统主要由以下组成部分构成:1.温度传感器:用于获取当前环境温度值。
2.控制器:使用单片机作为中央控制单元,负责接收温度传感器的数据并进行温度控制算法的计算。
3.执行器:负责根据控制器的指令控制设备工作状态,如电风扇、加热器等。
4.显示器:用于显示当前环境温度和控制状态等信息。
系统的功能需求主要包括:1.温度监测:通过温度传感器实时获取环境温度数据。
2.温度控制算法:根据温度数据进行算法计算,判断是否需要调节设备工作状态。
3.设备控制:根据控制算法的结果控制设备的工作状态,如打开或关闭电风扇、加热器等。
4.信息显示:将当前环境温度及控制状态等信息显示在显示器上。
二、系统实现的具体步骤:1.硬件设计:(1)选择适合的单片机:根据系统功能需求选择合适的单片机,通常选择具有较多输入输出引脚、计算能力较强的单片机。
(2)温度传感器的选择:选择合适的温度传感器,常见的有热敏电阻、热电偶、数字温度传感器等。
(3)执行器的选择:根据实际需求选择合适的执行器,如电风扇、加热器等。
(4)显示器的选择:选择适合的显示器以显示当前温度和控制状态等信息,如液晶显示屏等。
2.软件设计:(1)编写驱动程序:编写单片机与传感器、执行器、显示器等硬件的驱动程序,完成数据的读取和输出功能。
(2)设计温度控制算法:根据监测到的温度数据编写温度控制算法,根据不同的温度范围判断是否需要调节设备工作状态。
(3)控制设备的逻辑设计:根据温度控制算法的结果设计控制设备的逻辑,确定何时打开或关闭设备。
(4)设计用户界面:设计用户界面以显示当前温度和控制状态等信息,提示用户工作状态。
基于单片机的空调温度控制系统设计作者姓名:杨耀武专业名称:信息工程指导教师:黄宇讲师摘要在自动控制领域中,温度检测与控制占有很重要地位。
温度测控系统在工农业生产、科学研究和在人们的生活领域,也得到了广泛应用。
因此,温度传感器的应用数量居各种传感器之首。
目前,温度传感器正从模拟式向数字集成式方向飞速发展。
本论文概述了温控器的发展及基本原理,介绍了温度传感器的原理及特性。
分析了DS18B20温度传感器的优劣。
在此基础上描述了系统研制的理论基础,温度采集等部分的电路设计,并对测温系统的一些主要参数进行了讨论。
同时在介绍温度控制系统功能的基础上,提出了系统的总体构成。
针对测温系统温度采集、接收、处理、显示部分的总体设计方案进行了论证,进一步介绍了单片机在系统中的应用,分析了系统各部分的硬件及软件实现。
利用Proteus7.6进行了可行性的仿真,利用单片机开发板验证在实际电路中能起到的效果。
试验证明,这套温度控制器具有较强的可操作性,很好的可拓展性,控制简单方便。
课题初步计划是在普通环境下的测温,系统的设计及器件的选择也正是在这个基础上进行的。
关键词:DS18B20 单片机温度控制 1602液晶显示AbstractIn the automatic control area,temperature monitoring and controling have a very important position. The temperature monitoring system has a wildly applying in industry, agriculture, science reasearching and daily life of people. Therefore, the number of applying of the temperature monitoring comes first of all kinds of sensor. At present, the temperature monitoring is transformed from analog type to digital integrated type with a very fast speed.This paper introduces the developing and fundamental of the temperature monitoring, including the character of this kind of sensor. It also analyses the advantage and disadvantage of the temperature monitoring which named DS18B20. On that basis, the paper also has a further analysis of the theoretical basis of the system developing and the circuit design of temperature monitoring. Besides, some discussions about the important parameters also took on desk. At the same time, the auther of this paper also puts forward the composition of totality about this system, which including the different function of the thermometer system. Then a detailed analysis which is about the applying of Microcontrollers and the applying of different parts made by different hardwares and softwares in the system. In order to check the maneuverability and the expansibility of the Microcontrollers system, the auther used Proteus 7.6 to do the testing and got a pretty good result.This system puts the temperature measured in normal situation as a confirm condition. All design and selection of页脚内容component is also based on this suppose.keywords: DS18B20, Microcontrollers, Temeperature Controling, 1602 Liquid Crystal Display页脚内容目录摘要 (I)Abstract (II)目录 (IV)前言 (1)1 系统总体设计方案及功能 (2)1.1 温度传感器产品分类与选择 (2)1.1.1 常用的测温方法 (2)1.1.2 温度传感器产品分类 (2)1.1.3 温度传感器的选择 (4)1.2 总体方案的确定 (6)1.3 系统实现框图 (7)2 系统单元电路设计 (7)2.1 系统工作原理 (7)2.2 系统相关硬件及模块介绍 (8)页脚内容2.2.1 温度采集电路 (8)2.2.2 信号处理与控制电路 (9)2.2.3 温度显示电路 (10)2.2.4 按键功能设置电路 (11)2.2.5 继电器控制电路 (12)2.2.6 存储数据电路 (13)2.2.7 报警、音乐电路 (13)2.2.8 电动机电路 (14)3 仿真软件介绍 (15)3.1 Keil uVision2软件 (15)3.2 Proteus软件 (16)4 系统硬件设计 (18)5 系统软件设计 (20)5.1 DS18B20数据通信概述 (20)5.2 LCD1602液晶数据显示概述 (23)5.2.1 接口信号说明 (23)5.2.2 控制器接口说明 (24)页脚内容5.2.3 控制接口时序说明 (26)5.3 存储器24C02数据存储概述 (26)5.3.1 I2C 总线的定义 (26)5.3.2 I2C 总线的时序 (27)5.3.3 数据传送 (28)5.4 软件程序设计 (28)6 仿真及实验结果 (31)6.1 程序调试过程中遇到的问题及解决办法 (31)6.2 调试结果 (31)总结 (34)致谢 (35)参考文献 (36)附件1 系统硬件电路图 (37)附件2 系统软件程序 (38)页脚内容前言现代信息技术的三大基础是信息采集控制(即温度控制器技术)、信息传输(通信技术)和信息处理(计算机技术)。
基于单片机的空调温度控制系统设计下载提示:该文档是本店铺精心编制而成的,希望大家下载后,能够帮助大家解决实际问题。
文档下载后可定制修改,请根据实际需要进行调整和使用,谢谢!本店铺为大家提供各种类型的实用资料,如教育随笔、日记赏析、句子摘抄、古诗大全、经典美文、话题作文、工作总结、词语解析、文案摘录、其他资料等等,想了解不同资料格式和写法,敬请关注!Download tips: This document is carefully compiled by this editor. I hope that after you download it, it can help you solve practical problems. The document can be customized and modified after downloading, please adjust and use it according to actual needs, thank you! In addition, this shop provides you with various types of practical materials, such as educational essays, diary appreciation, sentence excerpts, ancient poems, classic articles, topic composition, work summary, word parsing, copy excerpts, other materials and so on, want to know different data formats and writing methods, please pay attention!一、引言空调温度控制系统是现代家庭中不可或缺的一部分。
基于单片机的空调控制器设计资料空调控制器是一种基于单片机的设备,用于控制和调节空调系统的运行和温度。
它可以监测室内温度、湿度和空气质量,并根据预设的温度和湿度值自动调节空调系统的工作状态,从而提供舒适的室内环境。
一、设计目标本空调控制器设计的主要目标是提供一个自动化的系统,能够实现以下功能:1.监测和显示当前的室内温度、湿度和空气质量。
2.根据预设的温度和湿度值自动调节空调系统的工作状态,包括启动、关闭和调节制冷和制热功能。
3.提供人机界面,让用户可以通过按键或触摸屏设置和调整温度和湿度值。
4.通过与网络或其他外部设备的连接,实现远程控制和监测的功能。
二、硬件设计1. 主控芯片:选择一款功能强大的单片机作为主控芯片,具备足够的计算能力和存储容量,如STC89C52或ATmega328P等。
2.温湿度传感器:选择一款高精度的温湿度传感器,如DHT22或DS18B20等,用于监测室内温度和湿度。
4.显示屏:选择一款合适尺寸和分辨率的液晶显示屏,用于显示当前的温度、湿度和空气质量,以及其他系统状态信息。
5.按键或触摸屏:提供给用户设置和调整温度和湿度值的界面,可以选择按键或触摸屏。
6.连接接口:提供与外部设备(如电脑、手机等)通信的接口,如RS232、RS485、Wi-Fi或蓝牙等,用于实现远程控制和监测的功能。
三、软件设计1.系统初始化:开机自检,初始化各个硬件模块,包括主控芯片、温湿度传感器、空气质量传感器、显示屏等。
2.数据采集:定时读取温湿度传感器和空气质量传感器的数据,并将其显示在显示屏上。
3.控制算法:根据预设的温度和湿度值,通过控制空调系统的工作状态,包括启动、关闭和调节制冷和制热功能来实现自动调节。
4.用户界面:提供给用户设置和调整温度和湿度值的界面,通过按键或触摸屏操作,并将用户的设置保存在存储器中。
5.远程控制:通过与外部设备的通信接口实现与电脑、手机等的连接,通过网络或其他通信方式实现远程控制和监测的功能。
基于单片机的空调温度控制器设计The design of air conditioning temperature controller based on MCU学院:信息科学与工程专业班级:测控技术与仪器1003班学号:100401316学生姓名:刘和平指导教师:颜华(教授)2014 年6 月摘要随着经济的发展和人们生活水平的提高,空调机受到了广泛的应用。
空调机的温度控制器主要是由温度传感器感受室内温度变化,将采集到的温度信号处理后与设定的温度值进行比较,控制继电器的通断,使温度被控制在设定值左右,使空调器的工作状态随着人们要求和环境状态而自动变化,迅速准确的达到人们的要求,并使空调器的工作状态保持在最合理的状态下。
在工农业生产、科学研究和在人们的生活领域中,温度测控系统占有很重要的地位,得到了广泛的应用。
因此,温度传感器的应用数量居各种传感器之首。
目前,温度传感器正从模拟式向数字集成式方向飞速发展。
本文主要从硬件和软件两方面介绍了单片机温度控制系统的设计。
该系统以STC12C5608AD单片机为核心,主要由温度检测电路、按键与显示电路、继电器控制电路等构成。
在本系统中,主要是同过DS18B20采集被测温度并转换成数字信号送单片机,以单片机为核心数据处理系统,通过两位数码管,显示设定温度,通过继电器来控制压缩机、四通阀从而控制空调制冷或制热。
本论文概述了温控器的发展及基本原理,介绍了温度传感器的原理及特性,分析了DS18B20温度传感器的优劣。
在此基础上描述了系统研制的理论基础,对测温系统的一些主要参数进行了讨论。
同时在介绍温度控制系统功能的基础上,提出了系统的总体构成。
针对测温系统温度采集、接收、处理、显示部分的总体设计方案进行了论证,进一步介绍了单片机在系统中的应用,分析了系统各部分的硬件及软件实现。
关键词:DS18B20;单片机;温度控制;空调AbstractWith the development of economy and the improvement of people's living standard, the air conditioner has been widely applied. Temperature controller of air conditioner is mainly composed of sensors to monitor indoor temperature, the temperature signal processing the collected with the set temperature value, to control the on-off relay, the temperature is controlled in the set value, the air conditioner working condition with people demand and the state of the environment changes rapidly and automatically, accurate to the requirements of the people, and make the air conditioner working state is maintained in a reasonable state. In the industrial and agricultural production, scientific research and in people's lives, temperature measurement and control system plays a very important role, has been widely applied. Therefore, the number of temperature sensor applications of various sensors of the first home. At present, the temperature sensor from analog to digital integrated development.This paper mainly describes the hardware and software aspects of the design of single-chip temperature control system. The system STC12C5608AD microcontroller core, mainly by the temperature detection circuit, buttons and display circuit, relay control circuit, etc.. In this system, mainly through the DS18B20 collection with the measured temperature and converted into a digital signal sent to the microcontroller, microcontroller as the core data processing system, through two digital tube display set temperature, the compressor is controlled by relays, Stone valve to control the air conditioning, refrigeration or heating. This paper outlines the development and the basic principles of the thermostat, introduced the principle and characteristics of the temperature sensor. Analysis of the merits of the DS18B20 temperature sensor. Based on this description of the theoretical basis for the development of the system, some of the key parameters of the measurement system were discussed. While the introduction of a temperature control system functions is proposed based on the overall structure of the system. Temperature measurement system for collecting, receiving, processing, display part of the overall design has been demonstrated, further describes the SCM applications in the system, and analyzes the various parts of the system hardware and software.Keywords: DS18B20; single chip microcomputer; temperature control; air conditioningII目录摘要 (I)Abstract (II)第1章绪论 (1)1.1 课题研究目的 (1)1.2 课题研究意义 (1)第2章系统总体方案设计 (3)2.1 温度传感器产品分类与选择 (3)2.1.1 常用的测温方法 (3)2.1.2 温度传感器产品分类 (3)2.1.3 温度传感器的选择 (5)2.2 总体方案的确定 (6)2.3 系统实现框图 (7)第3章系统单元电路设计 (8)3.1 系统相关硬件及模块介绍 (8)3.1.1 温度采集电路 (8)3.1.2 STC12C5608AD介绍 (9)3.1.3 时钟电路 (11)3.1.4 复位电路 (11)3.1.5 温度显示电路 (12)3.1.6 按键功能设置电路 (13)3.1.7 继电器驱动电路 (14)3.1.8 继电器控制电路 (14)3.1.9 压缩机、四通阀 (15)3.1.10 电动机电路 (15)第4章系统软件设计 (17)4.1 DS18B20数据通信概述 (17)4.2 控制接口时序说明 (19)4.3 软件程序设计 (20)4.3.1 主程序模块流程图 (21)4.3.2 DS18B20测温程序及流程图 (22)4.3.3 按键扫描程序及流程图 (25)4.4程序调试 (26)4.4.1 Keil uVision2软件 (26)4.4.2程序调试过程中遇到的问题及解决办法 (27)第5章结论 (28)参考文献 (29)致谢 (31)附录1 系统硬件电路图 (32)附录2 系统软件程序................................................................................ 错误!未定义书签。
第1章绪论1.1 课题研究目的利用单片机设计一个具有制冷和制热两种工作模式的空调温度控制器。
该控制器能够实时检测并显示室温,能利用键盘设定温度、风速和工作模式,并根据设定的温度、当前温度和工作模式,使压缩机处于制热、制冷或暂停工作状态。
1.2 课题研究意义现代信息技术的三大基础是信息采集控制(即温度控制器技术)、信息传输(通信技术)和信息处理(计算机技术)。
温度控制器属于信息技术的前沿尖端产品,尤其是温度控制器被广泛用于工农业生产、科学研究和生活等领域,数量日渐上升。
温度检测并控制是科研和实际生产生活中经常用到的一类控制系统,为保障生产的安全进行,提高生产的质量和数量,降低工人的劳动强度,节省人力,能源等,以及伴随人们生活品质的提高,对舒适的生活环境的需求,常常要实现温度的自动控制。
随着电子技术和微型计算机的迅速发展,微机测量和控制技术得到迅速发展和广泛运用。
进入21世纪后,温度控制器正朝着高精度、总线标准化、高可靠性以及安全性、研制单片机测温控温系统等高科技的方向迅速发展。