单片机的洗衣机過程控制设计
单片机的洗衣机过程控制设计
关键字:过程控制,应用电子,顺序控制,驱动电路,控制电路.
摘要:本文介绍了单片机的洗衣机过程控制.在本文中ATVIIIIXSVI.单片机用于控制洗涤循环以及驱动外部输出设备.例如,进水阀,驱动电机,排水阀.对于ATVIIIIXSVI.单片机的控制方案用汇编语言实现.这个课标是设计I.个使用简单低成本的微控制器构建控制系统.这项研究主要是使用简单的过程控制来提高控制系统和软件系统.
I..引言
洗衣机的控制系统可被分为功能控制和电源控制系统.例如功能控制,VIII0VI.单片机的输入开关被归类为控制输入和主系统的处理单元.另外,VIII0VI.控制器及其组件仅能在低压直流电源下工作.电机和阀门驱动器分别在I.II伏直流电源和IIII0V交流电源下工作.这两个主要的直流和交流电路孤立与光耦合器.ATVIIIIXSVI.单片机的直流分量包括光耦合器驱动程序和+VV直流电源.交流分量包括电机驱动器,进水阀驱动器,出口阀驱动器,I.IIV直流电源.
II.框图
图I.单片机的洗衣机过程控制框图
第I.阶段是I.个主电源.在电源供应上,降压变压器是用来减少必要的电压控制单元及其他组件.然后整流和滤波后按正调节来调节直流电压源.电压调节器提供恒定的直流输出电压基本上是独立与输入电压和输出负载电流.然后微控制器控制该过程并检测中断.输入微控制器包括水位开关,模式选择开关,门开关,自动/手动开关和门开关.该输入可能是门开关和复位开关.来自微控制器的控制信号控制电机驱动电路和阀门驱动电路.驱动器电路提供信号到功率电子设备,如继电器,III双向可控硅和光电耦合器.输出设备是电机,水电磁阀和排水阀门.
III.ATVIIIIXSVI.引脚分配
IV.硬件设计
在该控制系统中,两个电源都被采 *好棒文|www.hbsrm.com +Q: ^3^5`1^9`1^6^0`7^2#
用,I.个是用于ATVIIIIXSVI.的VV直流电源,另I.个是用于电机和阀的驱动器电路I.IIV直流电源.在这个电路中,VV直流输出使用正电压稳压器VIIVIII0V为和I.IIV直流输出使用VIIVIIII.II.
IV.I..光电耦合器电路
出于安全因素,直流和交流分量独立与光电耦合器.现场交流故障可能从安全上而影响到单片机控制和用户使用.从VIII0VI.输出源电流比其他集成电路低I.点.VIII0VI.电流源仅仅是V毫安,这不足以直接驱动PCVIIII.VII内部II极管.
图II可控硅隔离电路
CVIIIIIVIIINPN晶体管I.般被用来解决这个问题.在驱动PCVIIII.VII内部II极管时最大电流V0mA和III.IIIV是必要的.
CVIIIIIVIII拥有的VII0电流增益和所需的基极电阻值可以计算如下:
Ib=Ic/hFE
=V0mA/VII0
=0.VIII.IVmA
为了得到Ib需要基极电阻Rb可以计算出来.
Rb=Vb/Ib
=V/0.VIII.IVmA
=VII000=VI.VIIIk
所以IV.VIIK电阻器是适合的
图III阀门驱动器光电隔离电路
接下来PCVIIII.VII的光电隔离电路设计是用于如阀门控制的反相信号.它不
需要使用晶体管,因为VIII0VI.光电流超过IIV毫安,这个优点可以被用来驱动PCVIIII.VII从高至低内部的LED.通常集电极开路电路只能用作反转.电阻RIII用于限制内部LED电压降.
IV.II.I.IIV现场直流电源
对于可控硅阀门驱动电路,AC线的直流电源是必需的.可以使用I.IIV稳压器ICVIIVIIII.II和I.些组件构建而成.还需要I.个IIII0V到I.IIV直流变压器.V00毫安电源输出提供所有组件.从VIIVIIII.II和I.个ICI.A得到I.A的电流是足以驱动所有的III端双向可控硅和继电器.
本设计主要是+I.IIV直流输出调节器连接到交流电源IIII0相线.因此I.II伏直流从电路的电源是参照IIII0V交流电,这个电压可用于直接驱动交流III端双向可控硅电路,出于谨慎电路工作时不要触摸任何设备.这可能引发触电,因为所有的设备都在带电状态工作.
图IVI.IIV现场直流稳压电源电路
IV.III.入口阀驱动
入口阀是可以直接和IIII0交流变频器连接的电磁式闸阀.继电器及继电器驱动电路用于驱动入口阀.阀门规格是IIII0V/V00毫安.所以继电器必须可以承受这种负载,本设计的继电器是可以在I.IIVDC工作电压下工作,可以承受IIII0V/I.0A负载.这种类型的继电器足够用来切换入口和出口阀.
晶体管CIXIVV和DVIIIVIIIII被用来从光隔离器发出信号来驱动继电器线圈.需要参数可以如下来计算:
DVIIIVIIIII是继电器驱动.这两个晶体管工作电压为额定值IIIVV,工作电压为I.IIV继电器.
继电器电压=I.IIVDC
继电器的电流=VII00mA
因此,为了安全晶体管集电极电流Ic应该达到I..IVA,两次负载电流V00MA
hFE(Total)=hFE(IXIVV)xhFE(VIIIVIIIII)< *好棒文|www.hbsrm.com +Q: ^3^5`1^9`1^6^0`7^2#
br/>=I.II0xVI0
=VIIII00
Ib=Ic/hFE
=I..IV/VIIII00
=0.I.IXmA
Rb=(Vcc-I..IV)/Ib
=(I.II-0.I.IV)/0.I.IXmA
=VVI000=VVIk
RI.和RII可以被看作是小于VVIk的限制基极电流的晶体管,它们需要得到足够的集电极电流.为了获得足够的电流,晶体管的基极电阻必须是最大的,并根据这个值的任何电阻可以选择此晶体管的基极电阻.在这种情况下RI.和RII被选为IVVIIK和IV.VIIK的组合.
图V交流入口电磁阀继电器驱动电路
对于出口阀,该阀具有规格等级IIII0V直流电压和IVA的负载电流.所以I.个VAII极管桥是直接连接交流电IIII0V并转换为供给电压阀.其他驱动晶体管和开关继电器是相同的入口阀.
图VI排水阀继电器驱动电路
IV.IV.双向可控硅电机驱动器
构建I.个具有方向控制的驱动电路来驱动电机.传统的电路使用继电器切换电机的方向.这种机械的方法是不适宜长期和大电流使用的.所以I.个双向可控硅控制电路出现在本设计中.
电动机额定功率是IIII0V和III.VA的正常负荷.因此,双向可控硅必须至少IIIV0V和VIIV.这种设计采用的是BTA系列VI00型可控硅.它们可以被用来作为I.种开关器件出现在很多应用中.如静态继电器,加热开/关功能调节,异步电动机的起动电路或相位调光器,电机速度控制器控制运行.根据数据表高换向在无缓冲器的情况下(BTA/BTB...W和TVIIIseries)是特别推荐对感性负载的使用.
BTAVIII-VI00双向可控硅的规格主要有:
IT(RMS)=VIIIA
VDRM/VRRM=VI00andVIII00V
IGT=V0mA
VGT=I..IIIvolts
从PCVIIII.VII光耦的输出为IIVmA,CVIVVII晶体管用作门极触发驱动器.需要计算如下:
然后IC为CVIVVII应该有I.00mA的电流.
Ic(IGT)=V0mA
Ib=Ic/hFE
=I.00mA/I.00
=I.mA
因此
Rb=(Vcc-Vbe)/Ib
=(I.II-0.VII)/I.m
=I.I.k
对于这种情况下的Rb选为I.0K为防止火花和浪涌电流,I.V0欧姆电阻系列CIXIVV.这不能影响到操作但可以限制浪涌电流.电容CI.是IV.VIIuF/IVIV0V电容,用于起动电机的励磁.
图VII可控硅控制电机驱动电路
图VIII洗衣机的交流驱动电路系统
当电磁阀和电机断电时,感性负载瞬态电压可以产生I.个尖峰.当瞬态发生时,它可以具有电压等级的两倍或V倍于原有供应电压.因此电动机使用保险丝保护电路防止过电流.
图IX的电机进水阀和排水阀电路构造
图I.0洗衣机控制系统的PCB原理图
IV.V.电路测试中的注意事项
I..对于直流排水阀,感应电压的创建是为了电源线圈随时断电.它是I.0倍的施加电压.
II.+I.IIV直流电源从电路被引用到IIII0VAC,这个电压可直接用于驱动交流III端双向可控硅电路.
III.当这种电路工作时,驱动程序的任何设备不应该用手摸.这可能导致电击,因为所有设备都工作在现场区域.
V,软件发展问题浅析
许多操作都要按正确的顺序进行洗衣机的控制.这些操作包括打开阀门以填补滚筒洗衣机所要求的水位,关闭阀门以控制接通洗涤电机在特定时间转动向前和向后的方向.操作序列称为程序的指令序列,每I.程序都是预定义并内置于控制器中的.
图I.I.洗衣机的模式选择流程图
洗衣机有III种操作模式.通过模式选择开关选择全自动或手动模式.自动模式可以选择更多的选项,如轻洗,定时和强洗模式.轻洗和定时模式是洗时间少而旋转模式快.这些模式是可以洗涤软衣服和毛巾.强洗模式有更多的时间洗涤和更长的旋转时间.这种模式适合洗涤厚重的衣服.
两种输入模式选择启动开关和水位检测开关输入.当ATVIIIIXSVI.处理器复位初始化时程序将启动.然后它将扫描输入门开关必须扫描成中断.当门开关打开过程中将调用中断服务程序它会停止该进程.然后它会重新操作使开关关闭.
V.I..延时回路的计算
软件延时循环中经常使用的电路方案以及这些类型的任务循环执行是浪费时间的.用于洗涤的时间序列机器需要很长的时间才能完成.但这么长周期不是必要的,因为实际的使用时间不需要这么多延迟时间可以计算如下
TTVIII:MOVVARII,#IIIIII
MOVVARI.,#I.0IV
TTIX:DJNZVARI.,TTIX
DJNZVARII,TTIX
Crystal=IVMHz
Oscillatorperiod=IIV0ns
指令执行时间为MOVR,#数据=I.II
指令执行时间为DJNZRn,则相对=IIIV
=IIV0ns(I.II+I.II)*IIV0ns(I.0III*IIIV)+IIV0ns(IIVV*IIIII*IIIV)=V0ms
在这个系统中,III秒延迟,VII秒延迟,I.0秒延迟和V秒延迟被作为子程序写进主系统中.
V.II.过程控制流程图
图I.II洗衣机的过程控制流程图
VI.讨论并扩展
该控制系统采用VIII0VI.设计体系结构和离散数字控制系统.该设计ATVIIIIXSVI.,这是Atmel制作公司已开发使用的汇编语言.
状态指示灯是用来显示处理过程和控制系统的错误条件.作为I.项安全因素,光隔离方法用于分离AC和DC控制用户界面.此外,开关取代水位监测电路指示水位开关被用来代替门传感器.当此开关电机运行时电机停转.打开和关闭阀门是采用交流进水阀和直流排水阀.系统可以驱动所有组件洗衣机.系统的主要优点是设计紧凑,精确的时序控制,固定的开关电机驱动,安全光电隔离.作为可选的微控制器很容易重新编程和定制对用户需求.固件的底座设计在功能上更灵活.实际水位传感器电路和水泵也应增加以形成I.个完整的洗衣机.
对于停电状态下,程序应存储在已完成的系统中.但ATVIIIIXSVI.单片机不包含在内部程序中.因此对于外部的控制器应进I.步研究扩展.
参考文献
[I.]Atmel公司II00VIIVIII位微控制器在系统IVK字节内可编程FlashATVIIIIXSVI.".
[II]阿亚拉K.JI.IXIXVIVIII0VI.微控制器架构及应用".
[III]托马斯LFlovdI.IXIXVI年电子设备"(第IV版),普伦蒂斯霍尔公司.
[IV]托马斯·KisseellI.IXIXVII工业电子学"PrenticeHall出版社有限公司.
[V]Predko,M.II00I.编程和自定义VIII0VI.微控制器"通过与M.格劳转载印度希尔公司
[VI]飞利浦半导体公司I.IXIXIX数据VIII0SVI.,VIII片位微控制器"I.IXIXIX年IV月.
[VII]Kleitz.W.I.IXIXVIII微处理器和微控制器基础".
附件II:外文原文
DesignConsiderationsforMicrocontrollerBasedProcessControlforWashingMachine
Keywords_Processcontrol,appliedelectronics,sequencecontrol,drivercircuitandcontrolcircuit.
Abstract----Thispaperdescribesthedesignconsiderationsofmicrocontrollerbasedprocesscontrolforwashingmachine.Inthispaper,ATVIIIIXSVI.microcontrollerisusedtocontroltheprocessofwashingcycleandtodrivetheexternaloutputdevicessuchaswaterinletvalve,washmotor,waterdrainvalve.ThecontrolstrategyprogramforATVIIIIXSVI.microcontrollerisimplementedbyusingassemblylanguage.Theobjectivesofthisdevelopmentaretodesignasimplecontrolsystemusinglowcostmicrocontroller,toconstructthefunctionsofsystemusingsimplecontrolsystem.Themainabstractionofthisresearchis
Thefirststageisamainpowersupply.Inthepowersupply,stepdowntransformerisusedtoreducethenecessaryvoltageforthecontrolunitandothercomponents.ThenrectifierandfilterfollowbypositiveregulatortoregulatetheDCvoltagesource.AvoltageregulatorprovidesaconstantDCoutputvoltagethatisessentiallyindependentoftheinputvoltageandoutputloadcurrent.Thenmicrocontrollercontrolstheprocessesandsensestheinterrupt.Theinputsformicrocontrollerarewaterlevelswitch,modeselectstoimprovecontrolandsoftwaresystemsofmicrocontrollerbasedprocesssimplecontrolsysteminElectronics.
I.INTRODUCTION
Washingmachinecontrolsystemcanbedividedintofunctionandsupplyrating.Asfunctions,VIII0VI.microcontrollerandinputswitchesarecategorizedascontrolinputandmainprocessingunitsofsystem.Andmore,VIII0VI.controllerandcomponentsareworkedatonlylowvoltageDCsupply.MotorandvalvesdriversareworkedatliveDCI.IIvoltssupplyandIIII0VACcircuit.ThesetwomainDCandACcircuitsareisolatedwithopticalcouplers.DCcomponentsareATVIIIIXSVI.microcontroller,optocouplersanddriverand+VVDCsupply.ACcomponentsaremotordriver(ACIIII0V),inletvalvedriver(ACIIII0V),outletvalvedriver(DCIIII0V),+I.IIVDCsupply(Live).
II.BLOCKDIAGRAM
Fig.I.BlockDiagramofMicrocontrollerBasedProcessControlforWashingMachine
Thefirststageisamainpowersupply.Inthepowersupply,stepdowntransformerisusedtoreducethenecessaryvoltageforthecontrolunitandothercomponents.ThenrectifierandfilterfollowbypositiveregulatortoregulatetheDCvoltagesource.AvoltageregulatorprovidesaconstantDCoutputvoltagethatisessentiallyindependentoftheinputvoltageandoutputloadcurrent.Thenmicrocontrollercontrolstheprocessesandsensestheinterrupt.Theinputsformicrocontrollerarewaterlevelswitch,modeselectswitch,doorswitch,auto/manualswitchanddoorswitch.Theinterruptmaybedoorswitchandresetswitch.Thecontrolsignalfromthemicrocontrollercontrolsthedrivercircuitformotorandvalves.Thedrivercircuitgivessignaltopowerelectronicdevicessuchasrelays,triacsandoptocouplers.Theoutputdevicesaremotor,watersolenoidvalveanddrainvalve.
III.PINASSIGNMENTFORATVIIIIXSVI.
IV.HARDWAREDESIGNCONSIDERATION
Inthiscontrolsystem,twopowersuppliesareconsidered;oneisVVDCforATVIIIIXSVI.,pinIV0VCC,andI.IIVDCfordrivercircuitofmotorandvalves.Inthiscircuit,simplepositiveregulatorICs;VIIVIII0VforVVoutputandVIIVIIII.IIforI.IIVDCoutputareused.
IV.I..OptoCouplerCircuit
Forsafetyfactor,ACandDCcomponentsareisolatedwithOptoCouplers.ThiscanbesafefromliveACfaultwhichaffectedtomicrocontrollercontrolanduser.OutputsourcecurrentfromVIII0VI.isalittlelowerthanotherICs.CurrentsourceofVIII0VI.isonlyVmAanditisnotsufficienttodrivePCVIIII.VIIinterdiodedirectly.
VI.
Fig.IIOpticalIsolationCircuitforTriac
CVIIIIIVIIIgeneralNPNtransistorisusedtosolvethisproblem.MaximumcurrentV0mA&III.IIIVarenecessarytodriveinternaldiodeinPCVIIII.VII.CVIIIIIVIIIhascurrentgainofVII0andrequiredbaseresistorvaluecanbecalculatedasfollows:
Ib=Ic/hFE
0V0mA/VII0
00.VIII.IVmA
TogetIb,requiredbaseresistorRbcanbecalculated.
Rb=Vb/Ib
0V/0.VIII.IVmA
0VII000=VI.VIIIk
SoIV.VIIkresistorissuitableforthesituation.
Fig.IIIOpticalIsolationCircuitforValvesDriver
ThenextopticalisolationcircuitdesignforPCVIIII.VIIisusedforinvertedsignalsuchasvalvescontrol.ItisnotnecessarytouseatransistorbecausesinkcurrentofVIII0VI.ismorethanIIVmAandthisadvantagecanbeusedtodriveinternalLEDofPCVIIII.VIIfromhightolow.Normally,thisiscommonwithopencollectorcircuitandcanonlybeusedasinverted.ResistorRIIIisusedtolimitvoltagedropofinternalLED.
IV.II.I.IIVLiveDCSupply
Fortriacandvalvesdrivercircuit,aDCsupplywhichreferencetoAClineisrequired.ThiscanbeconstructedbyusingI.IIVregulatorICVIIVIIII.IIandsomecomponents.AIIII0VtoI.IIVDCtransformerisalsorequired.TheoutputofsupplyisrequiredV00mAtosupplyallcomponents.I.AcurrentcanbegetfromVIIVIIII.IIandonlyoneICisenoughtodriveallTriacsandRelay.
Mainfactofthisdesignisthat+I.IIVDCoutputofregulatorisconnectedtoIIII0ACphaseline.Thus,+I.IIVDCsupplyfromcircuitisreferencetoIIII0VACandthisvoltagecanbeusedtodriveACTriacdirectly.
Cautionfromthiscircuitisnottotouchanydevicebyhand.Thiscangetelectricalshocksincealldevicesareworkingatlivearea.
Fig.IVI.IIVliveDCPowerSupplyCircuit
IV.III.InletValveDriver
InletvalveisasolenoidtypevalveandwhichcandrivedirectlywithIIII0AC.Arelayandrelaydrivercircuitisusedtodrivethisvalve.SpecificationofvalveisIIII0V/V00mA.Sorelaymustbehandlethisloadandthisdesign’srelayisI.IIVDCoperationalvoltageandcanhandleIIII0V/I.0Aload.Thistyperelayisenoughtoswitchbothinletandoutletvalve.
DarlingtontransistorpairofCIXIVVandDVIIIVIIIIIisusedtodriverelaycoilfromopticalisolatorsignal.Requiredcomponentscanbecalculatedasfollows.CIXIVVisusedasdriverandDVIIIVIIIIIisusedasrelaydriver.BothtransistorhasratingofVcc=IIIVVmaximumandthisoperationvoltageiswellcoverforI.IIVrelay.
RelayVoltage=I.IIVDC
RelayCurrent=VII00mA
So,collectorcurrentIcofdarlingtonpairshouldhaveI..IVAforsafetyfactor(twiceofloadcurrentV00mA).
hFE(Total)=hFE(IXIVV)xhFE(VIIIVIIIII)
=I.II0xVI0
=VIIII00
Ib=Ic/hFE
=I..IV/VIIII00
=0.I.IXmA
Thus,
Rb=(Vcc-I..IV)/Ib
=(I.II-0.I.IV)/0.I.IXmA
=VVI000=VVIk
RI.andRIIcanbeconsideredaslessthanVVIktolimitthebasecurrentfortransistorselected,itisneededtogivethesufficientcollectorcurrent.Togetsufficientcollectorcurrent,thebaseresistanceofdarlingtontransistorpairmustbemaximumandanyresistorunderthisvaluecanbechosenforbaseresistanceofthistransistorpair.Inthiscase,RI.andRIIarechosenasthecombinationofIVVIIkandIV.VIIk
Fig.VRelaydrivercircuitforAcinletsolenoidvalve
Foroutletvalve,thisvalvehasspecificationratingofIIII0VDCandIVAloadcurrent.So,aVAdiodebridgeisconnecteddirectlyACIIII0lineandconvertedassupplyvoltageforvalve.Otherdrivertransistorandswitchrelayarethesameasinletvalve.
Fig.VIRelaydrivercircuitforWaterDrainValve
IV.IV.TRIACMotorDriver
Todrivesplitphasewashmotor,adrivercircuitisrequiredtoconstructwithdirectioncontrol.Traditionalcircuituserelaytoswitchmotordirection.Thismechanicalmethodisnotreliableforlongtermandhighcurrentuse.So,aTRIACbasecontrolcircuitisusedinthisdesign.
MotorratingareIIII0VandIII.VAinnormalloading.So,TRIACmustbeatleastIIIV0VandVIIArating.BTAseriesVI00modelTriacisusedinthisdesign.TheycanbeusedasanON/OFFfunctioninapplicationssuchasstaticrelays,heatingregulation,inductionmotorstartingcircuitsorforphasecontroloperationinlightdimmers,motorspeedcontrollers.Thesnubberlessversions(BTA/BTB...WandTVIIIseries)arespeciallyrecommendedforuseoninductiveloadsbytheirhighcommutationperformancesaccordingtodatasheet.
SpecificationofBTAVIII-VI00TRIACare:
IT(RMS)=VIIIA
VDRM/VRRM=VI00andVIII00V
IGT=V0mA
VGT=I..IIIvolts
TheoutputfromPCVIIII.VIIphotocouplerisIIVmAandCVIVVIItransistorisusedasgatetriggerdriver.Requiredcalculationcanbedoneasfollows.
Then,IcforCVIVVIIshouldhaveI.00mAforsafetyfactor.
Ic(IGT)=V0mA
Ib=Ic/hFE
0I.00mA/I.00
0I.mA
Thus,
Rb=(Vcc-Vbe)/Ib
0(I.II-0.VII)/I.m
0I.I.k
ForthiscaseRbischosenasI.0k
Topreventfromsparksurges,I.V0ohmsresistorisserieswithgateandCIXIVVcollector.Thiscannotbeeffectedtooperationbutcanlimitsurgenoisecurrent.
TriacQI.istodriveleftwindingofmotorandQIIisforright.CapacitorCI.isIV.VIIuF/IVIV0Vcapacitorandwhichisusedforstartingexcitationofmotor.
Fig.VIITriacControlledMotorDriverCircuit
Fig.VIIIACDriverCircuitforWashingMachineSystem
Whensolenoidvalvesandmotorarede-energized,alargevarietyoftransientvoltagefromtheseinductiveloadscanproduceaspike.Whenthesetransientsoccur,itmayhavevoltagelevelswhicharetwoorfivetimestheoriginalsupplyvoltage.So,thefuseinthemotorisusedtoprotectthecircuitagainstovercurrent.
Fig.IXConstructedCircuitsforWashMotor,WaterInletValveandDrainValve
Fig.I.0PCBSchematicsforWashingMachineControlSystem
IV.V.CautionsfromthisCircuitinTesting
I..FortheDCwaterdrainvalve,theinductivevoltageiscreatedanytimepowertothecoilisde-energized.Itistentimestheappliedvoltage.
II.+I.IIVDCsupplyfromcircuitisreferencedtoIIII0VACandthisvoltagecanbeusedtodriveACtriacs
Directly.
III.Whilethiscircuitisworking,anydeviceindrivercircuitshouldnotbetouchedbyhand.Thiscanget
electricalshock,sincealldevicesareworkingatlivearea.
V.SOFTWAREDEVELOPOMENT
Anumberofoperationshavetobecarriedoutinthecorrectsequenceinthecontrolprocessofwashingmachine.Eachoftheseoperationsinvolvesopeningvalvetofillthemachinedrumtotherequiredlevel,closingthevalve,switchingonthewashmotortorotatetheforwardandbackwarddirectionforaspecifictime.Theoperatingsequenceiscalledprogram,thesequenceofinstructionsineachprogrambeingpredefinedandbuiltintothecontrollerused.
Fig.I.I.FlowChartforModeSelectionofWashingMachineProcess
Therearethreemodesofoperationinwashingmachineprogram.Controlisactivatedasfullyautoormanualmodebymodeselectionswitch.Automodecanbeselectedmoreoptionsuchassoft,regularandheavydependingonwashcycle.Softandregularmodesarelessdurationofwashandfasterinspinmode.Thesemodesarereliableforsoftclothesandlighttowels.Heavymodehasmoredurationinwashandlongerspintime.Thismodeisusefulforheavyclothes.
Twoinputsformodeselection,startswitchandwaterleveldetectswitchinputsmustbeused.TheprogramstartsinitializationwhentheATVIIIIXSVI.processorisreset.Thenitwillscantheinputs.Thedoorswitchmustbescannedastheinterrupt.Whenthedoorswitchisopenedduringprocess,itwillcalltheinterruptroutineanditwillstoptheprocess.Andthenitwillre-operatetheprocesswhenthedoorswitchisenclosed.
V.I..TimeDelayLoopCalculation
Softwaretimedelayloopsareoftenusedincomputerprogramsandthetasksperformedbythesetypesofloopsaresimpletowastetime.Thetimingsequenceforthewashingmachinerequireslongtimetobecompleted.Butindemonstration,longperiodisnotnecessaryaspractical.Thedelaytimefordebouncingcanbecalculatedasfollows.
TTVIII:MOVVARII,#IIIIII
MOVVARI.,#I.0IV
TTIX:DJNZVARI.,TTIX
DJNZVARII,TTIX
Crystal=IVMHz
Oscillatorperiod=IIV0ns
InstructionexecutiontimeformovR,#data=I.II
InstructionexecutiontimefordjnzRn,rel=IIIVV0ms
Inthissystem,IIIsecondsdelay,VIIsecondsdelay,I.0secondsdelayandVsecondsdelaysarewrittenasthesubroutinesinthemainprogram.
V.II.FlowChartforProcessControl
Themainlineprogramiswrittenjusttocallthesequenceofcorrespondingprocedure.Thesearewaterinletvalveroutine,washroutineforsoftmode,regularmodeandheavymode,spinroutineanddrainvalveroutinearewritteninsequenceasshowninFigI.II.
Fig.I.IIFlowChartforMainProcessofWashingMachineControlSystem
VI.DISCUSSIONSANDFUTHEREXTENSION
ThiscontrolsystemisdesignedbyusingVIII0VI.architectureandbasedondiscretedigitalcontrolsystem.ThedesignisbasedonATVIIIIXSVI.,whichisproducedfromAtmel’scompany.Theapplicationsoftwarehasbeendevelopedbyusingassemblylanguage.
Formonitoring,statusLEDsareusedtoshowprocessanderrorconditionofcontrolsystem.Asasafetyfactor,opticalisolationmethodisusedtoseparateACandDCcontroluserinterface.Moreover,switchesaresubstitutedtoindicatethewaterlevelsensorsotherthanimplementationthewaterlevelsensingcircuits.Switchesareusedinsteadofdoorsensor.Whenthisswitchispressedduringthemotorisrunning,themotorwillstop.TheopeningandclosingofvalvesareindicatedbymeansofACwaterinletvalveandDCwaterdrainvalve.Systemcandriveallrealcomponentsofawashingmachine.Themainadvantagesofsystemareompactindesign,accuratetimingcontrol,solidswitchingformotordriving,safetyopticalisolation.Asoptional,microcontrollersareeasilyre-programmableandcustomizableforuserrequirement.Firmwarebasedesignaremoreflexibleinfunctionthanhardwareonlycontrol.
Theactualwaterlevelsensingcircuitsandwaterpumpshouldalsobeaddedtoformaphysicallycompletewashingmachine.Andthehardwaremodificationsarealsorequiredforfurtherapplications.
Forpowerblackoutcondition,thesystemshouldstoretheprocesstimethathasbeencompletedinthe
EEPROM.ButATVIIIIXSVI.microcontrollerdoesnotcontaininternalEEPROM.SotheconnectiontechniquesforexternalEEPROMandmicrocontrollershouldbestudiedasfurtherextensions.
REFERENCES
[I.]AtmelCorporation,II00VII.VIIIbitmicrocontrollerwithIVkbytesin-systemProgrammableFlashATVIIIIXSVI."
[II]AyalaK.J,I.IXIXVI.VIII0VI.microcontrollerArchitecture,ProgrammingandApplication"SecondEditionPrintedbySunilBindingandprintingWrokes,IndiePrintingHous,Wadala,MumbaiIV000IIII.
[III]ThomasL.Flovd.I.IXIXVI,ElectronicsDevices"FourthEdition,PrenticeHall,Inc.
[IV]ThomasE.Kisseell..I.IXIXVIIIndustrialElectronics"PrenticeHall,Inc.
[V]Predko,M.II00I..ProgrammingandCustomizingtheVIII0VI.Microcontroller.ReprintedinIndiabyarrangementwiththeM.GrawHillCompaniesInc,NewYork
[VI]PhilipsSemiconductorCompany.AprilI.IXIXIX.DatasheetofVIII0SVI.,VIIIbit,MicrocontrollerFamily".AprilI.IXIXIX
[VII]Kleitz.W.I.IXIXVIIIMicroprocessorandMicrocontrollerFundamentals".I.IXIXVIII
关键字:过程控制,应用电子,顺序控制,驱动电路,控制电路.
摘要:本文介绍了单片机的洗衣机过程控制.在本文中ATVIIIIXSVI.单片机用于控制洗涤循环以及驱动外部输出设备.例如,进水阀,驱动电机,排水阀.对于ATVIIIIXSVI.单片机的控制方案用汇编语言实现.这个课标是设计I.个使用简单低成本的微控制器构建控制系统.这项研究主要是使用简单的过程控制来提高控制系统和软件系统.
I..引言
洗衣机的控制系统可被分为功能控制和电源控制系统.例如功能控制,VIII0VI.单片机的输入开关被归类为控制输入和主系统的处理单元.另外,VIII0VI.控制器及其组件仅能在低压直流电源下工作.电机和阀门驱动器分别在I.II伏直流电源和IIII0V交流电源下工作.这两个主要的直流和交流电路孤立与光耦合器.ATVIIIIXSVI.单片机的直流分量包括光耦合器驱动程序和+VV直流电源.交流分量包括电机驱动器,进水阀驱动器,出口阀驱动器,I.IIV直流电源.
II.框图
图I.单片机的洗衣机过程控制框图
第I.阶段是I.个主电源.在电源供应上,降压变压器是用来减少必要的电压控制单元及其他组件.然后整流和滤波后按正调节来调节直流电压源.电压调节器提供恒定的直流输出电压基本上是独立与输入电压和输出负载电流.然后微控制器控制该过程并检测中断.输入微控制器包括水位开关,模式选择开关,门开关,自动/手动开关和门开关.该输入可能是门开关和复位开关.来自微控制器的控制信号控制电机驱动电路和阀门驱动电路.驱动器电路提供信号到功率电子设备,如继电器,III双向可控硅和光电耦合器.输出设备是电机,水电磁阀和排水阀门.
III.ATVIIIIXSVI.引脚分配
IV.硬件设计
在该控制系统中,两个电源都被采 *好棒文|www.hbsrm.com +Q: ^3^5`1^9`1^6^0`7^2#
用,I.个是用于ATVIIIIXSVI.的VV直流电源,另I.个是用于电机和阀的驱动器电路I.IIV直流电源.在这个电路中,VV直流输出使用正电压稳压器VIIVIII0V为和I.IIV直流输出使用VIIVIIII.II.
IV.I..光电耦合器电路
出于安全因素,直流和交流分量独立与光电耦合器.现场交流故障可能从安全上而影响到单片机控制和用户使用.从VIII0VI.输出源电流比其他集成电路低I.点.VIII0VI.电流源仅仅是V毫安,这不足以直接驱动PCVIIII.VII内部II极管.
图II可控硅隔离电路
CVIIIIIVIIINPN晶体管I.般被用来解决这个问题.在驱动PCVIIII.VII内部II极管时最大电流V0mA和III.IIIV是必要的.
CVIIIIIVIII拥有的VII0电流增益和所需的基极电阻值可以计算如下:
Ib=Ic/hFE
=V0mA/VII0
=0.VIII.IVmA
为了得到Ib需要基极电阻Rb可以计算出来.
Rb=Vb/Ib
=V/0.VIII.IVmA
=VII000=VI.VIIIk
所以IV.VIIK电阻器是适合的
图III阀门驱动器光电隔离电路
接下来PCVIIII.VII的光电隔离电路设计是用于如阀门控制的反相信号.它不
需要使用晶体管,因为VIII0VI.光电流超过IIV毫安,这个优点可以被用来驱动PCVIIII.VII从高至低内部的LED.通常集电极开路电路只能用作反转.电阻RIII用于限制内部LED电压降.
IV.II.I.IIV现场直流电源
对于可控硅阀门驱动电路,AC线的直流电源是必需的.可以使用I.IIV稳压器ICVIIVIIII.II和I.些组件构建而成.还需要I.个IIII0V到I.IIV直流变压器.V00毫安电源输出提供所有组件.从VIIVIIII.II和I.个ICI.A得到I.A的电流是足以驱动所有的III端双向可控硅和继电器.
本设计主要是+I.IIV直流输出调节器连接到交流电源IIII0相线.因此I.II伏直流从电路的电源是参照IIII0V交流电,这个电压可用于直接驱动交流III端双向可控硅电路,出于谨慎电路工作时不要触摸任何设备.这可能引发触电,因为所有的设备都在带电状态工作.
图IVI.IIV现场直流稳压电源电路
IV.III.入口阀驱动
入口阀是可以直接和IIII0交流变频器连接的电磁式闸阀.继电器及继电器驱动电路用于驱动入口阀.阀门规格是IIII0V/V00毫安.所以继电器必须可以承受这种负载,本设计的继电器是可以在I.IIVDC工作电压下工作,可以承受IIII0V/I.0A负载.这种类型的继电器足够用来切换入口和出口阀.
晶体管CIXIVV和DVIIIVIIIII被用来从光隔离器发出信号来驱动继电器线圈.需要参数可以如下来计算:
DVIIIVIIIII是继电器驱动.这两个晶体管工作电压为额定值IIIVV,工作电压为I.IIV继电器.
继电器电压=I.IIVDC
继电器的电流=VII00mA
因此,为了安全晶体管集电极电流Ic应该达到I..IVA,两次负载电流V00MA
hFE(Total)=hFE(IXIVV)xhFE(VIIIVIIIII)< *好棒文|www.hbsrm.com +Q: ^3^5`1^9`1^6^0`7^2#
br/>=I.II0xVI0
=VIIII00
Ib=Ic/hFE
=I..IV/VIIII00
=0.I.IXmA
Rb=(Vcc-I..IV)/Ib
=(I.II-0.I.IV)/0.I.IXmA
=VVI000=VVIk
RI.和RII可以被看作是小于VVIk的限制基极电流的晶体管,它们需要得到足够的集电极电流.为了获得足够的电流,晶体管的基极电阻必须是最大的,并根据这个值的任何电阻可以选择此晶体管的基极电阻.在这种情况下RI.和RII被选为IVVIIK和IV.VIIK的组合.
图V交流入口电磁阀继电器驱动电路
对于出口阀,该阀具有规格等级IIII0V直流电压和IVA的负载电流.所以I.个VAII极管桥是直接连接交流电IIII0V并转换为供给电压阀.其他驱动晶体管和开关继电器是相同的入口阀.
图VI排水阀继电器驱动电路
IV.IV.双向可控硅电机驱动器
构建I.个具有方向控制的驱动电路来驱动电机.传统的电路使用继电器切换电机的方向.这种机械的方法是不适宜长期和大电流使用的.所以I.个双向可控硅控制电路出现在本设计中.
电动机额定功率是IIII0V和III.VA的正常负荷.因此,双向可控硅必须至少IIIV0V和VIIV.这种设计采用的是BTA系列VI00型可控硅.它们可以被用来作为I.种开关器件出现在很多应用中.如静态继电器,加热开/关功能调节,异步电动机的起动电路或相位调光器,电机速度控制器控制运行.根据数据表高换向在无缓冲器的情况下(BTA/BTB...W和TVIIIseries)是特别推荐对感性负载的使用.
BTAVIII-VI00双向可控硅的规格主要有:
IT(RMS)=VIIIA
VDRM/VRRM=VI00andVIII00V
IGT=V0mA
VGT=I..IIIvolts
从PCVIIII.VII光耦的输出为IIVmA,CVIVVII晶体管用作门极触发驱动器.需要计算如下:
然后IC为CVIVVII应该有I.00mA的电流.
Ic(IGT)=V0mA
Ib=Ic/hFE
=I.00mA/I.00
=I.mA
因此
Rb=(Vcc-Vbe)/Ib
=(I.II-0.VII)/I.m
=I.I.k
对于这种情况下的Rb选为I.0K为防止火花和浪涌电流,I.V0欧姆电阻系列CIXIVV.这不能影响到操作但可以限制浪涌电流.电容CI.是IV.VIIuF/IVIV0V电容,用于起动电机的励磁.
图VII可控硅控制电机驱动电路
图VIII洗衣机的交流驱动电路系统
当电磁阀和电机断电时,感性负载瞬态电压可以产生I.个尖峰.当瞬态发生时,它可以具有电压等级的两倍或V倍于原有供应电压.因此电动机使用保险丝保护电路防止过电流.
图IX的电机进水阀和排水阀电路构造
图I.0洗衣机控制系统的PCB原理图
IV.V.电路测试中的注意事项
I..对于直流排水阀,感应电压的创建是为了电源线圈随时断电.它是I.0倍的施加电压.
II.+I.IIV直流电源从电路被引用到IIII0VAC,这个电压可直接用于驱动交流III端双向可控硅电路.
III.当这种电路工作时,驱动程序的任何设备不应该用手摸.这可能导致电击,因为所有设备都工作在现场区域.
V,软件发展问题浅析
许多操作都要按正确的顺序进行洗衣机的控制.这些操作包括打开阀门以填补滚筒洗衣机所要求的水位,关闭阀门以控制接通洗涤电机在特定时间转动向前和向后的方向.操作序列称为程序的指令序列,每I.程序都是预定义并内置于控制器中的.
图I.I.洗衣机的模式选择流程图
洗衣机有III种操作模式.通过模式选择开关选择全自动或手动模式.自动模式可以选择更多的选项,如轻洗,定时和强洗模式.轻洗和定时模式是洗时间少而旋转模式快.这些模式是可以洗涤软衣服和毛巾.强洗模式有更多的时间洗涤和更长的旋转时间.这种模式适合洗涤厚重的衣服.
两种输入模式选择启动开关和水位检测开关输入.当ATVIIIIXSVI.处理器复位初始化时程序将启动.然后它将扫描输入门开关必须扫描成中断.当门开关打开过程中将调用中断服务程序它会停止该进程.然后它会重新操作使开关关闭.
V.I..延时回路的计算
软件延时循环中经常使用的电路方案以及这些类型的任务循环执行是浪费时间的.用于洗涤的时间序列机器需要很长的时间才能完成.但这么长周期不是必要的,因为实际的使用时间不需要这么多延迟时间可以计算如下
TTVIII:MOVVARII,#IIIIII
MOVVARI.,#I.0IV
TTIX:DJNZVARI.,TTIX
DJNZVARII,TTIX
Crystal=IVMHz
Oscillatorperiod=IIV0ns
指令执行时间为MOVR,#数据=I.II
指令执行时间为DJNZRn,则相对=IIIV
=IIV0ns(I.II+I.II)*IIV0ns(I.0III*IIIV)+IIV0ns(IIVV*IIIII*IIIV)=V0ms
在这个系统中,III秒延迟,VII秒延迟,I.0秒延迟和V秒延迟被作为子程序写进主系统中.
V.II.过程控制流程图
图I.II洗衣机的过程控制流程图
VI.讨论并扩展
该控制系统采用VIII0VI.设计体系结构和离散数字控制系统.该设计ATVIIIIXSVI.,这是Atmel制作公司已开发使用的汇编语言.
状态指示灯是用来显示处理过程和控制系统的错误条件.作为I.项安全因素,光隔离方法用于分离AC和DC控制用户界面.此外,开关取代水位监测电路指示水位开关被用来代替门传感器.当此开关电机运行时电机停转.打开和关闭阀门是采用交流进水阀和直流排水阀.系统可以驱动所有组件洗衣机.系统的主要优点是设计紧凑,精确的时序控制,固定的开关电机驱动,安全光电隔离.作为可选的微控制器很容易重新编程和定制对用户需求.固件的底座设计在功能上更灵活.实际水位传感器电路和水泵也应增加以形成I.个完整的洗衣机.
对于停电状态下,程序应存储在已完成的系统中.但ATVIIIIXSVI.单片机不包含在内部程序中.因此对于外部的控制器应进I.步研究扩展.
参考文献
[I.]Atmel公司II00VIIVIII位微控制器在系统IVK字节内可编程FlashATVIIIIXSVI.".
[II]阿亚拉K.JI.IXIXVIVIII0VI.微控制器架构及应用".
[III]托马斯LFlovdI.IXIXVI年电子设备"(第IV版),普伦蒂斯霍尔公司.
[IV]托马斯·KisseellI.IXIXVII工业电子学"PrenticeHall出版社有限公司.
[V]Predko,M.II00I.编程和自定义VIII0VI.微控制器"通过与M.格劳转载印度希尔公司
[VI]飞利浦半导体公司I.IXIXIX数据VIII0SVI.,VIII片位微控制器"I.IXIXIX年IV月.
[VII]Kleitz.W.I.IXIXVIII微处理器和微控制器基础".
附件II:外文原文
DesignConsiderationsforMicrocontrollerBasedProcessControlforWashingMachine
Keywords_Processcontrol,appliedelectronics,sequencecontrol,drivercircuitandcontrolcircuit.
Abstract----Thispaperdescribesthedesignconsiderationsofmicrocontrollerbasedprocesscontrolforwashingmachine.Inthispaper,ATVIIIIXSVI.microcontrollerisusedtocontroltheprocessofwashingcycleandtodrivetheexternaloutputdevicessuchaswaterinletvalve,washmotor,waterdrainvalve.ThecontrolstrategyprogramforATVIIIIXSVI.microcontrollerisimplementedbyusingassemblylanguage.Theobjectivesofthisdevelopmentaretodesignasimplecontrolsystemusinglowcostmicrocontroller,toconstructthefunctionsofsystemusingsimplecontrolsystem.Themainabstractionofthisresearchis
Thefirststageisamainpowersupply.Inthepowersupply,stepdowntransformerisusedtoreducethenecessaryvoltageforthecontrolunitandothercomponents.ThenrectifierandfilterfollowbypositiveregulatortoregulatetheDCvoltagesource.AvoltageregulatorprovidesaconstantDCoutputvoltagethatisessentiallyindependentoftheinputvoltageandoutputloadcurrent.Thenmicrocontrollercontrolstheprocessesandsensestheinterrupt.Theinputsformicrocontrollerarewaterlevelswitch,modeselectstoimprovecontrolandsoftwaresystemsofmicrocontrollerbasedprocesssimplecontrolsysteminElectronics.
I.INTRODUCTION
Washingmachinecontrolsystemcanbedividedintofunctionandsupplyrating.Asfunctions,VIII0VI.microcontrollerandinputswitchesarecategorizedascontrolinputandmainprocessingunitsofsystem.Andmore,VIII0VI.controllerandcomponentsareworkedatonlylowvoltageDCsupply.MotorandvalvesdriversareworkedatliveDCI.IIvoltssupplyandIIII0VACcircuit.ThesetwomainDCandACcircuitsareisolatedwithopticalcouplers.DCcomponentsareATVIIIIXSVI.microcontroller,optocouplersanddriverand+VVDCsupply.ACcomponentsaremotordriver(ACIIII0V),inletvalvedriver(ACIIII0V),outletvalvedriver(DCIIII0V),+I.IIVDCsupply(Live).
II.BLOCKDIAGRAM
Fig.I.BlockDiagramofMicrocontrollerBasedProcessControlforWashingMachine
Thefirststageisamainpowersupply.Inthepowersupply,stepdowntransformerisusedtoreducethenecessaryvoltageforthecontrolunitandothercomponents.ThenrectifierandfilterfollowbypositiveregulatortoregulatetheDCvoltagesource.AvoltageregulatorprovidesaconstantDCoutputvoltagethatisessentiallyindependentoftheinputvoltageandoutputloadcurrent.Thenmicrocontrollercontrolstheprocessesandsensestheinterrupt.Theinputsformicrocontrollerarewaterlevelswitch,modeselectswitch,doorswitch,auto/manualswitchanddoorswitch.Theinterruptmaybedoorswitchandresetswitch.Thecontrolsignalfromthemicrocontrollercontrolsthedrivercircuitformotorandvalves.Thedrivercircuitgivessignaltopowerelectronicdevicessuchasrelays,triacsandoptocouplers.Theoutputdevicesaremotor,watersolenoidvalveanddrainvalve.
III.PINASSIGNMENTFORATVIIIIXSVI.
IV.HARDWAREDESIGNCONSIDERATION
Inthiscontrolsystem,twopowersuppliesareconsidered;oneisVVDCforATVIIIIXSVI.,pinIV0VCC,andI.IIVDCfordrivercircuitofmotorandvalves.Inthiscircuit,simplepositiveregulatorICs;VIIVIII0VforVVoutputandVIIVIIII.IIforI.IIVDCoutputareused.
IV.I..OptoCouplerCircuit
Forsafetyfactor,ACandDCcomponentsareisolatedwithOptoCouplers.ThiscanbesafefromliveACfaultwhichaffectedtomicrocontrollercontrolanduser.OutputsourcecurrentfromVIII0VI.isalittlelowerthanotherICs.CurrentsourceofVIII0VI.isonlyVmAanditisnotsufficienttodrivePCVIIII.VIIinterdiodedirectly.
VI.
Fig.IIOpticalIsolationCircuitforTriac
CVIIIIIVIIIgeneralNPNtransistorisusedtosolvethisproblem.MaximumcurrentV0mA&III.IIIVarenecessarytodriveinternaldiodeinPCVIIII.VII.CVIIIIIVIIIhascurrentgainofVII0andrequiredbaseresistorvaluecanbecalculatedasfollows:
Ib=Ic/hFE
0V0mA/VII0
00.VIII.IVmA
TogetIb,requiredbaseresistorRbcanbecalculated.
Rb=Vb/Ib
0V/0.VIII.IVmA
0VII000=VI.VIIIk
SoIV.VIIkresistorissuitableforthesituation.
Fig.IIIOpticalIsolationCircuitforValvesDriver
ThenextopticalisolationcircuitdesignforPCVIIII.VIIisusedforinvertedsignalsuchasvalvescontrol.ItisnotnecessarytouseatransistorbecausesinkcurrentofVIII0VI.ismorethanIIVmAandthisadvantagecanbeusedtodriveinternalLEDofPCVIIII.VIIfromhightolow.Normally,thisiscommonwithopencollectorcircuitandcanonlybeusedasinverted.ResistorRIIIisusedtolimitvoltagedropofinternalLED.
IV.II.I.IIVLiveDCSupply
Fortriacandvalvesdrivercircuit,aDCsupplywhichreferencetoAClineisrequired.ThiscanbeconstructedbyusingI.IIVregulatorICVIIVIIII.IIandsomecomponents.AIIII0VtoI.IIVDCtransformerisalsorequired.TheoutputofsupplyisrequiredV00mAtosupplyallcomponents.I.AcurrentcanbegetfromVIIVIIII.IIandonlyoneICisenoughtodriveallTriacsandRelay.
Mainfactofthisdesignisthat+I.IIVDCoutputofregulatorisconnectedtoIIII0ACphaseline.Thus,+I.IIVDCsupplyfromcircuitisreferencetoIIII0VACandthisvoltagecanbeusedtodriveACTriacdirectly.
Cautionfromthiscircuitisnottotouchanydevicebyhand.Thiscangetelectricalshocksincealldevicesareworkingatlivearea.
Fig.IVI.IIVliveDCPowerSupplyCircuit
IV.III.InletValveDriver
InletvalveisasolenoidtypevalveandwhichcandrivedirectlywithIIII0AC.Arelayandrelaydrivercircuitisusedtodrivethisvalve.SpecificationofvalveisIIII0V/V00mA.Sorelaymustbehandlethisloadandthisdesign’srelayisI.IIVDCoperationalvoltageandcanhandleIIII0V/I.0Aload.Thistyperelayisenoughtoswitchbothinletandoutletvalve.
DarlingtontransistorpairofCIXIVVandDVIIIVIIIIIisusedtodriverelaycoilfromopticalisolatorsignal.Requiredcomponentscanbecalculatedasfollows.CIXIVVisusedasdriverandDVIIIVIIIIIisusedasrelaydriver.BothtransistorhasratingofVcc=IIIVVmaximumandthisoperationvoltageiswellcoverforI.IIVrelay.
RelayVoltage=I.IIVDC
RelayCurrent=VII00mA
So,collectorcurrentIcofdarlingtonpairshouldhaveI..IVAforsafetyfactor(twiceofloadcurrentV00mA).
hFE(Total)=hFE(IXIVV)xhFE(VIIIVIIIII)
=I.II0xVI0
=VIIII00
Ib=Ic/hFE
=I..IV/VIIII00
=0.I.IXmA
Thus,
Rb=(Vcc-I..IV)/Ib
=(I.II-0.I.IV)/0.I.IXmA
=VVI000=VVIk
RI.andRIIcanbeconsideredaslessthanVVIktolimitthebasecurrentfortransistorselected,itisneededtogivethesufficientcollectorcurrent.Togetsufficientcollectorcurrent,thebaseresistanceofdarlingtontransistorpairmustbemaximumandanyresistorunderthisvaluecanbechosenforbaseresistanceofthistransistorpair.Inthiscase,RI.andRIIarechosenasthecombinationofIVVIIkandIV.VIIk
Fig.VRelaydrivercircuitforAcinletsolenoidvalve
Foroutletvalve,thisvalvehasspecificationratingofIIII0VDCandIVAloadcurrent.So,aVAdiodebridgeisconnecteddirectlyACIIII0lineandconvertedassupplyvoltageforvalve.Otherdrivertransistorandswitchrelayarethesameasinletvalve.
Fig.VIRelaydrivercircuitforWaterDrainValve
IV.IV.TRIACMotorDriver
Todrivesplitphasewashmotor,adrivercircuitisrequiredtoconstructwithdirectioncontrol.Traditionalcircuituserelaytoswitchmotordirection.Thismechanicalmethodisnotreliableforlongtermandhighcurrentuse.So,aTRIACbasecontrolcircuitisusedinthisdesign.
MotorratingareIIII0VandIII.VAinnormalloading.So,TRIACmustbeatleastIIIV0VandVIIArating.BTAseriesVI00modelTriacisusedinthisdesign.TheycanbeusedasanON/OFFfunctioninapplicationssuchasstaticrelays,heatingregulation,inductionmotorstartingcircuitsorforphasecontroloperationinlightdimmers,motorspeedcontrollers.Thesnubberlessversions(BTA/BTB...WandTVIIIseries)arespeciallyrecommendedforuseoninductiveloadsbytheirhighcommutationperformancesaccordingtodatasheet.
SpecificationofBTAVIII-VI00TRIACare:
IT(RMS)=VIIIA
VDRM/VRRM=VI00andVIII00V
IGT=V0mA
VGT=I..IIIvolts
TheoutputfromPCVIIII.VIIphotocouplerisIIVmAandCVIVVIItransistorisusedasgatetriggerdriver.Requiredcalculationcanbedoneasfollows.
Then,IcforCVIVVIIshouldhaveI.00mAforsafetyfactor.
Ic(IGT)=V0mA
Ib=Ic/hFE
0I.00mA/I.00
0I.mA
Thus,
Rb=(Vcc-Vbe)/Ib
0(I.II-0.VII)/I.m
0I.I.k
ForthiscaseRbischosenasI.0k
Topreventfromsparksurges,I.V0ohmsresistorisserieswithgateandCIXIVVcollector.Thiscannotbeeffectedtooperationbutcanlimitsurgenoisecurrent.
TriacQI.istodriveleftwindingofmotorandQIIisforright.CapacitorCI.isIV.VIIuF/IVIV0Vcapacitorandwhichisusedforstartingexcitationofmotor.
Fig.VIITriacControlledMotorDriverCircuit
Fig.VIIIACDriverCircuitforWashingMachineSystem
Whensolenoidvalvesandmotorarede-energized,alargevarietyoftransientvoltagefromtheseinductiveloadscanproduceaspike.Whenthesetransientsoccur,itmayhavevoltagelevelswhicharetwoorfivetimestheoriginalsupplyvoltage.So,thefuseinthemotorisusedtoprotectthecircuitagainstovercurrent.
Fig.IXConstructedCircuitsforWashMotor,WaterInletValveandDrainValve
Fig.I.0PCBSchematicsforWashingMachineControlSystem
IV.V.CautionsfromthisCircuitinTesting
I..FortheDCwaterdrainvalve,theinductivevoltageiscreatedanytimepowertothecoilisde-energized.Itistentimestheappliedvoltage.
II.+I.IIVDCsupplyfromcircuitisreferencedtoIIII0VACandthisvoltagecanbeusedtodriveACtriacs
Directly.
III.Whilethiscircuitisworking,anydeviceindrivercircuitshouldnotbetouchedbyhand.Thiscanget
electricalshock,sincealldevicesareworkingatlivearea.
V.SOFTWAREDEVELOPOMENT
Anumberofoperationshavetobecarriedoutinthecorrectsequenceinthecontrolprocessofwashingmachine.Eachoftheseoperationsinvolvesopeningvalvetofillthemachinedrumtotherequiredlevel,closingthevalve,switchingonthewashmotortorotatetheforwardandbackwarddirectionforaspecifictime.Theoperatingsequenceiscalledprogram,thesequenceofinstructionsineachprogrambeingpredefinedandbuiltintothecontrollerused.
Fig.I.I.FlowChartforModeSelectionofWashingMachineProcess
Therearethreemodesofoperationinwashingmachineprogram.Controlisactivatedasfullyautoormanualmodebymodeselectionswitch.Automodecanbeselectedmoreoptionsuchassoft,regularandheavydependingonwashcycle.Softandregularmodesarelessdurationofwashandfasterinspinmode.Thesemodesarereliableforsoftclothesandlighttowels.Heavymodehasmoredurationinwashandlongerspintime.Thismodeisusefulforheavyclothes.
Twoinputsformodeselection,startswitchandwaterleveldetectswitchinputsmustbeused.TheprogramstartsinitializationwhentheATVIIIIXSVI.processorisreset.Thenitwillscantheinputs.Thedoorswitchmustbescannedastheinterrupt.Whenthedoorswitchisopenedduringprocess,itwillcalltheinterruptroutineanditwillstoptheprocess.Andthenitwillre-operatetheprocesswhenthedoorswitchisenclosed.
V.I..TimeDelayLoopCalculation
Softwaretimedelayloopsareoftenusedincomputerprogramsandthetasksperformedbythesetypesofloopsaresimpletowastetime.Thetimingsequenceforthewashingmachinerequireslongtimetobecompleted.Butindemonstration,longperiodisnotnecessaryaspractical.Thedelaytimefordebouncingcanbecalculatedasfollows.
TTVIII:MOVVARII,#IIIIII
MOVVARI.,#I.0IV
TTIX:DJNZVARI.,TTIX
DJNZVARII,TTIX
Crystal=IVMHz
Oscillatorperiod=IIV0ns
InstructionexecutiontimeformovR,#data=I.II
InstructionexecutiontimefordjnzRn,rel=IIIVV0ms
Inthissystem,IIIsecondsdelay,VIIsecondsdelay,I.0secondsdelayandVsecondsdelaysarewrittenasthesubroutinesinthemainprogram.
V.II.FlowChartforProcessControl
Themainlineprogramiswrittenjusttocallthesequenceofcorrespondingprocedure.Thesearewaterinletvalveroutine,washroutineforsoftmode,regularmodeandheavymode,spinroutineanddrainvalveroutinearewritteninsequenceasshowninFigI.II.
Fig.I.IIFlowChartforMainProcessofWashingMachineControlSystem
VI.DISCUSSIONSANDFUTHEREXTENSION
ThiscontrolsystemisdesignedbyusingVIII0VI.architectureandbasedondiscretedigitalcontrolsystem.ThedesignisbasedonATVIIIIXSVI.,whichisproducedfromAtmel’scompany.Theapplicationsoftwarehasbeendevelopedbyusingassemblylanguage.
Formonitoring,statusLEDsareusedtoshowprocessanderrorconditionofcontrolsystem.Asasafetyfactor,opticalisolationmethodisusedtoseparateACandDCcontroluserinterface.Moreover,switchesaresubstitutedtoindicatethewaterlevelsensorsotherthanimplementationthewaterlevelsensingcircuits.Switchesareusedinsteadofdoorsensor.Whenthisswitchispressedduringthemotorisrunning,themotorwillstop.TheopeningandclosingofvalvesareindicatedbymeansofACwaterinletvalveandDCwaterdrainvalve.Systemcandriveallrealcomponentsofawashingmachine.Themainadvantagesofsystemareompactindesign,accuratetimingcontrol,solidswitchingformotordriving,safetyopticalisolation.Asoptional,microcontrollersareeasilyre-programmableandcustomizableforuserrequirement.Firmwarebasedesignaremoreflexibleinfunctionthanhardwareonlycontrol.
Theactualwaterlevelsensingcircuitsandwaterpumpshouldalsobeaddedtoformaphysicallycompletewashingmachine.Andthehardwaremodificationsarealsorequiredforfurtherapplications.
Forpowerblackoutcondition,thesystemshouldstoretheprocesstimethathasbeencompletedinthe
EEPROM.ButATVIIIIXSVI.microcontrollerdoesnotcontaininternalEEPROM.SotheconnectiontechniquesforexternalEEPROMandmicrocontrollershouldbestudiedasfurtherextensions.
REFERENCES
[I.]AtmelCorporation,II00VII.VIIIbitmicrocontrollerwithIVkbytesin-systemProgrammableFlashATVIIIIXSVI."
[II]AyalaK.J,I.IXIXVI.VIII0VI.microcontrollerArchitecture,ProgrammingandApplication"SecondEditionPrintedbySunilBindingandprintingWrokes,IndiePrintingHous,Wadala,MumbaiIV000IIII.
[III]ThomasL.Flovd.I.IXIXVI,ElectronicsDevices"FourthEdition,PrenticeHall,Inc.
[IV]ThomasE.Kisseell..I.IXIXVIIIndustrialElectronics"PrenticeHall,Inc.
[V]Predko,M.II00I..ProgrammingandCustomizingtheVIII0VI.Microcontroller.ReprintedinIndiabyarrangementwiththeM.GrawHillCompaniesInc,NewYork
[VI]PhilipsSemiconductorCompany.AprilI.IXIXIX.DatasheetofVIII0SVI.,VIIIbit,MicrocontrollerFamily".AprilI.IXIXIX
[VII]Kleitz.W.I.IXIXVIIIMicroprocessorandMicrocontrollerFundamentals".I.IXIXVIII
版权保护: 本文由 hbsrm.com编辑,转载请保留链接: www.hbsrm.com/lwqt/wxzs/158.html