Arduino Based Digital Weight Scale with Load Cell

Digital Weight Scale using Arduino and HX711 Module (Load Cell)

This project is to design digital weight scale that measures weight up to 10kg. We use a load cell of 10kg, a module that amplifies the output of load cell and an Arduino. Scale is designed with -+0.01kg accuracy and switches are used to calibrate digital weight scale. In this article, all these aspects are briefly explained with the designing and programming. This project makes us capable of learning the mechanism of digital weight scale and how to design an instrument by keeping related complexities in mind.

Introduction to Digital Weight Scale

An instrument is a device that is used for making measurements of physical quantity (distance, pressure, voltage, current etc). OR We can also say that an instrument is a device that converts one form of parameter that cannot be measured to another form that can be measured easily. As all the electrical instruments convert the input signal to electrical signal. For example: An electrical thermometer converts the temperature to voltage which is calibrated to give exact readings. The most important part of instrument is sensing part that senses the input signal and gives appropriate voltages accordingly. The instrument that we will discuss in this report is a 10kg weight cell.

The components that are required in making a digital weight scale are:

  1. Load cell (10kg)
  2. HX711 Module
  3. Arduino UNO
  4. L.C.D. (16x2)
  5. Switches
  6. Connecting Wires
  7. Resistors
  8. Varrow Board
  9. Battery and Regulator (5V)
  10. Wooden Base
  11. Screws, Nuts and Bolts
  12. Acrylic Sheet (for Body)
  13. Solder

Details of Main Components of Digital Weight Scale:

Now we will give brief explanation of the main components in making weight scale below:

  • Load Cell:

A load cell is a transducer that is used to create an electrical signal whose magnitude is directly proportional to the force.  The load cell that we will use in this project is a strain gauge 10kg bar type load cell that is shown below.

Load Cell for use in digital weight scale
Load Cell

Strain gauge load cells are the most common in industry. These load cells are particularly stiff, have very good resonance values, and tend to have long life. Strain gauge load cells work on the principle that the strain gauge (a planar resistor) deforms when the material of the load cells deforms appropriately. Deformation of the strain gauge changes its electrical resistance, by an amount that is proportional to the strain. The change in resistance of the strain gauge provides an electrical value change that is calibrated to the load placed on the load cell. A load cell usually consists of four strain gauges in a Wheatstone bridge configuration which is shown below:

Wheatstone bridge configuration (basis of load cell in digital weight scale)
Wheatstone bridge configuration (basis of load cell)

The four wires coming out from the Wheatstone bridge on the load cell are usually:

  • Excitation+ (E+) or VCC is red
  • Excitation- (E-) or ground is black
  • Output+ (O+) is white
  • Output- (O-) is green or blue

The maximum excitation voltage applied to load cell is of 15V and the output signal is in millivolts so an amplifier or amplifying module is must to read the readings. While using the load cell the assembly will be as shown below:

Load Cell Assemble to use as Weight Scale
Load Cell Assemble to use in Digital Weight Scale
  • HX711 Module:

As the loadcell will give the output in micro volts and Arduino is not capable of reading these values therefore an amplification is required. The best solution is to use HX711 amplifier which is a 24-bit analog to digital amplifier and gives best output from a loadcell. The HX711 amplifier consist of 10 pins the image of which is shown below:

Arduino based digital weight scale using HX711 Module
HX711 Module

The Excitation pins provide input to the Wheatstone bridge and there are two channels in this module namely Channel A and Channel B. Channel A gives the gain of 128 whereas Channel B gives the gain of 32. To excite the module, we will apply 3-5V to VCC pin of the module. The DT pin (Serial Data Output) and SCK (Serial Clock) pins are the output pins of the module that give values in the form of 0’s and 1’s. The working of these pins need to understand the digital logic design completely so we will not discuss it here.

  • Arduino

It is programmed through its own software namely ARDUINO IDE when it is connected to PC by a data cable.  Most of the modules that are available in electronic shops are manufactured in such a way that they can be used with Arduino easily. HX711 load cell can be used with Arduino and programmed easily but first we must add the library of HX711 to Arduino software.

Calculation for Calibration Factor of Load Cell:

To use any measuring instrument, we must have to calibrate it for exact readings. Such like that in our project of 10kg weight scale, as we are using a load cell of 10kg and HX711 module with Arduino and when we observe the readings of HX711 serially on PC then these readings does not give any sense that indicates the need of calibration. When the calibration factor is known then it is easy for the Arduino to give the exact readings of the weight placed on the weight scale. The value of calibration factor is placed inside the brackets of set_scale( ) built-in function inside the library of HX711 to complete the calibration. The connections of components for the calibration factor is shown below:

Complete circuit Diagram for Arduino based Digital Weight Scale with HX711 module
Schematic Diagram for Arduino based Digital Weight Scale

How to Calibrate Your Digital Weight Scale with Arduino?

  1. Call set_scale() with no parameter.
  2. Call tare() with no parameter.
  3. Place a known weight on the scale and call get_units(10).
  4. Divide the result in step 3 to your known weight. You should get about the parameter you need to pass to set_scale.
  5. Adjust the parameter in step 4 until you get an accurate reading.

After connecting the components according to the figure above we will program the Arduino UNO by the program below which is according to the above 5 instructions:

#include "HX711.h" 
#define DOUT  3
#define CLK  2
HX711 scale(DOUT, CLK);
void setup()
{
   Serial.begin(9600);
   scale.set_scale();
   scale.tare();
}
void loop()
{
  Serial.println(scale.get_units());
}

To complete the task of calibration factor we placed a known mass of 0.8kg (800grams) on the load cell. After placing the known weight, the serial output changed which is shown below:

COM Port output display of load cell
COM Port output display of load cell

By taking the average of these readings, we calculated -163102 as the raw value for 0.8kg weight. Now to calculate the calibration factor we will divide this raw value by the known weight in such units for which we are designing our weight scale. Therefore, the calculation of -163102/0.8 will give -203878 as our calibration factor. This calibration factor will give readings near to 0.8kg when placed on load cell but not exact 0.8kg. To find the exact calibration factor we will make a program that will make us able to increase or decrease the calibration factor and at the same time observing the effect of changing calibration factor on readings of weight.

Designing the Arduino based Weight Scale:

Most of the measuring instruments contain switches on their bodies that are for different purposes. If we look at the digital weight scales used in General Store’s then they have some switches and numeric keys on them. To make our weight scale simpler we will use only push buttons and ON/OFF switches. So, we decided that one ON/OFF switch will power the weight scale, one switch (CAL) will be used when the user wants to calibrate the weight scale. One switch (x100) will be used when the user wants to increase or decrease the calibration factor by multiples of 100 but by default the weight scale increases or decreases the calibration factor by multiples of 10.

Two push buttons are used; INC button is used to increase the calibration factor whereas DEC is used to decrease the calibration factor by multiples of 10 or 100 as required. The complete circuit diagram of the weight scale is shown below:

Complete Circuit Diagram of Arduino based Digital Weight Scale
Complete Circuit Diagram of Digital Weight Scale

Code:

You can download basic sketch and working code (for learning purposes) of arduino based digital weight scale in attached document. You can extend this code according to your own convenience.

complete arduino code for weight scale (load cell)

 

For More Articles and projects stay tuned with us. Like our facebook page to stay tuned.
In case of query and question, comment below or contact us.
Share your experience with world with engineerexperiences.com 🙂

Young Engineers

This article is linked to a project "Young Engineers' Experiences" to give platform to the 'engineers to be' so they can share their experiences with the world and gain confidence for future work. Articles of students of engineering will be published under this project.

What do you think?

This site uses Akismet to reduce spam. Learn how your comment data is processed.