Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
title: "Early Wildfire Detection System Using BME688 and LoRa"
authors: "jarodh moncada"
categories: "2025 Maker Contest"
tags: ["heltec", "wildfire", "bme688", "meshtastic", "lora", "forest"]
image: "img/1.jpg"
---

![image info](img/1.jpg)

# Your project story


This project was created as a response to the recurring problem of wildfires in my country, Honduras. Every year, thousands of hectares are lost, and one of the most affected areas is La Tigra National Park. Beyond being a protected biodiversity zone, La Tigra is the main water source for the capital city, so early detection of fire activity is critical.

The project aims to show the viability of a low-cost LoRa-based mesh network capable of monitoring air quality in real time across forested areas. The goal is to detect the early signs of a fire before it becomes large enough to cause irreversible damage.

The idea began with an earlier prototype based on an RP2040, an RTC module, traditional LoRa point-to-point communication, and a Sharp GP2Y smoke sensor. The prototype demonstrated that early smoke detection was possible, but it lacked the characteristics needed for a real deployment: energy efficiency, long communication range, and mesh networking. This led to the new design using the Heltec V3 and the BME688 sensor, which better fits the requirements of a forest-scale deployment.
![image info](img/2.jpeg)

# Preparation

Below is the list of items required for the project, with the exact quantities used and the purchase links for replication.

Heltec LoRa WiFi V3 (3-pack)
https://www.amazon.com/dp/B0DMN28TRW

BME688 gas sensor modules
https://www.amazon.com/dp/B0BZ76H645

3000 mAh lithium batteries
https://www.amazon.com/dp/B0D3LP6F8G

SONOFF IP66 waterproof case
https://sonoff.tech/products/sonoff-ip66-waterproof-case

Deployment used:
1x Heltec V3 Sensor Node
1x Heltec V3 Router
1x Heltec V3 Gateway

# Implementation process

The project uses one Heltec V3 configured as a sensor node, another as a router, and a third as the receiving gateway. Meshtastic version 2.5.4.8d288d5 was used for the sensor node because it allows shorter telemetry intervals required for this application.

The BME688 sensor is read by the sensor node using the Meshtastic I²C direction pins (GPIO 41 for SDA and GPIO 42 for SCL). The sensor node transmits telemetry over LoRa. The router relays the packets deeper into the mesh, and the gateway node forwards the packets to a local Mosquitto MQTT server. Node-RED processes the incoming data.

Two improvements are proposed for future versions, and these are optional approaches:

Modify Meshtastic firmware to support a pretrained BSEC model on the BME688, trained on clean air and smoke.

Add a secondary microcontroller dedicated to smoke detection logic, sending only the relevant alerts to the V3 via UART.

A third proposal is to replace Meshtastic entirely across the entire system. This would allow the use of a very low-power custom firmware and a communication strategy focused strictly on meeting long-term energy requirements, rather than depending on Meshtastic’s operational model.

Below are the measured average current consumption values:

Router node:
Standby: 11.1 mA
Window after data reception (every 1–3 seconds): approximately 130 mA
During active packet reception: 174 mA

Sensor node:
Standby: 98 mA
During LoRa transmission: 170 mA

All measurements were taken using default Meshtastic roles without deep firmware modifications.

![image info](img/3.jpeg)
![image info](img/4.jpg)

# Finished project showcase / Summary

Although the system is still under development, The current implementation demonstrates that BME688 gas measurements, can be transmitted through a local LoRa mesh, and forwards the data to an MQTT server for processing. Although the current implementation is simple, it demonstrates that a distributed private mesh can operate reliably in forest environments to support early detection of fire activity.

The main areas for future improvement include:

Replacing the default Heltec antennas with higher-performance long-range models suitable for forest terrain.

Replacing the Heltec V3 with the Mesh Node T114, which offers significantly better energy efficiency and direct solar-panel support.

Implementing intelligent smoke-detection logic using either a modified Meshtastic firmware or independent microcontroller firmware.

A watchdog-like mechanism that detects silent nodes and automatically triggers a fallback alert if communication is lost.


The Node-RED flow is expected to provide visualization of system states, warnings, and alarms, helping users understand environmental changes in real time and act if needed.

The project shows that early wildfire detection using low-cost mesh networks is achievable and practical. With further optimization and better energy management, these systems can be deployed across large protected areas to help prevent major environmental losses.

![image info](img/5.jpeg)
186 changes: 186 additions & 0 deletions news/early-wildfire-detection-lora/flows.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
[
{
"id": "cb5329161aac7489",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "c8fe2c3b41c6a9eb",
"type": "mqtt in",
"z": "cb5329161aac7489",
"name": "",
"topic": "msh/Gateway/2/json/LongFast/!9e9d8770",
"qos": "0",
"datatype": "auto-detect",
"broker": "b4ed02d13afacae4",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 280,
"y": 160,
"wires": [
[
"74fdeb046922071a",
"a0793ff748b271d3"
]
]
},
{
"id": "74fdeb046922071a",
"type": "switch",
"z": "cb5329161aac7489",
"name": "",
"property": "payload.from",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "2661539892",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 570,
"y": 160,
"wires": [
[
"165178b8860468eb"
]
]
},
{
"id": "a0793ff748b271d3",
"type": "debug",
"z": "cb5329161aac7489",
"name": "debug 1",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 580,
"y": 240,
"wires": []
},
{
"id": "165178b8860468eb",
"type": "switch",
"z": "cb5329161aac7489",
"name": "",
"property": "payload.type",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "telemetry",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 730,
"y": 160,
"wires": [
[
"671e559c590e34bd",
"d76c91df786326ae",
"000a5d55c477d812"
]
]
},
{
"id": "671e559c590e34bd",
"type": "function",
"z": "cb5329161aac7489",
"name": "function 1",
"func": "if(msg.payload.payload.hasOwnProperty(\"temperature\")) {\n node.status({fill:\"blue\",shape:\"ring\",text: msg.payload.payload.temperature.toFixed(1) + \"C\"}); \n}\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1220,
"y": 160,
"wires": [
[]
]
},
{
"id": "d76c91df786326ae",
"type": "function",
"z": "cb5329161aac7489",
"name": "function 2",
"func": "if (msg.payload.payload.hasOwnProperty(\"iaq\")) {\n node.status({ fill: \"blue\", shape: \"ring\", text: msg.payload.payload.iaq.toFixed(1) });\n}\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1220,
"y": 240,
"wires": [
[]
]
},
{
"id": "000a5d55c477d812",
"type": "function",
"z": "cb5329161aac7489",
"name": "function 3",
"func": "if (msg.payload.payload.hasOwnProperty(\"gas_resistance\")) {\n node.status({ fill: \"blue\", shape: \"ring\", text: msg.payload.payload.gas_resistance.toFixed(1) + \"MΩ\" });\n}\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1220,
"y": 320,
"wires": [
[]
]
},
{
"id": "b4ed02d13afacae4",
"type": "mqtt-broker",
"name": "Gateway",
"broker": "127.0.0.1",
"port": 1883,
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": 4,
"keepalive": 60,
"cleansession": true,
"autoUnsubscribe": true,
"birthTopic": "",
"birthQos": "0",
"birthRetain": "false",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closeRetain": "false",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willRetain": "false",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
}
]
Binary file added news/early-wildfire-detection-lora/img/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added news/early-wildfire-detection-lora/img/2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added news/early-wildfire-detection-lora/img/3.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added news/early-wildfire-detection-lora/img/4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added news/early-wildfire-detection-lora/img/5.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.