Solar-powered open-source LoRaWAN environmental monitoring node. Custom STM32WLE5 4-layer PCB designed in EasyEDA Pro, six sensor channels, 3D-printed Stevenson screen, live field data.
Loading README and project media…
Live now: A station is deployed outdoors and streaming real sensor data — view live dashboard
Detailed, hyperlocal environmental data is surprisingly scarce. Most weather and air quality stations are expensive, power-hungry, and installed only at a handful of official sites per city — leaving entire neighborhoods without meaningful data about what they breathe every day.
HydroNodeStation01 is a fully self-sufficient, unattended monitoring node that anyone can reproduce and deploy. It transmits CO₂, particulate matter, temperature, humidity, barometric pressure, and UV data over LoRaWAN using only a small solar panel and a single LiPo cell — and stays online for months without maintenance.
This is not a paper concept. It was designed, built, and field-tested as part of a university engineering project, with the goal of open, democratic, decentralized environmental monitoring.
| Quantity | Sensor | Notes |
|---|---|---|
| CO₂ concentration | Sensirion SCD41 | Single-shot photoacoustic NDIR, ±40 ppm |
| Particulate matter | Sensirion SPS30 | PM1.0 / PM2.5 / PM4 / PM10 + number concentration |
| Temperature & Humidity | Sensirion SHT45 | ±0.1 °C / ±1.0 % RH |
| Barometric pressure | Bosch BMP390 | ±0.5 hPa absolute |
| UV index | Lite-On LTR390 | UVA + ambient light |
| Battery state-of-charge | Maxim MAX17048 | Fuel gauge via I2C |
All sensors share an I2C bus. Drivers request sensor sleep/power-down between measurements; physical power isolation depends on the PCB wiring. The platform is open to extension: any I2C-compatible sensor can be added with a firmware adaptation.
The PCB was designed from scratch in EasyEDA Pro, fabricated at JLCPCB, and hand-assembled. It integrates:
Special attention was paid to RF layout: controlled-impedance traces, solid ground plane under the antenna feed, and proper keepout areas around the chip antenna.
Honest note on revision 1: two issues were found on the first fabricated board and fixed in the corrected design:
- TPS63900 regulator — a wiring bug in the regulator section. The station runs perfectly in the meantime with the same chip on a breakout adapter.
- BQ25185 charger
CEpin — must be driven by an MCU GPIO so the firmware can reset the charger's internal 6 h safety timeout (pulsed HIGH ~200 ms each cycle). The corrected design routes this; on the already-ordered boards theCEpin has to be hand-soldered to the GPIO.This is exactly the kind of real-world iteration documented openly so you don't repeat it.
The electronics live in a 3D-printed Stevenson screen in UV-resistant white ASA filament. Stacked louvers block direct sunlight and rain while allowing free air circulation — essential for accurate outdoor temperature and humidity readings. The design files (.3mf) are included and print on any consumer FDM printer.
flowchart LR
subgraph Field ["Field Deployment"]
Node1(("HydroNode\nStation01"))
Node2(("HydroNode\nStation02"))
end
subgraph Network ["LoRaWAN Network Server"]
NS["Helium IoT / ChirpStack v4 / TTN"]
end
subgraph Backend ["HydroNode Cloud"]
API{"HTTPS\nEndpoint"}
Kafka["Kafka Pipeline\n(Validation & Processing)"]
DB[("PostgreSQL\nDatabase")]
end
subgraph Client ["End Users"]
App["iOS App"]
end
Node1 -- LoRaWAN --> NS
Node2 -- LoRaWAN --> NS
NS -- HTTPS Webhook --> API
API --> Kafka
Kafka --> DB
DB --> App
| Guide | Description |
|---|---|
| Getting Started | Prerequisites, build, flash, first uplink, debug mode |
| Configuration Reference | LoRaWAN keys, feature flags, timing constants, payload format, decoder |
Firmware 1.6: fixes the reproducible 49.71-day uplink alarm overflow and adds watchdog/progress recovery, robust sensor shutdown, battery recovery and transactional NVM. See reliability and rollout notes. No percentage energy reduction has been measured for this update.
The firmware runs on the STM32Cube ecosystem with the Semtech LoRa Basics Modem (LBM). Every design decision prioritizes ultra-low power:
Power budget (measured, PPK2 on the custom PCB): day-average baseline draw ~1.1 mA. The datasheet floor from component sleep currents is ~5.7 µA; the gap is under investigation (suspected SCD41 IR leakage, BQ25185 quiescent, PCB leakage). Including the transmit events, the time-averaged draw is ~2.12 mA → ~24 days on a 1200 mAh LiPo without solar. Solar harvesting is designed to keep the node online indefinitely — long-term autonomy verification is ongoing.
Measured daily consumption (PPK2): baseline plus the extra charge per transmit event sums to ~50.9 mAh/day (~183,408 mC/day). At 1200 mAh this is 1200 / 50.9 ≈ 24 days.
| Source | Interval | Extra charge/event | Events/day | mC/day |
|---|---|---|---|---|
| Baseline (1.1 mA × 86400 s) | — | — | — | 95,040 |
| LoRa TX (+0.7 mA × 10 s) | 3 min | 7 mC | 480 | 3,360 |
| SCD41 CO₂ (+77 mC) | 15 min | 77 mC | 96 | 7,392 |
| SPS30 (55 mA × 30 s − idle) | 30 min | ~1,617 mC | 48 | 77,616 |
| Total | ~183,408 |
183,408 mC / 3600 = ~50.9 mAh/day
All commands from stm32_node/:
# Configure (once)
cmake -B build/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=cmake/gcc-arm-none-eabi.cmake
# Build
cmake --build build/Release
ELF/binary output lands in build/Release/. Requires arm-none-eabi-gcc.
The Device EUI is auto-derived from the STM32's 96-bit UID — leave it at zero. On boot the firmware prints the derived Device EUI over SW-UART (PA6); register that EUI as an OTAA device (LoRaWAN 1.0.4, EU868) on your network server, then put the resulting key macros in the Git-ignored stm32_node/LoRaWAN/App/se-identity-local.h:
#define LORAWAN_DEVICE_EUI 00,00,00,00,00,00,00,00 // leave 00 — derived from chip UID
#define LORAWAN_JOIN_EUI AA,BB,CC,DD,EE,FF,00,11 // from your network server
#define LORAWAN_APP_KEY AA,BB,CC,... // 16-byte app key from network server
#define LORAWAN_GEN_APP_KEY AA,BB,CC,... // same value as APP_KEY (LoRaWAN 1.0.x)
Supported network servers: Helium IoT, ChirpStack v4, The Things Network.
se-identity.hcontains tracked defaults; production keys belong only in the ignoredse-identity-local.h. No skip-worktree flag is needed.
The node accepts LoRaWAN downlinks (fPort matching the command port) for remote control:
| Bytes | Action |
|---|---|
0x10 HH LL | Set TX interval to HHLL seconds (2-byte big-endian, range 30–3600 s, persisted to flash). E.g. 10 00 B4 = 180 s. Handy for testing without re-flashing. |
0x11 | Trigger SPS30 fan cleaning |
0x12 | Request boot/reset/sensor diagnostics on fPort 5 |
0xFF | Software reset |
The SPS30 also runs an automatic fan-cleaning cycle every 120 h (when battery > 4120 mV).
With APP_LOG_ENABLED=1, pull DEBUG_SW_Pin (PB4) HIGH before boot → the node reads all sensors in a tight loop and logs via software UART on PA6 (bit-banged, no LoRaWAN). Attach a USB-UART to PA6 to see live sensor values. Useful for sensor bring-up without waiting for TX windows.
hydroNodeStation01/
├── stm32_node/ # Firmware (STM32WLE5, CMake)
│ ├── Core/Src/ # Sensor drivers (SHT45, BMP390, LTR390, SCD41, SPS30, MAX17048)
│ ├── LoRaWAN/App/ # Application logic (lora_app.c), LoRaWAN keys (se-identity.h)
│ └── cmake/ # Toolchain files
├── hardware/
│ ├── ordered_pcb/ # Schematic PDF + PCB renders
│ ├── bom/ # Bill of materials
│ ├── CAD/ # Stevenson screen + enclosure (3MF + STEP)
│ └── datasheets/ # Key component datasheets
└── doc/
├── GETTING_STARTED.md # Setup guide
├── CONFIGURATION.md # All configuration reference
├── assets/ # Images and SVGs used in documentation
└── analysis/ # Power budget analysis
The design is modular — not every sensor needs to be populated:
| Configuration | Approximate BOM Cost |
|---|---|
| Minimal (temp + humidity + pressure) | < $30 in sensors |
| Fully populated (all six sensors) | ~$120–150 |
Hardware (schematic, PCB, CAD enclosure): CC BY-NC-SA 4.0
Firmware: BSD-3-Clause (STMicroelectronics/Semtech heritage) + custom application code
Fork it, build it, deploy it, and contribute back. If you build a station, open an issue or PR — reports from real deployments (sensor calibration quirks, enclosure improvements, alternative sensors) are especially valuable.
Live data is flowing at hydronode.texhfexlabs.de.