Erratic readings from HX711 and MD-PS002

Hello,

This is my first Arduino project.

The aim of the project is to measure vacuum pressure to control a vacuum pump such that it is switched on and off according to a predetermined logic so that the pressure remains between approximately 7 psia and 8 psia.

I am using:
Arduino Uno R3
HX711 amplifier
MD-PS002 pressure sensor
Breadboard & jumper wires.
Jumper wires are soldered to the MD-PS002.

Schematic and setup photos attached.

The pressure sensor is housed inside a brass fitting, which is then connected to the vacuum chamber. I also have a manual vacuum gauge to be used as verification / calibration.

The idea is to use the HX711 reading to trigger a relay, switching the vacuum pump on or off as desired.
I know I could use a mechanical regulator to control the pressure the chamber is exposed too, but wanted to learn something new.

This is the problem:
The average readings I achieve are erratic. At atmospheric pressure, the average reading ranges from -1 or 0 to circa -43,000. When I apply a vacuum of around 6 psia the reading remains erratic and does not really change, still ranging from 0 to circa 10's of thousands.

I expected to see a difference in the average readings when the pressure in the vacuum chamber decreases.

Before posting this I have searched around and not found an example of fixing this issue.
I have also tried altering the number of readings for the average, the offset and scale and the gain I have tried both 64 and 128

By using a multi meter set on 200mV range I have tried to measure a voltage across combinations of the A+, A-, E+, E- pins. I never got a reading other than zero.

Here is the code

#include "HX711.h"

// HX711 circuit wiring
const int LOADCELL_DOUT_PIN = A2;
const int LOADCELL_SCK_PIN = A3;

HX711 scale;

void setup() {
  Serial.begin(57600);
  scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
  
  byte gain = 64;                         
  long average = scale.read_average(10);    //Reads the average (how many times)
  
 scale.set_scale (1.f);                    //Sets the scale to convert raw data to human readable data (psia). What does 1.f mean?
 float get_scale();                        //Reads the current scale
 scale.set_offset  (100);
 
//This section should print once

  Serial.println("START");  
  Serial.print("OFFSET: ");
  Serial.println(scale.get_offset());         //Serial Print OFFSET: Value  
  Serial.print("AVERAGE: ");
  Serial.println(average);                   //Serial Print AVERAGE: Value  
  Serial.print("CURRENT SCALE: ");
  Serial.println(scale.get_scale());        //Serial Print CURRENT SCALE: Value

delay(10000);

}

 void loop() {

  if (scale.is_ready()) {
    long reading = scale.read();
    long average = scale.read_average(10);  //Reads the average (how many times)
    byte gain = 64;                         //Sets the Gain on Channel A    

// This section should print continuously
 
    Serial.print("AVERAGE: ");
    Serial.println(average);                 //Serial Print AVERAGE: Value
  } else {
    Serial.println("HX711 not found.");
  }

  delay(1000);
  
}

My questions / help required areas are:

  • Why might the average readings be erratic?
  • What can be done to smooth the readings?
  • Is there another question I should be asking?
  • Should I be able to measure a voltage across combinations of the A+, A-, E+, E- pins?
  • Am I wasting my effort with this sensor / load amp combination?
  • What may be a better sensor to use?

Thank you

hx711_english.pdf (160 KB)

It sounds like several hardware issues, there is no bypass in your circuit, no power supply information, etc. It would help if you include a complete schematic with all the power and ground connections. You are working at the mV level and will have a lot of noise problems if not properly designed including leed dress.

Gil,

I thought I had included all required information, but forgot the power supply. I am using the USB port on the Arduino board from a laptop. So the wring is per the schematic + the USB cable. Nothing else. Not sure how I would show that.

What do you mean by leed dress? Is that a typo and should be lead dress? If lead dres I assume you mean a good electrical connection in the whole circuit?

What would a bypass do? And what would it be bypassing?

gilshultz:
It sounds like several hardware issues, there is no bypass in your circuit, no power supply information, etc. It would help if you include a complete schematic with all the power and ground connections. You are working at the mV level and will have a lot of noise problems if not properly designed including leed dress.

The HX711 is designed for exactly this purpose and if you use the recommended circuit
I don't see a problem with noise as it has a low effective bandwidth as you might expect
for a load-cell instrumentation amp/ADC.

Which actual HX711 module are you using BTW?

By using a multi meter set on 200mV range I have tried to measure a voltage across combinations of the A+, A-, E+, E- pins. I never got a reading other than zero.

A bad connection, or a fake part ?

Smooth readings use a Simple Kalman filter.

MarkT:
The HX711 is designed for exactly this purpose and if you use the recommended circuit
I don't see a problem with noise as it has a low effective bandwidth as you might expect
for a load-cell instrumentation amp/ADC.

Which actual HX711 module are you using BTW?
A bad connection, or a fake part ?

It had not occurred to me it could be fake. I purchased it from ebay
https://www.ebay.co.uk/itm/HX711-Digital-Weight-Pressure-Sensor-Module-Dual-channel-24-bit-A-D-Weighing/232748353847?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

Think I will go and look more closely at the connections. I hate not knowing why things do not work!
I have since purchased a MPXV6115VC6U which is a 0.2 v to 4.6 v output, so hopefully that will perform better and without the need for an amplifier. Am I correct in saying this can be wired direct to the Arduino analog input

eBay, say no more.

Did you get any further with using the MD-PS002 and HX711? All of the threads I read seem to end inconclusively....I've now got both these components with the intention of building a freeze-drier, and it would be good to know if someone has had definite success in using them

Hi. Nope, I gave up with those components and bought an absolute pressure gauge MPXV6115V. So much easier and accurate so far.

Just to benefit anyone following this thread, using the EXACT same wiring / components (MD-PS002/HX711) as matthorn95, and the EXACT same code as matthorn95, everything works hunky-dory

Haven't done any calibration yet, but I'm feeling positive...