基于STM32的智能家居检测控制系统设计

基于STM32的智能家居检测控制系统设计(任务书,开题报告,论文16800字)
摘要
随着互联网的发展,家居智能化的控制越来越多地应用在人们的日常生活中。本课题将构建一个智能家居检测控制系统。该系统可以实现对多种设备的控制以及对家居环境的检测。系统按现场、局域网、远程这三种不同控制距离的要求设计了三种控制方式,分别是:与STM32直接相连的硬件触摸屏控制;局域网内电脑上位机与下位机无线互联控制;远程手机短信控制。这三种控制方式可根据实际需要进行切换或多种方式同时使用。
系统的主要功能是使用户能够以某一种控制方式来是实现对小功率设备(LED灯)的开关、工作模式的设置,对大功率设备(风扇)的开关(包括直接开关和定时开关)和工作功率的设定,以及实时数据(温度)的检测(检测数值的同时绘制变化曲线)。不同的控制方式对应的控制功能不尽相同。经测试,该系统能够通过三种控制方式实现对两种设备的准确控制,准确检测温度并绘制曲线。各控制端优先级有严格规定,不会出现设备控制紊乱的情况。局域网内多个客户端的操作记录也能准确的生成到日志文件中供管理员查询。
关键词:STM32 设备控制 触摸屏 局域网 远程控制 [资料来源:Doc163.com]
Design of Smart Home Detecting and Control System Based on STM32
ABSTRACT
With the development of internet, intelligent control is more and more applied to our daily life. This capstone project will build a smart home detecting and control system. The system can realize the control of a variety of equipment as well as the detection of the home environment. The system has three controlling methods to meet requirements of different controlling distances--on scene, WLAN, long-distance. They are as follows: controlling by the touch screen which is connected to the STM32 directly, controlling by the host computer which is connected to the slave computer by WLAN, phones SMS remote control. We can switch to one method from another one or use more than one methods at the same time according to the need.
The main function of the system is providing a controlling method for users to realize the settings of low power devices’ switch and mode and setting of high power equipment’s switch(including direct switch and timing switch).What’s more, it can realize the settings of working power and the detection (testing data while drawing curves) of the real time data (temperature). Different control methods have different functions. According to the tests, we can find that the system can exactly control these two equipment by three methods, detect the temperature exactly and draw curves. Strict rules have been made for the priority of different controlling terminals. As the result of rules, the disorder of controlling did not appear. Operations of different terminals in the WLAN can be recorded in the log file exactly for the administrator to check.
Key Words: STM32; equipment control; touch screen; WLAN; remote control


目录
摘要 I
ABSTRACT II
第一章 绪论 1
1.1 研究背景 1
1.2 发展状况及相关技术 1
1.2.1 发展状况 1
1.2.2 相关技术 1
1.3 设计工作 3
第二章 系统设计概述 4
2.1 系统设计内容和要求 5
2.1.1 局域网控制 5
2.1.2 远程控制 6
2.1.3 现场控制 6 [资料来源:http://www.doc163.com]
2.2 系统方案选择 6
2.2.1 单片机选择方案 6
2.2.2 驱动模块方案 6
2.2.3 网络构建方案 7
2.2.4 局域网通信协议方案 7
2.2.5 实时温度采集方案 8
第三章 硬件系统设计 9
3.1 单片机最小系统 9
3.2 温度采集 10
3.3 LED驱动 11
3.4 风扇驱动 11
3.5 FLSAH 12
3.6 触摸屏 13
3.7 wifi模块 13
3.7 GSM模块 14
3.8 整体硬件电路 14
第四章 软件系统设计 16
4.1 上位机程序设计 16
4.1.1 管理员客户端 17
4.1.2 普通用户客户端 20
4.1.3 绘图子窗体 21
4.1.4 软件安装与使用 23
4.2 下位机程序设计 23
[资料来源:http://Doc163.com]
4.2.1 主函数 24
4.2.2 触屏检测 24
4.2.3 串口通信 28
4.2.4 定时器设置 32
4.2.5 温度获取 33
第五章 系统调试与总结 35
5.1 系统调试 35
5.1.1 上位机软件调试 35
5.1.2 下位机软件调试 36
5.1.3 硬件调试 37
5.2 问题总结 38
参考文献 40
[资料来源:https://www.doc163.com]