🌲 Falling in Love with Nature—and Facing Wildfires
A while ago, my family and I moved to Canada.
Coming from a bustling industrial background in China, the first thing that struck us was the raw, breathtaking nature. The air is crisp, the lakes and tap water are crystal clear, and humans live side-by-side with wildlife in total harmony. In fact, in our quiet neighborhood, black bears occasionally drop by! They wander through the yard looking for berries or fallen apples, and then quietly move on without ever disrupting our daily routine.
It felt like paradise.
Except for one devastating problem that returns every summer: wildfires.
Year after year, millions of hectares of majestic forests are consumed by roaring fires. Smoke blankets the skies for hundreds of miles, turning the sun into an eerie orange disc, shutting down schools, and forcing families to evacuate.
Watching this repeat year after year broke our hearts. We asked ourselves: Can we use technology to make a difference before fires rage out of control?
🤝 The Father & Son Team: IoT Meets Computer Vision
I have spent decades working in industrial IoT hardware and embedded systems in China—designing rugged field sensors, remote telemetry units, and ultra-reliable communications.
Meanwhile, my son is currently studying Computer Science with a focus on Artificial Intelligence and Computer Vision.
One evening, looking out at the haze during wildfire season, we had an idea: What if we combined our strengths?
- The Father (Edge Hardware & Firmware): Build an ultra-reliable, off-grid, low-power IoT sensing node capable of surviving years in remote wilderness.
- The Son (Cloud Backend & Multi-Modal AI): Ingest real-time telemetry, filter sensor drift, and run lightweight AI vision models on remote camera snapshots to verify smoke columns and suppress false alarms.
That is how ForestFireGuard was born.
🎥 The Story in Video
I recently recorded a short video sharing our journey, our motivation, and why we decided to make this project 100% open source:
(If the embed doesn't load, you can watch it directly on YouTube.)
🛠️ The Engineering Challenge: Why Wildfire IoT is Hard
Building a wildfire detector for a warm living room is easy. Building one for an isolated boreal forest is an entirely different engineering beast:
- Zero External Power: The node must run off a single primary battery and small solar cells for years.
- Fragile Cellular Connectivity: In deep forests, 4G signals fluctuate or drop for days. Zero data loss is mandatory.
- Severe Hardware RAM Constraints: Running on low-cost, low-power microcontrollers (STM32F030 with only 32KB SRAM) means you cannot allocate massive memory buffers for camera image payloads without risking stack overflows or fragmentation.
🏗️ How ForestFireGuard Works
Here is a look at the system architecture we engineered:
+-----------------------------------------------------------------------------------+
| EDGE NODE SUBSYSTEM (mcu/) |
| |
| +--------------------+ +---------------------+ |
| | ESP32 Camera Node |--UART-->| SPI RAM (64KB) | (High-Speed Image Cache) |
| | (VGA 640x480 JPEG) | +----------+----------+ |
| +--------------------+ | |
| v |
| +--------------------+ +---------------------+ +--------------+ |
| | Primary Sensors |--I2C/-->| SPI Flash (1MB) |<--FRAM--| Mainboard | |
| | (GPS, AQ, Temp/Humi| ADC | (Append-Only Queue) | (8KB) | (STM32F030) | |
| +--------------------+ +----------+----------+ +-------+------+ |
| | | |
+--------------------------------------------|----------------------------|---------+
v | TLV
+---------------------+ v
| Network Module |<----------------+
| (EC800CN 4G Cat.1) |
+----------+----------+
|
MQTT / TCP Cellular
v
+-----------------------------------------------------------------------------------+
| SERVER & AI SUBSYSTEM (service/ & Cloud) |
| |
| +-----------------------------------------------------------------------------+ |
| | IoT Ingress Service (service/) | |
| | (Receives 4G Payload & Stores to DB) | |
| +--------------------------------------+--------------------------------------+ |
| | |
| =======================================|======================================= |
| DATABASE LAYER (Delivery & Separation Boundary) |
| =======================================|======================================= |
| v |
| +-----------------------------------------------------------------------------+ |
| | Cloud AI Engine (Son's Pipeline) | |
| | * Fetches real-time sensor metrics & VGA photos from DB | |
| | * Runs Lightweight CV models (Smoke & Flame detection) | |
| | * Dispatches verified high-confidence alerts to emergency channels | |
| +-----------------------------------------------------------------------------+ |
+-----------------------------------------------------------------------------------+
Key Technical Highlights:
-
3-Tier Storage for Zero Data Loss:
- 64KB SPI RAM caches incoming JPEG images from the ESP32 camera without touching the STM32's tiny 32KB internal SRAM.
- 1MB SPI Flash operates in append-only mode as an indestructible flight data recorder.
- 8KB Ferroelectric RAM (FRAM) records non-volatile read/write pointers with near-infinite endurance. If the battery dies or connection drops, transmission resumes seamlessly upon reboot.
- Time-Multiplexed Power Gating: All power-hungry modules (4G modem, camera, gas sensors) sit behind independent MOSFET switches. The STM32 powers them on sequentially, preventing destructive peak current surges.
- Clean Architecture Boundary: The PostgreSQL/Timescale database serves as the strict contract boundary. I ensure rock-solid data ingestion from the field into the DB; my son pulls from the DB for AI training, validation, and real-time inference.
🌍 Why We Are Making It 100% Open Source
Wildfires don't respect borders or patents. Communities in Canada, the US, Southern Europe, Australia, and South America are all battling the same threat.
We believe that by sharing our schematics, PCB gerbers, STM32 firmware, and cloud code with the global developer community, we can help local forestry teams, researchers, and volunteers deploy affordable, early-warning sensor meshes.
đź’» Join Us on GitHub!
The project source code is available now on GitHub:
👉 Check out AI part on GitHub (Alex)
👉 Check out Hardware on GitHub(John)
We would love to hear your feedback:
- What sensors would you prioritize for forest deployment?
- Have you tackled similar memory and power constraints on Cortex-M0 devices?
- Want to help with PCB design, embedded C refactoring, or computer vision models?
Drop a comment below or open an issue on GitHub. Let’s build technology that makes a real-world difference together! 🌲🔥🚒

Top comments (0)