资源描述:
《基于单片机的水箱温度自动测控系统设计》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、第35卷第3期计算机工程2009年2月Vol.35No.3ComputerEngineeringFebruary2009·工程应用技术与实现·文章编号:1000—3428(2009)03—0248—03文献标识码:A中图分类号:N945基于单片机的水箱温度自动测控系统设计112顾春阳,任玲,王广林(1.哈尔滨工业大学电气工程及自动化学院,哈尔滨150001;2.哈尔滨工业大学机电学院,哈尔滨150001)摘要:采用新型单片机STC12C5412AD以及高灵敏度的热敏电阻对水箱温度进行实时测量,由单片机内集成的10bitA/D进行模数转换,从而实现
2、实时监测、实时控制、实时显示及越限报警等功能。系统硬件由主机、电源、按键及显示、控温执行和串行口通信等部分组成,软件由主程序、温度检测转换、温度控制等模块组成。系统通过按键切换实现实际温度和设定温度在数码管中的显示和更改。实验结果表明,该系统检测精度高、反应快,具有一定应用价值。关键词:水温自动控制;热敏电阻;A/D转换;SPI通信DesignofWaterTankTemperatureAutomaticMeasuringandCybernatingSystemBasedonSCM112GUChun-yang,RENLing,WANGGuang-
3、lin(1.CollegeofElectricEngineering&Automation,HarbinInstituteofTechnology,Harbin150001;2.CollegeofMechinery&Electricity,HarbinInstituteofTechnology,Harbin150001)【Abstract】Thetemperatureofwatertankismeasuredonreal-timebyusingthenewkindofSingle-ChipComputer(SCM)STC12C5412ADandt
4、hermo-esistancesofhighsensitivity.Thereal-timemonitoring,controlling,displayingandover-limitalarmingareimplementedbyemployingA/Ddeviceof10digitsintegratedinthecomputerforthetransformationofanaloganddigit.Thehardwareofthesystemconsistsofthemaincomputer,powersource,buttonanddis
5、play,temperature-controllingprocess,andserialinterfacecommunication.Thesoftwareofthesystemconsistsofthemodulessuchasmainprogram,temperaturemeasurementandtransformation,temperature-controlling,andetc.Therealtemperatureistransformedandthesettemperatureinthenixietubeisdisplayeda
6、ndalteredarbitrarilywiththebutton.Experimentalresultsshowthissystemisofhighaccuracyinmeasurementandrapidityinresponse,whichhasthevalueofapplications.【Keywords】automaticcontrolofwatertemperature;thermo-resistance;A/Dtransformation;SPIcommunication1概述时调整设定温度,从而扩大应用范围,因此功能扩展为:通温
7、度检测和温度控制是单片机在电子产品中的主要应用过加热器实现升温,通过轴流风机实现降温;通过单片机控之一[1-2]。随着温度控制器应用范围的日益扩大,各种适用于制使温度相对恒定;控制温度精度约为0.1℃;通过按键输入不同场合的智能温度控制器应运而生。在科研和生产中,常设定值;实时显示当前温度值并可以进行设定温度与实际温要对某些系统进行温度监测和控制,目前已有的实现温控的度的显示转换;越限报警。方法有很多,如油浴恒温法、比例式、积分式及其组合的调2.2精度保证与实现方法节方法等,有的方法达到热平衡需要的时间很长,但其控温采用现有最灵敏的感温元件——热
8、敏电阻,并使用单片精度很高,而有的方法达到热平衡的时间短,但其控温精度机内的10bitA/D转换。由于控制精度要求为0.1℃,因此较低。