Load cell dosent work

Hello guys my plan is make a smart shelf for my kitchen so i can know how much material i have basiclly. when i try to make an iot for this idea it isnt work. the schema is esp32 + hx711 + 3 cable load cell 50kg capacity. but it didnt work and i dont know why i cant get any data from load cell and i am new about this area. can u help me pls.

Neither do we if you don't provide details about your setup. Wiring, code....

sorry. as i say i am new this forum. my code :

#include <Arduino.h>
#include "HX711_ADC.h"

const int DOUT_PIN = 19;
const int SCK_PIN  = 18;

HX711_ADC scale(DOUT_PIN, SCK_PIN);

void setup() {
  Serial.begin(115200);
  scale.begin();
  scale.powerUp();
  scale.start(2000, false);
  Serial.println("İki loadcell ile Delta testi başlıyor (3 saniyede bir).");
}

void loop() {
  if (scale.update()) {
    long v = scale.getData();
    long delta = (long)v - 8388608L;
    Serial.print("Raw: "); Serial.print(v);
    Serial.print("  Delta: "); Serial.println(delta);
  }
  delay(3000);
}

If you are using a single loadcell then you need the 4 wire type

yeah i know. i also tried make a bridge connector with 2 1k ohm resistance and still dosent work properly.

You will never make it work that way, you need a 4 wire loadcell AND the HX711 should be powered by 5V AND yot need a voltage divider on the Data pin (DT)

Where is the calibration and tare routines?

Which HX711 board.
Only the Sparkfun version can work with 3.3volt processors.
The rest needs modification.
Leo..

In addition to the comments by other posters, your application is not well suited for a low cost load cell.

Typically low cost load cells perform well for the gain or slope or whatever you want to call it. However they do poorly for output at zero. The zero output is very unstable and will change from day to day and as a function of temperature etc. Most scale applications have a period of time where there is a known zero load. During this time to processor measures the output and subtracts if from the measurement values. In your case you will not be able to do that.

After you get your load cell working setup it up with a constant load and watch how it drifts. If the drift is acceptable for your situation they go ahead and go through the effort of installing it. If no then you must rethink your approach.

this code written for see the if any data comes from load cell or not. in this project code part isnt a problem real problem is hardware.


my hx711 module is this. so as i understand i must use 5v pin for this project am i right ?

Yes, that is a 5volt-only board, because the included 4.3volt load cell excitation voltage regulator on that board needs at least 4.6volt to do it's job.
But then there is the problem that the data pin will output a 5volt signal to the ESP, which will damage it.
@jim-p mentioned the solution for that in post@8.
I posted this cure many times in detail on this site. Not going to repeat myself again.
Do a forum search...
Leo..

Hi, @erb0
Welcome to the forum.

Can you post some images of your project?
So we can see your component layout.

You have soldered the header pins to the PCB?

Thanks.. Tom.... :smiley: :+1: :coffee: :australia:

Ok, carry on.

Which ESP32 do you have?

Connect like this:

Which ESP32 do you have?