Electronic Beehive Scale (Part 2)

Welcome back. I’m Jon, and this is part
2 in a two part video series on building electronic scales to constantly monitor the weight of
beehives. In part 1, I discussed building the frame for the scale and attaching the
load cell. Now, I’ll hook up the electronics, calibrate the scale, and update the arduino
Hivebot sketch to read the scale measurements. The Hx711 load cell amplifier came without
it’s headers soldered on, so I needed to do that first. Next I brought in the electronics from one
of the hives to add the amplifier to the breadboard. Due to the size of the amplifier, I ran some
jumpers from underneath it out to where I could more easily connect to, doing the same
with 5 volts and ground. Then I belatedly realized that I had 5 volt and
ground rails right there next to the amplifier, and so re-ran those jumpers right to where
they needed to go. Next I ran the signal and clock lines from
the amplifier over to the arduino, and connected up the 4 wires on the load cell to the other
side of the amplifier, red to E+, black to E-, green to A- and white to A+. I used to an arduino sketch from Sparkfun
to help calibrate the scale (I’ll provide a link from the website). First I had to change
the pins defined in the sketch to those that I’d actually plugged into. With the scale
empty, I uploaded the script to the arduino, and then placed some known weights on the
scale once things got going. Then I adjusted the calibration factor in the sketch and started
over until it was reading in the right ballpark. The author of the script found a calibration
factor of -7050 worked best for him. In my case, positive 13,500 was more appropriate.
Depending on your load cell and scale, you may find that a setting even more different
than either of ours works best for you. Thankfully though, both of my scales worked
good enough at 13,500, so I didn’t need to do any special coding in my hivebot sketches
to take into account different calibration factors for the different hives. If you’re
also building multiple identical scales, you may or may not not be so lucky. At last I was ready to take the scales out
the hives. I moved the hive aside before placing the scale underneath, with the load cell toward
the rear of the hive. Then I reassembled the hive on top of the scale and replaced the
breadboard and arduino back in the electronics box on top, re-connected the raspberry pi
and the other sensors, and put the roof back on, and then did the same with the other scale
on the other hive. The scale on the first hive turned out to
be surprisingly level. Maybe the cinder blocks are a little high in the front. However, the
second hive was tilting way forward. So, I just cut up a piece of scrap wood to place
under the front of the hive to level things back out again. The relevant bits of the hivebot arduino sketch
for the scale include the constants that define which pins are connected to the load cell
amplifier, as well as the calibration factor and zero factor. Normally, one would code a sketch like this
to re-tare (or zero) the scale whenever the sketch starts up, but I can’t be removing
several hundred pounds of active beehive every time I need to restart the arduino, but the
zero factor gets around this. The calibration sketch I used above tares the scale
and then prints out the zero factor. So, I can use this to zero the scale when the arduino
starts up, without removing the load from the scale. Next in the sketch, I initialize the scale,
telling it which two pins to monitor. Within setup, I set the calibration and zero
factors. And then, within the loop, I simply ask the
scale periodically for the units, which I earlier calibrated to be pounds. And that’s it. Both scales have now been
reading the weights of our two, still unoccupied, beehives for a little over a week. You can
see live charts of the data generated from the beehives at my website. Links are in the
video description below. Some things to keep in mind. Over long periods
of measurement, load cells are highly subject to temperature drift… and being outside
like this will only make that worse. Furthermore, due to the fact that these scale frames are
made of wood, humidity and other factors will likely affect the accuracy as well. So, I’m
not expecting to know, to the ounce, exactly how much the hives weigh. However, over the past week, with no changes
to what the scales are weighing, the scales have maintained readings within a range of
about 1 pound, with some warm days and cold nights, so I’m feeling pretty good about
that. The approximate changes in weight that these scales will provide from day to day
and week to week should tell me what I want to know, even if they’re not accurate to
the ounce, and be a lot better than manually weighing the hives. The load cells are pretty sheltered from the
weather inside the frames, but it’ll be interesting to see how they hold up over the
course of a year. Maybe next spring I’ll be able to get down in there and have a look. Thanks for watching. In upcoming videos, I
plan to be adding one more temperature and humidity sensor, this time for ambient readings
outside the hive, an infrared camera and microphone inside the brood box, and an automatic refilling
water supply for the bees, all before the bees arrive in less than a month. Check out this channel to see if any of those
videos have already been posted by the time you’re watching this, as well as lots more
of videos about making stuff, preferably incorporating moving electrons. And don’t forget to subscribe
to be notified as soon as any new videos are posted. The load cells are pretty sheltered from the
weather inside the frames, but it’ll be interesting to see how they hold up over the
course of a year. Maybe next spring I’ll be able to get down in there and have a look. Arggg


  1. On the various factors that affect weight readings: would it be practical to have an unused hive (with no entrance so it is never populated) which also has a weight sensor, and use any variation in that box to correct the live hives? It may at some point be worth having a dummy hive anyway, eg for a central server to store data from a group of nearby hives…, or to store a battery to augment any solar cells, etc etc.

  2. John, How does this electronics communicate with your computer. Is this wifi app? Some lab view app? I am a beginner beekeeper but very much interested with your hardware designs without spending too much. where can I buy hardware for temp and humidity control and breadbox? and do you have plans available?

  3. Construct a dummy hive on an additional load cell to help understand any drift / environmental impact.

    Also the dummy hive can double as swarm trap later on. lol.

Leave a Reply

Your email address will not be published. Required fields are marked *