I started beekeeping in the Spring of 2012. That winter I lost one of my two hives and I wanted to know if that could have been prevented. I’ve always had a strong interest in data visualization and I recently got into Arduino development. Naturally jamming some sensors into my hives and graphing the output was on my mind.

I began experimenting with the Arduino Fio. I was attracted to this model because it has an onboard XBee socket and can be programmed remotely. Additionally the Fio is a 3V device so it would need a little less power than something like an Uno. Following a great tutorial I was able to get the Fio running wirelessly and use the built-in watchdog routine to save power. My original goal was to run the whole kit off of a LiPo battery and a solar panel. The solar charger board from Adafruit would allow me to tie it all together.

With the Fio running I set about collecting sensors. I grabbed a few DS1820Bs and DHT22 sensors. I quickly learned the value of a quality sensor. The DS1820Bs are much more accurate and reliable than the DHT22. During testing I had 3 DHT22s running side-by-side and there could be as much as 2º F difference between them! Unfortunately due to the added complexity of putting a DS1820B and DHT22 in each frame I decided to use just the DHT22. I think this was a fine trade-off as I’m less concerned about accuracy and more concerned with trends.

Once I had the platform able to gather data I put together a ruby script to run on a host machine (a raspberry pi) and forward the data up to various IOT services. I experimented with EmonCMS and Sen.se. The first is open-source and seems to be evolving rapidly. The second is purpose-built for sensor data but I found their Web UI very confusing. Both services suffer from far too much indirection in the flow of data. First you set up a feed, then you set up a logger, and then there’s more steps for configuring visualization. It’s just too much to manage. I want to be able to send arbitrary key-value pairs to a service and then get the data back out. Stathat does this better than anything I’ve seen.

At a certain point I came across the Seeeduino Stalker board. This little gem is designed to do exactly what I wanted to do. It’s got built-in XBee, RTC, and an SD card (which I don’t use). They sell a great kit that would have you up and running very quickly.

The next piece of the the puzzle was getting the sensors into the hive. I used the instructions at Bee Hacker as a starting point and used steel mesh instead of copper.

Building the wire harnesses was the hardest part of this whole project. I knew that I wanted to be able to easily disconnect the frames in case I needed to get into the hives. I chose some water-proof connector cables as well as a waterproof power box to keep things tidy. Instead of hardwiring everything together I used a solderless breadboard and I made some connectors using header pins and hot glue (patent pending). Everything got attached to some fiber board and set inside the box

tumblr_inline_mmepsbizRT1qz4rgp

In the end, I decided not to try and power everything from a solar panel so I ran an extension cord out to my hives and hacked up a power supply for the whole thing. The main impetus for switching to wired powered was so I could add a bee counter to the mix. The counter draws about 75mA and I wanted it running continuously to get accurate readings.

While working on this project my company released a product called Status Board for the iPad which has some really nice graphing features. It’s the perfect way to display data from your hives.

tumblr_inline_mmfzcadJGl1qz4rgp

In the end I don’t know if all of this will help my bees but it was a great learning experience.

Arduino and Ruby code on Github

Collecting data from your beehives