毕业论文二O一一年六月┊┊┊┊┊┊┊装┊┊┊┊┊┊┊订┊┊┊┊┊┊┊线┊┊┊┊┊┊┊智能窗帘设计轮机工程学院内容摘要随着人们生活水平的提高,智能窗帘已成为现代人们的室内家居的一部分,它使人们的生活更加便捷,改善了人们日常生活的质量。传统的窗帘需要手动,但一些大型写字楼、高档办公室、展览馆的窗帘多、长且重,手动比较困难,所以本设计解决了此问题,实现了全自动。主要设计理念是通过检测窗外光线强弱,控制百叶窗摆动角度,调节室内光照,创造舒适的工作生活环境。论文设计的核心控制选用的是MCS-51单片机,光线采集选用光敏电阻。由于单片机只能读入数字信号,所以模拟信号处理采用ADC0809八路八位转换器。转换成数字信号后,根据数据大小相应地驱动电机,调节其转动角度。电机选用比较容易进行角度调节的步进电机,单片机与步进电机之间的连接采用ULN2003达林顿驱动器。本文分为四部分:第一部分总述基于MCS-51单片机的智能窗帘设计思想及结构内容;第二部分主要介绍MCS-51单片机结构特点及单片机的C语言编程-C51;第三部分详细论述了信号处理系统的设计,包括光线的采集和AD转换;第四部分详细论述了步进电机控制系统的设计。第五部分展示了硬件电路实体。通过此次毕业设计,使我进一步熟悉MCS-51单片机和步进电机的工作原理及应用,对于C51程序设计的编写也较熟练了,锻炼了独立思考与团队合作的能力。关键词:MCS-51单片机;ADC0809;步进电机;ULN2003驱动器ABSTRACTWithpeople’slivingstandardsimproved,theSmartcurtainshavebecomeapartofpeople'sindoorfurniturenow.Ithasmadepeople'slivingmoreconvenient,hasimprovedthequalityofpeople'sdailylives.Thetraditionalcurtainneedtomanual,butsomelargeofficebuildings、high-endoffice、exhibitionhall,theircurtainsarelarge,longandheavy,it’sdifficulttomanual.Therefore,thisdesigncansolvethisproblemandachieveafullyautomatic.Themainlyconceptsofthedesignisthroughdetecttheintensityofoutdoorlight,tocontroltheangleoftheelectricmotor.Adjusttheindoorlighttocreateacomfortableworkingenvironment.ThecorecontrollingofthisthesisdesignisMCS-51Microcontroller.Photoresistorgatherthelight.BecauseMCUcanonlyreadthedigitalsignal,soanalogsignalprocessinguseconverterADC0809.Accordingtothedatatodrivethemotor,adjustitsangleofrotationafterconvertedintodigitalsignal.Steppingmotorisselected,becauseitiseasertocontrol.Theconnectingofthemicrocontrollerandsteppingmotor,weuseULN2003driver.Thethesisisdividedintofourchapters:ChapteroneoverviewthedesignofsmartcurtainbyusedofMCS-51microcontroller,andthecontentandstructure.ThesecondchapterintroducesthestructuralcharacteristicsofMCS-51microcontrollerandmicrocontroller-C51.Thethirdchapterdescribesthesignalprocessingdesign,lightcollectionandADconversion.Thefourthchapteristheintroductionofthesteppingmotorcontroldesign.Thefifthchaptershowthethingsinactualuseofhardware.Withthisdesign,IfurtherfamiliarwiththeMCS-51microcontrollerandsteppingmotor’sworkingprincipleandapplication,programtheusingofC51,tempermyindependentthinkingandtheabilityofcooperationofteam.Keywords:MCS-51Microcontroller,ADC0809,ULN2003driver,SteppingMotor目录第1章概述..................................................................................................................11.1课题提出.................................................................................................................11.2关于MCS-51单片机控制窗帘的设计思想.........................................................11.2.1智能窗帘主要结构设计......................................................................................11.2.2流程图..................................................................................................................2第2章MCS-51单片机的介绍.................................................................................32.1MCS-51单片机的结构...........................................................................................32.1.1MCS-51单片机的内部结构................................................................................32.1.2引脚功能..............................................................................................................42.2单片机的C语言编程——C51.............................................................................6第3章信号处理系统设计..........................................................................................73.1光线采集部分的设计.............................................................................................73.1.1光敏电阻器的简介..............................................................................................73.1.2光敏电阻基本特性..............................................................................................93.1.3光敏电阻的选择................................................................................................113.1.4电压采集电路设计............................................................................................123.2模数转换部分的设计...........................................................................................133.2.1A/D转换器的介绍.............................................................................................133.2.2A/D转换器的选择.............................................................................................143.2.3ADC0809的介绍...............................................................................................143.2.4ADC0809与MCS-51单片机的连接设计........................................................153.3采集部分C51程序设计......................................................................................16第4章控制系统的设计............................................................................................194.1电机驱动部分的设计...........................................................................................194.1.1ULN2003简介...................................................................................................194.1.2电机驱动部分电路设计的连接图设计............................................................204.2电机