Strain gauge, HX711 and Arduino Uno

Hello and dear Forum,
I am complete rookie so please excuse my rookie mistakes.

A kitchen scale has been repurposed as a dinamometer. The measured weights of the dinamometer are supposed to be transfered to the PC and just displayed.

For this the strain gauge is powered thorugh USC-C - 5 V - from the grid. The strain gause has it's own display and thus the extra power through USB-C was needed. The strain gauge is connected to the HX711 and the HX711 to the Arduino UNO as you can see in the drawing and in the picture.

As code the simplest "HX711_basic_example.ino" has been used. For simpicity, here is the code:

#include "HX711.h"

// HX711 circuit wiring
int LOADCELL_DOUT_PIN =2 ;
int LOADCELL_SCK_PIN = 3;

HX711 scale;

void setup() {
  Serial.begin(57600);
  scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
  Serial.print("restarted ");
}

void loop() {

  if (scale.is_ready()) {
    long reading = scale.read();
    Serial.print("HX711 reading: ");
    Serial.println(reading);
  } else {
    Serial.println("HX711 not found.");
  }

  delay(1000);
  
}

The output that I get is "HX711 not found.", so the Arduino does not see the HX711. Ofc, my question is where is my mistake?

The hardware should not be faulty and I have checked the connectios 200 times. I know the wires RED and BLACK in the picture aka PINK and BLACK in the drawing are +/- and when current is applied the resistance goes to zero. On the other hand, the resistance between WHITE and YELLOW in the picture aka ORANGE and YELLOW in the drawing stays 1kOhm with or without current (and changes slightly when force applied).


I know this has been already posted a few times and I have read everything, but I just can not find the mistake.

Thank you for your time :slight_smile:

You probably have one or more bad solder connections.
Disconnect everything.
Use Male/Female jumpers to connect to the HX711 board to the Uno, see if the program detects it.
If yes, then connect the loadcell.
The loadcell should be completely disconnected from the scale. There is no need to apply power to the scale for the loadcell to work.

1 Like

loadcell is actually two resistive stripes, and they will be checked by hx711. no place for USB-C or something. not even arduino need it, bc it is powered thru own USB cable.

1 Like

I did deconnect the stain gauge and the arduino still does not find the HX711. Unfortunately I do not have female/jumpers.

Also: if I deconnect the VCC -- GND, pin 2, 3 still connected -- the output changes from "HX711 not found." to "HX711 reading: 0". Do you maybe know why that may be?

I have changed the VCC cable, same phenomenon.

To test the HX711 inputs.
While holding the DMM negative to the metal part of the USB socket...

E+ should be 4.25volt (± 0.05volt).
E- should be 0.0volt (± 0.05volt).
A+ and A- should both be 2.125volt (about half of E+).

There should be less than 20mV between A+ and A-
Leo..

1 Like

I have deconnected everything: the Arduino and the HX711, I got the female, male cables, I have changes the arduino and the HX711. Code stays the same. It does not work, the output is "HX711 not found." :frowning:

If I unplugg the VCC cable the output still goes "HX711 reading: 0".

Yes. The software looks to see it the data signal is LOW and without Vcc it will be LOW

If this code prints DOUT = 1, them something is wrong with the HX711 board.

#include "HX711.h"

// HX711 circuit wiring
const int LOADCELL_DOUT_PIN = 2;
const int LOADCELL_SCK_PIN = 3;

HX711 scale;

void setup()
{
  Serial.begin(57600);
  scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
  digitalWrite (LOADCELL_SCK_PIN, LOW); // Reset and normal mode
  delay(20);
  
  byte x = digitalRead(LOADCELL_DOUT_PIN); //Read the DOUT pin
  Serial.print ("DOUT = ");
  Serial.println (x);
  Serial.println ("*******************");
}

void loop()
{
  if (scale.is_ready())
  {
    long reading = scale.read();
    Serial.print("HX711 reading: ");
    Serial.println(reading);
  }
  else
  {
    Serial.println("HX711 NOT READY");
  }

  delay(1500);

}

I have also started susprecting that the HX711 is not working properly. I have bought yesterday a green one from another company and it is working aka reading raw values which are not 0.

Thank you very much for your code! Yes, I got the out put 1. :frowning:

DOUT = 1

*******************

HX711 NOT READY

HX711 NOT READY

HX711 NOT READY

My HX711 board is this one: https://vi.aliexpress.com/item/1005005574744274.html
I think my professor has bought quite some of them, so I will now look into the possibility of soldering something and maybe fixing it.

Thank you very much for your time!

Glad you got one working.
Have a nice day!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.