单片机的温度控制一个跨學科的本科工程设计项目

单片机的温度控制:I.个跨学科的本科工程设计项目
JamesS.McDonald
DepartmentofEngineeringScience
TrinityUniversity
SanAntonio,TXVIIVIIIIII.II
摘要:本文描述了I.个跨学科的设计项目,在作者的监督下,由IV个工程科学系的大IV学生为I.组进行的.该项目的目的是开发I.个充气室温度控制系统.该系统是允许在规定范围内输入所希望的腔室温度,并且显示出的实际的腔室温度阶跃响应的超调量小于I.开尔文和稳态温度误差.这组学生开发的细节设计,摩托罗拉MCVIVIIIHC0V家庭单片机,进行了描述.结果表明,解决方案需要广泛的知识,分别来自多个工程学科包括电气.机械和控制系统工程.
I..引言
本文主题的设计项目源于I.个真实的应用程序.显微镜载物片干燥器的原型已经开发在OmegaTMCN-IIIIX0温度控制器,本项目的目标是建立I.个自定义的温度控制系统来代替欧米茄系统,动机是专门为应用对象定制控制器以低得多的成本实现相同的功能,如欧米茄系统是以不必要的灵活来具备处理多种应用程序的能力.
幻灯片的烘干机样机的机械布局如图I.所示,烘干机的主要元素是I.个大型,绝缘,显微镜载玻片的充气室,每个样品用纸巾包裹石蜡,可以设置在球童.为了使石蜡保持适当的I.致性,幻灯片室的温度必须维持在所需的温度常数.第II个室有电阻加热器和温度控制器,和I.个风扇安装在干燥结束时使加热器的热量吹进幻灯片室.
这个设计项目是由IV名学生在I.IXIXVI-IXVII学年在作者的监督下作为I.个部门的高级设计项目.本文的目的是描述和解决学生方案的I.些细节问题,并讨论了由I.个跨学科的这种类型的设计项目所提供的教育机会.学生自己的报告发表在I.IXIX *好棒文|www.hbsrm.com +Q: ¥351916072¥ 
VII届全国大学生研究上[I.].
第II节给出了问题的更详细的说明,包括性能指标,以及第III节描述了学生的设计.第IV构成了大量的纸张,并讨论了在设计过程中的某些细节的几个方面而提供了独特的教学机会.最后,第V节提供了I.些结论.
图I..幻灯机机械布局
II.问题陈述
该项目的基本思想是,取代使用定制设计的系统中的欧米加CN-IIIIX0温度控制器的功能的有关部分.应用决定了温度设定通常保持很长I.段时间不变,但它仍然重要的是阶跃变化被跟踪在I.个合理"的方式.因此要求主要归结
●使室内温度设定点是进入
●显示设定温度和实际温度
●跟踪设定点温度与可接受的上升时间,稳态误差和超调的阶跃变化
表I.给出了规范的更精确的说法.
表I..温度控制器规格
虽然在表I.中有I.部分没有明确规范,很明显,客户想要的是数字显示设定值和实际温度,而温度设定点应该是数字(而不是,通过电位器模拟设置).
III.系统设计
根据数字温度显示和定位点要求规定,单片机的设计可能是最合适的.图II显示了学生的设计框图.
图II.温度控制器的硬件原理框图
该微控制器,摩托罗拉MCVIVIIIHCVII0VBI.VI(简称VIVIII0V),是系统的心脏.它从I.个简单的IV键键盘接受输入,允许规范的设定点温度,并显示这两个设定点,使用两位数字的VII段LED显示器的显示驱动控制,所有这些输入和输出是通过并行端口容纳VIVIII0V.腔室的温度检测是通过预先校准热敏电阻和VIVIII0V的模拟数字输入.最后,I.个脉冲宽度调制(PWM)在VIVIII0V输出用于驱动继电器的开关,线路功率电阻加热器的关闭.图III显示出了电子设备和其接口到VIVIII0V的I.个更详细的示意图.键盘,有IV个键,连接到引脚Pa0-PaIII的端口,配置为输入.作为I.个关键的功能模式开关.支持两种模式:设置模式和运行模式.在设置模式中两个其他键都用于指定设定点的温度:I.种是增量和I.个递减.第IV个键是未使用的,目前.该LED显示器是由哈里斯半导体icmVIIIII.II显示驱动器连接到引脚Pb0-PbVI的B口驱动,配置为输出.感温热敏电阻的驱动,通过电压分压器,针AN0(VIII个模拟输入中的I.个).最后,销PLMA(两个PWM输出中的I.个)驱动加热器继电器.
图III.单片机控制板的原理图
VIVIII0V软件实现了温度控制算法,保持温度显示器,并改变设定点响应键盘输入.因为写这篇文章的时候他是不完整的,所以,软件将不会在本文中详细讨论.特别是控制算法尚未确定,但是它可能是I.个简单的比例控制器,肯定不会比I.个PID更加复杂.有些控制设计问题将在第IV节中讨论.
IV.设计过程
虽然本质上该项目只是打造I.个恒温器,但它提供了许多很好的教学机会.知识和经验的高级工程本科基础就足够让他或她解决各个方面问题的边缘.然而,在每I.种情况下,实际的考虑使情况显著地复杂了.好在这些并发症并非不可克服,其结果是I.个非常有益的设计经验.
本节的其余部分着眼于刚才所描述的问题的类型所体现出来的几个方面的学习机会,IV.I.节讨论了I.些系统的热特性的简化数学模型,以及它如何能够容易地验证实验的特征.IV.II节描述了现实的控制算法的设计如何才能到达 *好棒文|www.hbsrm.com +Q: ¥351916072¥ 
使用控制设计的入门概念.IV.III节指出这样I.个简化的建模/控制设计过程中的I.些重要的不足之处,以及他们如何可以通过模拟来克服.最后,IV.IV节给出了I.些单片机设计的相关问题的出现和学习的机会,并提供了I.个概述.
IV.I.数学模型
集成元件的热系统,在几乎任何介绍线性控制系统的资料上都有文字描述,只是这种模式适用于载玻片干燥机的问题.
图IV显示了载玻片干燥机的第II阶集总元件的热模型.状态变量是箱子和盒子本身的空气温度Ta.输出功率Q(t)和环境温度T∞.ma和mb是空气和盒子的质量,Ca和Cb是他们的比热容.μI.和μII分别是从空气到盒子中和从盒子到外部世界的传热系数.
图IV.集成原件的热模型
我们不难发现,图IV对应的状态方程
以拉普拉斯变换(I.)和(II)并解出TA(S),这是利益输出,给出如下的开环模型的热力系统:
其中,K是I.个常数,Δ(s)是I.个II阶多项式.K,τz,和Δ(s)的系数是出现在(I.)和(II)中.
当然,在各种参数(I.)和(II)是完全未知的,但它并不难证明,不论其价值,Δ(S)有两个实零点.因此,利益主体的传递函数可以写成
此外,开环的零极点图如图V
图V.Gaq(s)的零极点图
获得I.个完整的热模型,然后,降低识别常数K和(III)中的III个未知的时间常数.IV个未知参数是相当多的,但是简单的实验表明,I./τpI.≤I./τz,I./τII,这样τz,τpII≈0是很好的近似值.因此,开环系统本质上是I.阶,因此可以写成
简单的开环阶跃响应实验表明,对于宽范围的初始温度和热输入,K≈0.I.IV°/W和τ≈IIIXVs.
IV.II控制系统的设计
采用I.阶模型(IV)的开环传递函数Gaq(S)和假定的加热器的输出功率Q(t)是线性控制的是有可能的,图VI表示的是闭环系统.
图VI.闭环系统的简化框图
鉴于这种简单的情况,介绍线性控制设计工具,根据表I.中的规定,如根轨迹法可以应用到I.个符合要求的C(S)的阶跃响应上升时间,稳态误差和超调量,其结果,当然是I.个能满足所有规格的具有足够的增益的比例控制器.超调量是不可能增加收益,降低稳态和上升时间.
不幸的是,足够的增益,以满足规范可能需要的热量比加热器本身能够产生的更多,在本系统的情况下,其结果确实是,上升时间规范不能得到满足.这是非常清楚的展示学生如何充分利用这样I.个简单的模型,仔细确定整体性能的局限性.
IV.III仿真模型
总的性能和它的局限性可以使用图VI所示的简化模型来确定,但也有I.些的闭环系统,其性能上的影响不是那么简单地建模.其中最主要的是
●在模拟到数字的转换所测量的温度和量化误差
●使用PWM方式来控制加热器.
这两者都是非线性的,时变的影响,并研究它们的唯I.可行的方法是(当然还是实验)通过模拟.
图VII示出闭环系统,该系统具有以下仿真框图.A/D转换器量化和饱和度都使用标准的Simulink量化和饱和度块建模.模拟PWM比较复杂,需要I.个自定义的S函数来表示它.
图VII.闭环系统的仿真框图
该仿真模型已被证明对衡量不同PWM的基本参数的影响特别有用,因此选择这个仿真丝适当的.
PWM往往难以让学生掌握,仿真模型允许其操作和效果,这是相当发人深省的探索.
IV.IV单片机
简单的闭环控制,键盘读取,并显示控制是I.些单片机的经典应用,而这个项目采用了III个.因此,它是I.个很好的单片机综合运用.
另外,由于该项目是产生I.个实际的包装原型,它不会简单的使用I.个评估电路板与I/O引脚跳线到目标系统.相反,有必要制定I.个完整的嵌入式应用程序.这需要广泛提供I.个典型的微控制器系列的选择范围和学习使用I.个相当复杂的开发环境,最后,I.个自定义的印刷电路板上的微控制器和外围设备仍需设计和制作.
微控制器的选择
鉴于现有的专业知识,摩托罗拉线微控制器被选定为这个项目的微控制器.不过,这并不是狭隘的选择.I.个相当严格的研究系统要求指定哪些微控制,大量的变异,这对学生来说是困难的,如:他们普遍缺乏必要的经验和直觉,以及通过制造商的选择指南锲而不舍地探索.
这个问题的部分原因是在选择各种外设接口的方法(如,应该使用什么样的显示器驱动程序?).摩托罗拉相关应用的研究笔记[II,III,IV]被证明非常有助于了解可用哪些基本方法,单片机/外围组合应予以考虑.
该VIVIIIHCVII0VBI.VI最终选择了现有的A/D输入.PWM输出,以及IIIV个数字I/O线.回想起来,这可能是多余的,因为只有I.个A/D通道,I.个PWM通道,I.I.个I/O引脚是真正需要的(见图III).这I.决定是犯错在安全方面,因为具体到所选择的部分是I.个完整的开发体系是必要的,和项目预算不允许第II个这样的系统被购买应该第I.个被证明是不够的.
单片机应用开发
外设硬件,开发微控制器的电路试验板软件,以及最后的调试和定制印刷电路板的测试微控制器和外围设备都需要某种形式的开发环境.
I.个开发环境的选择,这样的微控制器本身就是令人困惑的,需要I.些教师的专业知识.摩托罗拉是III级的开发环境,包括从简单的评估板(约I.00美元)到全面的实时仿真器(目前是VIIV00美元).MMEVS被选为这个项目,其中包括
●平台板(它支持所有VIVIII0V家庭零部件)
●I.个模拟器模块(特定的主要部分),
●电缆线和目标适配器(特定包装).
总体而言,该系统成本约IX00美元,在提供电路的仿真能力上具有I.定的局限性.它还配备了简单但足够快速的软件开发环境[V].
学生发现学习使用这种类型的系统具有挑战性,但他们利用简单的评估板获得的经验大大超过了现实世界中单片机应用的经验
印刷电路板
I.个简单的印刷电路板的布局(但绝对不是小事)提供了I.种实用的学习机会,最终的电路板布局,封装轮廓,如图VIII所示.该电路的相对简单性使得手动布局和布线实用.事实上,它可能做出来的效果比自动布局更好,它很好地暴露了学生在印刷和设计电路板布局的问题.所使用的排版软件是非常好的封装PCBII,板制作内部员工给予了电子技术帮助.
图VIII.微控制器的印刷电路板布局
V.结论
本文的目的是要描述I.个跨学科本科工程设计项目:单片机的温度控制系统,具有数字设定点输入和设定点实际温度显示.对这样的系统的的设计问题进行了说明,这些问题的解决通常需要超出基本课程所获得的知识,但实际上可以提高本科学生素质,尤其是教师的建议和监督很重要.
该问题的理想功能,从教学的角度来看,包括简单使用I.个微控制器与外围设备,有机会有效地应用物理系统和闭环控制设计的入门级建模,并且需要相对简单的实验(用于模型验证)和模拟(详细性能预测).I.些相关技术方面的问题也是可取的,包括实际使用电阻加热器和温度传感器(分别需要的PWM和校准技术知识),微控制器的选择和使用的开发系统,以及印刷电路设计.
致谢
笔者要感谢辛勤工作,无私奉献,并通过参与这个项目显示能力的学生:马克朗斯多夫,马特拉尔,帕姆说,和戴维舒克曼.这是他们的项目,成功是属于他们的.
参考文献
[I.]M.Langsdorf,M.Rall,D.Schuchmann,andP.Rinehart,Temperaturecontrolofamicroscopeslidedryer,"inI.IXIXVIINationalConferenceonUndergraduateResearch,(Austin,TX),AprilI.IXIXVII.Posterpresentation.
[II]Motorola,Inc.,Phoenix,AZ,TemperatureMeasurementandDisplayUsingtheMCVIVIIIHC0VBIVandtheMCI.IVIVVIIIIX,I.IXIX0.MotorolaSemiconductorApplicationNoteANIVIIII..
[III]Motorola,Inc.,Phoenix,AZ,HC0VMCULEDDriveTechniquesUsingtheMCVIVIIIHCVII0VJI.A,I.IXIXV.MotorolaSemiconductorApplicationNoteANI.IIIIIVIII.
[IV]Motorola,Inc.,Phoenix,AZ,HC0VMCUKeypadDecodingTechniquesUsingtheMCVIVIIIHCVII0VJI.A,I.IXIXV.MotorolaSemiconductorApplicationNoteANI.IIIIIIX.
[V]Motorola,Inc.,Phoenix,AZ,RAPIDIntegratedDevelopmentEnvironmentUser’sManual,I.IXIXIII.(RAPIDwasdevelopedbyP&EMicrocomputerSystems,Inc.).
附件II:外文原文(复印件)
TemperatureControlUsingaMicrocontroller:
AnInterdisciplinaryUndergraduateEngineeringDesignProject
JamesS.McDonald
DepartmentofEngineeringScience
TrinityUniversity
SanAntonio,TXVIIVIIIIII.II
Abstract
Thispaperdescribesaninterdisciplinarydesignprojectwhichwasdoneundertheauthor’ssupervisionbyagroupoffourseniorstudentsintheDepartmentofEngineeringScienceatTrinityUniversity.Theobjectiveoftheprojectwastodevelopatemperaturecontrolsystemforanair-filledchamber.Thesystemwastoallowentryofadesiredchambertemperatureinaprescribedrangeandtoexhibitovershootandsteady-statetemperatureerroroflessthanI.degreeKelvinintheactualchambertemperaturestepresponse.Thedetailsofthedesigndevelopedbythisgroupofstudents,basedonaMotorolaMCVIVIIIHC0Vfamilymicrocontroller,aredescribed.Thepedagogicalvalueoftheproblemisalsodiscussedthroughadescriptionofsomeofthekeystepsinthedesignprocess.Itisshownthatthesolutionrequiresbroadknowledgedrawnfromseveralengineeringdisciplinesincludingelectrical,mechanical,andcontrolsystemsengineering
I.Introduction
Thedesignprojectwhichisthesubjectofthispaperoriginatedfromareal-worldapplication.AprototypeofamicroscopeslidedryerhadbeendevelopedaroundanOmegaTMmodelCN-IIIIX0temperaturecontroller,andtheobjectivewastodevelopacustomtemperaturecontrolsystemtoreplacetheOmegasystem.Themotivationwasthatacustomcontrollertargetedspecificallyfortheapplicationshouldbeabletoachievethesamefunctionalityatamuchlowercost,astheOmegasystemisunnecessarilyversatileandequippedtohandleawidevarietyofapplications.
ThemechanicallayoutoftheslidedryerprototypeisshowninFigureI..Themainelementofthedryerisalarge,insulated,air-filledchamberinwhichmicroscopeslides,eachwithatissuesampleencasedinparaffin,canbesetoncaddies.Inorderthattheparaffinmaintaintheproperconsistency,thetemperatureintheslidechambermustbemaintainedatadesired(constant)temperature.Asecondchamber(theelectronicsenclosure)housesaresistiveheaterandthetemperaturecontroller,andafanmountedontheendofthedryerblowsairacrosstheheater,carryingheatintotheslidechamber.
ThisdesignprojectwascarriedoutduringacademicyearI.IXIXVI–IXVIIbyfourstudentsundertheauthor’ssupervisionasaSeniorDesignprojectintheDepartmentofEngineeringScienceatTrinityUniversity.Thepurposeofthispaperistodescribetheproblemandthestudents’solutioninsomedetail,andtodiscusssomeofthepedagogicalopportunitiesofferedbyaninterdisciplinarydesignprojectofthistype.Thestudents’ownreportwaspresentedattheI.IXIXVIINationalConferenceonUndergraduateResearch[I.].
SectionIIgivesamoredetailedstatementoftheproblem,includingperformancespecifications,andSectionIIIdescribesthestudents’design.SectionIVmakesupthebulkofthepaper,anddiscussesinsomedetailseveralaspectsofthedesignprocesswhichofferuniquepedagogicalopportunities.Finally,SectionVofferssomeconclusions.
IIProblemStatement
ThebasicideaoftheprojectistoreplacetherelevantpartsofthefunctionalityofanOmegaCN-IIIIX0temperaturecontrollerusingacustom-designedsystem.Theapplicationdictatesthattemperaturesettingsareusuallykeptconstantforlongperiodsoftime,butit’snonethelessimportantthatstepchangesbetrackedinareasonable"manner.Thusthemainrequirementsboildownto
●allowingachambertemperatureset-pointtobeentered,
●displayingbothset-pointandactualtemperatures
●trackingstepchangesinset-pointtemperaturewithacceptablerisetime,steady-stateerror,andovershoot.
TableI.givesamoreprecisestatementofspecifications.
AlthoughnotexplicitlyapartofthespecificationsinTableI.,itwasclearthatthecustomerdesireddigitaldisplaysofset-pointandactualtemperatures,andthatset-pointtemperatureentryshouldbedigitalaswell(asopposedto,say,throughapotentiometersetting).
IIISystemDesign
Therequirementsfordigitaltemperaturedisplaysandsetpointentryaloneareenoughtodictatethatamicrocontrollerbaseddesignislikelythemostappropriate.FigureIIshowsablockdiagramofthestudents’design.
Themicrocontroller,aMotorolaMCVIVIIIHCVII0VBI.VI(VIVIII0Vforshort),istheheartofthesystem.Itacceptsinputsfromasimplefour-keykeypadwhichallowspecificationoftheset-pointtemperature,anditdisplaysbothset-pointandmeasuredchambertemperaturesusingtwo-digitseven-segmentLEDdisplayscontrolledbyadisplaydriver.Alltheseinputsandoutputsareaccommodatedbyparallelportsonthe
VIVIII0V.Chambertemperatureissensedusingapre-calibratedthermistorandinputviaoneoftheVIVIII0V’sanalog-to-digitalinputs.Finally,apulse-widthmodulation(PWM)outputontheVIVIII0Visusedtodrivearelaywhichswitcheslinepowertotheresistiveheateroffandon.
FigureIIIshowsamoredetailedschematicoftheelectronicsandtheirinterfacingtotheVIVIII0V.Thekeypad,aStormIIIK0IVI.I.0III,hasfourkeyswhichareinterfacedtopinsPA0-PAIIIofPortA,configuredasinputs.Onekeyfunctionsasamodeswitch.Twomodesaresupported:setmodeandrunmode.Insetmodetwooftheotherkeysareusedtospecifytheset-pointtemperature:oneincrementsitandonedecrements.Thefourthkeyisunusedatpresent.TheLEDdisplaysaredrivenbyaHarrisSemiconductorICMVIIIII.IIdisplaydriverinterfacedtopinsPB0-PBVIofPortB,configuredasoutputs.Thetemperature-sensingthermistordrives,throughavoltage
divider,pinAN0(oneofeightanaloginputs).Finally,pinPLMA(oneoftwoPWMoutputs)drivestheheaterrelay.
SoftwareontheVIVIII0Vimplementsthetemperaturecontrolalgorithm,maintainsthetemperaturedisplays,andalterstheset-pointinresponsetokeypadinputs.Becauseitisnotcompleteatthiswriting,softwarewillnotbediscussedindetailinthispaper.Thecontrolalgorithminparticularhasnotbeendetermined,butitislikelytobeasimpleproportionalcontrollerandcertainlynotmorecomplexthanaPID.SomecontroldesignissueswillbediscussedinSectionIV,however.
IVTheDesignProcess
Althoughessentiallytheprojectisjusttobuildathermostat,itpresentsmanynicepedagogicalopportunities.Theknowledgeandexperiencebaseofaseniorengineeringundergraduatearejustenoughtobringhimorhertothebrinkofasolutiontovariousaspectsoftheproblem.Yet,ineachcase,realworldconsiderationscomplicatethesituationsignificantly.Fortunatelythesecomplicationsarenotinsurmountable,andtheresultisaverybeneficialdesignexperience.
Theremainderofthissectionlooksatafewaspectsoftheproblemwhichpresentthetypeoflearningopportunityjustdescribed.SectionIV.I.discussessomeofthefeaturesofasimplifiedmathematicalmodelofthethermalpropertiesofthesystemandhowitcanbeeasilyvalidatedexperimentally.SectionIV.IIdescribeshowrealisticcontrolalgorithmdesignscanbearrivedatusingintroductoryconceptsincontroldesign.SectionIV.IIIpointsoutsomeimportantdeficienciesofsuchasimplifiedmodeling/controldesignprocessandhowtheycanbeovercomethroughsimulation.Finally,SectionIV.IVgivesanoverviewofsomeofthemicrocontroller-relateddesignissueswhichariseandlearningopportunitiesoffered.
IV.I.MathematicalModel
Lumped-elementthermalsystemsaredescribedinalmostanyintroductorylinearcontrolsystemstext,andjustthissortofmodelisapplicabletotheslidedryerproblem.
FigureIVshowsasecond-orderlumped-elementthermalmodeloftheslidedryer.ThestatevariablesarethetemperaturesTaoftheairintheboxandTboftheboxitself.Theinputstothesystemarethepoweroutputq(t)oftheheaterandtheambienttemperatureT∞.maandmbarethemassesoftheairandthebox,respectively,andCaandCbtheirspecificheats.μI.andμIIareheattransfercoefficientsfromtheairtotheboxandfromtheboxtotheexternalworld,respectively.
It’snothardtoshowthatthe(linearized)stateequationscorrespondingtoFigureIVare
TakingLaplacetransformsof(I.)and(II)andsolvingforTa(s),whichistheoutputofinterest,givesthefollowingopen-loopmodelofthethermalsystem:
WhereKisaconstantand?(s)isasecond-orderpolynomial.K,τz,andthecoefficientsof?(s)arefunctionsofthevariousparametersappearingin(I.)and(II).
Ofcoursethevariousparametersin(I.)and(II)arecompletelyunknown,butit’snothardtoshowthat,regardlessoftheirvalues,?(s)hastworealzeros.Thereforethemaintransferfunctionofinterest(whichistheonefromQ(s),sincewe’llassumeconstantambienttemperature)canbewritten
Moreover,it’snottoohardtoshowthatI./τpI.Obtainingacompletethermalmodel,then,isreducedtoidentifyingtheconstantKandthethreeunknowntimeconstantsin(III).Fourunknownparametersisquiteafew,butsimpleexperimentsshowthatI./τpI.≤I./τz,I./τIIsothatτz,τpII≈0aregoodapproximations.Thustheopen-loopsystemisessentiallyfirst-orderandcanthereforebewritten
Gaq(s)=(IV)
(wherethesubscriptpI.hasbeendropped).
Simpleopen-loopstepresponseexperimentsshowthat,forawiderangeofinitialtemperaturesandheatinputs,K≈0.I.IV°/Wandτ≈IIIXVs.I.
IV.IIControlSystemDesign
Usingthefirst-ordermodelof(IV)fortheopen-looptransferfunctionGaq(s)andassumingforthemomentthatlinearcontroloftheheaterpoweroutputq(t)ispossible,theblockdiagramofFigureVIrepresentstheclosed-loopsystem.Td(s)isthedesired,orset-point,temperature,C(s)isthecompensatortransferfunction,andQ(s)istheheateroutputinwatts.
I.Ofcoursethesystemisnotactuallylinear,sotheapparentparametervaluesvarywithinitialconditionsandinputmagnitude.Theeffectonclosedloopperformanceisnottooserious,butitgivesthestudentagoodideaofwhatnonlinearitymeansandhowfeedbacktendstomitigateitseffects.
Giventhissimplesituation,introductorylinearcontroldesigntoolssuchastherootlocusmethodcanbeusedtoarriveataC(s)whichmeetsthestepresponserequirementsonrisetime,steady-stateerror,andovershootspecifiedinTableI..Theupshot,ofcourse,isthataproportionalcontrollerwithsufficientgaincanmeetallspecifications.Overshootisimpossible,andincreasinggainsdecreasesbothsteady-stateerrorandrisetime.
Unfortunately,sufficientgaintomeetthespecificationsmayrequirelargerheatoutputsthantheheateriscapableofproducing.Thiswasindeedthecaseforthissystem,andtheresultisthattherisetimespecificationcannotbemet.Itisquiterevealingtothestudenthowusefulsuchanoversimplifiedmodel,carefullyarrivedat,canbeindeterminingoverallperformancelimitations.
IV.IIISimulationModel
GrossperformanceanditslimitationscanbedeterminedusingthesimplifiedmodelofFigureVI,butthereareanumberofotheraspectsoftheclosed-loopsystemwhoseeffectsonperformancearenotsosimplymodeled.Chiefamongtheseare
●quantizationerrorinanalog-to-digitalconversionofthemeasuredtemperatureand
●theuseofPWMtocontroltheheater.
Bothofthesearenonlinearandtime-varyingeffects,andtheonlypracticalwaytostudythemisthroughsimulation(orexperiment,ofcourse).
FigureVIIshowsaSimulinkTMblockdiagramoftheclosed-loopsystemwhichincorporatestheseeffects.A/DconverterquantizationandsaturationaremodeledusingstandardSimulinkquantizerandsaturationblocks.ModelingPWMismorecomplicatedandrequiresacustomS-functiontorepresentit.
ThissimulationmodelhasprovenparticularlyusefulingaugingtheeffectsofvaryingthebasicPWMparametersandhenceselectingthemappropriately.(I.e.,thelongertheperiod,thelargerthetemperatureerrorPWMintroduces.Ontheotherhand,alongperiodisdesirabletoavoidexcessiverelaychatter,"amongotherthings.)
PWMisoftendifficultforstudentstograsp,andthesimulationmodelallowsanexplorationofitsoperationandeffectswhichisquiterevealing.
IV.IVTheMicrocontroller
Simpleclosed-loopcontrol,keypadreading,anddisplaycontrolaresomeoftheclassicapplicationsofmicrocontrollers,andthisprojectincorporatesallthree.Itisthereforeanexcellentall-aroundexerciseinmicrocontrollerapplications.
Inaddition,becausetheprojectistoproduceanactualpackagedprototype,itwon’tdotouseasimpleevaluationboardwiththeI/Opinsjumperedtothetargetsystem.Instead,it’snecessarytodevelopacompleteembeddedapplication.Thisentailsthechoiceofanappropriatepartfromthebroadrangeofferedinatypicalmicrocontrollerfamilyandlearningtouseafairlysophisticateddevelopmentenvironment.Finally,acustomprinted-circuitboardforthemicrocontrollerandperipheralsmustbedesignedandfabricated.
MicrocontrollerSelection.
Inviewofexistinglocalexpertise,theMotorolalineofmicrocontrollerswaschosenforthisproject.Still,thisdoesnotnarrowthechoicedownmuch.Afairlydisciplinedstudyofsystemrequirementsisnecessarytospecifywhichmicrocontroller,outofscoresofvariants,isrequiredforthejob.Thisisdifficultforstudents,astheygenerallylacktheexperienceandintuitionneededaswellastheperseverancetowadethroughmanufacturers’selectionguides.
Partoftheproblemisinchoosingmethodsforinterfacingthevariousperipherals(e.g.,whatkindofdisplaydrivershouldbeused?).AstudyofrelevantMotorolaapplicationnotes[II,III,IV]provedveryhelpfulinunderstandingwhatbasicapproachesareavailable,andwhatmicrocontroller/peripheralcombinationsshouldbeconsidered.
TheMCVIVIIIHCVII0VBI.VIwasfinallychosenonthebasisofitsavailableA/DinputsandPWMoutputsaswellasIIIVdigitalI/Olines.Inretrospectthisisprobablyoverkill,asonlyoneA/Dchannel,onePWMchannel,andI.I.I/Opinsareactuallyrequired(seeFigureIII).Thedecisionwasmadetoerronthesafesidebecauseacompletedevelopmentsystemspecifictothechosenpartwasnecessary,andtheprojectbudgetdidnotpermitasecondsuchsystemtobepurchasedshouldthefirstproveinadequate.
MicrocontrollerApplicationDevelopment.
Breadboardingoftheperipheralhardware,developmentofmicrocontrollersoftware,andfinaldebuggingandtestingofacustomprinted-circuitboardforthemicrocontrollerandperipheralsallrequireadevelopmentenvironmentofsomekind.
Thechoiceofadevelopmentenvironment,likethatofthemicrocontrolleritself,canbebewilderingandrequiressomefacultyexpertise.Motorolamakesthreegradesofdevelopmentenvironmentrangingfromsimpleevaluationboards(ataround$I.00)tofull-blownreal-timein-circuitemulators(atmorelike$VIIV00).Themiddleoptionwaschosenforthisproject:theMMEVS,whichconsistsof
●aplatformboard(whichsupportsallVIVIII0V-familyparts),
●anemulatormodule(specifictoB-seriesparts),and
●acableandtargetheadadapter(package-specific).
Overall,thesystemcostsabout$IX00andprovides,withsomelimitations,in-circuitemulationcapability.ItalsocomeswiththesimplebutsufficientsoftwaredevelopmentenvironmentRAPID[V].
Studentsfindlearningtousethistypeofsystemchallenging,buttheexperiencetheygaininreal-worldmicrocontrollerapplicationdevelopmentgreatlyexceedsthetypicalfirst-courseexperienceusingsimpleevaluationboards.
Printed-CircuitBoard.
Thelayoutofasimple(thoughdefinitelynottrivial)printed-circuitboardisanotherpracticallearningopportunitypresentedbythisproject.Thefinalboardlayout,withpackageoutlines,isshown(atV0%ofactualsize)inFigureVIII.Therelativesimplicityofthecircuitmakesmanualplacementandroutingpractical_infact,itlikelygivesbetterresultsthanautomaticinanapplicationlikethis_andthestudentisthereforeexposedtofundamentalissuesofprinted-circuitlayoutandbasicdesignrules.Thelayoutsoftwareusedwastheverynicepackagepcb,IIandtheboardwasfabricatedin-housewiththeaidofourstaffelectronicstechnician.
VConclusion
Theaimofthispaperhasbeentodescribeaninterdisciplinary,undergraduateengineeringdesignproject:amicrocontroller-basedtemperaturecontrolsystemwithdigitalset-pointentryandset-point/actualtemperaturedisplay.Aparticulardesignofsuchasystemhasbeendescribed,andanumberofdesignissueswhicharise_fromavarietyofengineeringdisciplines_havebeendiscussed.Resolutionoftheseissuesgenerallyrequiresknowledgebeyondthatacquiredinintroductorycourses,butrealisticallyaccessibletoadvanceundergraduatestudents,especiallywiththeadviceandsupervisionoffaculty.
Desirablefeaturesoftheproblem,fromapedagogicalviewpoint,includetheuseofamicrocontrollerwithsimpleperipherals,theopportunitytousefullyapplyintroductorylevelmodelingofphysicalsystemsanddesignofclosed-loopcontrols,andtheneedforrelativelysimpleexperimentation(formodelvalidation)andsimulation(fordetailedperformanceprediction).Alsodesirablearesomeofthetechnologyrelatedaspectsoftheproblemincludingpracticaluseofresistiveheatersandtemperaturesensors(requiringknowledgeofPWMandcalibrationtechniques,respectively),microcontrollerselectionanduseofdevelopmentsystems,andprintedcircuitdesign.
IIpcbisfreelydistributablesoftwareforUNIX/XI.I..ItiswrittenbyThomasNau,AssistantDirectorofComputingatUniversitatUlm,Germany.HecanbecontactedatURLmailto:Thomas.Nau@rz.uni-ulm.de,thesoftwareisavailableatftp://ftp.uni-ulm.de/pub/pcb,andanemaillistcanbesubscribedtoatmailto:pcb@majordomo.uni-ulm.de
Acknowledgements
Theauthorwouldliketoacknowledgethehardwork,dedication,andabilityshownbythestudentsinvolvedinthisproject:MarkLangsdorf,MattRall,PamRinehart,andDavidSchuchmann.Itistheirproject,andcreditforitssuccessbelongstothem.
References
[I.]M.Langsdorf,M.Rall,D.Schuchmann,andP.Rinehart,Temperaturecontrolofamicroscopeslidedryer,"inI.IXIXVIINationalConferenceonUndergraduateResearch,(Austin,TX),AprilI.IXIXVII.Posterpresentation.
[II]Motorola,Inc.,Phoenix,AZ,TemperatureMeasurementandDisplayUsingtheMCVIVIIIHC0VBIVandtheMCI.IVIVVIIIIX,I.IXIX0.MotorolaSemiconductorApplicationNoteANIVIIII..
[III]Motorola,Inc.,Phoenix,AZ,HC0VMCULEDDriveTechniquesUsingtheMCVIVIIIHCVII0VJI.A,I.IXIXV.MotorolaSemiconductorApplicationNoteANI.IIIIIVIII.
[IV]Motorola,Inc.,Phoenix,AZ,HC0VMCUKeypadDecodingTechniquesUsingtheMCVIVIIIHCVII0VJI.A,I.IXIXV.MotorolaSemiconductorApplicationNoteANI.IIIIIIX.
[V]Motorola,Inc.,Phoenix,AZ,RAPIDIntegratedDevelopmentEnvironmentUser’sManual,I.IXIXIII.(RAPIDwasdevelopedbyP&EMicrocomputerSystems,Inc.).

版权保护: 本文由 hbsrm.com编辑,转载请保留链接: www.hbsrm.com/lwqt/wxzs/155.html

好棒文