Creating a Custom Weight Scale

A project log for - A full stack IoT platform

A full stack project dedicated to easily collecting, analyzing and sharing IoT sensor data.

Luke Beno 09/06/2015 at 20:342 Comments

I published a summary of my previous scale project. In this project I hacked a postal scale that was purchased off of Amazon. This has been working really well, really the only complaint is that the scale area is smaller than the Hive base so things are somewhat tippy and unstable. I also felt somewhat discouraged that I'm not fully utilizing the readout electronics so I wanted to find a source for only the load cell portion.

While I was ordering PCBs from Elecrow for my Sensor Node Build, I noticed that they had this load cell. So I tossed one onto my order.

This cell is constructed different than the sensors in the postage scale. It is basically a steel beam with packets machined out of it that focus strain in a localized region. This strain is then sensed by a strain gauge that is epoxied into the pocket. Using the same HX711 24bit ADC that I used in the previous project, I'm able to read out this strain gage with great resolution.

It is actually quite amazing, even though the load cell is a 1in by 1in, practically solid piece of steel, it is so sensitive that if I hold one side of it in a vice and VERY lightly touch the other side, this is enough to trip the reading buy at least 500 LSBs. Pretty remarkable really.

So with the Load cell in had and some preliminary testing, I started to think about how it could be mounted such that I could use it to weigh a bee hive. I ended up thinking up a U shaped bracket constructed from 2in angle iron. I purchased the raw materials from the local Menards home improvement store along with a 10in abrasive cut off wheel for my Miter saw. This was particularly handy when cutting 45 deg angles. A word of caution, if there is a sawdust catcher on your saw, make sure to take it off, I neglected to do this and mine started on fire!

Next, drill some holes:

With the angle iron cut, along with another piece of square tubing (which we'll talk about later) and all of the holes drilled, it was time for the next step: welding the pieces together.

Here's a look at the final product loosely bolted together:

Remember that this load cell right now is simply measuring strain so the next step is to mount it to a test jig in order to calibrate it. For this I built a simple wood frame out of 2x10 lumber:

Next I used 4 carriage bolts to fasten the bracket to the frame. Also using a bubble level to ensure that everything is leveled. Looking at the video below, you can see the finished product. If you watch towards the end, I also demonstrate how downward force will be applied to this load cell.

Now I rip a 2x4 piece of lumber on the table saw to match the height of the top of the square tubing. Then I can place The bee hive frame on top of all of this as shown here:

With the frame in place it is time to begin the calibration process. This process is demonstrated in this video. In a nutshell, I place pre-weighed bricks onto the scale and record the output of the load cell vs the brick weight taken from a reference scale.

This interesting part about this process is that I am using to log the calibration values. I am doing this using a slight modification to the the code that I talked about here. This code reads the HX711 scale output, sends it to the serial port and then a NodeJS app reads from the serial port and logs the data to After the data collection is complete, here is a time series plot:

In the time plot, we can see the stair case pattern as I add weight to the scale, next I download a CSV file of the data, load it into Excel and input the known weight from the reference scale. Then I can do a X-Y scatter plot with the known weight on the X axis and the ADC value on the Y axis.

I then do a curve fit and Excel tells the linear transfer function. The last thing to do is load the function into the sensor code and we have a fully calibrated scale ready to install!

Here's the code for the scale readout:

#include "HX711.h"

// HX711.DOUT	- pin #A1
// HX711.PD_SCK	- pin #A0

HX711 scale(P2_2, P2_1);		// parameter "gain" is ommited; the default value 128 is used by the library

void setup() {
  Serial.println("HX711 Reader");
  scale.set_scale(-9450.f);                      // this value is obtained by calibrating the scale with known weights; see the README for details
  scale.tare();				        // reset the scale to 0

void loop() {
  Serial.println(scale.get_units(10), 1);
  scale.power_down();			        // put the ADC in sleep mode
By the way, I'm using this awesome library for Arduino.


Clemens Gruber wrote 10/14/2015 at 12:21 point

Hi Luke, nice work! I thought also about a setting where you can weight a hive with relatively less hardware (and so cost). Perhaps you find my low cost module interesting. It weights only one side of the hive (like yours do also) but a bit more compact:

My other prototype is a platform that weights the whole hive. The base is with Film Coated Plywood:

Here are some photos of the complete system:

  Are you sure? yes | no

Luke Beno wrote 10/14/2015 at 13:59 point

Hi Clemens,

Thanks for sharing, I do like your scale design very much!  It Should be significantly easier to install than mine without requiring drilling and bolts.  How much would it cost to purchase one?

Where do you store your weight data?  Are you interested in trying  

Also in terms of temp sensing, this past weekend I just installed multi-level temp sensors in some of the hives.  Here is one example:

I think that this will be interesting this winter because it should track movement of the colony up and down the hive over time.  I found last winter that 1 temp sensor did not have enough coverage.

  Are you sure? yes | no