基于物联网技术的盆栽环境监测系统的设计
摘 要
近年来,随着科学技术的高速发展,以及全民家庭生活水平的提高和物质生活的丰富,盆栽出现在越来越多的家庭与工作环境中,它不仅能够净化空气,吸收粉尘,而且能够间接改善心情,缓解眼睛疲劳,因此盆栽越来越多地参与着人们的生活,但由于大多数盆栽都是人工养殖的,所以在一定程度上这种培养方式影响了盆栽的生长状态和存活率。就此问题,本文运用stm32单片机、oled12864液晶显示、光敏传感器、dht11温湿度传感器、wifi模块、报警器等设计一个具备无线联网的智能盆栽监测系统。
系统由软件和硬件两部分组成,stm32单片机是硬件基础,dht11温湿度传感器测量温湿度,光敏传感器测量光照强度,wifi模块通过MQTT协议将数据传输到云平台,使用Android studio进行安卓手机app编写,在手机端查看盆栽环境数据,采用oled12864使用户能观察各个传感器获取的数据。系统处于wifi模块运行时,采集的数据和信息通过无线模块传输到OneNet云服务器,触发下一环节转送到手机app,在手机的应用界面展现出来。用户可查看资料,分析数据,对盆栽所处实时环境进行调整与优化。该系统能够实现对盆栽生长环境进行有效监测和管理,测试结果基本满足了设计的目标。
【关键词】WIFI;环境监测;物联网技术; MQTT协议;stm32单片机
Design of Potted Environmental Monitoring System Based on Internet of Things Technology
Abstract
In recent years, with the rapid development of science and technology, as well as the improvement of family living standards and the enrichment of material life, potted plants appear in more and more families and working environments. It can not only purify air and absorb dust, but also indirectly improve mood and relieve eye fatigue. Therefore, potted plants participate in people's life more and more. However, as most potted plants are cultured artificially, this cultivation method affects the growth state and survival rate of potted plants to a certain extent. To solve this problem, this paper designs an intelligent potted plant monitoring system with wireless networking by using stm32 single chip microcomputer, oled12864 liquid crystal display, photosensitive sensor, dht11 temperature and humidity sensor, wifi module, alarm, etc.
The system consists of software and hardware. stm32 microcontroller is the hardware foundation. dht11 temperature and humidity sensor measures temperature and humidity, and photosensitive sensor measures light intensity. wifi module transmits data to cloud platform through MQTT protocol. Android studio is used to write Android mobile phone app and view potted environment data on the mobile phone side. The aim is to design a real-time and effective intelligent potted plant environment remote monitoring system. With oled12864, users can observe the data acquired by various sensors nearby. When the system is running in wifi module, the collected data and information are transmitted to OneNet cloud server through wireless module to trigger the next link to be transferred to mobile phone app and displayed on the application interface of the mobile phone. Users view data, analyze data, and adjust and optimize the real-time environment of potted plants. Finally, tests show that the system can effectively monitor and manage the growth environment of potted plants and basically meet the design objectives.
【Key words】WIFI,Environmental monitoring, Internet of things technology, MQTT protocol ,Stm32 single chip microcomputer