4 x 10kg load cell, 4 hx711 amp and esp32-c3-supermini

Hello, I'm going to configure it like 4 x 10kg load cell, 4 hx711 amp and esp32-c3-supermini and test it. In the case of amp, the line is complicated, so I'm making it into pcb and experimenting with it.
The circuit diagram at the top left works and the program runs, but the rest of it doesn't work, so I'm having a hard time.
Can you give any advice?
(I will also attach the code and pcb photo.)

`#include "HX711.h"

//DOUT, SCK
const int HX711_dout1 = 1;
const int HX711_sck1 = 0;
const int HX711_dout2 = 4;
const int HX711_sck2 = 3;
const int HX711_dout3 = 6;
const int HX711_sck3 = 5;
const int HX711_dout4 = 10;
const int HX711_sck4 = 9;

HX711 scale1;
HX711 scale2;
HX711 scale3;
HX711 scale4;

void setup() {
Serial.begin(115200);
delay(1000);

scale1.begin(HX711_dout1, HX711_sck1);
scale2.begin(HX711_dout2, HX711_sck2);
scale3.begin(HX711_dout3, HX711_sck3);
scale4.begin(HX711_dout4, HX711_sck4);

scale1.set_scale(-705.0);
scale2.set_scale(-705.0);
scale3.set_scale(-705.0);
scale4.set_scale(-705.0);

scale1.tare();
scale2.tare();
scale3.tare();
scale4.tare();

Serial.println("All scales tared and ready to measure.");
}

void loop() {

float weight1 = scale1.get_units();
float weight2 = scale2.get_units();
float weight3 = scale3.get_units();
float weight4 = scale4.get_units();

Serial.print("Weight 1: ");
Serial.print(weight1, 2);

Serial.print("Weight 2: ");
Serial.print(weight2, 2);

Serial.print("Weight 3: ");
Serial.print(weight3, 2);

Serial.print("Weight 4: ");
Serial.print(weight4, 2);

delay(1000);
}
`

I moved your topic to a more appropriate forum category @iron_0425.

The Nano ESP32 category you chose is only used for discussions directly related to the Arduino Nano ESP32 board.

In the future, please take the time to pick the forum category that best suits the subject of your question. There is an "About the _____ category" topic at the top of each category that explains its purpose.

Thanks in advance for your cooperation.

Thank you for your kind response.

1 Like

The HX711-Multi library allows the clock pins to be shared, so you only need five pins of the ESP32 for four HX711 boards.

How do you power the two supply pins of the HX711, and how do you power the load cells.
A schematic diagram would be more helpful than a board layout.
Leo..

Thank you! There was a library for multi..
Powered from PC (USB cable) to esp32.
It is connected to each hx711 through a circuit.

If you found and used the library, can you simply show me an example or something?

What circuit.

Did you Google "HX711-Multi library".
Leo..

shmulike/HX711-multi <- I looked up the library, and is this the library you used? Example in the library, it seems that clk is used in one group, and I wonder if you used it like this, too

1. I think you can go for multi-tasking using ESP32C3 and FreeRTOS. Acquire the weights for four load cells from four tasks and then average them in the loop() task and then show the average value on the Serial Monitor/Display Unit.

2. For the ADC/AMP of each load cell, the CLK signal is to be generated by bit-bang to bring out data from the ADC/AMP buffer of the load cell. So, a common clock may work theoretically; practical result can only be published after experiment.

Thank you.
It's good that there are many directions.

1 Like

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