项目编号:mcuclub-dz-294
设计简介:
项目名:家居环境监测
项目编号:mcuclub-dz-294
单片机类型:STM32F103C8T6
具体功能:
1、通过DHT11检测温湿度,当温湿度不在设置的上下限值之间,进行声光报警
2、通过MQ-2检测烟雾值,当烟雾值大于设置最大值,进行声光报警
3、通过光敏电阻检测光照值,当光照值低于设置最小值且通过人体热释电感应到有人,自动打开照明灯
4、通过按键可设置各阈值
5、通过OLED显示屏显示测量值
6、通过WIFI模块将测量数据发送到手机端,手机端可调节各阈值,并可以打开照明灯
总字数:10823
摘 要
随着社会的发展,人们对高品质生活环境的需求逐渐升高,所以智能环境的生活参数正成为人们关注的焦点,为了满足人们的对生活环境的高质量要求,本文基于STM32单片机设计了一款智能家居环境监测系统,硬件部分包括人体热释电感应电路、DHT11温湿度测量电路、光照强度检测电路、烟雾浓度监测电路、照明电路、按键电路、声光报警电路、显示电路以及WiFi模块电路。通过四种不同类型的传感器分别采集系统光照强度值、温度值、烟雾浓度值以及是否有人,再由单片机对采集到的系统数据进行综合处理,然后控制声光报警和打开照明灯,并在实物测试环境下对系统的数据采集功能、模块控制功能等进行了测试。测试结果表明,测试效果良好,基本符合用户对智能环境监测参数的需求。
关键词:STM32单片机;人体热释;DHT11;WiFi
Abstract
With the development of society, people’s demand for high quality living environment is gradually increasing, so the living parameters of intelligent environment are becoming the focus of people’s attention. In order to meet the high quality requirements of people’s living environment, this paper designs a smart home environment monitoring system based on STM32 microcontroller. The hardware includes human pyroelectric induction circuit, DHT11 temperature and humidity measurement circuit, light intensity detection circuit, smoke concentration monitoring circuit, lighting circuit, key circuit, sound and light alarm circuit, display circuit and WiFi module circuit. Through four different types of sensors to collect the system light intensity value, temperature value, smoke concentration value and whether there are people, and then by the single chip microcomputer to collect the system data for comprehensive processing, and then control the sound and light alarm and open the lamp, and in the physical test environment of the system data acquisition function, module control function is tested. The test results show that the test results are good and basically meet the requirements of users for intelligent environment monitoring parameters.
Key words: STM32 MCU; Human heat release; DHT11; WiFi
目 录
1.绪论
1.1 研究背景及其研究意义
1.2 国内外研究现状
1.2.1 国内研究现状
1.2.2 国外研究现状
1.3 研究目标和组织结构
2.系统方案设计
2.1 整体方案设计
2.2 主要器件选型选择
2.2.1 主控芯片方案选择
2.2.2 显示模块方案选择
2.2.3 无线传输模块
3.硬件电路设计
3.1 主控模块电路
3.2 人体热释电红外感应电路模块
3.3 光照强度检测模块电路
3.4 环境温湿度检测模块电路
3.5 烟雾检测电路模块
3.6 显示模块电路
3.7 照明灯模块电路
3.8 按键电路
3.9 声光报警报警提醒电路模块
3.10 WiFi模块电路
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 OLED显示流程设计
4.5 温湿度检测模块子流程
4.6 WiFi模块子流程设计
- 实物调试
5.1 整体实物测试图
5.2 温湿度监测实物测试
5.3 烟雾监测实物测试
5.4 光照强度监测实物测试
5.5 远程测控实物测试
总结与展望
致谢
参考文献
附录
附录A:原理图
附录B:PCB
附录C:主程序