Both Hives Dead Again

I trudged out through the snow to check on my hives and I found them both dead!  It looks like one was nearly empty, as if the bees didn't like my winter preparations and left just after I last worked on it.  The other had a tiny clump of maybe 100 bees at the top -- much too weak to stay warm through the winter!  I don't know why they got so weak, but my guess is Varroa mites, something I didn't treat for again last year.

Transient

Again, I've got a ton of honey left, so I certainly won't have any trouble feeding the two new packages I expect in late March!

Communicating with the MCP3551

Finally, I made some major progress on the bee hive scale!  I've spent the last couple months learning to program PIC microprocessors in C via the MPLAB X IDE, but while I felt like I was really getting the hang of PIC programming, and I was fairly confident with my bit-banged SPI functions, I wasn't seeing any data in the debugger!  I finally ordered a Bus Pirate logic analyzer and some wildly expensive probes that can grab the over-soldered pins of my SOIC chips to give me a look into the voltages on the pins that were SUPPOSED to be communicating.

Once I correctly configured the Bus Pirate and got all the micrograbbers in the right place, I immediately saw a signal!  The MCP3551 IS in fact taking a measurement on command and reading it back when sent a clock signal by the PIC.  In the following picture, the third line is the clock signal (sent from the PIC) and the second line is the data being read back -- the first 2 bytes are all 0s (low voltage) because it's not actually connected to any load cells.  I never really nailed down what the first and fourth lines were (one is CS and the other is probably just picking up cross-talk and confusing me since it's not hooked up to anything.)

MCP3551_SPI.PNG

After talking to a helpful fellow at work (thanks a lot Jon!) I suspect that I'm using the MPLAB X debug function incorrectly or assuming something about the in-circuit debugging that isn't quite right.  Either that or I've failed to properly set up the data input pin.  I'll be checking that by having the PIC output voltages on a couple other output pins that I can tie to LEDs for simple visual debugging!

Fitting Honeybees With RFID Tags

Scientists at the Commonwealth Scientific and Industrial Research Organization in Australia are doing some really incredible work fitting thousands of bees with tiny RFID tags and monitoring their movement using remote sensing stations.  This will help to improve models of bee behavior that can be used to optimize pollination at farms and to reduce bee exposure to pesticides applied at nearby farms.  Understanding where bees travel and under what conditions they don't will likely lead to much improved best practices for farmers who will be able to help preserve the bees that pollinate their fields even while using pesticides that dramatically increase yields.

Even more exciting to me, is that this will likely lead to a much better understanding of what doses and combinations of pesticides and other chemicals significantly influence bee behavior.  While it's been shown that sub-lethal doses of many toxins can reduce honeybee flights and increase the time it takes bees to reach their destination (for example, this much simpler study of RFID-tagged bees in an enclosed environment), much more research is needed to evaluate the wide range of possible interactions, and data from a natural environment may show behavior changes that aren't obvious in a simpler experiment.

Here's a great video on the CSIRO research:


As for my hive electronics, I have soldered a test board and I'm slogging through the slow process of teaching myself to program PIC microcontrollers.

In other news, the intro to hobby electronics design course at contextualelectronics.com is starting on January 20, and while I'm sure it'll slow down progress on my hive electronics somewhat, I'm excited to learn some practical board design skills will building a useful piece of bench equipment!  Sign up ASAP if you're interested!

Hive Scale Electronics Coming Together

IMG_20131109_211617902.jpg

I've been slowly making progress on design of a a hive scale. I've designed a board to fit in a small enclosure from polycase.com.

The board has an MCP3551 ADC to read the load cell, driven at 5V by a 5V regulator on the board. I could probably get slightly better resolution at 10V, but adding a second regulator isn't worth the trouble.

I did my best to isolate the load cell measurement from any digital signals, and while I'm not confident that I've followed any specific set of best practices, at least I don't have digital signals running near the important voltage measurement, and I'll also be able to ensure that there aren't any digital signals passing around on the board while the MCP3551 is taking measurements.

Even though Contextual Electronics didn't start the design course in time for this design, I didn't want to design this board using a non-commercial license from Eagle or DipTrace, so I took the plunge into KiCad.  It's certainly different, but now that I have a lot more experience with amateur EDA, I've found that the KiCad isn't missing anything critical to this kind of simple design. 

Here's a render of the board from OSHPark where I've annotated the different components. 

HiveScaleRev0.1FrontAnnotated.jpg

As I said before, I've got the MCP3551 close to the load cell lines away from any digital signals.  At the bottom right, I've also got a temperature sensor that I've thermally connected to a separate ground plane (on the back).  I'm hoping I can get away with eliminating the external temperature sensor by minimizing heating of the on-board temperature sensor.  I will cut power to the board by disabling the regulator when it's not being used, and I'll read the on-board temperature sensor first when the microprocessor comes on, so the sensor won't be heated by the microprocessor before taking a measurement.  I still fear that the weatherproof enclosure will be insulating enough that it will retain too much generated heat from one measurement to the next, but I'll be able to determine that by comparing the on-board sensor to the external sensor.

IMG_20131109_211756045.jpg

I also purchased some 200kg load cells on Aliexpress.com.  They came quickly and well-packaged, and while it'll be a few more months until I can test them for precision, they look beautiful!

 

Apitronics Kickstarter Project Handles My Data Collection

Louis Thiery, an active participant at http://farmhack.net is running a Kickstarter project that should perfectly handle data transmission for the kind of remote datalogging application that I'm working on for my bee hives!

http://www.kickstarter.com/projects/lthiery/apitronics-wireless-platform

The project is on track to be funded on October 6, and Louis is offering a custom ATXMega-based board in "Bee" units designed to connect to sensors at a remote location and transmit back data to a "Hive" box running a BeagleBone Black for data storage and display via a web interface.  [Yes, the naming convention is particularly annoying for beekeeping applications].

Louis has been quick to share his prototype schematics, and while I expect to design minor custom boards to modify his design, any modifications should be very minor, like adding a voltage regulator to power one of my sensors, or adapting his design to my solar power system.

The BeagleBone Black eats up significantly more energy than would be tolerable on solar power (especially since it's way overpowered for what it's doing), but I can work with some collaborators to reduce power in the future and in my apiaries, I'll have both WiFi and mains power available.  If it's not ideal for solar powered applications, the BeagleBone Black is at least easy to work with.  It's also a relief to have all these details (like XBee communication, installation in weatherproof boxes, datalogging software) largely sorted out so I can focus on building hive scales and supporting work on the bee counters as necessary!

I've been making slow process on both sensor platforms -- I've got the ADC dev board running, and I will be installing proper headers to test it with a load cell by the end of the week. 

Finally, I pulled 3.5 medium boxes full of honey off the bee hives, and they're looking good for winter!  I'll still want to feed them to help fill out the lower boxes, but they've both got 2-3 full boxes of honey! 

 

Inspection in the Summer Heat

I visited the hives yesterday and added another super to the hives.  Both hives have filled the 4th and 5th boxes with capped honey, and for whatever reason, I found that the left hive is actively working on the 6th box while the right hive has been drawing out the comb but doesn't seem to be storing anything.

I think the bees are finding slower nectar flows in the summer heat, and at this point, I've got an extra empty super on each hive, but I don't expect them to finish filling the top supers.

At a temperature above 90F, the bees were out chilling on the front of the hive.

Inspection Update

Last Friday, I inspected the hives.  They had just about filled up the top box, so I added another empty box to the top.  I also reversed the first and third boxes to put more pollen near the top of the hive.  This will be very helpful next winter when the bees move up toward the top of the hive and need pollen to help new brood to develop. Here's some new (bright white) burr comb the bees made to try to store some more of the nectar they were bringing in.  I should have put another box on about a week earlier, but luckily, I didn't see any swarm cells so it looks like the limited space didn't trigger swarming at this point.

Both hives had a great brood pattern and I'm optimistic about getting some honey this year!

Some Burr Comb

Some Burr Comb

Making Load Cells From Scratch

James Moore at http://jmoore.me/ pointed me to this incredibly thorough build log for DIY load cells!  Given that it's relatively simple to get 200kg load cells on aliexpress.com for under $50, I'm not going to dive into making my own (at least until I get some of these higher priority projects off my plate) but showing how they can be made really makes it easy to understand how they work! Another reader shared this link to a digital load cell concept based on a commercially available chip.  It looks like an incredibly elegant solution, taking care of temperature compensation and analog-to-digital conversion, but I can't find any source of actual digital load cells that don't cost hundreds of dollars each!  As with most electronics, I'm sure the price will decrease eventually, but if you happen to see a cheap 200kg digital load cell for sale (cheap being well under $100, preferably under $50) I'll go and buy some samples immediately!

I finally got my Microchip 22-bit ADC dev board, so I can start nailing down electronics and firmware details for my own digital scale when I have time.  Unfortunately, that won't be for weeks now as I'm actively supporting a bee counter design for a student in Virginia and a nasty virus set me back a week or so on my playset build for the kids.

New Hands-On Course in Electronics Design!

I'm super excited about Chris Gammell's new project, Contextual Electronics a 10-week online course on designing and building electronic hardware!  It will include a range of instructional videos as well as live hangouts and troubleshooting of projects in real time.  I'm particularly excited to get a little hand-holding in a strong introduction to KiCAD, the open-source EDA platform! Chris' focus on learning on an "as needed" basis is particularly attractive to me as I know I have access to resources when I need them, but I'm certain I don't have time for a traditional course in fundamentals of electronics design.

If you're interested in learning more hardware design, or just want a good excuse to hang out with this rising star from The Amp Hour, have a look at Chris' introduction video (below) and sign up for future announcements on chrisgammell.com!

 

Side-Project Vegetable Gardens

With the beginning of Spring, I find I have much less time for electronics and blogging.  I built a couple of gardens that had to be finished ASAP to get everything planted and took most of my time over the last few weeks.

Since we have a sloped yard and a thriving population of deer, rabbits and moles, the raised bed allows me to keep animals out (hardware cloth on the bottom, wire fence on the sides and netting on the top).  This also keeps the garden level so the plants get evenly watered.  We planted strawberries and Rhubarb (the green plants in there) and carrots, peas, beans, corn, pumpkins, cucumbers and squash.  It's an eclectic mix, and not all of it will thrive, but my 3-year old son was involved in crop planning, and he's excited to see everything grow.

I've also been working with Kass on a revision of the bee counter to be installed in a pollen trap.  We've left all the LEDs powered all the time since he has power to his hive, and I successfully tested each LED before sending it off to him to work on programming.

My next projects include building a playset (next weekend) and learning welding for building hive scales.  I also need to finish a prototype bee counter with the pulsed LEDs.

I've got a full summer of projects, and I'll be in good shape to deploy some much better systems next year.  Unfortunately that leaves me with more sporatic and incoherent blog posting, but it's all moving in the same direction -- beehive monitoring along with whatever side projects I get involved with.

Bee Hive Data Back Online

Just a quick update: the streaming weight and temperature data is back online.  Apparently, I just needed to reset the ConnectPort X2 I'm using as a portal between XBee radios and the internet.  It's annoying that it dropped out in the first place, and I'll see if this method of data collection is really robust enough.  For future systems, I will likely need to use an SD card as hard backup, something I skipped for the prototype mainly to avoid the hassle of dealing with another library and more hardware (not really a good excuse).

Temperature Compensation of Load Cells

All along, I've assumed that my postal scale would be fully temperature compensated -- I assumed it would be at least partly done in software, but it seems that the standards for postal scales are significantly lower than I had assumed.  They're probably published somewhere, but a measurement is probably better than any spec. I was confused about what I was seeing in the raw data, and during 4 days where it was too cold for the bees to go outside (the first 5 days in the graph) I used the data during 20 degree C daily temperature swings to run a regression analysis to statistically estimate the  temperature sensitivity of the load cells.

Here's the raw data:

Slide1

And here I adjusted for temperature.  You can clearly see the 5 days where the bees just consumed honey and then the two days where they brought in nectar and pollen, increasing the hive weight during the day (and continuing consumption at night).  According to the regression analysis, the new 3lb package of bees consume around half a pound of honey a day and the postal scale signal varies by 0.0331 pounds per degree C.

Slide2

Note that a regression analysis is a horrible way to do accurate compensation.  For one thing, I'm assuming that the bees really were inside for the whole 5 days and that their consumption of honey was constant even when temperature varied (almost certainly false).  I'm sure the bees consume faster in the cold than at warmer temperatures while they're keeping their brood warm.

Tomorrow, I'll see if I can figure out why the feed has dropped offline and I'll take the hive off the scale and put on a fixed weight.  The fixed weight will allow me to determine an accurate temperature compensation without convoluting factors.

Pictures From Hive Scale Installation

This first picture shows shows the inside of the postal scale (Adams CPWPlus200). I designed one of my first circuit boards (with lots of mistakes which is why it's a total mess to look at) to hold the power regulators that convert from 12V from a marine battery to 3.3V for the Arduino Fio and temp sensors as well as 9V for the scale. You can see I've run a U.FL connector from the XBee radio (bottom right) to an external duck antenna on the right to get the signal out of the metal box. Inside Scale

 

This next picture shows the scale on a hive bottom board.  I had one available and they're about the right size and shape so I just used two bottom boards with the scale sandwiched between them.  Here you can see the scale readout.  I ran a wire from the Arduino to the power on switch so I could turn the scale on and off remotely.

Scale In Position

This next picture shows all the wires running from the bee hive to a second box housing the battery, a charge controller (for when I get a solar panel mounted out there) and the scale's readout.  The bees are still a bit confused that I raised their entrance a couple inches by adding an extra bottom board and postal scale!

Messy Wires

Finally, here's a wide view of the 3 hives at the apiary (and the battery "hive" box).

Apiary

I've got lots more to add (including some really great processed weight data) but I've been "forced" to take advantage of the good weather to build a garden before I miss planting season!  I'll get some pretty graphs up tomorrow, and hopefully on Saturday, I can go out to the apiary and figure out why I'm no longer getting live data from the hives (since 8:40 this morning).

First Data From Bee Hive

I've got first data from the bee hive streaming to Thingspeak.com here: https://thingspeak.com/channels/3004 My initial installation of the ConnectPort X2 isn't ideal so the data is dropping out periodically (I'll be adding a repeater to get through 4 walls) but it's amazing that the system is working!

I'll also post more details and pictures when I have time, but I wanted to throw this out there to share my celebration.

First Inspection of 2013

On Saturday, I opened up the hives for a one-week inspection to make sure the queens are there and laying eggs properly.  Both hives have around 4 frames of bees that were active and calm in the 70 degree weather.  I found each hive had 2-3 frames with a great pattern of eggs and brood.  This picture is from after I smoked the bees a bit, so it looks a bit sparser than before they got smoked.

Once the population gets much higher, it gets really difficult to find the queen, so I took a quick video to show the queen and some tiny day-old larvae!  I really need an assistant or a tripod if I want to get into taking videos regularly, but YouTube has a stabilization feature that I think really helped make the video easier to watch.  It causes the camera to move around unnaturally, and it looks really weird when I get close up to the cells with brood, but the alternative is looking at a super shaky video when I've got a frame in one hand and my phone in the other.

http://www.youtube.com/watch?v=vrmqcTnb9A4

It's not critical to actually find the queen in each hive (I didn't see her in the other hive) as long as you can find eggs or brood, but it's always exciting to find that one egg-laying queen bee!

In other news, I was struggling to rewire the bee counter test board, and after destroying two of the sensors, I gave up and ordered a revised version with (hopefully) the correct pinout now.  It was sent to the fab today, so it should arrive in a week or so.

I've also got plans to install the hive scale and temperature sensors next weekend.  The system is ready except for mounting of the solar panel.  The battery can last more than a week without recharging, so I'll be able to test it even if it's not permanently installed.

Lair Hives Repopulated

On Sunday, April 21, I got my two 2lb. packages. My wife was kind enough to allow me to keep them in the kitchen even though they buzzed louder and louder as they warmed up in the house. I was waiting until the evening to install the bees as they're less likely to try to find a new home if it's starting to get dark when they're installed. My son thought the bees were pretty neat once he understood that they couldn't get out of the box to sting him.

I installed the bees into two medium boxes each.  I also fed them a 1:1 sugar syrup to try to stimulate brood rearing.  They have plenty of capped honey from last year so I didn't bother to cook up 2:1 sugar syrup (making it easier for the bees to get the sugar).

I forgot to add my pollen patty, but they have a few frames of pollen in each hive so it's probably unnecessary.  I'll add a pollen patty when I check for brood in a week to make sure the queen is laying.

I also managed to mark my queens for the first time this year!  I released the queen into the queen marking tube (seen below) and gently pushed her up against the screen with the foam plunger until she stopped moving around.  Then I realized that I'd forgotten to open the paint marker!  I had to work for a while to get the shrink-wrapping off the pen at which point I realized the paint wouldn't flow even after shaking the pen vigorously and trying to follow the little pictographic instructions on the side.  Of course, the entire time, I was trying to keep the queen warm in the marking tube without accidentally dropping her!

Finally, I sucked on the end of the pen through my veil, and while I got a mouthful of paint (which I spit promptly back onto the veil), the paint was flowing and I dabbed a conservative dot on the queen's thorax.  She was still moving around vigorously, and the temperature was above 40F, so I don't think my learning experience caused any harm.

Here's a picture of the first marked queen with the rest of her hive in the background.  I'm not quite comfortable yet beekeeping with bare hands as I tend to flinch every time a bee lands on my fingers, so I found the tight gloves to be really helpful.  They might stop a light sting, but it was too chilly for the bees to be trying to sting me anyway so I'm not sure any bees actually tried.

I gave each hive two frames of warm (room temperature) capped honey that I uncapped for them, and a gallon of 1:1 sugar water to help stimulate egg laying activity.  Just as I was finishing up, it started raining pretty strongly, so I didn't get a chance to take more pictures, but the hives now have two boxes of drawn comb (with about 8 frames of honey each) and an empty box for feeding on top.

I'm getting close to finishing my hive scale.  I could throw it outside now, but I've got four weeks until the Maker Faire deadline, and I'm still working on adding transmission to stathat as well as thingspeak.  I'd also like to track down why my sensors are reporting 85C sometimes (I suspect they're resetting and need slightly more power).  I have strong plans to install the system two weekends from now at the Acreage.

Ask Legislators to Support Bee Research in Minnesota

The latest bonding bill in the MN House includes support for honey bee research at the U of M.  We badly need this research to help slow the decline of honey bees, so if you live in MN, consider contacting your state legislators supporting funding for the MN Bee Lab in this bonding bill. http://library.constantcontact.com/download/get/file/1104002975061-14/Bee+Lab.pdf

Spring Cleaning

This week, I cleaned out the two dead hives at the Lair and got them ready for the package bees that are scheduled to arrive April 20.  The weaker (right) hive hadn't touched the bee candy, but the other hive had started on it and was only about an inch away from the life-saving sugar when they died, apparently of starvation one very cold night when they couldn't move enough to get at the sugar! Here you can see the cluster dead just an inch away from the sugar (on top of this frame).  The other hive died both an inch below my added sugar AND an inch above honey on the same frame.

There was also a little mouse that moved in under the hive.  I tried to get a video of the mouse running out when I cleaned out its extensive nest, but either it had left long before I got there or it hid down in a corner somewhere.  It did some minor damage to the hive, but it only touched 3 frames.  I'm glad I closed up the hive before he had a chance to do more damage!

I wonder if part of the problem is that I've left the hives too big over the winter.  Air space shouldn't have a large effect given that the bees only keep their small cluster warm, but it's possible that it gets more drafty or slightly colder with a larger hive.  I've cut the hives down to three boxes with about one full of honey each.  I'll be back on bee installation day (still tentatively April 20).

2012 Bee Hive Death

There's a lot of sensationalist reporting (or making stuff up) out there on why bee hives are dying off.  A couple days ago, NBC put out a really good summary of some of the factors that have contributed to hive death recently. To expand on the article, the neurotoxic neonicotinoids that cover planted corn and canola seeds (among others) has been shown in a couple papers early this year to block bee's memory and ability to learn, for example learning where nectar-producing flowers can be found or how to get back to their hives.  This is suspiciously similar to colony collapse disorder where bees just disappear over the course of a few days and never come back.

At the same time, I have seen really minimal evidence that neonicotinoids are actually present in hives that suffer from colony collapse disorder.  Samples from afflicted hives over recent years haven't yielded very strong patterns as one might expect if the problem was bees collecting contaminated pollen from corn or flowers near treated crops.

With the dozen or so diseases and complex interactions between the dozens of insecticides and other chemicals we routinely spray on crops, I think we really need much better funded research to facilitate the time-consuming collection of data showing when bees are being exposed to what chemicals and which combinations correlate most strongly with colony death.

Since Bayer's last line of defense against the demonstration of really bad sub-lethal effects of neonicotinoids on bees is to simply claim that nobody's shown that bee hives ARE being contaminated (so lab demonstration of really bad sub-lethal effects might not extend to actual hives), they're certainly not going to spend millions of dollars looking to see if one of their most profitable products is ending up in nearby bee hives!  It's really up to publicly funded researchers to make the case, and as budgets get slashed, it could be another decade before we really know what's going on.