Honey Bee Tracking Box

My school is kind of strange. We don’t have a cafeteria, but we do have a four week course on “The Simpsons.” We don’t have a jungle-gym on the elementary playground, but we do have a half-buried firetruck.

We don’t have a football team, but we do have a bee-keeping club. It’s pretty awesome.

This year I decided to do some cool experiments with honey bees. This project uses 12 temperature probes placed throughout a beehive to track the movement of honey bees over the course of several weeks. The project is completely solar powered, weatherproof, and can log months of data onto a 1GB memory card. I wouldn’t have been able to build this without the parts supplied by the bee keeping club. Thanks, Magnus!

Parts you’ll need (in no particular order):

TOTAL: $328.65 + Shipping (if you’re getting everything new)

Here’s the code. It’s a bit silly in parts — in particular realize I define each sensor individually and refer to them one by one instead of throwing them into an array. The parts for the SD card may have to change a little depending on what shield and Arduino you use. Because I used a Mega here, I had to do a bit of a work around to get the SD shield to work without modifying it, so it could probably be simplified further.

First, I measured and drilled holes for the 13 cable glands. 5 on each side with two on the front for the temperature probes, and one on the back for power.

The outermost cable glands had a nut on the inside that ran into a support post. I just cut off part of the outside of the nut to make it fit – it shouldn’t compromise the seal too badly, and should survive splashes just fine. Hopefully this thing won’t end up entirely underwater.


After that I brought the end of each temperature probe through its gland.

Then I began wiring up the buses that will power all the temperature probes. I had some extra screw-terminal blocks around, so I put them all in a row and soldered the leads together to make two buses: one for 5v, one for ground.

There should only be white (signal) wires left from the temperature probes. I insulated the bottom of the terminal blocks with electrical tape so they don’t short out with each other.

Next I wired each signal wire to the SD card shield. Pictured is a Sparkfun SD card shield. In the parts list I linked to an Adafruit shield, as that’s what I recommend buying (and what I ended up actually using). The Sparkfun shield was a huge pain. Don’t use it. The Adafruit shield also has a RTC (real time clock) module built in, so we can timestamp our data points more accurately, even after power gets cut out. I highly recommend it.

Because these temperature probes work on the digital, one-wire bus system (where each probe has a unique address), all of the signal wires get tied together and brought to a single digital pin on the Arduino. I chose to use pin 3.

Then I used a 4.7K pull up resistor on the signal wires, tying them to the 5v supply on the Arduino. I also connected the power busses to 5v and ground at this time. Now you can slap your Arduino on there!

As I mentioned before, you’ll see an Arduino Mega pictured, but this was unnecessarily powerful for this application. In fact, a lower power chip would probably be superior. If you end up connecting more sensors, however, a Mega might be useful.

Next I began the wiring for the power supply. This was really simple. After soldering the large capacitor onto the charging circuit (leaving lots of extra lead so that it could save space by bending the capacitor over), I connected the charger’s load output to the boost converter, and the 6V charger input to the solar panel. I also extended the solar panel’s wires; this ensures that when we bring the box out to the hive we can place the solar panel somewhere with as much sunlight as possible.

Next, I connected the power out from the USB connection on the boost converter to the DC in jack on the Arduino. Make sure to add a power switch so you don’t have to disconnect the solar panel whenever you want to program the Arduino.

I placed all of the power circuitry in an anti-static bag to avoid any short circuits.

This was a pretty fun, straightforward project. Of course, the board can get pretty power hungry when driving all those sensors, so you shouldn’t use this setup in mission-critical situation where powering off would be a disaster. Indeed, the code could probably be optimized to be more power efficient. But if you’ve never done a weatherproof project before, this one is highly recommended!

This entry was posted in project.

12 thoughts on “Honey Bee Tracking Box

  1. Pingback: Honey bee temperature logger tracks internal hive movement - Hack a Day

  2. Pingback: Belgaum news | About Belgaum | Belgaum information | Belgaum district | Belgaum city | Belgaum Hotels | Belgaum People | Belgaum tourism | Belgaum entertainment | Belgaum students | Inside facebook | Hack | make use of | technical news | | Honey bee tempe

  3. its a bit expensive only for measuring temperature :P

    also the DS18B20 its a pretty precise (and expensive) temperature sensor i think you could have just used the inexpensive lm35 sensor and to reduce the number of ADC channel an simple analog mux

    anyway nice (expensive) project :P

  4. Hey Max, great work!

    I’m working on a similar project to monitor hive temperature and weight next year so I can add hive weight data to NASA’s Honey Bee Net program ( http://honeybeenet.gsfc.nasa.gov/ ).

    I’ve skipped most of the weatherproofing as bee hives aren’t generally dripping wet inside. This lets me design in 9 DS18B20 temp probes per box for significantly less than a single waterproof temp probe (order in bulk on ebay for great prices direct from China). Of course, it’s not uncommon for honey to drip down between frames, so I might find the network shorted out at some point, but I’m betting that some heat shrink will protect the sensors from the rare drop of honey until the bees suck it back up.

    I originally designed the hive to log to an SD card, but I’ll have real-time access to the data (and notice if anything is wrong) by logging the data directly to the web. This isn’t too expensive if the system is within a few hundred feet of an electrical outlet as you can use XBee repeaters ($25 each) to transmit the data to the nearest ethernet network via a ConnectPort X2 ($100). You could even log directly to a computer and skip the ConnectPort if you want to mess with programming and deal with power outages (restarting the computer).

    Finally, weight is one of the most useful data in the summer, and I’d strongly suggest adding a scale for next spring if you can. I’ve got a $160 scale that “just works” in that you send it a short string “G\r\n” on one wire of a serial cable and it sends back around 10 ASCII characters giving the weight. It takes 9V DC power and as an industrial scale, it’s stable over a wide temperature range.

    I bought an industrial scale I knew would work (from previous work) but I’ve seen some very similar scales as cheap as $80 that should work just as well, and you could go as low as $50 if you get a cheap version that doesn’t have a serial cable (meaning you’d have to hack the scale to read out weight).

    I plan to house all the electronics (except the temp probes) under the hive in a shallow super-sized box. With an overhanging cover, it should be able to stay dry while allowing the scale to function (unless the area floods of course).

    I run the whole thing with an Arduino Fio that goes into sleep mode via the “narcoleptic” library and draws very little power between measurements. I’d originally specced an Arduino Uno, but the power consumption of just the DC regulator really kicks up the cost of the solar panels!

    I’ve got the system running on a breadboard, and I’m about ready to start putting holes into the expensive scale, but my scope creaped when I saw the instructable on bee counting! I’ve been talking to Tom and we have some ideas to bring down power consumption, and we’ll see where that goes.

    I’d love to chat more — send me an email if you’re interested. I’ll also be looking at your code (thanks for posting it! I’m pretty new to Arduino, and my coding gets much better every time I see something similar to what I’m doing! I guarantee I’d learn a lot just seeing how someone else solved the same problems I face!

    Thanks for the great photo documentation!

      • Sure dusan, I’ll send this via email too, and be sure to let me know if you try any of these scales. I’d love to swap info and get an idea of what to expect as I try to reduce cost for future designs!

        I am currently hacking an Adam Equipment CPWplus200 as suggested by http://hivetool.org/ I haven’t yet tested it as extensively as I’d like, but I suspect that scales marketed as industrial postal scales must be temperature compensated as I didn’t note any drift in a relatively short test (over a few days) of 200 lbs from 60F to about 100F. That scale can be purchased here: http://www.americanweigh.com/product_info.php?cPath=21&products_id=747

        I’ve also been eyeing this scale that looks like a cheap knock-off. Again, it’s important to actually test to make sure it’s compensated for temperature variation (as load cells vary in output with temperature) but it’s not THAT cheap at $80 and it’s got the same features as the ADAMS scale so I suspect it’d work the same.
        http://www.globalindustrial.com/p/packaging/scales/shipping-receiving/digital-shipping-receiving-scale-with-ac-adapter

        Finally, i haven’t spent much time researching the cheapest scales as I’m just now getting to transferring my breadboarded prototype into the ADAMS scale. I suspect there’s something cheap and acceptable out there, but since none of these scales advertise temperature compensation and 24/7 use, I’d either have to get lucky and talk to an actual design engineer or simply buy one and see for myself if it holds accuracy over temperature and humidity swings. Amazon has a good selection of dirt-cheap postal scales. While I wouldn’t bet money that they all meet hive monitoring needs (or even work for valid postal measurements) I do suspect that there’s something out there that will work. Here’s an example of a sub-$50 scale that almost certainly doesn’t have an RS-232 output (so it’d have to be hacked further to get the weight out) but otherwise SEEMS like a similarly capable 440 lb postal scale:
        http://www.amazon.com/Digital-Postal-Platform-Weight-Shipping/dp/B007263E3K

  5. Pingback: Honey Bee Tracking Box | Max Justicz « adafruit industries blog

  6. Pingback: Some awesome temperature logging projects! | Hacker Bee

  7. Pingback: Hacker Bee

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>