Quick Answer
A LoRa-based environmental monitoring network uses long-range (up to 15 km in rural areas), low-power wireless communication to connect distributed sensor nodes measuring air quality, water level, soil moisture, and weather parameters across wide geographic areas. Built with STM32L4 microcontrollers and SX1276 LoRa transceivers, each node operates for 2-5 years on a 10,000 mAh battery while reporting sensor data every 5-60 minutes. At InnovChip, we have deployed networks with 100+ nodes across areas exceeding 200 km².
https://innovchip.net/wp-content/uploads/2026/06/pexels_4429327-6.jpg
Project Background
We designed and deployed this LoRa-based environmental monitoring network for a municipal environmental protection bureau in Shandong Province, China. The requirement was to monitor air quality (PM2.5, PM10, VOC), water level at river gauging stations, and soil moisture at agricultural monitoring points across a 200 km² area encompassing urban, suburban, and rural zones. The system needed 120 sensor nodes, each self-powered by solar panel and battery, communicating to a central server without relying on cellular networks or WiFi coverage.
WiFi was impossible due to the remote locations of many monitoring points (river banks, reservoirs, agricultural fields). Cellular 4G modems were technically feasible but economically prohibitive — 120 nodes each requiring a $10-20/month cellular data plan would cost $14,400-28,800 annually in connectivity charges alone. LoRaWAN was the clear choice: up to 15 km range in rural areas (2-5 km in urban areas with building obstructions), thousands of nodes per gateway, and radio module costs under $5 each. The complete network — 120 nodes, 3 gateways, and cloud platform — cost 60% less than an equivalent 4G cellular solution and has near-zero ongoing connectivity costs.
Sensor Node Hardware Design
Each sensor node is built around the STM32L476RG — an ultra-low-power 80 MHz Cortex-M4F with 1MB flash, 128KB SRAM, and power consumption specifications that make it ideal for battery-powered applications: 100 nA in Standby mode with RTC, 1 μA in Stop mode with RTC, and 100 μA/MHz in Run mode. The STM32L4’s ability to wake from Stop mode, read all sensors via I2C, transmit a LoRa packet, and return to sleep in under 2 seconds is the foundation of our multi-year battery life. With a 10,000 mAh LiPo battery, the average current consumption of 48 μA yields approximately 3 years of continuous operation with hourly reporting.
Sensor complement per node varies by installation location: Air quality nodes include Sensirion SHT31 temperature/humidity sensor (±0.3°C accuracy, I2C, 500μA during measurement, 50nA standby), Plantower PMS5003 PM2.5/PM10 particulate sensor (laser scattering, UART, 20mA during measurement — this is the most power-hungry component), and Sensirion SGP30 VOC/eCO2 sensor (I2C, 30mA during measurement). Water level nodes use a Keller Series 30 pressure transmitter (4-20mA current loop, 0.1% full-scale accuracy) with a precision current-to-voltage converter (300Ω shunt resistor). Weather stations add an anemometer (pulse output, counted by STM32 timer), tipping-bucket rain gauge (reed switch, debounced in firmware), and pyranometer for solar radiation measurement.
Managing the I2C address conflicts between sensors is a practical consideration. The SHT31 has a fixed I2C address of 0x44, and the SGP30 has a fixed address of 0x58 — no conflict between them. However, if two SHT31 sensors are needed (for redundant temperature measurement or differential humidity sensing), an I2C multiplexer (NXP PCA9548A, 8 channels) resolves the address conflict by providing switched I2C bus segments. The multiplexer itself consumes only 1μA in standby.
LoRa Radio Design
The LoRa transceiver is the Semtech SX1276IMLTRT (or the pin-compatible SX1278 for 470MHz band). Connected to the STM32L4 via SPI2 (up to 10 MHz clock rate, 4 pins: MOSI, MISO, SCK, NSS). The SX1276 provides up to 20 dBm output power (100 mW) and sensitivity down to -148 dBm at SF12, 125 kHz bandwidth. Radio parameters for our deployment: Frequency 470 MHz (CN470-510 MHz ISM band, 8 channels from 470.3 to 509.7 MHz), Spreading Factor SF7 for nodes within 2 km of a gateway (fastest, 5.5 kbps payload rate, ~50ms airtime for 50-byte payload) and SF10 for distant nodes at 5-15 km (0.98 kbps, ~300ms airtime). Bandwidth 125 kHz, Coding Rate 4/5 for error correction redundancy, transmit power +14 dBm (maximum legal limit in China for this band).
The LoRa payload per transmission is structured as 50 bytes: 2-byte node ID, 4-byte timestamp (Unix epoch), 6 sensor values × 4 bytes each (IEEE 754 float32, covering temperature, humidity, PM2.5, PM10, VOC index, battery voltage), 2 bytes status flags, 2 bytes CRC-16 (CRC-CCITT). This 50-byte payload fits in a single LoRa frame at all spreading factors including SF10 (maximum payload size at SF10, 125 kHz is 61 bytes).
Antenna design proved critical during initial testing. A simple quarter-wave wire antenna (λ/4 ≈ 16cm at 470MHz) mounted indoors next to a window gave approximately 2 km range. The same wire antenna mounted outdoors on a rooftop with good line of sight achieved 8 km. After switching to a commercially tuned 470 MHz fiberglass omnidirectional antenna (2.15 dBi gain, 1.2m length), reliable communication was achieved at 12 km in open terrain. The antenna upgrade cost $15 per node but more than doubled the effective range — the cheapest range improvement available.
Power Management for Multi-Year Battery Life
Battery life is the single most critical design parameter for a remote environmental monitoring network. Replacing batteries at 120 distributed nodes across a 200 km² area is logistically expensive and disruptive. Our firmware implements aggressive power management at multiple levels.
Sleep strategy: After each sensor reading and LoRa transmission (approximately 3 seconds total), the STM32L4 enters Stop mode with the RTC wake-up timer set for the next reporting interval (configurable from 1 minute to 24 hours; typical deployment is 10 minutes). In Stop mode, the main CPU clock is stopped, all peripherals except the RTC are powered down, and SRAM content is retained. Current consumption: 1.2 μA (STM32L4 in Stop + RTC).
Peripheral power control: The SX1276 enters sleep mode via SPI command (current drops to 0.2 μA). The SHT31 and SGP30 sensors are power-gated via MOSFET switches controlled by GPIO — they are only powered during the measurement phase (approximately 200ms per reading cycle), reducing their standby leakage current to zero. The PMS5003 particulate sensor is also power-gated but only activated every 6th reading cycle (once per hour with 10-minute base interval) because it consumes 20mA during its 30-second measurement cycle — running it every cycle would increase average current from 48μA to over 200μA, cutting battery life from 3 years to under 8 months.
Power supply efficiency: The initial design used a linear regulator (LDO, TPS7A02, 95% typical efficiency at 10mA load, but only 78.6% at the 3.3V/4.2V LiPo voltage ratio). After measuring the actual efficiency under real-world load profiles (mostly sleep with periodic 100mA transmit pulses), we switched to a buck-boost converter (TPS63070, 96% efficiency across the full LiPo voltage range of 3.0-4.2V). This change increased battery life by approximately 20%. The TPS63070 costs $0.50 more than the LDO, but it saves $15-20 in battery replacement costs over the node’s lifetime — a clear economic win.
Gateway and Network Infrastructure
Three LoRa gateways cover the 200 km² area, each positioned at elevated locations (water tower, school rooftop, municipal building) with good line-of-sight to their respective coverage zones. Each gateway uses a Semtech SX1301 8-channel LoRa concentrator connected to a Raspberry Pi 4 Model B via SPI. The SX1301 can simultaneously receive on 8 LoRa channels (IF0-IF7), enabling it to process packets from multiple nodes transmitting on different channels at the same time.
The gateway software runs ChirpStack LoRaWAN Network Server (open-source, replaces the discontinued Semtech LoRaWAN server). ChirpStack handles device registration and activation (OTAA and ABP modes), frame counter management, encryption/decryption (AES-128), ADR (Adaptive Data Rate) optimization, and uplink/downlink scheduling. Uplink data is forwarded to our cloud platform via MQTT over TLS. Each gateway has a 4G LTE cellular backhaul (Quectel EC20 module) for internet connectivity, with a local buffer for offline operation.
The cloud platform runs on AWS EC2 (t3.medium instance, 2 vCPU, 4GB RAM, approximately $60/month). The software stack: ChirpStack Application Server for LoRaWAN management, Node-RED for data processing and routing, InfluxDB for time-series data storage, and Grafana for dashboard visualization. A typical month generates approximately 500,000 data points (120 nodes × 12 reports/day × 30 days = 43,200 reports, each with 6 sensor values), consuming about 2GB in InfluxDB with 1-year retention. The Grafana dashboards provide real-time maps with color-coded sensor values, historical trend charts, and alarm thresholds with email/SMS notifications.
Firmware OTA Update Capability
Over-the-air firmware updates are essential for a 120-node network. Our OTA mechanism uses LoRaWAN’s Fragmented Data Block Transport (FRMPayload fragmentation) to transmit firmware images in 50-byte chunks. A 100KB firmware image requires approximately 2,000 LoRa frames at SF7 (50ms airtime each) or 10,000 frames at SF10 (300ms each). With duty cycle limitations in the CN470 band (1% duty cycle, meaning 36 seconds of transmit time per hour), a complete firmware update takes approximately 28 hours at SF7 — acceptable for planned maintenance windows. Firmware images are encrypted with AES-128 using a per-device key, and integrity is verified with SHA-256 before the bootloader applies the update. The bootloader supports one firmware bank with a rollback mechanism: if the new firmware fails to send a “firmware OK” message within 30 minutes of update application, the bootloader reverts to the previous version.
Engineer’s Notes: What We Learned
The most important lesson from deploying 120 LoRa nodes is that radio performance in the field never matches the datasheet. Semtech’s SX1276 datasheet claims -148 dBm sensitivity at SF12, 125 kHz — in reality, with antenna cable losses, connector losses, PCB trace losses, and environmental noise, we measure approximately -135 dBm at the gateway receiver. This 13 dB gap means that the maximum range in our deployment is approximately 12 km instead of the theoretical 15 km. Always perform a site survey with actual hardware before finalizing gateway placement.
Another lesson: LoRa’s ADR (Adaptive Data Rate) algorithm does not work well in environments where node-gateway distance varies significantly (some nodes are 500m from the gateway, others are 12km). The ADR algorithm tends to downshift all nodes to higher spreading factors when any single node reports poor SNR, which wastes airtime for the nearby nodes. We disabled ADR and manually assigned spreading factors based on the site survey measurements — this improved overall network capacity by approximately 40%.
Third, environmental factors affect antenna performance in ways that are easy to overlook. Antennas mounted on metal poles (which are common in water level monitoring stations) exhibit a pattern distortion that reduces gain in the direction away from the pole by 3-6 dB. We switched to fiberglass non-conductive mounting poles for all antenna installations, which restored the expected range. Similarly, antennas mounted near water surfaces (river gauging stations) experience ground reflection effects that can either enhance or degrade reception depending on the antenna height above the water surface.
Frequently Asked Questions
How many sensor nodes can one gateway support?
In our deployment, each gateway handles 40-50 nodes with 10-minute reporting intervals. The theoretical capacity is much higher (thousands of nodes at low reporting rates), but the practical limit is determined by airtime utilization. At SF7 with 50-byte payloads and 10-minute intervals, 40 nodes consume approximately 0.33% of the available duty cycle (1% in CN470 band). At SF10, 40 nodes consume approximately 3.3% — still within limits but leaving less margin for retransmissions. If reporting intervals decrease to 1 minute, the per-gateway node count drops to approximately 10 at SF10 or 40 at SF7.
What happens if a node loses its gateway connection?
The node firmware includes automatic retry and duty cycle management. If no downlink ACK is received after 3 consecutive uplink attempts (spread across 3 reporting intervals), the node enters a power-saving mode: reporting interval increases from 10 minutes to 30 minutes, then to 60 minutes, reducing battery drain while the gateway is unavailable. All sensor data is stored in the STM32L4’s 128KB SRAM (retained through sleep cycles, no flash wear) as a circular buffer holding approximately 200 readings. When connectivity is restored, the buffered data is transmitted with the original timestamps. In our 18-month deployment, the longest gateway outage was 6 hours (power supply failure at one gateway site), and no data was lost from any of the 40 affected nodes.
Can the network be expanded with additional nodes?
Yes, adding nodes is straightforward: configure the node’s DevEUI, AppEUI, and AppKey in ChirpStack (or generate them from the STM32L4’s unique ID), mount the node at the desired location, and power it on. The node automatically joins the network via OTAA (Over-The-Air Activation) and begins reporting. Adding a gateway is equally simple: install the gateway hardware at a new location, configure its GPS coordinates in ChirpStack, and the network server automatically routes node traffic to the nearest available gateway. Our network has grown from 80 nodes at initial deployment to 120 nodes over 18 months, with plans to add 40 more nodes for agricultural soil moisture monitoring.
What is the total cost of a 100-node monitoring network?
For a typical 100-node network across a 150 km² area: Sensor nodes (hardware + assembly): $150-300 per node × 100 = $15,000-30,000. Gateways (3 units with 4G backhaul): $800-1,500 each × 3 = $2,400-4,500. Cloud platform (AWS EC2 + InfluxDB): $60-150/month. Installation and commissioning: $50-100 per node × 100 = $5,000-10,000. Total initial deployment: $22,400-44,500. Annual operating cost (cloud hosting + cellular backhaul for 3 gateways): $1,500-2,000. This compares favorably with cellular-based solutions at $50,000-80,000 initial cost and $24,000-48,000 annual operating cost.
Need a LoRa-based environmental monitoring system? Contact InnovChip Electronics for a free feasibility study and project quote.
