HappyBees: Distributed IoT Beehive Monitoring System

Inspiration
This project was born in Latvia from a happy accident. A wild swarm landed in our tree and suddenly we were "accidental beekeepers." One hive quickly turned into eight.
As hobbyists, we cannot check on the hives every day. We wanted a way to keep an eye on them without disturbing the colony. We are curious and we love data, but the rainy seasons revealed a disconnect. We had no idea what was actually happening inside the box during critical times.
This disconnect is not just a hobbyist's frustration; it is a global blind spot. We rely on bees for $577 Billion of the global economy annually. This is a massive impact, yet we cannot speak their language. We usually find out a colony is starving or diseased only when we physically open the hive. By then, it is often too late or impossible during freezing winters.
We tried to find a commercial solution, but the market is broken. "Dumb" IoT toys that just measure temperature cost around €300. Industrial solutions with weight scales demand €700-900 per hive. For a hobbyist with eight hives that is simply infeasible.
Instead of a thermometer we needed a translator. We needed a system that cost under $50, could survive a winter and provided real intelligence to help our bees survive and thrive.
What it does
HappyBees is a distributed IoT beehive monitoring system. It uses Edge ML on a Raspberry Pi Pico 2 W to detect hive health events via acoustic analysis and weight monitoring.
Instead of sending raw audio to the cloud the device processes everything locally. It uploads only critical telemetry to a local Raspberry Pi 4 central hub. This architecture allows for efficient multi-hive management without needing a SIM card for every device.
It features two distinct operating modes based on biological seasons:
- Summer Mode (Activity Monitor): Detects high-energy events like Swarming or Queen Piping. It calculates a "Spike Ratio" by comparing current audio energy to a historical rolling average.
- Winter Mode (Anomaly Detector): Monitors the "Winter Cluster." Bees vibrate to generate heat which creates a specific acoustic hum. The system flags if the cluster breaks or "heater efficiency" drops which indicates starvation or death.
How we built it
We built a prototype hardware layer and a full-stack local IoT system (Firmware, Backend, Dashboard) designed for off-grid reliability.
1. The Hardware & Sensors

- We used the Raspberry Pi Pico 2 W as the brain. Its Arm Cortex-M33 architecture offered the perfect balance. It is powerful enough for DSP and inference but low-power enough to run on batteries.
- Audio: We built a custom circuit using an SPW2430 MEMS Microphone fed into a TLC272 Dual Op-Amp. We designed this amplification stage to get the signal usable for ML.
- Environmental: We used SHT20 for temperature/humidity and load cells for weight.
2. The ML Pipeline (Edge Impulse)
We have a mixed background in data science and embedded C development. We used Edge Impulse to bridge that gap.
- Summer Model: We iterated 7 times to tune a model that detects "spikes" in activity relative to the hive's specific background noise.
- Winter Model: Since we didn't have enough data on "dead" hives we pivoted to Anomaly Detection. We trained an Autoencoder only on "Healthy" data. If the hive sounds "alien" (high reconstruction error) it flags an alert.
- Deployment: We used the Bring Your Own Model (BYOM) workflow to export our PyTorch models as optimized C++ (TensorFlow Lite for Microcontrollers) libraries that run efficiently on the Pico 2 W.
3. The Local Hub
To avoid paying for 8 SIM cards all Picos talk over Wi-Fi to a local Raspberry Pi 4 Hub running a Python FastAPI backend and a Dash frontend.

Challenges we ran into
- The Physical Reality: Hardware is unforgiving. The microphone signal from the SPW2430 was too weak for our initial setup. We had to integrate the TLC272 Op-Amp and learn how to manage gain control and noise floors manually.
- Construction: We don't have an industrial lab. Our casing is a "functional prototype." This means a lot of hot glue, soldering passive components by hand and ensuring wires don't short out in the damp environment.
- Data Scarcity: Real-world data is messy. We didn't have recordings of "catastrophic failures" because good beekeepers prevent them. This forced us to innovate with the Anomaly Detection approach. Instead of teaching the AI what "death" looks like we taught it what "health" looks like.
- Cold Start Logic: The Summer model struggled with "fresh starts." With no history the spike ratio calculation would output
1.0(steady state) which sometimes triggered false positives. We had to build robust buffer logic to handle initialization.
Accomplishments that we're proud of
- Democratizing Bee Tech: We achieved a Bill of Materials (BOM) under $50. This makes advanced monitoring accessible to the hobbyists who manage the majority of the world's hives.
- Edge Intelligence: We aren't just sending raw audio to the cloud. We are running complex DSP and Autoencoders on the device. The Pico 2 W analyzes the sound and only reports the insight.
- The "Silent" Design: By using a local hub and edge processing we created a system that respects the low-power/low-bandwidth constraints of rural fields. Stay tuned for a LoRa version soon.
What we learned
- Real World vs. Ideal World: We learned that real life does not offer ideal precision or conditions. We had to accept that sensors drift and noise happens. We focused on making our software and ML robust enough to handle these imperfections rather than chasing hardware perfection.
- The Power of Arm Cortex-M33: We were surprised by how much compute we could squeeze out of the Pico 2 W. Running spectral analysis and neural networks locally is a massive step up from the "dumb" sensors we started with.
What's next for HappyBees
- Validation: We want to collect more data from different climates and environments to verify if our Anomaly Detector holds up across the world.
- Hardware Refinement: We need to move from hot glue to 3D-printed weather-sealed enclosures and custom PCBs to ensure long-term durability.
- Sensor Experiments: We plan to experiment with different load cells and sensors to find the best balance between quality and price.
Log in or sign up for Devpost to join the conversation.