分类号:TP271.510710-2010132051硕士学位论文基于STM32的智能家居控制系统的设计与开发王佳导师姓名职称苏诗琳副教授申请学位级别硕士学科专业名称交通信息工程及控制论文提交日期2013年5月17日论文答辩日期2013年6月8日学位授予单位长安大学TheDesignAndDevelopmentOfSmartHomeSystemBasedOnSTM32ADissertationSubmittedfortheDegreeofMasterCandidate:WangJiaSupervisor:AssociateProf.SuShilingChang’anUniversity,Xi’an,ChinaI摘要随着社会的不断发展,信息时代的到来促进了人们对生活要求的提高。日常的室内起居在人们的生活中扮演着重要的角色,那么如何将先进的科学技术应用到人们的正常生活中去,从而改善和提高人们的生活质量,成为人们关注的问题之一。而智能家居的出现将会使人们的梦想得到实现。所谓的智能家居,就是指以住宅为基础,利用综合布线技术、网络通信技术、智能家居系统设计方案安全防范技术、自动控制技术、音视频技术将家居生活有关的设施集成,构建高效的住宅设施与家庭日程事务的管理系统,并实现环保节能的居住环境。智能家居是将室内的电器、防盗、远程控制有效的结合在了一起,实现了智能化的管理和控制,通过智能家居控制系统实现了住户与室内的信息交流,为家居提供了先进的智能化信息。伴随着智能家居的不断发展,已经逐渐融入了通信、自动控制、监控等多种技术,为我们的日常生活带来了更高效率和更好的舒适性,全面提升了家居的安全性、舒适性、便利性和艺术性,提高了人们的生活质量。虽然目前的智能家居系统已经有了非常大的发展,然而其更多的是面向高级住宅或者高端用户,这极大限制了智能家居控制系统的推广应用。与此同时,开发智能家居系统的公司各个标准不一,成本极高,使得智能家居系统难以市场化,相互通用率很差,后期维护升级成本高,普通用户只能望而止步。本文分析了智能家居的现状,设计了一款价格低廉、性价比高、功能齐全、易于安装和简单实用智能家居控制系统。本系统采用STM32系列新一代嵌入式处理器为核心,配合外围的硬件设备和软件的驱动,实现了对家居家电的远程控制、室内监控、安防报警、室内数据信息保存等功能。利用相关的传感器采集室内的数据信息,当室内发生火灾烟雾或者陌生人入侵时,启动相关的报警设施。另外,本系统还会对室内的数据信息进行实时保存,以便用户查询。本系统针对室内家电设计了三种控制方式:本地控制以PC机上为平台,通过在VC6.0开发环境编写的软件进行本地操作;远程控制基于GPRS模块,通过用户发送AT命令到GPRS模块,经过RS232串口与嵌入式控制器通信,实现相关的操作;另外,本系统还设计了嵌入式Web服务器,采用B/S模式远程网络的控制,用户可以通过远程以太网登录系统,实现对家电的相关操作。本系统通过以上三种方式实现对家居的灯光、加湿器以及空调等家电手动和智能控制。II关键字:STM32、智能家居、GPRS模块、B/S模式、远程监控IIIAbstractWiththecontinuousdevelopmentofsociety,theadventoftheinformationagepromotepeopletoimproveliferequirements.Thedailyindoorlivingplaysanimportantroleinpeople'slife,howwilltheapplicationofadvancedscienceandtechnologytopeople'snormallife,soastoimproveandenhancethequalityoflifeofpeople,becomeoneoftheconcernedproblems.AndtheemergenceofSmarthomefurnishingwillmakepeoplerealizethedream.Smarthomefurnishingtheso-called,isreferstothehousingasthebasis,usingtheintegratedwiringtechnology,networkcommunicationtechnology,Smarthomefurnishingdesignschemeofthesystemsecuritytechnology,automaticcontroltechnology,audioandvideotechnologywillbehomefurnishingliferelatedfacilitiesintegratedbuildingmanagementsystem,andthefamilyagendaefficientresidential,andrealizeenvironmentalprotectionandenergysavingthelivingenvironment.Smarthomefurnishingisindoorappliances,anti-theft,remotecontroleffectivelycombinetogether,realizethemanagementandcontrolofSmarthomefurnishing,throughtheintelligentcontrolsystemtoachievetheinformationexchangeofresidentsandindoor,providesintelligentinformationadvancedforhomefurnishing.AlongwiththecontinuousdevelopmentoftheSmarthomefurnishing,hasbeengraduallyintegratedintoavarietyoftechnicalcommunication,automaticcontrol,monitoring,resultinmoreefficientandbettercomfortforourdailylife,improvetheoverallhomefurnishingsecurity,comfort,convenienceandartistry,improvepeople'squalityoflife.AlthoughSmarthomefurnishingsystemcurrentlyhasaverybigdevelopment,butitismoreorientedtotheseniorresidentialorhigh-endusers,thisgreatlylimitsthepopularizationandapplicationofSmarthomefurnishingcontrolsystem.Atthesametime,thedevelopmentofSmarthomefurnishingsystem,eachofdifferentstandards,highcost,sotheSmarthomefurnishingsystemtomarket-oriented,userateisverypoor,maintenanceandupgradecostshigh,ordinaryuserscannotstop.ThispaperanalysesthepresentsituationoftheSmarthomefurnishing,designedalowprice,highcostperformance,completefunctions,easyinstallationandsimpleandpracticalcontrolsystemofSmarthomefurnishing.ThesystemusestheSTM32seriesisanewgenerationofIVembeddedprocessorasthecore,combinedwithperipheraldrivehardwareandsoftware,toachievetheremotecontrol,indoormonitoring,securityofhomefurnishinghomealarm,indoordatainformationpreservationfunctions.Collectedbythesensorfortheinteriordata,whenindoorfiresmokeortheintrusionofstrangers,startalarmfacilities.Inaddition,thissystemcanreal-timepreservationofindoordatainformation,sothattheuserquery.Thesystemisdesignedthreekindsofcontrolmethodsforindoorappliances:localcontroltoPCmachineasaplatform,throughthelocaloperationsintheVC6.0developmentenvironmentforthepreparationofthesoftware;remotecontrolbasedonGPRSmodule,theusersendsaATcommandtotheGPRSmodulethroughtheserialport,RS232andembeddedcontrollercommunication,implementtherelevantoperation;inaddition,thesystemalsodesignedtheembeddedWebserver,remotenetworkcontrolusingB/Smode,theusercanlogintothesystemthroughtheInternet,realizeoperationofhomeappliance.Thesystemthroughtheabovethreewaystorealizethehomefurnishinglights,humidifierandairconditionermanualandintelligentcontrol.Keywords:STM32、Smarthomesystem、GPRS、B/Smodel、remotemonitoringV目录第一章绪论..............................................................................................................................11.1课题背景..........................................................................................................................11.2国内外发展状况..............................................................................................................21.1.1国外发展状况............................................................................................................21.1.2国内发展状况.............................................