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.
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:
- Alert me using SMS or email if the sensor readings go beyond certain parameters
- Measure the weight of the hive so I can get a sense of how much honey and brood (baby bees) is in the hive
- Monitor the activity of the hive entrance
- Monitor the frequency of the buzz of the hive
- Detects movement (due to wind blowing the hive over or vandalism)
I started off with a standard Arduino Duo and a DHT22 temperature and humidity sensor.
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!)
Solar and GSM shields
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.
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.
Debugging in the field
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.
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...
Trying to push things further https://www.ulule.com/open-source-platform-beehive/
Keep up the good Work Everybody