Moire
A low-cost soil-moisture sensor network for reforestation research, running on a LoRa mesh in the Ecuadorian Andes.
The problem
Researchers at the FCAT reserve in Ecuador (Fundación para la Conservación de los Andes Tropicales) want to know which conditions help reforested seedlings survive. That needs soil-moisture, temperature, humidity, and light readings from many points across steep, forested terrain with no cell coverage and no power, on a student budget. Today that data is collected by hand, daily.
The system
Each sensor node is a Heltec T114 (nRF52840 with a LoRa radio) carrying our custom sensor daughter board: a TI HDC1080 for temperature and humidity, a TI OPT3001 for light, and a capacitive soil-moisture probe that reports moisture as a pulse frequency. A 5 V solar panel charges a 950 mAh LiPo. The 3D-printed PETG enclosure is sealed with a rubber gasket, with a PTFE vent that lets light and humidity reach the sensors while keeping water out.
Nodes run a fork of Meshtastic, so readings can hop through other nodes and dedicated routers to reach the gateway. The gateway is another T114, connected over USB serial to an Intel NUC that parses incoming packets into MySQL and serves the web dashboard (React, Express).
What I built
I wrote most of the firmware. Most of the work was turning a general-purpose mesh messenger into something that could sleep in the mud for months.
- Sleep scheduling over the mesh. The gateway broadcasts the sleep interval, so the schedule can change in the field without touching a node. Nodes wake, take a reading, transmit, stay awake briefly to relay, and go back to sleep.
- Collision avoidance. Nodes woken by the same broadcast all wanted to transmit at once. Each node now waits a random 0–3 seconds before sending.
- Range tuning. Tested LoRa presets (Long Slow, then Long Moderate) and raised the hop limit to reach nodes deep in the forest.
- Power. Stripped unused Meshtastic modules from sensor-node builds, turned off the heartbeat LED, and report battery percentage over the mesh.
- Hardware pulse counting. The moisture probe outputs a frequency. I built a counter from nRF52 peripherals that measures it with zero CPU involvement, later open-sourced as nrf_pcnt.
- Separate builds per role: sensor node, router, and gateway.
Results
Before Ecuador, the system ran in a deployment with the City of New Orleans at city-maintained cemeteries. We then deployed 25 nodes at FCAT. The longest-running nodes operated for six months without maintenance, sending real-time environmental data to researchers.
A new student team is continuing the project in 2026–27, and I'm advising them.