- Epic Demo:
Protecting forests through intelligent audio detection and real-time monitoring.
Illegal logging represents a critical environmental threat worldwide. In Mexico alone, 70% of consumed wood originates from illegal sources according to UNAM research. This project delivers an AI-powered solution that detects chainsaw activity and human presence in protected forest areas, providing immediate alerts to conservation teams.
Key Innovation: Real-time audio classification using Edge Impulse machine learning, combined with environmental monitoring and long-range LoRaWAN communication for comprehensive forest protection.
Mission: Create an affordable, scalable system that empowers forest rangers and conservation organizations with the technology needed to combat illegal logging effectively.
Rainforest Connection (RFCx) Guardian System
- ✅ Solar-powered acoustic monitoring using recycled smartphones
- ✅ Real-time chainsaw detection with cellular/satellite connectivity
- ✅ Deployed in 10+ countries protecting 2.5M+ acres
- ❌ Limitation: Requires cellular coverage or expensive satellite connectivity
Global Forest Watch GLAD Alerts
- ✅ Satellite-based deforestation detection using Landsat and Sentinel data
- ✅ Industry standard used by governments and major NGOs
- ✅ Weekly updates on forest loss with 30m resolution
- ❌ Limitation: 1-week detection delay, weather-dependent, cannot detect selective logging
Trase Platform
- ✅ AI-powered supply chain transparency using satellite data and trade flows
- ✅ Maps commodity supply chains to identify deforestation risks
- ✅ Used by major corporations for compliance
- ❌ Limitation: Focuses on large-scale commercial operations, not real-time detection
An intelligent, cost-effective forest protection system combining:
- Edge AI Processing: On-device machine learning for real-time audio classification
- Multi-sensor Integration: Environmental monitoring with temperature, humidity, air quality sensors
- Long-range Communication: LoRaWAN connectivity for remote deployment without cellular infrastructure
- Solar Power: Autonomous operation with battery backup for continuous monitoring
- Web Dashboard: Comprehensive monitoring interface with geographic visualization
The Seeed Studio XIAO nRF52840 Sense serves as the core processing unit, utilizing its built-in PDM microphone for AI-powered audio analysis. The system processes audio signals through trained neural networks to distinguish between chainsaw sounds, human voices, and natural forest ambiance.
Key Features- Real-time Audio Detection: ML-powered chainsaw and human voice recognition
- Multi-sensor Monitoring: Environmental data collection (temperature, humidity, air quality)
- Long-range Communication: LoRaWAN connectivity for remote forest deployment
- Low Power Design: Solar charging with battery backup for autonomous operation
- Visual Feedback: RGB LED status indicators for on-site monitoring
- Web Dashboard: Real-time monitoring and alert management interface
- Interactive Maps: Geographic visualization of sensor locations and events
The breadboard prototype demonstrates complete system integration with all sensors and components connected to the XIAO nRF52840 Sense microcontroller.
System Integration Details:
Power Distribution
- 3.3V and GND rails distributed across the breadboard
- USB power supply for development and testing
Sensor Connections
- BME680 Environmental Sensor: I2C communication (SDA/SCL pins)
- PIR Motion Sensor: Digital pin 2 input for motion detection
- Photoresistor: Analog pin A0 for ambient light measurement
- LoRaWAN Module: Serial1 communication at 9600 baud (AT commands)
User Interface Elements
- NeoPixel RGB LED: Pin 1 connection with brightness control (254 high, 20 low)
- Push Buttons: Pin 10 (Button1 with interrupt for system reset), Pins 9 & 8 (Button2 & 3)
- Built-in LED: Pin LED_BUILTIN for additional status indication
Intelligent audio classification system powered by Edge Impulse for real-time forest monitoring.
The Edge Impulse studio interface manages the complete machine learning workflow. Audio samples are captured with 1,000ms windows and 500ms stride at 16kHz frequency. The MFE (Mel-frequency Energy) processing block extracts audio features, while the Classification neural network distinguishes between chainsaw, human, and standby audio patterns.
Training Dataset: 38+ minutes of audio data with 82%/18% train/test split for robust model validation. The Data folder contains organized audio samples across three categories: chainsaw sounds, human voices, and environmental standby noise.
Mel-filterbank Energy Parameters:
- Frame length: 0.025 seconds
- Frame stride: 0.01 seconds
- Filter banks: 41
- FFT length: 512
- Low frequency: 80Hz
- Noise floor normalization: -55dB
These parameters are optimized for detecting chainsaw mechanical sounds and human vocal patterns in forest environments, ensuring optimal feature extraction from raw audio input.
Exceptional Classification Accuracy: 98.0% accuracy with 0.11 loss on validation set
Confusion Matrix Results:
- Chainsaw Detection: 100% precision
- Human Voice Recognition: 96.1% accuracy
- Standby Classification: 98.3% precision
- F1 Scores: 0.98, 0.97, and 0.99 respectively
Quantized (int8) Model Specifications:
- Memory Usage: 22.8K RAM, 32.0K Flash
- Processing Latency: 509ms total (500ms MFE + 9ms classification)
- EON Compiler Optimization: 25% less RAM, 46% less ROM
- Power Efficiency: Optimized for extended battery operation
- Index 0 - Chainsaw: Mechanical cutting sounds and motor patterns
- Index 1 - Human: Speech, voices, and vocal patterns
- Index 2 - Standby: Natural forest sounds, wind, birds
- Inference Frequency: Every 7 seconds with 90%+ confidence threshold
- Audio Input: Built-in PDM microphone
- Buffer Size: 2048 samples for efficient processing
- Optimization: Forest environment-specific training and tuning
Arduino implementation for XIAO nRF52840 Sense with AI-powered forest monitoring.
Device Firmware: View Source Code
Core Features- AI Audio Detection: Edge Impulse ML model with 98% accuracy for chainsaw/human detection
- Environmental Sensors: BME680 for temperature, humidity, pressure, and air quality
- Motion Detection: PIR sensor and light level monitoring
- LoRaWAN Communication: Long-range data transmission every 15 seconds
- Visual Indicators: RGB LED status feedback
- Power Management: Solar charging with battery backup
- AI Processing: 7-second inference intervals with 90%+ confidence threshold
- Memory Usage: 22.8K RAM, optimized for microcontroller efficiency
- Data Format: JSON payload converted to hex for LoRaWAN transmission
- Power Consumption: Low-power design with sleep modes between operations
Connecting forest sensors to the cloud through Helium Network infrastructure.
Helium Console: Access Platform
The Helium Console provides comprehensive device performance visibility. The live dashboard displays RSSI (signal strength) readings over time, with blue indicators representing successful data transmissions. Integration status shows green for success, red for errors, enabling real-time connectivity health monitoring.
The system utilizes a streamlined integration pipeline: XIAO Nordic devices connect wirelessly to the Helium Network, which forwards sensor data directly to the web application. This seamless connection enables forest monitoring data to flow from remote locations to the dashboard without complex infrastructure requirements.
The Helium Console displays all connected devices with comprehensive information:
- Device Identification: XIAO - Nordic with unique Device EUI
- Connection Status: Green indicator for active connections
- Data Statistics: Frame Up/Down counts and total packet transfers
- Performance Metrics: Real-time transmission success rates
- Account Creation: Register for Helium Console access
- Device Registration: Add device using XIAO nRF52840 Device EUI
- Integration Configuration: Set up data forwarding to web application
- Deployment: Deploy device and monitor real-time data flow
Network Coverage: Helium Network's extensive infrastructure enables communication from remote forest locations, making this solution ideal for protecting vast wilderness areas.
📊 Data Transmission PipelineSimple data flow from forest sensor to web dashboard.
How Data Flows- Sensor Collection: Device gathers environmental data and AI audio classification
- Data Packaging: Information formatted as JSON every 15 seconds
- LoRaWAN Transmission: Data sent via long-range radio to Helium Network
- Cloud Processing: Helium Console forwards data to web application
- Dashboard Display: Real-time updates appear on monitoring interface
// Example sensor data sent every 15 seconds
{
"temp": 23.8, // Temperature in °C
"hum": 58.1, // Humidity percentage
"pres": 766, // Pressure in hPa
"gas": 51, // Air quality sensor
"light": 281, // Light level
"pir": 0, // Motion detection (0/1)
"ai_label": 2, // AI classification (0=Chainsaw, 1=Human, 2=Standby)
"ai_score": 0.89 // AI confidence level
}Technical Specs- Transmission Range: 10+ km in rural areas
- Frequency: 915 MHz LoRaWAN
- Update Interval: 15 seconds
- Payload Size: ~120 bytes JSON data
Real-time forest monitoring interface built with Next.js for comprehensive illegal logging detection.
Live Application: https://illegal-logging-detector-ultra.vercel.app/
The web interface provides a complete forest protection command center with real-time monitoring capabilities. The dark-themed dashboard displays all essential information in an intuitive layout designed for forest rangers and monitoring teams.
Key Interface ComponentsSystem Status Panel
- Online Status: Shows system uptime and connection health
- Detection Alerts: Real-time chainsaw and human presence indicators
- Last Update: Timestamp of most recent data refresh
Environmental Monitoring
- Temperature: 23.8°C for seasonal tracking
- Humidity: 58.1% for fire risk assessment
- Pressure: 766 hPa for weather monitoring
- Air Quality: Gas sensor readings for environmental health
- Light Level: 281 lux for day/night context
AI Detection Center
- Audio Classification: Shows detected sounds (Chainsaw/Human/Standby)
- Confidence Score: AI certainty level (89.0% shown)
- Motion Detection: PIR sensor status for presence confirmation
Interactive Map
- Geographic View: OpenLayers map showing sensor locations
- Zone Monitoring: Protected forest areas highlighted in green
- Real-time Markers: Sensor status with color-coded indicators
Activity Log
- Event History: Timestamped detection records
- Alert Management: Critical event notifications
- Data Export: Download capabilities for analysis
- Real-time Updates: 15-second data refresh intervals
- Responsive Design: Works on desktop, tablet, and mobile devices
- Alert System: Audio and visual notifications for critical events
- Data Processing: Intelligent multi-sensor fusion for accurate detection
- Offline Resilience: Handles connection interruptions gracefully
Built with Next.js and deployed on Vercel for reliable, fast performance worldwide.
📦 Final ProductOpen Case:Live System: https://illegal-logging-detector-ultra.vercel.app/
🎯 EPIC DEMO:Disclaimer: We ordered the PCB from NextPCB, but it got stuck in transit (customs and other services are infamous in Mexico), as soon as we get them we will add the Gerber files and some photos of it!













Comments