## 🐝 About DynamicBees
**DynamicBees** is an open-source, "FAIR-by-design" automated ethology and smart-garden monitoring kit designed to track insect behavior, dynamics, and environmental stressors. Unlike conventional systems that rely solely on species identification or heavy data compression, DynamicBees focuses on the **temporal dimension of behavior** and continuous micro-doppler/video recording.
To preserve absolute data integrity for complex ecological analysis, **our hardware performs no mathematical trajectory compression (such as TDA)**. Instead, raw video streams, audio data, and high-frequency radar metadata are safely stored directly onto high-capacity local storage (eMMC/SD) upon behavioral trigger confirmation.
---
## 🛠️ System Architecture & Hardware Stack
The project is built around the powerful **ESP32-P4** dual-core microcontroller, using a dual-path pipeline (Fast Path on Core 0 for real-time inference, Slow Path on Core 1 for bulk storage and logging):
1. **Wake-up Sentinel:** 24 GHz mmWave Radar (LD2410C) connected via GPIO 4 to wake the system upon movement.
2. **High-Precision Target Analysis:** 60 GHz mmWave Radar (SPI bus) for micro-doppler wingbeat frequency extraction and 3D spatial positioning ($z$-axis).
3. **Audio Capture:** I2S Digital Microphone for acoustic wingbeat frequency analysis (Goertzel & FFT algorithms).
4. **Vision & Edge AI:** H.264 Camera module managed via SCCB/I2C for lightweight FOMO/vision scoring.
5. **Environmental Context:** T/HR Sensor (I2C) tracking ambient temperature and relative humidity.
6. **Storage:** High-speed eMMC storage (SDMMC bus) preserving raw `.h264`, `.pcm` (audio), and `.meta` binary logs.
7. **Power Management:** Software-driven power-down (`PWDN`/`EN`) pins to completely shut down power-hungry sensors and enter deep sleep during inactive periods, maximizing energy efficiency.
---
## 🧠 Algorithmic Pipeline
- **Core 0 (Fast Path):** Continuously processes low-level sensory inputs (Audio Goertzel filters, 60GHz radar ramps, and lightweight vision inference). A **Bayesian Confirmation Network** evaluates the combined probabilities ($P(\text{Bee} \mid \text{Sensors})$) against a configurable threshold.
- **Core 1 (Slow Path):** Triggered only upon target confirmation. Manages circular buffers in PSRAM, flushes pre-trigger data, and streams synchronized multi-modal data streams directly to the eMMC storage files until target loss or session timeout.
Henri