article / 29 September 2025

Forest Guard

A Decentralized Edge-AI LoRa Mesh Network for Forest Surveillance

Forest Guard is a low-power, solar-powered sensor network for remote conservation sites. Each node “listens” for gunshots and watches for smoke (early fire), then relays alerts over a LoRa mesh—no cell or internet required. A field gateway collects those alerts, timestamps them, and forwards to a Firebase database for a map-based dashboard. Everything is open and reproducible.

Full build + code: Hackster projecthttps://www.hackster.io/Mukesh_Sankhla/forest-guard-b1eaa5

GitHub repo (firmware, PCB, enclosure, data tool) → https://github.com/MukeshSankhla/Forest-Guard

Why we built it

Many protected areas have no reliable cell coverage and limited power. That makes timely response to poaching, illegal logging, and wildfire ignition really hard. Forest Guard tries to fill that gap with an affordable, field-ready kit that runs on sunlight and shares data across a LoRa mesh—so rangers can still get the signal out.

How it works (plain language)
  • Sensor Nodes (in the forest)

    Small, solar-powered boxes with:
    • A microphone for gunshot detection using a tiny on-device ML model (Edge Impulse).
    • A smoke sensor for early fire alerts.
    • An environmental sensor (temperature, humidity, light, pressure).
    • Optional GNSS for location and time.
    • A LoRa radio that forwards alerts through the mesh, hopping from node to node until a gateway hears it.
  • Gateway (at the station, vehicle, or tower)

    A simple base unit that:
    • Listens to the LoRa mesh and parses only valid frames to ignore noise.
    • Adds reliable time (NTP) and de-duplicates events.
    • Uploads to Firebase Realtime Database when internet is available.
    • Sounds a buzzer and shows status on a small screen for immediate awareness.
  • Dashboard (web)

    A lightweight map that:
    • Shows node status (active/inactive/alert).
    • Lists events with timestamps and locations (if GNSS available).
    • Lets an operator clear an event, which automatically notifies the node to reset.

No cell? The mesh still works locally, and the gateway can sync later when it briefly sees internet.

What makes it different
  • Works without internet: LoRa mesh hops data across long distances through the forest canopy.
  • Edge AI on the node: The gunshot detector runs locally, no cloud inference needed.
  • Open and adaptable: Designs, firmware, training pipeline, and 3D models are published.
  • Practical reliability choices:
    • Only upload changed sensor values to save bandwidth.
    • Ignore radio garbage; process #…* framed messages only.
    • Block cloud uploads until gateway time is correct (NTP synced).
What you can do with it (beyond gunshots)
  • Illegal logging: Retrain the audio model for chainsaw sounds.
  • Species monitoring: Train on endangered species calls to aid presence/absence surveys.
  • Fire weather & ignition: Use smoke plus environmental trends to trigger earlier patrols.
  • Boundary beacons: Drop a few nodes on access tracks to get low-latency alerts at choke points.

We include a simple Flask tool that streams audio from the node to Edge Impulse for fast dataset building, so customizing models is straightforward.

Field notes and trade-offs
  • Power: The nodes are sized for small solar panels and Li-ion packs; in deep canopy you may need bigger panels or seasonal placement.
  • Range: LoRa can reach kilometers line-of-sight; expect less under dense canopy—use the mesh hops to bridge.
  • False positives: Any acoustic model can misfire. Collect local sounds (wind, birds, distant vehicles) to fine-tune thresholds.
  • Ethics & consent: Acoustic monitoring can pick up human voices. If deploying near communities, follow local consent and data privacy guidelines.
What we are asking from the WILDLABS community
  1. Reality check: Does this fit your terrain, workflows, and patrol patterns?
  2. Data & models: What background sounds or target events should we include for your site (chainsaws, motorbikes, specific firearms, species calls)?
  3. Hardware tweaks: Preferred enclosures, connector standards, or mounting methods that have worked for you?
  4. Power strategy: Solar sizing and battery chemistry recommendations for rainforest vs. savanna?
  5. Integration: Would you rather push to another platform (e.g., EarthRanger, OpenCollar, custom APIs)? We can add adapters.

Please jump into the Hackster thread or open a GitHub issue with your feedback, deployment constraints, and ideas. We’re especially keen to hear from teams who’ve tried acoustic sensors in tough soundscapes.

Try it or adapt it
  • Pilot scale: Start with 2–3 nodes and a gateway to validate mesh routes and power.
  • Local retraining: Capture a few minutes of real site audio and retrain the Edge Impulse model to your soundscape.
  • Extend: Add camera traps, water-level sensors, or battery telemetry—the LoRa messaging format is intentionally simple.
Edge AI Earth Guardians Contest (Hackster.io)

I’m sharing Forest Guard as part of the EarthGuardians challenge on Hackster.io. The spirit of the challenge is simple: build practical, open solutions that help protect ecosystems and the communities that depend on them. Forest Guard fits that mission by combining edge-AI, LoRa mesh, and low-power design into a deployable, field-friendly kit.

If you’re coming from WILDLABS and are curious about the broader community effort, please check out the contest page above. I’m one of the participants, and I’d love your feedback on how this project could be adapted to real conservation workflows—whether that’s acoustic monitoring for poaching, illegal logging, species detection, or early wildfire alerts.

Build guide, PCB files, and firmware:

Hackster projecthttps://www.hackster.io/Mukesh_Sankhla/forest-guard-b1eaa5

GitHub repohttps://github.com/MukeshSankhla/Forest-Guard

If you’re considering a deployment and want help tailoring the model or hardware, leave a comment on WILDLABS or open a discussion on GitHub—happy to collaborate.

Thanks to the Edge Impulse community for on-device ML tooling, Meshtastic for the LoRa mesh firmware, DFRobot for sensor libraries, and NextPCB for fabrication support. And thanks in advance to the WILDLABS community for field-hardened feedback.


Hi Mukesh — this is a well-thought-out architecture and the combination of Edge Impulse + Meshtastic is a smart choice for keeping the stack open and maintainable.

A few thoughts from field deployment experience with similar systems in remote African environments:

On the LoRa mesh topology — Meshtastic works well for general mesh but uses a flooding algorithm that can become inefficient as node count grows. For a dense sensor network where you have many nodes but relatively few gateways, consider whether a more structured topology (like a simple star-of-stars with dedicated repeater nodes at higher elevation points) might give you better latency and battery performance. The flooding approach also burns extra TX cycles on every node for every message, which matters if you're trying to squeeze months out of a solar cell.

On power — for permanent solar installations in tropical and savannah environments, the main risk isn't average insolation but multi-day cloud cover during wet season. A 3-5 day battery reserve at minimum operating current is worth designing in explicitly. The BQ25504 MPPT IC is a good choice for harvesting from small cells — it starts up at very low input voltage which matters in low-light conditions.

On acoustic model reliability — gunshot detection in open African bush is harder than in forest because there's less acoustic diffraction and more wind noise. The VM3011 mic you mentioned in other threads handles wind well, but you'll want to train your Edge Impulse model on savannah soundscapes specifically, not just forest recordings. False positive rate from vehicle backfires, thunder, and snapping branches can be high if the training set doesn't include local ambient audio.

On chainsaw detection for illegal logging — this is actually easier than gunshots because of the sustained harmonic signature. If you retrain for this, worth adding accelerometer data as a secondary feature — a chainsaw physically couples vibration into whatever surface it's resting on, which can improve classification confidence.

Happy to discuss deployment architecture further — I've been working on LoRaWAN-based tracking systems and have gone through a lot of these trade-offs in practice.

Add another post

Want to share your own conservation tech experiences and expertise with our growing global community? Login or register to start posting!