Calibrating HX711

Hello,

i need to make weighting scale, with 4 load cells (3 wire) + HX711.
I connected the circuit like on photo and using this library ( GitHub - bogde/HX711: An Arduino library to interface the Avia Semiconductor HX711 24-Bit Analog-to-Digital Converter (ADC) for Weight Scales. ).

Load cells ( http://i.imgur.com/Iwr7KdX.jpg )

I know that this is not the first post on this topic, but i really don’t understand how to do this.

Please help,
maliHugo

weighting scale.png

Hi,
What is the problem you are having?

Do you have a sketch?

If you do have a sketchCan you please post a copy of your sketch, using code tags?

Please use code tags… See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html c

Tom :slight_smile:

Hey Tom,

the problem is that the programs prints wrong numbers, and I read some topics on internet, and maybe my problem is in calibrating scale. I don't have idea how to do this, I tried eveything...

#include "HX711.h"

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

HX711 scale(A1, A0);        // parameter "gain" is ommited; the default value 128 is used by the library
/* CALIBRATING STEPS How to Calibrate Your Scale

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.
*/

void setup() 
{
  Serial.begin(9600);
  Serial.print("Beginning");
  scale.set_scale();                    // this value is obtained by calibrating the scale with known weights; see the README for details
  scale.tare();                             // reset the scale to 0
  Serial.println("Now put upper plate"); // my upper plate is about 6 kg ->6000 g
  delay(10000);
  float f= scale.get_units(10);
  Serial.println(f);                      //here program prints values we need to divide with 6000g     
 //
}
void loop() 
{
float ff=scale.get_units(10);
 Serial.println(ff);
  scale.power_down();                  // put the ADC in sleep mode
  delay(5000);
  scale.power_up();
}

If You can help me I will be grateful

maliHugo :D

Hello maliHugo,

sorry to reply so late, just saw your post, you will need to have something like this to make it work.

include "HX711.h"

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

HX711 scale(A1, A0); // parameter "gain" is ommited; the default value 128 is used by the library /* CALIBRATING STEPS How to Calibrate Your Scale

  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. */

void setup() { Serial.begin(9600); Serial.print("Beginning"); scale.set_scale(); // this value is obtained by calibrating the scale with known weights; see the README for details scale.tare(); // reset the scale to 0 Serial.println("Now put upper plate"); // my upper plate is about 6 kg ->6000 g delay(10000); float f= scale.get_units(10); Serial.println(f); //here program prints values we need to divide with 6000g // } void loop() {

}

then you devide f/6000 and get a number. We will call it Calibration, so what you need to do now is write something like

include "HX711.h"

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

HX711 scale(A1, A0); // parameter "gain" is ommited; the default value 128 is used by the library /* CALIBRATING STEPS How to Calibrate Your Scale

  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. */

void setup() { Serial.begin(9600); Serial.print("Beginning"); scale.set_scale(Calibration); // instead of Calibration put a number you calculated on last program

} void loop() { float ff=scale.get_units(10); Serial.println(ff); scale.power_down(); // put the ADC in sleep mode delay(5000); scale.power_up(); }