Navigation

Saturday 3 September 2016

Using Load cell with the Arduino

A load cell is a force sensing module having a metal structure, with strain gauges mounted in precise locations on the structure. It is easy to use with voltage rating of 5-10V. The force applied to the load cell changes in the output voltage signal directly. Load cells are designed to measure force in one direction. They will often measure force in other directions, but the sensor sensitivity will be different.


Load cells are used in weight, jewellery and kitchen scales. It is usually mounted by bolting down through the screw hole or gluing the end of the load cell where the wires are attached, and applying force on the other end, that is, where the direction of the arrow is. This end is left in floating state.

The electrical signal output by the load cell is very small and requires amplification. The HX711 module is a 24 Bit Analogue to Digital Converter with 2 channels. A load cell has four lead wires and connected as follows to the HX711 amplifier:

Red wire -> E+
Black wire -> E-
White wire -> A-
Green wire -> A+

The DOUT and SCK line are connected to analogue pins A2 and A3 of the Arduino. The Vcc and GND lines are connected to the Vcc and GND of the Arduino. B- and B+ lines in the HX711 amplifier module can be used for another load cell.

If negative readings are obtained, or if the load cell reading is not increasing appropriately with the load applied, then you will have to reverse the A+ and A- lines.

Download the library files here, extract, and then copy only the Hx711 folder to the libraries directory of the Arduino folder. Copy the examples folder to your preferred location where you want to save it.

Calibration with known weights is essential to ensure proper operation. This is done by navigating to the Hx711 library folder, open the Hx711.h, and locate the statement:

void setScale(float scale = 1992.f);

The number 1992 has to be changed to the appropriate value for weight scale. In my case, the load cell was reading 4.7g, while the actual weight was 22g (measured using a weight scale). So I changed the value of 1992 to 1992/(22/4.7) = 425. So I changed the code to:

void setScale(float scale = 425.f);

After adjusting, save the .h file, and upload the above code again.

No comments:

Post a Comment