Design and Architecture of a Distributed Atmospheric Monitoring System
Tencent’s rapid‑deployment project creates a volunteer‑hosted, low‑cost atmospheric monitoring network using LoRa, NB‑IoT and Wi‑Fi, with edge‑agnostic data collection, cloud‑based device normalization, and business processing modules that manage devices, analyze PM2.5 sensor data, and visualize real‑time air quality across five community sites.
The article introduces an experimental project launched within Tencent to track micro‑environment air quality at the community level. Volunteers host monitoring terminals, enabling fine‑grained, life‑space data collection.
Design Requirements
Low entry barrier for volunteers on both device and platform.
Low development cost by leveraging Tencent Cloud IoT products and other cloud services.
Scalable architecture that can be extended beyond atmospheric monitoring.
Overall Architecture
The system consists of four main modules:
Data Acquisition Module – collects raw sensor data on the edge.
Wireless Access Module – provides multiple wireless protocols (LoRa, NB‑IoT, Wi‑Fi) for device connectivity.
Device Access Module – normalizes various device protocols on the cloud side.
Business Processing Module – manages devices, analyzes sensor data, and visualizes results.
Key design principles include: no processing of sensor data on the edge, no restriction on sensor data formats, and support for diverse hardware (TencentOS tiny, Arduino, Raspberry Pi, etc.).
Wireless Access Details
LPWAN technologies (LoRa and NB‑IoT) are preferred for outdoor deployments. LoRa is favored because Tencent provides a shared community LoRa network, reducing deployment cost. Wi‑Fi is also supported for low‑cost indoor nodes.
Device Access Module
The module uses Tencent Cloud IoT Development Platform, which offers massive device connectivity, multi‑protocol support, product definition, and a flexible data parsing engine.
Business Processing Module
This module handles device management, sensor data analysis, and visualizes results using API Gateway, SCF cloud functions, cloud databases, and Tencent Cloud Map.
Case Study: LoRa PM2.5 Node
A NUCLEO LoRa development kit with a PMS7003 PM2.5 sensor is used as the edge device. Firmware built on TencentOS tiny streams raw payloads to the cloud.
Data parsing script (executed on the IoT platform) converts the raw bytes into a JSON payload:
function RawToProtocol(fPort, bytes) {
var data = {
"method": "report",
"clientToken" : new Date(),
"params" : {}
};
var i = 0;
data.params.PM1_CF1 = (bytes[i++] << 8) | bytes[i++];
data.params.PM2d5_CF1 = (bytes[i++] << 8) | bytes[i++];
data.params.PM10_CF1 = (bytes[i++] << 8) | bytes[i++];
data.params.PM1 = (bytes[i++] << 8) | bytes[i++];
data.params.PM2d5 = (bytes[i++] << 8) | bytes[i++];
data.params.PM10 = (bytes[i++] << 8) | bytes[i++];
data.params.particles_0d3 = (bytes[i++] << 8) | bytes[i++];
data.params.particles_0d5 = (bytes[i++] << 8) | bytes[i++];
data.params.particles_1 = (bytes[i++] << 8) | bytes[i++];
data.params.particles_2d5 = (bytes[i++] << 8) | bytes[i++];
data.params.particles_5 = (bytes[i++] << 8) | bytes[i++];
data.params.particles_10 = (bytes[i++] << 8) | bytes[i++];
data.params.version = bytes[i++];
data.params.Error = bytes[i++];
return data;
}The parsed data appears in the IoT platform as structured JSON attributes for each PM2.5 device.
Final Outcome
The complete system, built within two days for five monitoring points, demonstrates rapid IoT development using TencentOS tiny, LoRa connectivity, and Tencent Cloud services. Visualizations are displayed via Tencent Cloud Map, showcasing real‑time atmospheric data.
Tencent Cloud Developer
Official Tencent Cloud community account that brings together developers, shares practical tech insights, and fosters an influential tech exchange community.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.