Threaded Vacuum Sensor

Im having a hard time finding a vacuum sensor that is the threaded type (1/4 or 1/8 NPT. lots out there but they are hundreds of dollars each.
It will be used to moniter vacuum levels on a Dairy Milker remotely using BLYNK. Range of the mechanical gauge I have now is 0-30"HG (inches of mercury) so id like one in the same range.
there are a ton of Arduino vacuum sensors but none are threaded type.
just wondering if any of you have used one or know of a good quality one out there that's not hundreds of dollars . And yes ive tried google,ebay,amazon, just looking for a tried and tested part

thanks

Yes, industrial sensors cost that much. But they are actually cheap sensors inside some plumbing parts that fit the industrial threads. I would just go to a "good" plumbing store to get adapters to go between your NPT thread and the cheap sensor.

NXP makes a good range of sensors. The MPX series is pretty good. Usually around $8-$12. Just make sure you buy one with a 5V or 3.3V output, stay away from the millivolt ones.

The next step up is Honeywell. They make industrial sensors too, but the "cheap" ones you want to use with your Arduino are usually around $30.

Do you have a link to the Honeywell sensor.
$30-$50
Is fine.
I’d like it to be good quality.
And not homemade. It has to be pretty durable.

Thanks

Do you want an absolute pressure sensor or differential? If you are measuring suction, differential would be best.

I’m replacing a standard dial vacuum gauge. So I’m assuming differential.
It has to be able to measure between 0-30. “Hg.

Would this one work?

https://www.ebay.com/itm/Vacuum-Pressure-Transducer-Sensor-14-5-30-PSI-Oil-Fuel-Gas-Air-Water-Stainless/253539195079?_trkparms=aid%3D111001%26algo%3DREC.SEED%26ao%3D1%26asc%3D20180816085401%26meid%3Db5e0a0ba8903465c8cf574553530041b%26pid%3D100970%26rk%3D1%26rkt%3D3%26sd%3D253539195079%26itm%3D253539195079&_trksid=p2481888.c100970.m5481&_trkparms=pageci%3Aade3204c-32c5-11e9-b359-74dbd180befd|parentrq%3Afbff095c1680ab6acb640044ffe82460|iid%3A1

Well, the vacuum range is only 1/3 of the total range, that would give only about 240 ADC counts out of 718 total, ( 1/8 inHg resolution), but for the price, might be worth a try.

So with the sensor I posted it would be accurate to 1/8”hg increments?
Pretty close to the mechanical gauge I have now.
Would I need a specific library with this sensor. ?

No, if you use a 5 volt Arduino, UNO, Nano, ProMini, you could use the regular analog inputs. You will need libraries for wifi, blynk or whatever, that's out of my pay grade. :slight_smile:

How would I convert the analog reading for this sensor to HG readings.
I assume it would be 0.5v reading for 0hg. And 4.5v for 30”hg ?

When I get the sensor I’m going to do an analog to serial test and see what it outputs while connected to the vacuum pump. But just want to get my head around it a little first.

The way I read it is, 0.5V = -29.5"Hg, 4.5V = 61.080629"Hg, (30 PSI), so a total range 90.580629"Hg, so 0"Hg (atmospheric pressure) would be about 1.8V or an ADC reading of about 369 and a vacuum of 29.5"Hg about 0.5V or ADC 102.
IF my math is valid. :slight_smile:

So how would I put that into code from an analogRead of the ADC to display it in HG

int sensorADC = analogRead(A0); // read the ADC input on pin A0:
float voltage = sensorADC * (4 / 1023.0); // Convert the analog reading to volts (divide by 4 volts)
float Hg = voltage * (15.27015); // range of sensor 61.0806 hg divided by 4 volts
Serial.println(Hg);

since the sensor output is 0.5 volts to 4.5 volts the volt range is 4 volts
and if I have a 4 volt range to divide the max HG's of the sensor 61.0806 that means 4 volts divided by 61.07

math seems to work what does everybody think

Give this a try, compiles on Nano, untested of course. Put in real numbers when you get the sensor.

int zOffset = 102, // ADC value @ -29.5 "Hg
    span = 819,
    atm = 268, // ADC val @ atmospheric - zOffset
    sensorADC;
float pressure,
      fullScale = 90.581, // "Hg (30 PSI)
      vac;
void setup()
{
  Serial.begin(9600);

}
void loop()
{
  sensorADC = analogRead(A0);
  pressure = (sensorADC - zOffset - atm) / span * fullScale;
  Serial.print(pressure,1);
  Serial.print("  inHg  "); // negative reading is vacuum
  if(pressure <= 0)
  {
    vac = pressure * - 1;
    Serial.print(vac);
    Serial.println("  inHg vacuum");
  }
  else
    Serial.println();
  delay(500);
}

Thanks
So I wasn't even close with my code

I will try the code out when I get the sensor in a couple days . I found another source with quicker shipping.
should have it by Friday hopefully.

Thanks

I can’t get the sensor I wanted in time.
Ships from China.

Would one that does 0 - 1.2 MPa
Work?
0.1 mpa is basically 29.5 inches hg so the math would be significant but will it work?

But you need vacuum (negative pressure relative to atmosphere), do you not? You can get differential pressure transducers and absolute ones, see reply # 1. They are naked chips that would have to be mounted and connected with hose and hose barb fitting.

I’ll keep looking to find a better source for the 14.5-30 psi sensor.
Seems the right fit. But if worse comes to worse I could mount the chip mounted sensor in the enclosure and run a vac tube to the pump.

That was - (negative) 14.5 to + 30 PSI, You do need a VACUUM gauge, right?

Yes. Just like a standard vacuum gauge
0”hg - 30”hg.
I call it just “hg but it’s probley -“hg. I just don’t measure anything else in hg so I just call it hg.
Most it ever gets to is 27”hg maybe when the lines are getting cleaned. But most of the time it’s at 15”hg.
But all vacuum gauges go from 0-30” hg