Need help for the HX710B

Hello, I need help for the calibration of the HX710B pressure sensor. The readings of the ADC value is a non-zero pressure even without applying a pressure to the MPS20N0040D. How can I make it to a zero or near zero pressure? I'm using Arduino mega as the microcontroller.

#include <Q2HX711.h>

const byte MPS_OUT_pin =46; // OUT data pin
const byte MPS_SCK_pin =44; // clock data pin
int avg_size = 10; // #pts to average over

const float ADC_mV = 4.8828125;    
const float sensitivity = 4.413;    
const float mmh2O_kpa = 0.00981;
    

Q2HX711 MPS20N0040D(MPS_OUT_pin, MPS_SCK_pin); // start comm with the HX710B

void setup() {
  Serial.begin(9600); // start the serial port

}

void loop() {
  float avg_val = 0.0; // variable for averaging
  for (int ii=0;ii<avg_size;ii++){
    avg_val += MPS20N0040D.read(); // add multiple ADC readings
    delay(50); // delay between readings
  }
  avg_val /= avg_size;
  Serial.println(avg_val,0); // print out the average
    

  float mmHg = ((avg_val - ADC_mV) / sensitivity )/ mmh2O_kpa;

  Serial.println(mmHg, 2); // print out the converted value with 2 decimal places
 
}

Simple answer: subtract the zero error (offset) from the readings.

Harder: learn about calibration.

You are using the library for HX711 with an HX710B. I guess these two are very similar, so that may be why the library appears to work. But the HX711 library does not state that it is also compatible with HX710B, so maybe there is a small difference, and this could be why you do not get a zero result as expected?

Why do you divide by mmH2O_kPa to convert to mmHg?

I just see some coding for the HX710b like that so I tried it. So what is the correct formula I should use??

So I should just make an offset variable then subtract it to the from the readings of ADC value or the float mmHg?

Doesn't really matter...

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