摘要随着空调的产生,电风扇面临巨大冲击。其实,电风扇和空调相比还是有很多优点,首先耗能小,符合目前节能的观念。其次,空调房间都是密闭的,电风扇吹风比较自然,可开门窗,空气流通好,不易感染疾病。为了更好的研发智能风扇,本文基于STC89C52单片机设计电风扇的控制系统。以单片机为控制中心,主要通过提取热释电红外线传感器感应到的人体红外线信息和温度传感器DS18B20得到的温度来控制电风扇的开关及档速的变化,通过单片机对室内温度进行档速划分处理后应用PWM方式控制电风扇档速,并通过液晶显示电路实时显示温度及电风扇的档速。首先进行总体设计,然后进行硬件电路设计与软件设计,最后试制出电风扇原型机。经过前期设计、制作和最终的测试得出,该风扇电源稳定性好,操作方便,运行可靠,功能强大,价格低廉,节约能耗,能够满足用户多元化的需求。该风扇具有的人性化设计和低廉的价格很适合普通用户家庭使用。关键词:STC89C52单片机;电风扇;控制器;智能AbstractWiththegenerationofairconditioning,electricfanisfacingahugeimpact.Infact,comparedwiththeelectricfanandairconditioninghasmanyadvantages,thefirstenergyconsumptionissmall,inlinewiththecurrentconceptofenergyconservation.Next,theairconditioningroomisairtight,theelectricfanhairdryerisquitenatural,canopenthewindowsanddoors,aircirculationisgood,isnoteasytoinfectthedisease.Inordertodeveloptheintelligentfan,thecontrolsystemoftheelectricfanisdesignedbasedonSTC89C52microcontroller.Inordertocontrolthecenterofthesinglechipmicrocomputerascontrolcenter,thetemperatureiscontrolledbythethermalreleaseinfraredsensorandthetemperaturesensorDS18B20tocontrolthetemperatureoftheelectricfan.Firstly,theoveralldesign,andthenthehardwarecircuitdesignandsoftwaredesign,andfinallydevelopedtheprototypeofelectricfan.Afterthepreliminarydesign,productionandfinaltest,thepowersupplyofthefanisgood,theoperationisconvenient,theoperationisreliable,thefunctionisstrong,thepriceislow,theenergyconsumptioncanmeetthediversifiedneedsofusers.Thefanhasauser-friendlydesignandlowpriceisverysuitableforordinaryuserstousethefamily.Keywords:STC89C52microcontroller;electricfan;controller;intelligent目录摘要.............................................................................................................IAbstract......................................................................................................II第一章绪论............................................................................................11.1系统整体设计.......................................................................11.2方案论证...............................................................................21.2.1温度传感器的选择......................................................21.2.2控制核心的选择..........................................................21.2.3温度显示器件的选择..................................................21.2.4调速方式的选择..........................................................2第二章系统各主要单元硬件电路........................................................42.1温度检测电路.......................................................................42.1.1DS18B20的温度处理方法..........................................42.1.2温度传感器..................................................................52.2LED数码管显示电路...........................................................62.2.1移位寄存器简介..........................................................62.2.2共阴极八段数码管简介...................................