Introduction: Build a Digital Weight Scale & Force Guage W/ Arduino & Loadcell
In this tutorial, you will learn about the load cell module, its applications and its operation. Also, you’ll see how to use the load cell module with Arduino. Then after learning about calibrating the load cell, you will create a digital scale that can measure the weight with an accuracy of 0.0001 grams and also a force gauge.
What You Will Learn:
- What load cell is and how it works
- How to use the load cell module with Arduino
- Build a digital scale with Arduino
- Use a load cell as force gauge
Step 1: Getting Started With Load Cells
A load cell is an electronic sensor for measuring weight and force. When a force is applied to it, a weak electrical signal at the millivoltage level appears on its output wires. In fact, the load cell is a transducer which converts force into measurable electrical output.
A load cell consists of a metal core and a set of electrical resistances that transform when a force is applied to it. But after the force is removed, it returns to its original state. The reversibility of this material determines the quality and accuracy of the load cell. The equivalent electrical circuit of a load cell is as the circuit above.
Load cells have 4 wires:
- Red for Excitation+
- Black for Excitation-
- White for Output-
- Green for Output+
Step 2: Required Materials
Step 3: Interfacing a Load Cell With Arduino
The output signal produced by the load cell is in range of millivolts, so we need an amplifier to convert the signal into a level that we can later transform it into a digital signal and process it. For this purpose, we useHX711 amplifier sensor. The HX711 amplifier sensor includes a HX711 chip with analog-to-digital conversion capability in 24-bit accuracy. The HX711 module amplifies the low-voltage output of the load cell and sends it to the Arduino so that the Arduino eventually calculate weight from this data.
You can see the connections between Arduino, load cell and HX711 in the attached table:
Step 4: Circuit
Be careful about the side of the load cell when you’re putting a weigh on it. Usually, there is an arrow on the module that shows the force direction. With the help of this arrow, you can place the weight and the load cell correctly.
Step 5: Load Cell Calibration
To use a load cell, first you need to calibrate it. To do this upload the following code on your Arduino board. Wait until the Reading message is displayed on the serial monitor and then place a specified weight item on the load cell. Using the A key, you can increase the calibration_factor one unit and you can use the Z key to decrease it to get the correct weight. Now your scale is calibrated!
Step 6: Code
You need HX711 Library:
set_scale(); function set the calibration_factor, which uses for the scale calibration, to desired value andtare(); function set it to zero.
get_units(); function reads the weight and if it is smaller than zero, it is considered to be zero.
Step 7: Measuring the Weight of Objects
Step 8: Code
Step 9: Make a Force Gauge
You can also use load cell module to measure the force in newtons.To do this, you can upload the following code after applying a proper calibration_factor on your board, and see the result by applying different forces to the load cell.
Be aware that applying force to the cell load should not be instantaneous. Because the process of measuring the force needs a short time so try to apply force to the load cell for at least 1 second.
Place the load cell on a flat surface. Then apply a force to it with your hand. You can see when you apply more force to load the cell, a larger number is displayed on the LCD.
Step 10: Code
This code is for demonstration purposes only. In real life, it is not wise to use a load cell to measure your fist power!
Step 11: What's Next?
- By adding a potentiometer and a rotary encoder to the circuit, make the user able to change the measurement unit.
- Add the possibility to define a custom “zero” condition. This is useful when there is already an object on the scale and you want to measure the weight of a new object.
- Like our FaceBook page to notice the latest projects and also support our team.