还剩9页未读,继续阅读
本资源只提供10页预览,全部文档请下载后查看!喜欢就下载吧,查找使用更方便
文本内容:
温度控制系统的设计摘要研究了基于AT89s51单片机温度控制系统的原理和功能,温度测量单元由单总线数字温度传感器DS18B20构成该系统可进行温度设定,时间显示和保留监测数据假如温度超过任意设置的上限和下限值,系统将报警并可以和自动控制的实现,从而到达温度监测智能一定范围内基于系统的原理,很轻易使其他多种非线性控制系统,只要软件设计合理的变化该系统已被证明是精确的,可靠和满意通过现场实践关键词单片机;温度;温度Th.LC.grayscal.ca.b.change.b.adjustin.th.variabl.resisto.connecte.th.pi.Vic.o.th.LCD.CL.i.use.t.transmi.seria.communicatio.clock.SLi.use.t.transmi.seria.data.C.i.use.t.enabl.contro.th.LCD.L.i.use.t.contro.th.LC.backligh.power.D.Cloc.Circui.Th.Dalla.DS
130.i.used.whic.i..hig.performance.low-powe.an.real-tim.cloc.chi.wit.RAM.Th.DS
130.serve.i.th.syste.wit.calenda.doc.an.i.use.t.monito.th.time.Th.tim.dat.i.rea.an.processe.b.th.AT89S
5.an.the.displaye.b.th.LCD.Als.th.tim.ca.b.adjuste.b.th.keyboard.Th.DS
130.crysta.oscillato.i.se.a.32768Hz.an.th.recommende.compensatio.capacitanc.i.6p F..mak..bi.differenc.t.th.tim.precision.Th.backu.powe.suppLca.b.connecte.t..
3.
6.rechargeabl.battery.E.Keyboar.Contro.Circui.Th.keyboar.interfac.X.keyboar.i.used.an.th.keyboar.code.ar.define.as.07H.0FH.17H.lFH.27H.2FH.Th.orde.ca.b.rea.ou.b.readin.th.cod.instruction.HD
7279.i.connecte.t.th.AT89S
5.i.seria.mod.an.onl..port.ar.need.A.show.i.Fig.
6.DIG0-DIG.an.D.ar.respectivel.th.colum.line.an.ro.lin.port.o.th.si.key.whic.achiev.keyboar.monitoring.decodin.an.ke.code.identification.F.Alar.Circui.Lorde.t.simplif.th.circui.an.convenien.debugging..
5.automati.buzze.i.use.i.th.alar.circui.
[8].An.thi.mak.th.softwar.programmin.simplified.A.show.i.Fig.
7.i.i.controlle.b.th.PN.transisto.
901.whos.bas.i.connecte.t.th.pi.P
2..o.th.AT89S
51.Whe.th.temperatur.exceed.th.uppe.an.lowe.limi.value.th.P
2..outpu.lo.leve.whic.make.th.transisto.b.o.an.the.a.alar.i.give.b.th.buzzer.G.Driv.Circui..ste.moto.i.use.a.th.driv.devic.t.contro.th.temperature.Th.four-phas.an.eight-bea.puls.distributio.mod.i.use.t.driv.moto.an.th.simpl.dela.progra.i.use.t.handLth.tim.interva.betwee.th.pulse.t.obtai.differen.rotationa.speed.Ther.ar.tw.outpu.state.fo.th.ste.motor.One.whe.th.temperatur.i.ove.th.uppe.value.th.moto.rotate.reversel.t.lo.th.temperature.whil.whe.lowe.tha.th.lowe.limi.value.th.moto.rotate.normall.t.rais.th.temperature.beside.no.equal.th.prese.value.Two.whe.th.temperatur.i.a.somewher.betwee.th.tw.end.an.equal.th.prese.value.th.moto.stops.Thes.step.ar.use.t.achiev.th.temperatur.control.I.addition.th.moto.spee.ca.als.b.adjuste.b.relativ.buttons.A.show.i.Fig.
8.th.cod.dat.i.inpu.throug.port.Al l-A.b.P
2.3-P
2.
0.o.th.AT89S
5.an.inverte.outpu.b.th.inverte.74LS
04.FinalLi.i.amplifie.b.th.powe.amplifie.
2803.t.powe.th.motor.IV.SOFTWAR.DESIG.Accordin.t.th.genera.desig.requiremen.an.hardwar.circui.principl.o.th.system.a.wel.a.th.isig.i.modularized.Th.syste.flo.mainl.include.th.foliowin..steps.POS.Power-o.self-test.syste.initiation.temperatur.detection.alar.handling.temperatur.control.doc.chi.DS
130.operation.LC.an.keyboar.operation.Th.mai.progra.flo.i.show.i.Fig.
9.Giv..littl.analysi.t.th.abov..tasks.i.i.eas.t.fin.ou.tha.th.las.fiv.task.requir.th.rea.tim.operation.Bu.t.th.temperatur.detectio.i.ca.b.achieve.wit.timer.timin..second.tha.i.t.sa.temperatur.detectio.occur.pe.second.Th.syste.initiatio.include.globa.variabl.definition.RA.initiation.specia.functio.registe.initiatio.an.periphera.equipmen.initiation.Globa.variabl.definitio.mainl.finishe.th.interfac.definitio.o.externa.interfac.chi.connecte.t.th.AT89S
51.an.specia.definitio.o.som.memor.units.RA.initiatio.mainl.refer.t.RA.processing.Fo.exampl.whe.th.syste.i.electrifie.th.tim.cod.wil.b.store.i.th.interna.uni.addres.o.th.scintillatio.fla.wil.b.cleared.Th.specia.functio.registe.initiatio.include.loadin.th.initia.valu.o.time.an.openin.th.interrupt.Fo.example.whe.th.syste.i.electri fie.th.time.i.initialized.Th.periphera.equipmen.initiatio.refer.t.se.th.initia.valu.o.periphera.equipment.Fo.example.whe.th.syste.i.electrified.th.LC.shoul.b.initialized.th.start-u.displa.shoul.b.called.th.temperatur.conversio.comman.shoul.b.issue.firstl.an.th.cloc.chi.DSl
30.shouLals.b.initialized.Th.alar.handlin.i.mainl.th.lowerin.an.th.raisin.o.temperatur.t.mak.th.temperatur.remai.wit.th.prese.range.Whe.th.temperatur.i.betwee.th.uppe.an.th.lowe.limi.value.i.goe.t.temperatur.contro.handling.tha.i.t.sa.th.temperatur.nee.t.b.raise.o.lowere.accordin.t.th.prese.value.B.doin.s.mak.th.conditio.temperatur.equa.t.th.prese.valu.an.henc.t.reac.th.temperatur.target.V.CONCLUSIO.Th.temperatur.contro.syste.ha.th.advantage.o.friendl.human-compute.interactio.interface.simpl.hardware.lo.cost.hig.temperatur.contro.precisio.erro.i.th.rang.o.±.℃.convenienc.an.versatility.etc.l.ca.b.widel.use.i.th.occasion.wit.-
55.t.
125.range.an.ther.i..certai.practica.value.I.导言...温度是在人类生活中非常重要日勺参数在现代社会中,温度控制TC不仅用于工业生产,还广泛应用于其他领域伴随生活质量日勺提高,我们可以发目前酒店,工厂和家庭,以及比赛设备而比赛的I趋势将更好地服务于整个社会,因此它具有十分重要的意义测量和控制温度在AT89s51单片机和温度传感器DS18B20日勺基础上,系统环境温度智能控制温度可设定在一定范围内动任意该系统可以显示在液晶显示屏的时间,并保留监测数据,并自动地控制温度,当环境温度超过上限和下限的I值这样做是为了保持温度不变该系统具有很高的抗干扰能力,控制精度高,灵活的设计,它也非常适合这个恶劣的环境它重要应用于人们的I生活,改善工作和生活质量这也是通用的,因此它可以以便地扩大使用该系统因此,设计具有深刻的重要性一般的设计,硬件设计和软件系统日勺设计都包括在内H.系统总体设计...该系统硬件包括微控制器,温度检测电路,键盘控制电路,时钟电路,显示,报警,驱动电路和外部RAM基于AT89s51单片机,DS18B20日勺将温度信号传送到数字信号日勺检测和信号发送到微控制器进行处理最终,温度值显示在液晶12232F这些环节是用来实现温度检测使用键盘接口芯片HD7279在设定温度值,使用微控制器保持一定的温度,并使用液晶显示的温度控制设定值止匕外,时钟芯片DS1302用于显示时间和外部RAM6264是用来保留监测数据报警将予以及时蜂鸣器假如温度超过了上限和下限温度值IH.硬件设计A.微控制器...在AT89S51单片机是一种低功耗,高性能CMO.8位4K日勺系统内可编程闪存字节微控制器该设备是采用Atmel的高密度非易失性内存技术,并与业界原则的80C51指令集和引脚兼容片上闪存程序存储器可以编程就可以在系统或由老式的非易失性存储器编程通过结合在系统灵活的8位CPU集成在一种芯片可编程闪存,Atmel日勺单片机AT89S51是一种功能强大的微控制器提供了一种高度灵活的I和具有成本效益的处理方案诸多嵌入式控制应用为了节省监测数据,6264是用来作为外部RAM它是一种静态RAM芯片,低功耗具有8K字节的I内存B.温度检测电路...温度传感器是该系统的关键部分达拉斯DS18B20时使用,它支持..Wire总线接口,板上专利是在内部使用所有的传感器部分和转换电路集成在一种晶体管集成电路像[1]其测量范围为-55℃~125℃,在T0℃~85℃精度为±
0.5℃[2,3]由DS18B20的温度采集传播在..Wire总线的方式,这种高度提高了系统的抗干扰,使之适合在恶劣的环境现场温度测量[4]有两个电源DS18B20的供应方式首先是外部电源供应DS18B20的第一脚连接到地面,第二引脚用作信号线,三是连接到电源第二种方式是寄生电源[5]由于寄生电源会导致硬件电路,软件控制的难度和芯片日勺性能下降等,但DS18B20日勺s日勺复杂性,可以连接到
1.0端口的单片机在外部电源供电方式,它更受欢迎因此,外部电源供应使用,而第二个接脚连接到引脚PL3可单片机AT89s51其实,假如多有被检测,DS18B20JU S可以连接到..Wire总线不过,当数超过8,有一种向驾驶和更复杂日勺软件设计,以及..Wire总线长度日勺关注一般而言,这是不超过50米为了实现远程控制,该系统可在一种无线之一,意在打破了..Wire总线长度时限制
[6]oC.LCD显示屏电路...液晶显示12232F使用,这可以用来显示字符,温度值和时间,并提供一种友好的显示界面该12232F是一种具有8192128X32像素的J中文数据库和128个
1.X8像素的J ASCH字符集图形液晶显示它重要由行驱动器/列驱动器和
128.32点阵日勺充足显示图形,以及
7..X2个中文功能的液晶显示屏它是在并行或串行方式连接到外部CPU
[7]为了节省硬件资源,12232F应以串行方式连接到单片机AT89s51,只有4个输出使用的端口液晶显示屏灰度可以通过调整可变电阻连接的I液晶VLCD日勺PIN码CLK是用于传播串行通信时钟SID是用于传播串行数据CS是用来使能控制,液晶显示L+是用来控制LCD背光电源D.时钟电路...达拉斯DS1302%;使用,这是一种高性能,低功耗和实时时钟芯片与RAM在DS1302的服务于带有日历时钟系统,用于监测欧I时间读取数据的I时间由AT89s51单片机,再由液晶显示处理此外的时间可以调整键盘在DS1302日勺晶体振荡器设定为32768Hz日勺,提议的J赔偿电容是6pF振荡器的频率较低,因此有也许不连接的电容器,这不会有很大的不一样的时间精度备用电源可以连接到
3.6V的J可充电电池E.键盘控制电路...系统中的键盘接口HD7279A的驱动下,它有一种+.V单电源,这是连接,无需使用任何有源设备的键盘和显示根据基本规定和系统功能,只有6个按钮是必要日勺该系统的功能是由输入的数据接受单片机AT89s51为了节省外部电阻器,
1.6使用键盘和键盘代码定义为07hJu,OFH,17H条,1FH,27H款,2Fh的该命令可以读出通过阅读代码指令.HD7279A是连接到单片机AT89s51日勺串行模式,只有4个端口时需要DIG0-DIG5和DP分别列线和六个键是实现键盘监控,解码和识别关键代码行线端口F.报警电路...为了简化电路,调试以便,是一种5V的蜂鸣器自动报警电路中的应用[8]这使得软件编程简化它是由
901.PNP晶体管的基连接到AT89s51单片机欧|引脚P
2.5当温度超过上限和下限日勺值,P
2.5输出低电平使晶体管上,然后由一种报警蜂鸣器定G.驱动电路...一种步进电机作为驱动装置来控制温度四相和八打脉冲分派模式是用来驱动电机和简朴欧I延时程序是用来处理脉冲之间的时间间隔,获得不一样的转速有两个步进电机的I输出状态一当温度超过上限值时,电机反向旋转(以低的温度),而当低于下限值时,电机旋转正常(提高温度),除了不等于预设值二当温度在两者之间的某处结束,等于设定值时,电机停止这些环节是用来实现温度控制止匕外,电机的转速也可以调整相对按钮代码数据是通过港口答11-A8的输入(P
2.3sp
2.0时是)时逆变器74LS04由AT89S51单片机和反向输出最终,它被放大功放2803A权力电机IV.软件设计...按照一般设计规定,该系统的硬件电路原理,以及该程序的可读性,可移植性和改善的调试以便,软件设计模块化系统流程重要包括如下8个环节POST(加电自检),系统启动,温度检测,报警处理,温度控制,时钟芯片DS1302的操作,液晶显示和键盘操作给一点分析,上述8个任务,很轻易地发现,过去五年任务需要实时操作但对温度的检测,可与TIMERO计时1秒,即出现温度检测到达每秒系统启动包括全局变量的定义,内存启动,启动特殊功能寄存器和外围设备的启动全局变量的定义,重要完毕对外部接口连接到单片机AT89s51芯片,内存单位和某些特殊日勺定义的接口定义开始重要是指RAM日勺内存处理例如,当系统通电时间码将在内部单位地址或闪烁标志存储的信息将被清除特殊功能寄存器包括加载启动定期器初值时开放中断例如,当系统通电定期器初始化外围设备的启动,是指设置外围设备的初始值例如,当系统通电后,LCD应当被初始化,启动显示屏应当叫,温度转换命令时,必须先发出的时钟芯片DS1302也要被初始化报警处理重要是减少和温度日勺提高使温度保持在预设范围当温度之间的上限和下限时值,这是不言而喻的温度控制处理,即需要时温度升高或减少根据预设值这样做的条件温度等于设定值,从而到达温度的目的V.结论..温度控制系统具有友好的人机交互界面,硬件简朴,成本低,温度控制精度高(误差在±1℃范围内误差),便利性和多功能性等,它可广泛日勺场所使用的长处与-55℃至125℃范围内,且有一定的实用价值Design ofthe TemperatureControl SystemBased onAT89S51ABSTRACTTh.principl.an.function.o.th.temperatur.contro.syste.base.o.microcontrolle.AT89S
5.ar.studied.an.th.temperatur.measuremen.uni.consist.o.th.l-Wir.bu.digita.temperatur.senso.DSl8B
20.Th.syste.ca.b.expecte.t.detec.th.prese.temperature.displa.tim.an.sav.monitorin.data.A.alar.wil.b.give.b.syste.i.th.temperatur.exceed.th.uppe.an.lowe.limi.valu.o.th.temperatur.whic.ca.b.se.discretionaril.an.the.automati.contro.i.achieved.thu.th.temperatur.i.achieve,monitorin.intelligent!.withi..certai.range.Basin.o.principl.o.th.system.i.i.eas.t.mak..variet.o.othe.non-linea.contro.system.s.Ion.a.th.softwar.desig.i.reasonabLchanged.Th.syste.ha.bee.prove.t.b.accurate.reliabl.an.satisfie.throug.fiel.practice.KEYWORDS:AT89S51;microcontroller;DS18B20;temperatureL.INTRODUCTIO.Temperatur.i..ver.importan.paramete.i.huma.life.Lth.moder.society.temperatur.contro.TC.i.no.onl.use.i.industria.production.bu.als.widel.use.i.othe.fields.Wit.th.improvemen.o.th.1if.quality.w.ca.fin.th.T.applianc.i.hotels.factorie.an.hom.a.well.An.th.tren.tha.T.wil.bette.serv.th.whol.society.s.i,i.o.grea.significanc.t.measur.an.contro.th.temperature.e.i.o.hig.anti-jamming.hig.contro.precisio.an.flexibl.design.i.als.fit.th.rugge.environment.Li.mainl.use.i.peopleMif.t.improv.th.qualit.o.th.wor.an.life.Li.als.versatile.s.tha.i.ca.b.convenien.t.exten.th.us.o.th.system.S.th.desig.i.o.profoun.importance.Th.genera.design.hardwar.desig.an.softwar.desig.o.th.syste.ar.covered.IL SYSTE.GENERA.DESIG.Th.hardwar.bloc.diagra.o.th.T.i.show.i.Fig.l.Th.syste.hardwar.include.th.microcontroller.temperatur.detectio.circuit.keyboar.contro.circuit.cloc.circuit.Display.alarm.driv.circui.an.externa.RAM.Base.o.th.AT89s5l.th.DSl8B
2.wil.transfe.th.temperatur.signa.detecte.t.digita.signal.An.th.signa.i.sen.t.th.microcontrolle.fo.processing.A.las.th.temperatur.valu.i.showe.o.th.LC.12232F.Thes.step.ar.use.t.achiev.th.temperatur.detection.Usin.th.keyboar.interfac.chi.HD
727.t.se.th.temperatur.value.usin.th.microcontrolle.t.kee..certai.temperature.an.usin.th.LC.t.sho.th.prese.valu.fo.controllin.th.temperature.Laddition.th.doc.chi.DS
130.i.use.Lsho.tim.an.th.externa.RA.
626.i.use.t.sav.th.monitorin.data.A.alar.wil.b.give.b.buzze.i.tim.i.th.temperatur.exceed.th.uppe.an.lowe.limi.valu.o.th.temperature.
111.HARDWAR.DESIG.A.Microcontrolle.Th.AT89S
5.i..low-power.high-performanc.CMO.8-bi.microcontrolle.wit.
4.byte.o.in-syste.programmabl.Flas.memory.Th.devic.i.manufacture.usin.Atmel.high-densit.nonvolatil.memor.technolog.an.i.compatibl.wit.th.industry-standar.80C
5.instructio.se.an.pinout.Th.on-chi.Flas.aHow.th.progra.memor.t.b.reprogramme.in-syste.o.b..conventiona.nonvolatil.memor.programmer.B.combinin..versatiL8-bi.CP.wit.in-syste.programmabLFlas.o..monolithi.chip.th.Atme.AT89S
5.i..powerfu.microcontrolle.whic.provide..highly-flexibl.an.cost-effectiv.solutio.t.man.embedde.contro.applications.Minimu.syste.o.th.microcontrolle.i.show.i.Fig.
2.Lorde.t.sav.monitorin.data.th.
626.i.use.a.a.externa.RAM.Li..stati.RA.chip.low-powe.wit.
8.byte.memory.B.Temperatur.Detectio.Circui.Th.temperatur.senso.i.th.ke.par.i.th.system.Th.Dalla.DS18B
2.i.used.whic.support.th.1-WiChbetwee.・-10・~8・・i.土
0.
5.[.,3]-Th.temperatur.collecte.b.th.DS18B
2.i.transmitte.i.th.l-Wir.bu.way.an.thi.highLraise.th.syste.anti-jammin.an.make.i.fi.i.sit.temperatur.measuremen.o.th.rugge.environmen.
[4].Actually.
1.ther.ar.multipoin.t.b.detected.th.DS18B20s.ca.b.connecte.t.th.l-Wir.bus.Bu.whe.th.numbe.i.ove.
8.ther.i..concer.t.th.drivin.an.th.mor.comple.softwar.desig.a.wel.a.th.lengt.o.th.l-Wir.bus.Normall.i.i.n.mor.tha.50m.T.achiev.distan.control.th.syste.ca.b.designed.t..wireles.on.t.brea.th.lengt.limi.o.th.l-Wir.bu.
[6].C.LC.Circui.Th.LC.l
2232.i.used.whic.ca.b.use.t.sho.characters.temperatur.valu.an.time.an.suppL.friendl.displa.interface.Th.
12232.i..LC.wit.
819.128X
3.pixel.Chines.characte.databas.an.l
2.16XX.Chines.characters.Li.i..paralle.o.seria.mod.t.connec.t.externa.CP.
[7].I.orde.t.economiz.th.hardwar.resource.th.l
2232.shoul.b.connecte.t.th.AT89S
5.i.seria.mod.wit.onL.outpu.port.used.。
个人认证
优秀文档
获得点赞 0