I'm having problems getting load cells to work,
mainly having the issue that when the load cell is hooked up i don't get any change in data(nor when pressing down on the load cell)
I'm using an Arduino mega with 4 HX711 modules and 4 load cells, below is a diagram of the wiring.
Using the basic hx711 example code to test the modules, I do get values from the HX711 module fluctuating around this value: HX711 reading: -31855
When hooking up the load cell these values don't change, i tried different wiring configurations for the load cell as described in this post: HX711 Weighing Module NOT taking readings from Load Cell - #11 by zstergios
and tried other wiring configurations as well, but no matter the wiring i don't get any change in values.
The load cell i'm using is Mavin Load Cell-200kg and the HX711 module is the green breakout board, below are the links to the (dutch) product page:
(1 thing i noticed on the product page, is that the recommended voltage is 5-12v, where the HX711 will only provide 4v, but not sure how i would tackle this)
I have 4 of the load cell and the hx711 and i've tried switching them around, but the same happens every time.
I'm hoping you can be of help as i can't figure it out, and the last time i hooked a load cell to arduino it worked without any issues(albeit a 20kg load cell)
Let me know if you need more information
Need a few more details such as code and whether the load cells are separate or weighing the same object (800kg!) .
Run each separately with the example code provided with the library , then add each and recheck .
If you have a DVM , check the output from the cell itself when weight added.
Are you setting up up scale1, scale2 in the software with the appropriate pins for each ?
#include "HX711.h"
// HX711 circuit wiring
const int LOADCELL_DOUT_PIN = 34;
const int LOADCELL_SCK_PIN = 36;
HX711 scale;
void setup() {
Serial.begin(9600);
scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
}
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);
}
I'm testing them one by one at this point in time, and i'm only changing the pin definitions when testing another module.
(For the final code where they all have to work i'm defining the scales properly with their own pin definitions, for example:
HX711 scale_01;
HX711 scale_02;
If you have a DVM , check the output from the cell itself when weight added.
I would measure the voltage going into the 711’s with it all powered , adding weight .
But if each works on its own with its own input pins , the issue is in the code.
Well that's the issue, they don't work on it's own, using the example code I only get this reading in the terminal: HX711 reading: -31855
Whether I hook up the load cell or not this value stays around the same number (the other HX711 give a slightly different value, but also doesn't change when a load cell is wired in) .
(of course i also tried different load cells to see if the issue is with the cell itself)
Ok the example code is fine ( I’ve used it )
You should see a varying mV output on the input of the 711 when you add weight .
There maybe a wiring issue ?
I was thinking wiring issue too, but besides trying the wiring as you described, i also tried it in different configurations all to no avail.
(Yellow(shield) is transparent on mine)
SCK and data pins should be the right way around, as when i switch them i just get the value 0 in the terminal.
When i get the chance (hopefully today) i'll measure the input on the HX711 to see if that gives a response when adding weight.
EDIT: As a response to the multi HX711 library, i will definitely try this once i get a single unit working
Welp, i'll be slapping myself this weekend.. i guess i wasn't paying attention enough, i was checking the modules one at a time, and i was sure i noted the right pins to the right module.
I was testing the 4th module on pins 34 and 36, but just found out the 4th module is wired to 30 and 32
So it seems to be solved for now..
Thanks for all your great suggestions, and sorry for wasting your time!