{$cfg_webname}
主页 > 电子信息 > 单片机 >

基于51单片机智能家居系统设计

来源:wenku163.com  资料编号:WK16314183 资料等级:★★★★★ %E8%B5%84%E6%96%99%E7%BC%96%E5%8F%B7%EF%BC%9AWK16314183
资料介绍

基于51单片机智能家居系统设计(任务书,开题报告,外文翻译,论文11200字,CAD电路原理图,CAD电气图)
摘要
随着经济社会的发展,在物质、科技、信息充斥的时代中,生活的必须不仅仅局限于生活的必需品,更多的是对人性化、智能化的需求。同时科技的进步带动着制造业的发展,也在极大程度上推动着智能家居的诞生。
按照设计要求以51单片机为核心。根据设计要求,分析设计过程我们可以得到一下模块分配:智能计数通过红外避障模块检测室内人数,室内人数可以通过数码管显示。当室内人数为零时,窗帘闭合,灯关闭,空调关闭且设置温度为25℃。当时内人数不为零时,开启自动模式相应检测。开启自动模式的同时,系统进行室内温度检测和外界光照强度的检测。智能窗帘通过光敏电阻检测外界光照强度,当光照强度达到设定阈值时,智能家居系统通过单片机控制电机将窗帘开启,否则关闭窗帘。智能空调通过温度传感器检测室内温度,当检测温度在设置阈值范围以外,智能家居系统通过单片机控制空调开启,否则空调关闭。
本次设计选用华中电子科技开发板模拟智能家居环境系统,同时使用keil来编写C语言程序,继而完成软件调试,然后下载到开发板进行硬件调试,联合开发板以及实物搭建,完成本次毕业设计。
关键词:智能家居,单片机,AT89S52,人数检测模块,自动模式
 
Abstract
With the development of economy and society, in the era of material, science and technology, and information, life must not only be limited to the necessities of life, but also more to humanity and intelligence. At the same time, the progress of science and technology has driven the development of the manufacturing industry, and it has also greatly promoted the birth of smart homes.
In accordance with the design requirements to 51 core microcontroller. According to the design requirements, the analysis design process we can get the following module assignments: Smart counting through the infrared obstacle avoidance module to detect the number of people in the room, indoor number can be displayed through the digital tube. When the number of people in the room is zero, the curtains are closed, the lights are turned off, the air conditioner is turned off and the set temperature is 25°C. When the number of people at that time was not zero, automatic detection was turned on. While the automatic mode is on, the system performs indoor temperature detection and detection of external light intensity. The smart curtain detects the external light intensity through the photosensitive resistor. When the light intensity reaches the set threshold, the smart home system turns on the curtain through the SCM control motor, otherwise the curtain is closed. The intelligent air conditioner detects the indoor temperature through the temperature sensor. When the detected temperature is outside the set threshold range, the smart home system controls the air conditioner to turn on through the single chip microcomputer, otherwise the air conditioner is turned off.
This design uses the Huazhong Electronic Technology Development Board to simulate the smart home environment system. At the same time, Keil is used to write the C language program. Then the software debugging is completed. Then the hardware debugging, development board and physical structure are downloaded to the development board to complete the graduation project.
Key Words:Smart home, Microcontroller, AT89S52, Number detection module, Automatic mode

1.2系统设计任务和要求
本系统由五一单片机总体控制,使用红外避障模块进行检测房屋内人员的当前数量;光敏电阻传感器模块用以检测室外的光照强度,从而判断是否系统控制电机打开窗帘;温度传感器模块用以检测室内环境的温度,从而判断是否系统控制空调打开调节温度;当检测到有人员进入室内的同时立即打开智能灯(用于装饰、照明),同时数码管显示的数字表明室内人数。
本系统设置两种模式,默认情况下是自动模式,可以计算室内人数、控制智能灯的开启和关闭,控制空调的开启和关闭,控制窗帘的开启和关闭;除去自动模式外,可以通过4×4矩阵键盘改变为手动模式,手动按键控制智能灯、空调、窗帘。
1.3课题分析
在满足基本功能前,对于智能家居系统来说,易于控制是首先考虑的,但是不得不考虑一点就是微控制器的内存有一定的局限。因此,为SCM控制选择合适的存储器已成为此设计的首要任务。
其次每个部分的功能,需要尽可能精确控制,这就需要在逻辑顺序上设计能够尽量贴合用户的选择。本次设计要求能够通过检测控制智能灯、空调、窗帘,为了能够实现精确控制,必须使得程序设计的严密性,从自动模式和手动模式两个方面下手,在室内有人的前提通过单片机系统进行判断输出指令信号用以控制,从而满足实现要求动作。
1.4设计原理
主要由单片机矩阵键盘、红外避障模块、数码管显示、采光电路、温度采集电路、室内人员计数电路等组成。矩阵键盘用于输入智能家具系统的自动和手动控制方式,用户可以用键盘按键切换自动手动模式。对智能家居系统的预设条件,分别有以下两种模式的工作状态,其中室内设置的初始状态是:窗帘闭合,智能灯关闭,空调关闭且设置温度为25℃。当单片机检测到室内环境中有人时,开启智能家居系统,默认状态为自动模式,智能灯在检测到有人的同时打开,窗帘在检测到有人的同时,光照采集电路检测外界环境的光照强度,并确定是否达到预设值,如果光照强度超过预设值,串联在单片机控制下被打开,否则被关闭。空调在检测到室内环境中有人的同时,温度采集电路检测室内环境的温度,如果室内环境温度在预设值范围以内,则空调保持关机状态。如果室内环境温度在预设值范围以外,则空调开启工作。
为了方便用户操作以及满足用户各种需求,本设计另设有手动模式,在矩阵式键盘上设置了相应的控制开关,单片机智能家居系统的通用性和可靠性已经实现。
 

基于51单片机智能家居系统设计
基于51单片机智能家居系统设计
基于51单片机智能家居系统设计


目 录
第1章绪论    1
1.1背景介绍    1
1.2系统设计任务和要求    2
1.3课题分析    2
1.4设计原理    2
1.5系统组成    4
1.6 系统概述    4
第2章智能家居系统的硬件电路设计    6
2.1单片机AT89S52简介    6
2.2红外蔽障模块介绍    6
2.2.1模块电路图    6
2.2.2模块接口说明以及检测人员方法    7
2.3 4×4矩阵键盘    7
2.4 YL-38 光敏电阻传感器    8
2.5 DS18B20数字温度传感器    8
2.6数码管显示电路    9
2.7复位电路    10
2.8振荡电路    11
第3章软件程序设计    12
3.1软件设计    12
3.2具体软件模块实现    12
3.2.1自动模式模块    12
3.2.1.1人数检测    13
3.2.1.2光照强度检测    16
3.2.1.3温度检测    17
3.2.1.4灯光控制    17
3.2.1.5窗帘控制    17
3.2.1.6空调控制    18
3.2.2手动模式模块    19
3.2.2.1自动模式手动模式转换    19
3.2.2.2 手动模式按键分布    20
3.3软件抗干扰技术    20
第4章系统调试    22
4.1模块电路调试    22
4.1.1软件调试    22
4.1.2硬件调试    22
4.2调试分析    23
4.3故障分析    23
第5章结论    24
参考文献    25
致谢    26
附录1:主程序    27
附录2:温度调用程序    34
附录3:电路原理图    38
附录4:Proteus原理图    39
附录5:电气图    40

推荐资料