A 4-channel LoRaWAN temperature node, from schematic to a plant-room trial.
A custom battery-powered node, with its firmware, radio link and cloud pipeline, running in an operational plant room. It is a trial, not a product, and what went wrong in it is the most useful part.
Setting
An operational plant room in a water hygiene setting. One unit was installed and left running. There is no fleet and no customer deployment behind it.
The problem
Water hygiene monitoring depends on temperature readings arriving on time from a battery-powered device nobody visits. We built a custom node and ran one unit in an operational plant room, with an indoor gateway and a network server on the receiving end.
What we've built
4-channel LoRaWAN temperature node
A custom PCB with four temperature channels and a battery fuel gauge, sending over LoRaWAN to a network server and telemetry database.
Designed from schematic to field trial; one unit running in an operational plant room
| Layer | What we did | Detail |
|---|---|---|
| Electronics | Custom PCB around a RAK3172 module (STM32WL, LoRaWAN) with four temperature channels, battery powered, and an STC3100 battery fuel gauge. | Fuel gauge in the MiniSO-8 package rather than the DFN-8 variant, so bring-up boards are easier to rework by hand |
| Firmware | RUI3 4.2.4 built with arduino-cli. Progress markers are kept in backup registers and read over ST-Link, so the cause of a hang can be read back afterwards. | Independent watchdog 32 s · maximum sleep 20 s · join back-off 30 s rising to 1 h, then 4 h after 11 h · two patches to the vendor RUI3 sleep and timer code |
| Radio | LoRaWAN through an indoor gateway running Basic Station into ChirpStack. | Basic Station · ChirpStack |
| Cloud | ChirpStack as the network server, with a telemetry database beside it, self-hosted. | ChirpStack · telemetry database |
What we learned
The node stopped on the tenth of October. After 25 uplinks it entered Stop2 sleep and never woke, and it stayed silent for seven days. It had no watchdog, so nothing recovered it until a manual reset on the seventeenth.
Which vendor defect caused the hang is unproven, so the fix is defence in depth rather than one patch. An independent watchdog now resets the node after 32 seconds, sleep is capped at 20 seconds, join retries back off from 30 seconds up to an hour, and two patches go into the vendor sleep and timer code. After the fix, a forced hang produced a watchdog reset and the node rejoined by itself.
Two smaller lessons followed. After a gateway outage the node stayed quiet for about 13 minutes because its join back-off had run out; a single reset rejoined it in 5 seconds. And the fuel gauge returned a stale register, reporting 3.91 V while a meter read 3.83 V. Reading it after a 5-second settle delay gave 3.862 V.
Related
Legionella monitoring ·Water leak detection ·Embedded firmware development ·LoRaWAN sensor design ·Low-power IoT design · All sectors →