设计说明书
总字数:18000+
摘要
随着气象环境对人们生产生活、出行安全影响的日益加深,实时、精准地获取局部区域温湿度、光照、风速、风向等气象数据,成为保障日常生活便捷性与安全性的重要需求。传统天气预报存在区域针对性不足、数据更新滞后等问题,难以满足用户对周边微气象环境实时监测的需求,因此,研发一种小型化、低成本、可实时监测并远程交互的智能天气预报系统具有重要现实意义。
本设计提出了一种基于 STM32F103C8T6 单片机的智能天气预报系统。系统核心功能包括:通过 DHT11 温湿度传感器实时采集环境温湿度数据,当检测到温度超出用户设定阈值范围时,系统自动触发声光报警;借助 5516 光照检测模块获取环境光照强度值,为用户提供光照条件参考;利用小型直流有刷电机与三杯式旋转风杯组成的风速检测模块,实时测量环境风速,当风速超过预设最大值时,系统启动声光报警以提示风险;通过绝对式格雷码盘型风向检测模块精准识别当前风向,全面呈现风场信息;用户可通过按键手动设置温湿度、风速等参数的报警阈值,满足个性化监测需求;系统配备 OLED 显示屏,实时直观地显示温湿度、光照、风速、风向等所有测量数据;同时,系统搭载 ESP8266-12F WiFi 模块,可将采集到的所有气象数据远程传输至手机端,方便用户随时随地查看,用户也可通过手机端远程设置各项参数阈值,实现系统与用户的远程交互。
该智能天气预报系统的作用在于,为用户提供了一种近距离、实时化、可交互的微气象监测工具。通过本地数据采集与显示、异常情况报警及远程手机端数据查看与参数设置,帮助用户及时掌握周边环境气象变化,提前规避恶劣气象条件带来的不便与风险,为日常出行、农业种植、户外作业等场景提供科学参考,进一步提升生活与生产的便利性和安全性。
关键词:STM32F103C8T6;智能天气预报系统;多参数监测;WiFi 远程交互;声光报警
Design of Intelligent Weather Forecast System
Abstract
With the increasing impact of meteorological environment on people’s production, life, and travel safety, real-time and accurate acquisition of local meteorological data such as temperature, humidity, light, wind speed, and wind direction has become an important requirement to ensure the convenience and safety of daily life. Traditional weather forecasting has problems such as insufficient regional specificity and lagging data updates, which make it difficult to meet users’ real-time monitoring needs for the surrounding micro meteorological environment. Therefore, developing a miniaturized, low-cost, real-time monitoring and remote interactive intelligent weather forecasting system is of great practical significance.
This design proposes an intelligent weather forecasting system based on STM32F103C8T6 microcontroller. The core functions of the system include: real-time collection of environmental temperature and humidity data through DHT11 temperature and humidity sensors. When the temperature exceeds the user set threshold range, the system automatically triggers an audible and visual alarm; Using the 5516 light detection module to obtain ambient light intensity values, providing users with reference for lighting conditions; Using a wind speed detection module composed of a small DC brushed motor and a three cup rotating wind cup, real-time measurement of environmental wind speed is carried out. When the wind speed exceeds the preset maximum value, the system will activate an audible and visual alarm to indicate the risk; Accurately identify the current wind direction and comprehensively present wind field information through the absolute Gray code disk type wind direction detection module; Users can manually set alarm thresholds for parameters such as temperature, humidity, and wind speed through buttons to meet personalized monitoring needs; The system is equipped with an OLED display screen, which displays real-time and intuitive measurement data such as temperature, humidity, lighting, wind speed, and wind direction; At the same time, the system is equipped with ESP8266-12F WiFi module, which can remotely transmit all collected meteorological data to the mobile phone for users to view anytime and anywhere. Users can also remotely set various parameter thresholds through the mobile phone to achieve remote interaction between the system and users.
The function of this intelligent weather forecasting system is to provide users with a close range, real-time, and interactive micro meteorological monitoring tool. Through local data collection and display, abnormal situation alarm, and remote mobile data viewing and parameter setting, we help users timely grasp the changes in the surrounding environment and weather, avoid the inconvenience and risks caused by adverse weather conditions in advance, provide scientific references for daily travel, agricultural planting, outdoor operations and other scenarios, and further improve the convenience and safety of life and production.
Keywords:STM32F103C8T6; Intelligent weather forecasting system; Multi parameter monitoring; WiFi remote interaction; audible and visual alarm
目 录
1 绪论
1.1 研究背景及意义
1.2 国内外研究现状
1.3 主要内容
2 系统总体方案设计
2.1系统总体设计
2.2 主要模块方案选择
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 温湿度检测模块子流程
4.5 风速检测模块子流程设计
4.6 风向检测模块子流程设计
4.7 光照检测模块子流程设计
4.8 OLED显示流程设计
4.9 WiFi模块子流程设计
5 实物制作与功能测试
5.1 实物制作
5.2 温湿度与光照检测及显示功能测试
5.3 风速风向检测及显示功能测试
5.4 声光报警功能测试
5.5 阈值设置与存储功能测试
5.6 WiFi 数据传输与远程控制功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!