I摘要伴随社会发展,现代工程对温度控制要求很高。传统温度控制系统一般采用模拟电路控制技术,结果是温度控制达不到相应的要求。因此,设计一种较高级别的温度控制系统将会具有很重要的意义。洗浴行业遍布全国各地,合理的进行水温控制无疑是具有很大的社会利益。本文模拟浴室水温控制箱对水温进行控制,使其能更好的为大众服务。本系统设计以浴室温度控制为出发点,采用模块化设计,以使用最为广泛的单片机STC89C52作为系统核心;采用测量精度高、对环境要求小的Pt100温度传感器来采集温度;通过模数转换芯片ADC0809将采集到的温度转换成数字量送到单片机中进行数据处理;采用三个独立按键进行温度参数设定;使用4位共阴极数码管显示器来动态显示系统采集到的实时数据和设定的温度值;输出控制经过数模转换芯片DAC0832将数字量转换成对应的模拟量,然后连接功率放大器来进行功率放大,通过电热管对浴室中水箱内的水进行加热,冷却采用的方式是自然冷却;液位控制以保护的方式体现,通过设定水箱液位的上限和下限,进行液位保护;还有声光报警装置,当温度过高或者过低时,启动声光报警装置。在控制算法方面,采用比较法,使温度控制箱的控制准确。通过以上设计可以使温控箱的温度测量与控制较传统的温控箱有很大改善。关键词:单片机温度控制Pt100温度传感器IIAbstractWiththesocialdevelopment,modernengineeringfortemperaturecontrolhavehighdemands.Conventionaltemperaturecontrolsystemsgenerallyuseconventionalanalogcircuittemperaturecontroltechnology,resultingintemperatureinsidetemperaturecontrolaccuracyoflessthanthecorrespondingrequirements.So,thedesignofacontrolsystemwithahighprecisiontemperaturewillhaveaveryimportantsignificance.Bathindustrythroughoutthecountry,werereasonabletemperaturecontrolisundoubtedlyofgreatsocialbenefit.Thispaperanalogbathroomtemperaturecontrolboxfortemperaturecontrol,sothatitcanbetterservethepublic.Fromthepracticalengineeringapplicationsasastartingpoint,theuseofmodulardesign.WiththemostwidelyusedmicrocontrollerSTC89C52heartofthesystem.Measuredusingawiderange,highmeasurementaccuracyPt-100temperaturesensorscollecttemperature.Byanalog-digitalconversionchipADC0809toconvertanalogtodigitaldataprocessingtomicrocontroller.Usingthreeseparatebuttonsfortemperatureparametersettings.UsingfourcommoncathodeLEDdisplayshowsthetemperaturevalueofthesystemtodynamicallycollectreal-timedataandsettings.OutputcontrolafterDAC0832digital-analogconverterchiptoconvertdigitaltoanalog,thenthroughthepoweramplifierpoweramplifier,connectedtotheelectricheatingtubeIIItemperature.Coolingusingnaturalcoolingway.LevelcontrolandprotectionEmbodiedbysettingtheupperandlowerwaterlevel,liquidlevelprotection.Therearesoundandlightalarmdevice,whenthetemperatureistoohighortoolow,thestartsoundandlightalarmdevices.Intermsofthecontrolalgorithm,bycomparison,thetemperaturecontrolboxcontrolisaccurate.Throughtheabovetemperaturecontrolboxdesignallowstemperaturemeasurementandcontrolthantraditionaltemperaturecontrolboxcontrolsystemhasgreatlyimproved.Keywords:MonolithicIntegratedCircuitTemperatureControlPt100temperaturesensorIV目录摘要.....................................................................................................................IAbstract................................................................................................................II1绪论....................................................................................................................11.1课题研究的背景以及意义......................................................................11.2国内外的研究现状..................................................................................11.3课题设计的主要工作..............................................................................22系统总体设计....................................................................................................32.1系统的功能..............................................................................................32.2系统硬件方案分析..................................................................................32.3系统软件方案分析..................................................................................43硬件电路设计....................................................................................................63.1单片机......................................................................................................63.1.1单片机选取..................................................................................63.1.2单片机的介绍..............................................................................63.1.3时钟电路......................................................................................83.1.4复位电路......................................................................................83.1.5I/O口扩展电路............................................................................93.2铂电阻测温电路....................................................................................103.3A/D转换器及接口电路..........................................................................123.4键盘显示接口电路................................................................................133.4.1键盘输入电路..............................................................................133.4.2数码管显示电路..........................................................................143.5输出控制电路........................................................................................153.6保护报警电路........................................................................................173.6.1液位保护电路..............................................................................173.6.2报警电路......................................................................................184软件电路设计..................................................................................................194.1软件整体设计思路