Weight sensor with HX711

Hello, guys!
So I need to use a wight sensor on my project, but it simply doesn't work. Acording to internet tutorials, I need to calibrate the sensor and here is the steps:

  1. Compilate the calib program to arduino with no weight
  2. the monitor serial will show some numbers
  3. Put a known weight on the sensor
  4. the serial monitor will show different numbers from step 2.
  5. To calculate the scale, you need to divide the avarage of the numbers of step 4 by the known weight you put on the step 3.

the things went wrong in the step 4, the monitor doesn't show different numbers from step 2. It keeps sending random numbers ( the numbers aren't even close to each other).
I can't set a scale because of this.
Can you guys help me please?

Here is the code I'm using to calibrate (the coments are in portuguese, i'm sorry):

#include <HX711.h>

// DEFINIÇÕES DE PINOS
#define pinDT  A2
#define pinSCK  A0 
#define pinBotao 4

// INSTANCIANDO OBJETOS
HX711 scale;

// DECLARAÇÃO DE VARIÁVEIS
float medida = 0;

void setup() {
  Serial.begin(57600);

  scale.begin(pinDT, pinSCK); // CONFIGURANDO OS PINOS DA BALANÇA
  scale.set_scale(); // LIMPANDO O VALOR DA ESCALA

  delay(2000);
  scale.tare(); // ZERANDO A BALANÇA PARA DESCONSIDERAR A MASSA DA ESTRUTURA

  Serial.println("Balança Zerada");
}

void loop() {

  medida = scale.get_units(5); // SALVANDO NA VARIAVEL O VALOR DA MÉDIA DE 5 MEDIDAS
  Serial.println(medida, 3); // ENVIANDO PARA MONITOR SERIAL A MEDIDA COM 3 CASAS DECIMAIS

  scale.power_down(); // DESLIGANDO O SENSOR
  delay(1000); // AGUARDA 5 SEGUNDOS
  scale.power_up(); // LIGANDO O SENSOR
}

Some HX711 PCBs have a production fault where the E- terminal of the bridge is not connected to GND.
See this post for further details.

If your PCB is like this, then you will need to modify it by adding a wire link to get it to work correctly.

1 Like

Sounds like you are not being able to use the HX711 with an Arduino. If possible, try to use it with a Raspberry pi following this tutorial. If it does not work in another platform either, you can be sure that there is a manufacturing error with your HX711.

Hey! Thank you but mine it's not like this

I'm using XFW-HX711. Is there any production fault with this one too?

hello, thank you for answere me but i really need to use this with a arduino. all the internet tutorials I saw use the HX711 with an arduino too so I believe that arduino it's not the problem

Well let's see if anthing works.
Run the HX711_basic_example.ino and see if it works.