目录目录摘要·······························································································IAbstract···························································································II1绪论····························································································11.1全自动洗衣机的介绍····································································11.1.1全自动洗衣机的发展背景························································11.1.2全自动洗衣机的发展前景························································11.1.3全自动洗衣机的设计目的························································21.1.4模糊控制理论简介·································································21.2全自动洗衣机的设计方案······························································31.2.1按键····················································································31.2.2洗衣机的自检·······································································31.2.3洗衣程序··············································································31.2.4显示····················································································41.2.5传感器·················································································42硬件电路介绍·················································································52.1CPU选型····················································································52.289C51的存储器与寄存器································································72.3A/D转换器··················································································72.4传感器·······················································································102.5显示器·······················································································113软件设计·······················································································143.1全自动洗衣机中的模糊控制···························································143.1.1模糊控制器···········································································143.1.2模糊控制实现方法·································································143.2软件流程图及代码·······································································153.2.1寄存器·················································································153.2.2流程图及其代码····································································163.3伟福仿真器·················································································523.3.1伟福仿真器简介····································································52目录3.3.2伟福仿真器特点····································································53结论·······························································································54致谢·······························································································55参考文献·························································································56附录A程序代码················································································60附录B原理图···················································································69摘要I摘要基于模糊控制的全自动洗衣机自动控制系统,所有的电路都是在单片机的控制下工作的,目前通常采用的是Motorola公司的MC6805系列的单片机,而本设计中采用了Intel公司的89C51作为控制核心,以单片机89C51为核心结合接口芯片及外围电路以实现洗衣机的智能控制。其中模糊控制器的设计是关键环节,采用传感器检测洗衣过程必需的物理量,进入模糊控制器,通过模糊推理,实现对洗衣机自动识别衣质、衣量,自动识别肮脏程度,自动决定水量,自动投入恰当的洗涤剂等功能的控制。本设计在洗涤过程中采用了实时模糊控制,提高洗衣质量,节约能源。硬件结构框图及软件流程图是该系统的重要组成部分,在整个控制过程中,模糊控制软件起了决定性的作用。关键词:模糊控制;单片机;全自动洗衣机AbstractIIAbstractBasedonfuzzycontrolcompletelyautomaticwasherautomaticcontrolsystem,Allelectriccircuitsareworkedunderthemonolithicintegratedcircuitcontrol,atpresent,usuallyusesmonolithicintegratedcircuitisMotorolaCorporation'sMC6805series,butinthisdesign,itusedIntelCorporation’s8031totakethecontrolcore,8031realizesthewasherintelligentcontrol,takethemonolithicintegratedcircuitasthecoreunioningconnectionchipandtheperipheryelectriccircuit.Fuzzycontroller’sdesignistheessentiallink.Itusesthesensortoexaminetheessentialphysicalquantityofthewashclothesprocess,theyenterthefuzzycontroller,throughthefuzzyreasoning,realizesofthewasherautomaticdiagnosingclothesnature,theclothesquantity,theautomaticdiagnosingdirtydegree,automaticallydecidingthewatervolume,function,automaticinvestingappropriatedetergent,andsoon.Inthisdesign,theprocessofwashingusesthereal-timefuzzycontrol,enhancedthequalityofwashingclothes,Savestheenergy.Thehardwarearchitecturediagramandthesoftwareflowchartaretheimportantconstituentofthissystem,Inentirecontrolledprocess,Fuzzilycontrolledsoftwareplaysthedecisiverole.Keywords:fuzzycontrol;single-chip;fullautomaticwasher河北工程大学毕业设计说明书11绪论1.1全自动洗衣机的介绍洗衣机是一种在家庭中不可缺少的家用电器,发展非常快,而全自动式洗衣机因使用方便更加得到大家的青睐,全自动即进水、洗涤、漂洗、甩干等一系列过程自动完成,控制器通常设有几种洗涤程序,对不同的衣物可选择不同的洗涤方式。1.1.1全自动洗衣机的发展背景从古到今,洗衣服都是一项难于逃避的家务劳动,而在洗衣机出现以前,对于许多人而言,它并不像田园诗描绘的那样充满乐趣,手搓、棒击、冲刷、甩打……这些不断重复的简单的体力劳动,留给人的感受常常是:辛苦劳累。1858年,汉密尔顿·史密斯制成了世界上第一台洗衣机。1874年,“手洗时代”受到了前所未有的挑战,美国人比尔·布莱克斯发明了世界上第一台人工搅动洗衣机。1911年美国人又研制了世界上第一台电动洗衣机。1920年美国的玛依塔格公司又把洗衣机的木制桶改为铝制桶体,第二年又把铝制桶体改为外层铸铝、内层为铜板的双层结构。1936年,他们又将搪瓷用于洗衣机桶体。与此同时,世界各地也相继出现了洗衣机。欧洲国家研究成功了喷流