Pressure sensor with hx710b chip

Hello - I have a pressure sensor with the hx710b ADC chip on it. It is similar to the hx711 chip and that library seems to work. I am using it with an arduino mini pro. I have both a 3.3v and a 5v. I plan on placing the sensor in a tube sealed on one end and putting the open end of the tube in a tank of water. As the fluid rises, the pressure should rise, I am not sure if this would be linear, but I doubt it since are will decrease in size 1/2 for about every 33 ft of submersion, so 66 feet is 1/4 the original volume.

When I hook the unit up, I am using a code designed for a load cell. I get readings that of course the code says are in pounds. I would like to calibrate this sensor but I am kind of at a loss how to do that. One thing I was considering was to just empirically calibrate it. So what I would do is put the tube in a tank with no liquid, take a reading, add an inch of liquid and take a reading and so on until I reach about 48 inches for my tank. I think this would work but I can see a couple of issues:

  1. As atmospheric pressure changes, would this effect my readings? I could use a second sensor but since they are not really calibrated to a true stand, I don't think I can just subtract them especially since it is probably not linear.

  2. If I want to duplicate the setup for another similar take but with a new sensor, none of the calibrations would apply, I don't think, because it is not calibrated to a standard.

Here is the board I am using:

Here is my initial code with no empirical calibration and basically unchanged from sparkfun's website for a load cell. Like I said, I get reading that change as I move a plunger.

/*
 Example using the SparkFun HX711 breakout board with a scale
 By: Nathan Seidle
 SparkFun Electronics
 Date: November 19th, 2014
 License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license).

 This example demonstrates basic scale output. See the calibration sketch to get the calibration_factor for your
 specific load cell setup.

 This example code uses bogde's excellent library: https://github.com/bogde/HX711
 bogde's library is released under a GNU GENERAL PUBLIC LICENSE

 The HX711 does one thing well: read load cells. The breakout board is compatible with any wheat-stone bridge
 based load cell which should allow a user to measure everything from a few grams to tens of tons.
 Arduino pin 2 -> HX711 CLK
 3 -> DAT
 5V -> VCC
 GND -> GND

 The HX711 board can be powered from 2.7V to 5V so the Arduino 5V power should be fine.

*/

#include "HX711.h"

#define calibration_factor -7050.0 //This value is obtained using the SparkFun_HX711_Calibration sketch

#define DOUT  3
#define CLK  2

HX711 scale;

void setup() {
  Serial.begin(9600);
  Serial.println("HX711 scale demo");

  scale.begin(DOUT, CLK);
  scale.set_scale(calibration_factor); //This value is obtained by using the SparkFun_HX711_Calibration sketch
  scale.tare(); //Assuming there is no weight on the scale at start up, reset the scale to 0

  Serial.println("Readings:");
}

void loop() {
  Serial.print("Reading: ");
  Serial.print(scale.get_units(), 1); //scale.get_units() returns a float
  Serial.print(" lbs"); //You can change this to kg but you'll need to refactor the calibration_factor
  Serial.println();
}

Any thoughts and comments would be appreciated. I cannot find anything really specific to this sensor.

Anthony

BTW - The sensor seems to be more sensitive when hooked to 5v vs 3.3v. Does this make sense? If it does, it means that calibration is voltage specific.

Anthony

Atmospheric pressure and temperature variations will affect your readings. Your sensor needs to be suitable for liquid use as the inside of the tube will be at 100% humidity.

The output will be linear with height .

Thanks Hammy - That's great information. It seems I need a pressure sensor with temp compensation and differential pressure. That way I only need to calibrate one sensor and since they are linear I can do a two point calibration at empty and full. I am going to test with a cheap sensor chip with water. The actual fluid will be acids and after proof of concept, I will invest in the right sensor.

Thank you for the help.

Anthony

hammy:
Atmospheric pressure and temperature variations will affect your readings. Your sensor needs to be suitable for liquid use as the inside of the tube will be at 100% humidity.

The output will be linear with height .

Atmospheric pressure has no effect, the pressure will always be the same on the sensor and the surface of the liquid. The sensor is reading the difference between atmos and tube pressure.
Humidity will be your major concern, check the spec of the pressure transducer, not the breakout board.
Tom... :slight_smile:

TomGeorge:
Atmospheric pressure has no effect, the pressure will always be the same on the sensor and the surface of the liquid.

Yes I'd agree with that ( the "backend" of the sensor), but , at the time of posting, I had thought this was the problem I had with a similar setup using a bourden gauge, dip tube, and a water butt. I thought was getting some sort of bubbling at the dip tube end due to pressure change - it turned out to be the tiniest of leaks, another issue with this sort of setup lol.

thx for the correction for the OP.