It’s been a slow process, mainly because of the time it takes to order, receive and experiment with different bits of kit, but I feel like I’m making progress on the bee hive monitoring project.

Ambition
My original aim was to create a self contained monitoring platform that would enable me to record the temperature and humidity of my bee hives.

Temperature can be a really good indicator of the health of a colony, and may provide an early indication that the bees are about to swarm (temperature can spike just before a swarm). This is useful, as the beekeeper can take steps to prevent the swarm from happening, rather than loose half his bees to a neighbour.

Contrary to popular belief, cold weather doesnt kill bee colonies - bee colonies are pretty good at thermoregulation as long as the climate isn’t too extreme. What does do them damage though is dampness, hence my interest in monitoring the humidity of the hive.

So my MVP is a package that can record these two readings and upload them to a platform like Xively.
Beyond this, I would like a system that can:


Equipment
I started off with a standard Arduino Duo and a DHT22 temperature and humidity sensor.

image

DHT22

There are a good number of tutorials (https://learn.adafruit.com/dht/connecting-to-a-dhtxx-sensor) and a library (http://playground.arduino.cc/Main/DHTLib) that quickly enabled me to get readings from the sensor.

Having successfully received data from the DHT222, I started looking at how I could get these readings online.

Since the hives are in a field, several miles from my wireless router, I needed to look at a stand alone solution. Enter the GPRS shield; paired with a GiffGaff SIM, it proved relatively straight forward to send data to Xively.

With no power comes great responsibility
The elephant in the room throughout all this though, is the power requirements.

This combination of Arduino, GSM/GPRS shield and sensor works perfectly whilst plugged in to mains power, however a 9v battery lasts approximately 2 hours before losing charge.

Enter the Seeed Studio solar shield: (http://www.seeedstudio.com/wiki/index.php?title=Solar_Charger_Shield_v2.0b). This amazing bit of kit plugs into and manages the power to your Arduino. Plug in a solar panel and a lithium polymer battery and, in theory, you have a self contained self powering unit. Arduinos and GSM shields use a lot of power though - so I have been experimenting with the a power save library (https://github.com/n0m1/Sleep_n0m1) to see if I can effectively put the Arduino to sleep between sensor readings - early tests were positive, but I am going to rewrite the sketch to fix problems I am having with the GSM connection not closing before the Arduino goes to sleep (if it’s actually going to sleep!)

image

Solar and GSM shields

Live test

This weekend I introduced the sensor between the centre good frames of my recovering hive (read http://marccurtis.tumblr.com/post/90468223611/the-queen-is-dead for more info on this) and left it ticking away.

image

image

It quickly became evident (once I got home) that the Arduino wasn’t sending the data - so, back at the hives, one debugging session later I had the unit broadcasting.

image

Debugging in the field

image

Xively feed

The sleep function and power management need to be fine tuned, but the results so far have been great. I can see that the bees are maintaining a hive temperature of around 34deg. It will be interesting to see how this fluctuates once the weather gets colder and the brood starts to decrease.

image

Code for the Arduino on GitHub - https://github.com/exmonkey206/beehive_monitor/

Other bee projects
Ken’s (http://www.hackerbee.com/) sensor package is of the most interest to me, as his main focus has been to record the weight of his hives. His needs are a little different, since his hives are within wireless range of his house. My hives are in [the] field, several miles from my house.

Another promising project is the Open Source Beehive Project (http://www.opensourcebeehives.net/) - These guys are developing a range of laser cut hives (although not of the type I use, Langstroth) and are integrating sensors that send data to http://www.smartcitizen.me.

Next stepsOnce I’ve rewritten the code for the platform, I’m going to start adding some of the other features. The summer is almost over, and my bees will be retreating into the hive for the winter. My aim is to have a more finessed system in place for the spring.