){.nav-menu .menu-item-has-children a{padding-right:20px}.nav-menu .menu-item-has-children a:after{position:absolute;right:7px;top:10}}.vce-ad-container{margin:30px auto;display:block;clear:both;width:728px;position:relative;max-width:100%}.vce-ad-below-header{margin-bottom:0}@media only screen and (max-width:1200px) and (min-width:1024px){.vce-ad-container{width:630px}.vce-ad-below-header{width:728px}}@media only screen and (max-width:1023px){.vce-ad-below-header,.vce-ad-container{width:728px}}@media (max-width:767px){.vce-ad-container{width:375px}}@media (max-width:400px){.vce-ad-container{width:300px}}@media (max-width:320px){.vce-ad-container{width:280px;max-width:100%}}:root .main-navigation ul ul{opacity:1}@media only screen and (min-width:1024px) and (max-width:1200px){.container{max-width:1000px}.vce-main-content{width:700px}.main-navigation ul ul{display:none}.top-header{overflow:hidden}.main-navigation a{padding:15px 9px 15px}.search-header-wrap a{padding:15px}.header-3-wrapper .site-branding{max-width:300px}h1.entry-title{width:540px}.entry-title{display:block}}@media only screen and (min-width:670px) and (max-width:1023px){.header-3-wrapper .site-branding{max-width:300px}.header-3-wrapper .nav-menu>li>a{padding:0 15px}h1.entry-title{width:540px}.entry-title{display:block}}@media only screen and (max-width:1023px){.container{max-width:90%}.vce-main-content{width:100%;padding:15px 0!important}.main-navigation ul ul{display:none}.vce-res-nav{float:left;position:absolute;left:0}.header-3-wrapper{height:50px!important;padding-top:0!important;text-align:center}.header-3-wrapper .site-branding{position:relative;float:none;top:0!important;left:initial!important;text-align:center;max-width:initial;padding:3px 0 7px}.site-branding{padding:4px 0 7px;display:inline-block}.site-branding img{max-width:120px;max-height:28px}.main-header .header-3-wrapper .site-title,.main-header .header-3-wrapper .site-title a.has-logo{line-height:40px!important;font-size:26px!important}.sidebar{margin:0 auto 20px;float:none!important;display:block;clear:both;padding-top:0!important;width:100%;max-width:300px}h1.entry-title{max-width:100%}.vce-responsive-nav{display:block;margin:10px 0 9px}.nav-menu,.top-header{display:none}.main-header .site-title,.main-header .site-title a{line-height:36px!important;font-size:40px!important}li>ul{margin:0}}@media only screen and (min-width:200px) and (max-width:670px){html{margin-top:0!important;overflow-x:visible}html body,button,input,textarea{font-size:14px;line-height:22px}.container{max-width:95%}.vce-main-content{padding:0 0 10px!important}.main-box,.sidebar .widget{margin-bottom:10px}.vce-wrap-right{width:100%;max-width:100%;text-align:center}.vce-single .entry-header{margin:20px 0}.vce-wrap-right{text-align:center}body h1.entry-title{font-size:24px;line-height:30px;padding:0 20px}body p{margin-bottom:20px}body h1{font-size:24px;line-height:34px;margin-bottom:10px}body h4{font-size:18px;line-height:28px;margin-bottom:10px}.sidebar .widget-title{line-height:22px}.vce-wrap-right>ul{float:none;display:inline-block;margin:10px 0 0}}#cookie-notice *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cookie-notice .cookie-notice-container{display:block}#cookie-notice.cookie-notice-hidden .cookie-notice-container{display:none}.cookie-notice-container{padding:15px 30px;text-align:center;width:100%;z-index:2}.cn-close-icon{position:absolute;right:15px;top:50%;margin-top:-10px;width:15px;height:15px;opacity:.5;padding:10px;outline:none}.cn-close-icon:before,.cn-close-icon:after{position:absolute;content:' ';height:15px;width:2px;top:3px;background-color:#fff}.cn-close-icon:before{transform:rotate(45deg)}.cn-close-icon:after{transform:rotate(-45deg)}#cookie-notice .cn-button{margin:0 0 0 10px}.cn-button.bootstrap{font-family:-apple-system,BlinkMacSystemFont,Arial,Roboto,"Helvetica Neue",sans-serif;font-weight:400;font-size:13px;letter-spacing:.25px;line-height:20px;margin:0;text-align:center;text-transform:none;display:inline-block;touch-action:manipulation;white-space:nowrap;outline:none;box-shadow:none;text-shadow:none;border:none;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;text-decoration:none;padding:8.5px 10px;line-height:1}.cn-button.bootstrap{color:#fff;background:#20C19E}.cn-text-container{margin:0 0 6px 0}.cn-text-container,.cn-buttons-container{display:inline-block}@media all and (max-width:900px){.cookie-notice-container #cn-notice-text{display:block}.cookie-notice-container #cn-notice-buttons{display:block}#cookie-notice .cn-button{margin:0 5px 5px 5px}}@media all and (max-width:480px){.cookie-notice-container{padding:15px 25px}}

How to Build a Digital Weight Scale

Nowadays, if you want to build your own digital weight scale, it’s surprisingly easy because you only need a handful of commonly available components in addition to your favorite Arduino microcontroller board. In this primer I’m going to describe how to interface one inexpensive Load Cell to an Arduino Uno with the help of the popular HX711 module so that you can rig up a complete digital weight scale later. Let’s start!

Hardware Required

  • Arduino Uno
  • 50kg Half-Bridge Load Cell
  • HX711 (Weight Sensor Amplifier + 24 bit ADC) module

The 50kg Half-Bridge Load Cell (sometimes called a strain gauge) consists of a metallic half-bridge connected to three wires of different colors (red, white, and black). When pressure is exerted on the half-bridge, it sends the corresponding signal via the red wire. This particular load cell can measure weights up to about 50kg.

50kg Half-Bridge Load Cell

The HX711 module based on HX711 consist of an amplifier and a precision 24-bit analog-to-digital convertor (ADC) designed for weigh scale applications to interface directly with a bridge sensor. HX711 module operates at 5V and the communication is executed through a serial (clock-data) interface.

HX711 Weight Sensor Amplifier + 24-Bit ADC

Hardware Setup

As you can see here, the hardware setup is pretty straight forward. Since the load cell is a half-bridge type, you need 2 external resistors (1Kx2) to attain full-bridge measurement scope.

Software Tryout

After the completion of hardware system you can experiment with example code(s) to verify your hardware setup so that you can proceed further with sureness thereafter. First of all you need to download and install a special library prepared for HX711 (https://github.com/bogde/HX711). After installing the HX711 Library you can upload the well-commented example code (shown below) to your Arduino, as usual.

  Setup your hardware and start the sketch without a weight on the scale
  Once readings are displayed place a known weight on the scale
  Press +/- or a/z to adjust the calibration_factor until the output readings match the known weight
  Arduino pin A0 -> HX711 SCK
  Arduino pin A1 -> HX711 DT
  Arduino pin 5V -> HX711 VCC
  Arduino pin GND -> HX711 GND

#include "HX711.h"

#define DOUT A1
#define CLK A0
HX711 scale(DOUT, CLK);

float calibration_factor = 1025; // see notes
float units;
float ounces;

void setup() {
  Serial.println("HX711 calibration sketch");
  Serial.println("Remove all weight from scale");
  Serial.println("After readings begin, place known weight on scale");
  Serial.println("Press + or a to increase calibration factor");
  Serial.println("Press - or z to decrease calibration factor");

  scale.tare();  //Reset the scale to 0

  long zero_factor = scale.read_average(); //Get a baseline reading
  Serial.print("Zero factor: "); //This can be used to remove the need to tare the scale. Useful in permanent scale projects.

void loop() {

  scale.set_scale(calibration_factor); //Adjust to this calibration factor

  Serial.print("Reading: ");
  units = scale.get_units(), 10;
  if (units < 0)
    units = 0.00;
  ounces = units * 0.035274;
  Serial.print("Grams: ");
  Serial.print("  Calbr: ");

  if (Serial.available())
    char temp = Serial.read();
    if (temp == '+' || temp == 'a')
      calibration_factor += 1;
    else if (temp == '-' || temp == 'z')
      calibration_factor -= 1;

If everything is perfect, you will get a serial monitor window similar to the one shown below (but it won’t make much sense until you calibrate the system)!

Once you’re sure about the functionality of your experimental setup, you can adjust the scale factor with a known weight until you get correct readings (the weight/load needs to be applied to the tip in the middle of the sensor for accuracy). Literally, the example code has auto & manual calibration features i.e. initially auto calibration will run and thereafter you can tweak the values through manual calibration. The  given example code lets you to add (+/a) and subtract (-/z) calibration factor value (it’d be better to follow the steps in the code for scale calibration).

Remember, this article is just a primer that only shows you how to connect a load cell to Arduino with the help of an interface circuitry (perhaps, the fastest method to hook everything together and see if it would work and use serial monitor for readout). So, you must start your own research to complete your digital weight scale concept/project. Also note that, load cells comes in various form factors/specifications, and their wire color codes could be dissimilar than the one mentioned here. Actually, I began working with another (TEM01052B) 50kg half-bridge ‘bathroom scale’ load cell (with one home-made support holder) because a consignment was delayed by the Xmas bang!

What’s a Load Cell?

In principle, load cell (made by using an elastic member with very highly repeatable deflection pattern to which a number of strain gauges are attached) is usually an electro-mechanical a sensor/transducer that converts a load/force acting on it into an electronic signal. Although there are many different kinds of load cells, resistive load cells (and capacitive load cells) are the most popular ‘common’ types widely available now. In a resistive type load cell, if a load/force/stress is applied to it, there’s a change in its resistance, and this change leads to a change in output voltage when a input voltage is applied. “Single Point Load Cells” are broadly used to build scales as they offer excellent off-center loading compensation, but “Button Load Cells” are compact and easy to use and ideal for measuring compression forces that are applied axially.

Since the mV range output from a load cell is not large enough to be processed accurately, one needs to amplify the signal carefully to obtain a utile output. And, the interface usually has a 24-bit ADC in addition to the required regulator and amplifier circuitry (reference – https://www.loadstarsensors.com).

Finally, a bunch of images for your reference:

author’s experimental setup

author’s experimental setup

3D Print Idea

Module Schematic

Leave a Comment X