Close
0%
0%

Beehive Monitor

Keep tabs on your beehives with Home Assistant & ESPHome

Similar projects worth following
Having a beehive (or multiples) is a very rewarding hobby, and not just the possibility of obtaining some of the best honey you will ever taste! Watching your hive grow is half the fun, but opening your hive to see what’s happening more than necessary isn’t ideal. Having had bees off and on multiple times and having some components from a previous, but dead, open-source hive-tracking project I decided to make my own in time for our latest attempt at raising bees. A few simple sensors, a custom PCB and I have a live-feed of data on the health and daily comings and goings of my hive, with room to easily expand to additional hives in the future.

We (my wife and I) have had bees off and on for nearly a decade, and during that time I came across the open-source project HiveTool. It worked well-enough, but unbeknownst to me it had very recently become a mostly abandoned project right as I discovered it. A string of several bad seasons for our bees, and we decided to call it quits. Fast-forward to now, with a renewed motivation to give bee keeping a go again I decided I definitely wanted to pull data about our hive into Home Assistant. After verifying that the original project was still dead, I decided to essentially just re-create it in ESPHome and Home Assistant. Some strain-gauges (in my case, re-using existing ones I already had), a new temperature and light sensor, and an ESP32 (with an added external antenna) combined with a PCB I milled myself and I was ready to go.

In my case, one of the strain-gauges/load cells had been damaged by pests (a mouse decided to take the tiniest nibble RIGHT where there were some internal wires, but in a way where repair would be a nightmare/impossible). While I briefly considered buying a replacement or starting from scratch, I ultimately decided that while 3 gauges in 4 corners is less than ideal, the hive ‘should’ be fairly well-balanced and this entire project is more for fun than anything mission-critical, so I just cut the wire on the problem gauge and accepted that if the load shifts much my measurements will be off. Additionally, I’ve had good luck with the style of strain-gauges used in bathroom scales and I have a handful of extras (plus they’re pretty cheap), so if/when I add hives I’ll most likely use those.

After designing and milling my own PCB, I put all the sensitive bits in an outdoor enclosure I already had and connected everything. I opted to use phone-plugs for all of the hive-specific sensors (temperature and weight) in order to make it literally plug-and-play; ultimately, I found that the plugs on the strain gauges were a little finnicky (they are after all measuring incredibly small changes in resistance), and so if I were doing it over I’d probably just use screw-terminals for everything. Regardless, everything worked quite well and is much neater and cleaner looking than when I did this previously. I also already have a weather station at my house (which is where the hive is located), so I have outdoor temperature (and rain, which I might play with too) that I can use as well.

For the data-visualization piece, I settled on using the ‘apexcharts-card’ as the native graph card has a lot of limitations, especially when using multiple sensors with different values. After spending an evening playing around with the options, I ended up with something that I’m pretty happy with. 

Obviously the hive doesn't way 800lbs!

While testing everything out in my garage, it all worked perfectly, but I also only had a few weeks between starting the project and implementation. About a week before our bees arrived, I set it up outside and while initially everything seemed to work as-intended, after a few days I noticed my weight readings were WAY off. Suspecting the phone plugs (I’m using a phone line splitter to combine the strain gauges as well as then connecting the combined connection to the PCB), I gave them a good jiggle or two and got more reasonable readings again, but shortly after ended up with the same issues. My suspicion is that weather conditions are enough to subtly change the connection properties of the phone plugs (since they’re basically just held connected with tension), and since I’m measuring very tiny changes in resistance this is throwing my readings off measurably. My current plan is to ditch the phone line splitter and solder the wires together, but that will still leave me with a phone plug on the PCB in addition to the shortcomings of my strain gauge setup (3 of the 4 gauges working and a more flexible mounting mechanism than I’d prefer). I’m not very hopeful that this will completely eliminate my strain...

Read more »

View all 9 components

  • Improved Strain Gauge Readings!

    Ben Brooks17 hours ago 0 comments

    A few days ago I finally had some free time to rewire the strain gauges and remove the splitter phone plug connections; I ended up simply stripping the wires and soldering them together using heat-shrink solder connectors. This meant I went from 5 phone plugs to just the single one on the PCB. I figured it would improve things, but only somewhat and that I would still need to ultimately either solder the wires to my board (or in a future PCB design, use screw terminals). Surprisingly, the readings immediately fell in line with what I would expect based on my previous calibrations (obviously I can't truly calibrate things, because there's an active beehive on the scale now). Even better, I played around with the phone plug and didn't get any wild changes in readings like I had previously with the other connections. It currently shows ~15lbs of bees, comb, honey, etc. which seems reasonable and when I added a known weight it increased by this amount. In the days since, it's also stayed relatively consistent; while there is a fair bit of noise in the data over time, I've found that if I use a healthy average it stays quite consistent too (found a 12 hour average works well, but am now trying smaller averages to see how low I can go). Time will tell if it continues to work well; I'm still planning to begin designing and testing a new scale for any future hives (and possibly for this one if my existing scale appears to fail again) using bathroom scale-style strain gauges I already have.

View project log

Enjoy this project?

Share

Discussions

Steven Bell wrote 05/06/2024 at 14:53 point

Super cool!  It sounds like you're a couple years ahead of me -- my wife had bees for three years but they never made it through the NH winter.  So we're taking a break until the kids are old enough to help, and I'll definitely take another attempt at remote monitoring when we try again!

I've heard that one major problem with load cells is that the measurements aren't stable for long periods of time... with a normal bathroom scale, it can get a zero reference before you step on it, and you only need the measurement for a few seconds.  But over several weeks, the numbers will wander all over the place.  I'm pondering whether some other method might actually be more accurate, maybe even a mechanical balance harvested from a scale?

https://makezine.com/projects/bees-sensors-monitor-hive-health/ 

  Are you sure? yes | no

Ben Brooks wrote 05/11/2024 at 00:21 point

Yeah, our first hive was a swarm that showed up in our backyard and even gave us a ton of honey the first year. Unfortunately, they got slimed by hive beetles the second year and every bought hive we've gotten since hasn't survived a year. Rather disheartening, but we keep trying.

I'm definitely aware of potential drift, and while I have seen some in other projects I've done, I've also had pretty good readings for years at a time. I'll be curious how my version 2 of this does when I replace the strain gauges/connections.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates