Monitoring bees with a Raspberry Pi and BeeMonitor
Keeping an eye on bee life cycles is a brilliant example of how Raspberry Pi sensors help us understand the world around us.
Getting to design and build things for a living sounds like a dream job, especially if it also involves Raspberry Pi and wildlife. Glyn Hudson has always enjoyed making things and set up a company manufacturing open-source energy monitoring tools shortly after graduating from university. With access to several hives at his keen apiarist parents’ garden in Snowdonia, Glyn set up BeeMonitor using some of the tools he used at work to track the beehives’ inhabitants.
“The aim of the project was to put together a system to monitor the health of a bee colony by monitoring the temperature and humidity inside and outside the hive over multiple years,” explains Glyn. “Bees need all the help and love they can get at the moment and without them pollinating our plants, weíd struggle to grow crops. They maintain a 34∞C core brood temperature (± 0.5∞C) even when the ambient temperature drops below freezing. Maintaining this temperature when a brood is present is a key indicator of colony health.”
Wi-Fi not spot
BeeMonitor has been tracking the hives’ population since 2012 and is one of the earliest examples of a Raspberry Pi project. Glyn built most of the parts for BeeMonitor himself. Open-source software developed for the OpenEnergyMonitor project provides a data-logging and graphing platform that can be viewed online.
The hives were too far from the house for WiFi to reach, so Glyn used a low-power RF sensor connected to an Arduino which was placed inside the hive to take readings. These were received by a Raspberry Pi connected to the internet.
At first, there was both a DS18B20 temperature sensor and a DHT22 humidity sensor inside the beehive, along with the Arduino (setup info can be found here). Data from these was saved to an SD card, the obvious drawback being that this didn’t display real-time data readings. In his initial setup, Glyn also had to extract and analyse the CSV data himself. “This was very time-consuming but did result in some interesting data,” he says.
Sensor-y overload
Almost as soon as BeeMonitor was running successfully, Glyn realised he wanted to make the data live on the internet. This would enable him to view live beehive data from anywhere and also allow other people to engage in the data.
“This is when Raspberry Pi came into its own,” he says. He also decided to drop the DHT22 humidity sensor. “It used a lot of power and the bees didn’t like it – they kept covering the sensor in wax! Oddly, the bees don’t seem to mind the DS218B20 temperature sensor, presumably since it’s a round metal object compared to the plastic grille of the DHT22,” notes Glyn.
The system has been running for eight years with minimal intervention and is powered by an old car battery and a small solar PV panel. Running costs are negligible: “Raspberry Pi is perfect for getting projects like this up and running quickly and reliably using very little power,” says Glyn. He chose it because of the community behind the hardware. “That was one of Raspberry Pi’s greatest assets and what attracted me to the platform, as well as the competitive price point!” The whole setup cost him about £50.
Glyn tells us we could set up a basic monitor using Raspberry Pi, a DS28B20 temperature sensor, a battery pack, and a solar panel.
20 comments
levi
coolest thing everrrrrrrr!!!!!
scruss
Neat! Looks very similar to what the folks at HiveSense have been doing. And yes, they have Raspberry Pis in there too: https://twelvedot.com/hivesense/
It seems that bees in Wales and Canada both agree that if they don’t like a sensor, it gets the full wax coating.
Norman Dunbar
Interesting. I kept bees for a number of years until my wife became allergic to bee stings. I would have thought that the bees would have covered anything inside the hive with propolis as opposed to wax. Mine did. I have seen photos of a mouse carcass inside a hive, “mummified” in propolis.
Propolis is a sticky resin based substance bees use to fill in cracks and holes etc in the hive. It’s brown and sticky. And a right pain to clean off your hive tools. (In case anyone was wondering what I’m on about.)
Cheers,
Norm.
Daniel Dodson
The DHT22 casing IIRC has a matt finish so it would be easy for them to crawl on. I suspect the metal temperature sensor can is going to be too slippery for them. I saw a programme on daffodils and why bees generally aren’t interested in them. The theory (unproven at that time) was that they cannot grip the petals, however there was a dwarf variety called ‘tete a tete’ where the petals were slightly rougher and bees suddenly took interest. Similarly I’ve seen people use shiny galvanized nails in the end of brood/super frames when the lugs have broken off and they don’t seem to attract propolis, so I suspect the slippery metal might be the reason the temperature sensor doesn’t get covered.
steve
This is just wonderful — what a fantastic project, and a great write-up for the blog. I would love to see more about projects like this one.
John Nalezny
I put a raspberry pi with a temp/humidity sensor in a quiltbox on by beehive. So only 1 sensor, not inside the hive, but in an area where hive air can get. Unfortunately my bees didn’t make it through the winter, but you can definitely tell when there are living bees in the hive. When they are alive the humidity level is constantly jiggling, and when they were not the humidity moves very slowly. You should be able to get a lot more data than I did! Good luck.
Seoit
It is intresting and wonderfull!
Eug
Cool project… funny thing is I got the idea for a similar project – logging weight, temperature and humidity in my hive. I start doing research and get the feeling there are other people doing this too judging by the comments sections when I’m looking for sensors etc. I eventually get the pi delivered today, come to this site to download noobs and presto…. I see this post lol. Cool project. Hope I can check it out for some tips and pointers ;-)
Errol
DS218B20?
DS28B20?
Are you sure that isn’t DS18B20?
Martin Kendall
Teflon coatings could help. Using Teflon tape which is porous may still allow humidity measurements and reduce the propolising activity.
Ewald
Perhaps a BME280 sensor is a good solution, it’s I2S so easy interfaced with good software support. And apart from temperature and humidity it also provides barometric pressure.
Also LoRaWAN is a great solution to provide real-time data when there is no wifi, the sx1276 modules are cheap nowadays.
Bernhard
May be rasperry pi cam with a macro lens to monitor the entrance would be a fine add on.
Best regards
Bernhard
john
I was considering a lethal gatekeeper which would allow bees to pass but would whack hornets.
JohnoFon
You might get away with putting sensors above the crown board with Porter escapes fitted to keep the bees away from them. It’s a bit like putting them in the window to measure the air escaping, though.
wezwijfachowca
It is interesting and wonderfull!
Strony internetowe
Nice blog. I love Raspberry :)
Naprawa pralek i zmywarek
Wow! Very good site, I bought my first Raspberry Pi :D
Perfumy damskie
PI is the best!
Komornik Warszawa Śródmieście
It is intresting. Fantastic project!
LepszySerwis.pl
Yes! Raspberrypi is always great piece of hardware :)
Comments are closed