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).
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.
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.
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 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."
If I unplugg the VCC cable the output still goes "HX711 reading: 0".
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.
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.