基于单片机的温度控制电路设计学院江汉大学机建学院专业光机电一体化班级08光机电一学号016508201248姓名李杰指导教师兰琳负责教师兰琳江汉大学机电与建筑学院2012年2月摘要本文介绍了基于C51单片机和电压比较器的空调温度自动控制系统,重点研究了温度采集模块和电压比较模块。通过对温度采集模块不同方案(热电偶传感器、电阻式温度探测器和半导体型温度传感器)的比较和分析,得出最佳结果,并详细分析了温度传感器AD590分别在单片机和电压比较器控制下的工作流程;通过分析空调控制器工作原理,结合课本知识,设计出电压比较模块电路和A/D转换电路。本文在阐述多点测温系统设计背景及单片机工作原理的基础上,详细介绍了该系统的硬件和软件设计过程。其中,硬件设计是以AT89S52单片机和DS18B20数字温度传感器为核心器件,主要由四路温度采集、单片机数据处理、键盘输入、LCD温度显示等四部分组成。软件设计采用模块化编程方法,使得程序易于调试和维护,并利用C语言实现数据处理、LCD显示、键盘扫描等各功能子程序的编写,并通过PROTELDXP软件对该系统的各项功能进行了仿真。大量实验表明,所设计的单片机空调测温系统能够较好实现空调各项功能。该系统结构简单、抗干扰性强、实用性强,具有一定的工程应用价值。关键词:C51单片机;电压比较器;温度传感器;A/D转换电路LCD显示AbstractThisarticledescribestheautomaticcontrolsystemofair-conditioningtemperaturewhichbasesC51microcontroller,andfocusingonthetemperatureacquisitionmoduleandthevoltagecomparatormodule.Throughtemperatureacquisitionmoduleondifferentoptions(thermocouplesensors,resistancetemperaturedetectorsandsemiconductortemperaturesensor)incomparisonandanalysistoobtainbestresults.AndImakeadetailedanalysisofworkflowtemperaturesensorAD590.Byanalyzingtheworkingprincipleofairconditioningcontroller,combinedwithtextbookknowledgetodesignavoltagecomparatorcircuitmodule.Inaddition,thepaperalsodescribesthetemperaturecontrolsystemusedinthemicrocontrollerandtheA/Dconvertercircuitdesign.Thisarticleanalysesmoretemperaturemeasurementsystemdesignbackgroundandsinglechipmicrocomputer,thebasicprincipleofthesystemisdiscussedindetailthehardwareandsoftwaredesignprocess.Amongthem,thehardwaredesignisAT89S52SCManddigitaltemperaturesensorDS18B20forthecoredevice,andthemainroad4temperaturegatheringandsingle-chipmicrocomputerdataprocessing,keyboardinput,LCDtemperaturedisplayfourcomponents.Thesoftwaredesignusingmodularprogrammingmethod,andmakestheprogramiseasytodebugandmaintenance,andbyusingClanguageimplementationdataprocessing,LCDdisplay,keyboardscaneachfunctionandthewritingoftheprocedure,andthroughthesystemsoftwarePROTELDXPeachfunctionofthesimulation.Experimentsshowthatthedesignofthesinglechipmicrocomputertemperaturemeasuringsystemisabletoairconditioningbetterrealizethefunctionofairconditioning.Thesystemstructureissimpleandrobustof,practicalstrong,hassomeoftheengineeringapplicationvalue.Keywords:C51microcontroller;voltagecomparator;temperaturesensor;A/Dconvertercircuit;LCD目录摘要……………………………………………………………………3第一章:绪论…………………………………………………………………1.1课题来源……………………………………………………1.2温度采集系统的意义……………………………………………1.3研究的目的及意义……………………………………1.4温度传感器的国内外研究动态………………………第二章:整体思路………………………………………………………32.1系统设计方框图2.2系统方案选择2.3系统部件功能简介第三章温度采集部分…………………………………………………………43.1温度传感器……………………………………………………………43.1.1…………………...