mgevpp

Home Air Quality Monitoring System Based on STC32 Microcontroller

 
Overview
This home air quality monitoring system, based on the STC32 microcontroller, uses a DHT11 sensor to detect
ambient temperature and humidity data, and a PM2.5 sensor to monitor PM2.5 levels. The collected data is displayed in real-time on an LCD1602 screen and transmitted to a mobile phone via Bluetooth. The system will then perform actions based on the air quality, such as turning on an air purifier. The system can also be started and stopped via a mobile phone or by pressing buttons. II. Design Connection Port Description 1. Data from the DH11 temperature and humidity sensor is transmitted via port P4.7. 2. PM2.5 detection uses an external module with UART as the communication protocol, so serial port 4 (RXD4, TXD4) is used. 3. Data from the LCD1602 is transmitted via P0, using three control lines: EN connects to port P4.4, RW connects to port P4.3, and RS connects to port P4.2; backlight control connects to port 4.1. 4. Buttons are connected to ports P0.0, P0.1, P0.3, P0.4, and P4.6. 5. Bluetooth communication uses serial port 3 (RXD3, TXD3). 6. Indicator lights are driven by ports P7.0 and P7.1. 7. Motor drives are driven by ports P7.2 and P7.3. III. Software Description I. Software Requirements Functional Analysis 1. Basic Part (1) Data acquisition of DHT11 (GPIO initialization) (2) Data acquisition of PM2.5 sensor (UART4 serial port configuration) (3) Display of LCD1602 (GPIO initialization) (4) Button detection (GPIO initialization) (5) Data transmission and reception of Bluetooth module (UART3 serial port configuration) (6) LED light drive and motor drive (GPIO initialization) 2. Specific Functional Analysis In addition to the basic part of the functions, the following functions also need to be implemented: (1) The safety thresholds of temperature, humidity and PM2.5 can be set by buttons. (2) When the temperature, humidity or PM2.5 exceeds the threshold, corresponding operations are performed (starting the LED light and motor). (3) The motor can be manually started and stopped without being affected by thresholds (i.e., the user's control authority is higher than the system's control authority). (4) Temperature, humidity and PM2.5 values ​​can be transmitted to the mobile phone via Bluetooth for display, and the mobile phone can also control the motor to start or stop. IV. Physical Demonstration ## Precautions The designed system does not have a reset button. To reset, please turn the power switch back on.



























参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-26 15:39:21

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号