Smart Beehive with M5StickC
Devilstower last edited by
I'm a bee keeper in the U.S. in an area that has cold winters, hot summers, and problems with pests all year round. So I'm trying to build a "smart beehive" that keeps track of a series of items:
Minimum feature set
- Temperature and humidity outside the hive
- Temperature and humidity inside the hive
- Orientation of the lid
- battery / solar panel
- Option to connect to local WiFi
Better feature set
- Volume / pitch from the microphone
- Weight of the hive box
- Camera + red light LED strip
I have a version of this up and running already using an ESP32 (a couple of different versions, but the latest is an Adafruit S2 "feather"), a triple-axis accelerometer, OLED screen, 2 DHT11 temp/humidity/pressure sensors, a little MEMS microphone, and an ArduCAM Mini. It works, but it's far from ideal. Battery management is messy. The camera doesn't do well (i.e. barely registers anything) in dim light, and mostly the whole thing is a whopping mess of wires and breadboards that lasts about a day before the bees turn it all into a goop-filled mess.
The M5StickC and it's ecosystem looked like a way I could neaten all this up and, along with some 3D printed covers and a hot glue gun, give myself a system that would stand up to at least a few months of bee-monitoring.
What I had imagined was a system that looked like this:
- M5STICKC-18650 battery cap
- ENV II sensor (x2)
- MEMS Microphone
- Mini Weight Unit (x2) + load cells
On top of the hive, I placed a solar panel that feeds into the 18650, then connected the hub to the M5StickC. I can connect then two ENV II units to the hub and ... then I'm suck.
Here are my current problems:
- I can't figure out how to physically connect the Weight sensors without removing the battery hat, which ... doesn't work for me.
- I had hoped to use UI Flow rather than the C I was using on the existing system, but there are two immediate problems:
2A. I can't see a way to bring the system up in WiFi_Sta ("host mode") so that I can either offer to detect available WiFi networks or run disconnected (a critical feature).
2B. There doesn't seem to be any support for any form of microphone in UIFlow.
- I'd really like to connect a camera and LED strip to provide lighting, but this seems to introduce problems both in the "how do I connect it" and the "how do I control it" categories.
I can always solve the software problems by going back to C. But that's a shame, because UIFlow is so easy to follow and looked like it would be nicer to maintain. But that doesn't solve my hardware connection problems.
Any tips on how to make progress appreciated.
(NOTE: I've started this a couple of times, but can't find my previous posts. Unsure if they've been deleted, or if the search just isn't bringing them up. So ... apologies if you've seen this before.)