Analog Pressure Sensors (automotive type

JohnRob:
I've never seen an automotive pressure sensor that was absolute. They are all Gauge pressure. I very much doubt you have absolute transducers, most likely low accuracy gauge type

These are not what I would call high end transducers. This site claims 2% error without any explanation of how the error (if real) is calculated. Also you didn't mention how much off the 102 count your transducer.

Easy test. Connect the transducer to your arduino and leave it sit. Monitor the readings every couple of hours for maybe a day and see how stable it is. After that, repeat the test but warm or cool the transducer, see how much it changes with temperature. See if the short term change is stable enough for you to even consider.

For any pressure transducer the most unstable parameter is the zero offset. Even in the most costly sensors this is the most difficult characteristic to keep stable. And the arduino is not what I would call a precision device.

So I think you should look at your goals from the application side. A good rule of thumb is one should use a transducer at about 2/3 of the max range. This means you will require transducers with different ranges.

You mentioned your expected pressure values but you didn't mention what you need to measure to accomplish your goals. Is it there or not there? Or do you need values?

I realize you must stay with the Arduino for readings. However if you expect any precision I strongly suggest you get one with this chip on it MCP3421

The delta sigma conversion is the key here. They are inherently low noise and rejecting most periodic noise. You will need three of these, one for each transducer and one for the 5V transducer supply. I thought there was another type of delta sigma converter with multiple input channels but I couldn't find it in a quick eBay search.

Hi John Robert,
Quick follow up on the mcp342X.
The X in the PN indicates the number of channels.
The 342x is an 18 bit version, lower versions exist, all the way down to the 10 bit 30xx.
Do I understandyyou correctly:
Install an MCP really close to the sensor.
Supply both with 5V, ground one input and connect the pressure transducer's output to the remaining input of the MCP...
This would certainly reduce noise due to EMI, ground loops, ionization currents in the water etc...
My question is around the I2C... The sensors are as far as 6m (20') from the Arduino. Will this create and issues. The forum seems split on the issue. I newly have 22awg/4 shielded sensor wire installed.
Cheers

Alright;

The plot thickens:,

Definitely running up against CHEAP! sensors here.

In order to trouble shoot and calibrate in the units in the lab, I built a manifold out of brass Ts and connected the sensors on it. A separate port has the water column attached, so I can vary the pressure from 0cm to 250cm of water.

The sensors are hooked up to the connector block via 1.2m long 22/4 shielded cable. the connector block has a 2.2uF film sitting across the 5V.

each sensor output is connected as follows sensor → 47k → 100nF to ground. from 47k → 510ohm → Analog in (as per a previous post by @JohnRob)… there is a 32x digital filter in software.

I initially let the system run for several hours and monitored the output. less than 10/1024 variability, both at 0cm and 250cm water column. I used these values to set the offset and slope in the software. I could vary the water column and accurately display the result for all sensors.

Then it started raining (the sensor manifold sits on the terrace) and I noticed one of the sensors drift dramatically. In Colombia, when it rains, it pours, so I thought maybe the rapid drop in pressure caused the differential pressure to go haywire. In hindsight this makes no sense.

When it occurred to me that maybe the water touching the brass manifold and changing ground conductivity might cause some drifting. So, I took a an alligator clip and connected the shield of the 22/4 wire to the brass manifold. Lo and behold, only one sensor remained stable. One drifted up by about 200 counts, the other maxed out at 1020!!!

Measuring the insulation between 0V, Vcc, Vout and sensor chassis shows the culprit. Only stable sensor shows open circuit on my DVM. The one that drifted to MAX has as little as 40k, the others are in the 3-6M range of resistance…

Of the five sensors I have, only two are well insulated. The 150psi (too big a range for the app) unit and one of two 10psi units are useable as my circuit is designed at present…

Now, my electrical engineering career is about 30 years behind me, but if I had to guess, I would be pointing at the values of the RC filter as a potential culprit. Putting this to the test, I removed the analog filters and connected the sensor output straight to the Analog in. Same result. One sensor unaffected, on sensor moves up to 400, the other maxes out…

I’d buy more sensors, but the odds are of 2/5 are rather poor and for now, it seems Amazon doesn’t have 10 psi sensors in stock…

Any ideas? since I’m measuring water, isolating the sensors won’t work. The stainless membrane of the sensor will see water…

Cheers.

trilife:
Alright;

The plot thickens:,

Definitely running up against CHEAP! sensors here.

In order to trouble shoot and calibrate in the units in the lab, I built a manifold out of brass Ts and connected the sensors on it. A separate port has the water column attached, so I can vary the pressure from 0cm to 250cm of water.

The sensors are hooked up to the connector block via 1.2m long 22/4 shielded cable. the connector block has a 2.2uF film sitting across the 5V.

each sensor output is connected as follows sensor --> 47k --> 100nF to ground. from 47k --> 510ohm --> Analog in (as per a previous post by @JohnRob)... there is a 32x digital filter in software.

I initially let the system run for several hours and monitored the output. less than 10/1024 variability, both at 0cm and 250cm water column. I used these values to set the offset and slope in the software. I could vary the water column and accurately display the result for all sensors.

Then it started raining (the sensor manifold sits on the terrace) and I noticed one of the sensors drift dramatically. In Colombia, when it rains, it pours, so I thought maybe the rapid drop in pressure caused the differential pressure to go haywire. In hindsight this makes no sense.

When it occurred to me that maybe the water touching the brass manifold and changing ground conductivity might cause some drifting. So, I took a an alligator clip and connected the shield of the 22/4 wire to the brass manifold. Lo and behold, only one sensor remained stable. One drifted up by about 200 counts, the other maxed out at 1020!!!

Measuring the insulation between 0V, Vcc, Vout and sensor chassis shows the culprit. Only stable sensor shows open circuit on my DVM. The one that drifted to MAX has as little as 40k, the others are in the 3-6M range of resistance...

Of the five sensors I have, only two are well insulated. The 150psi (too big a range for the app) unit and one of two 10psi units are useable as my circuit is designed at present...

Now, my electrical engineering career is about 30 years behind me, but if I had to guess, I would be pointing at the values of the RC filter as a potential culprit. Putting this to the test, I removed the analog filters and connected the sensor output straight to the Analog in. Same result. One sensor unaffected, on sensor moves up to 400, the other maxes out...

I'd buy more sensors, but the odds are of 2/5 are rather poor and for now, it seems Amazon doesn't have 10 psi sensors in stock...

Any ideas? since I'm measuring water, isolating the sensors won't work. The stainless membrane of the sensor will see water...

Cheers.

OK, so I removed all the sensors from the manifold and ohmed them out individually. Then I applied power, measuring output, with and without grounding the housing:
2 show completely open circuits and are not affected by grounding the housing. one 10psi one 150psi
2 show 12k-50k to ground and 2.2M to VCC. Their output floats to close to VCC. 30psi and 10psi
1 is busted 100psi...
Solution: Buying 4 each of 10psi and 80psi and repeating the above test. Send back what fails... Long Live Amazon Prime!
BTW, I think JohnRob had suspected noise on the Buck converter. Indeed, the scope showed almost 500mV/5V! So, I changed the supply of the sensors back to the regulated supply of the Arduino. Huge drop in fluctuations. Thanks for the tip!
I'll post the results of my bulk buy.
Cheers

Hallo,
Hast du schon einen Code dafür? Es würde mich sehr interessieren, wie Sie wegen des Drucks an die Berechnung herangehen. Da habe ich auch ein Projekt mit einem Pool und möchte dessen Wasserstand mit einem Drucksensor abfragen. Mein Code ist derzeit so.

int getPressure (int channel, int type, int mittel) {
  float vcc, vsensor, result=0,psi,bar;
  for (int i = 0; i < mittel; i++) {
    vcc = analogReadBG(0x1f); // dummy Read 
    vcc = 1.1 * 1024 /analogReadBG(0x1e) * 1000; // Bandgab Referenz bestimmen 1.1 V Default
    vsensor = (float) analogReadBG(DS_Pin[channel]) * vcc/1024; // Messwert mit korrektem spannungsbeszug
    result +=  vsensor;
  }
  psi  = (float)(result / mittel);
  if (psi < 500) { psi = 500; } // 0,5 mV => 0 PSi damit keine negativen drücke angezeigt werden
  // Serial.print("Druck in mV:  "); Serial.println(psi);
  switch (type) {
    case 60:
    case  5:
      psi =  (type/4.0 * (psi/1000))*100;
      break;
    default: // Fehler bei den Parametern
      return 0;
  }
  bar = psi * 0.0689;
  Pbar=bar;
  Serial.print("Druck Channel "); Serial.print(channel); Serial.print(" in Bar:  "); Serial.println(bar/100);
  return (int)psi;

Ich habe das Arduino für die Referenzspannung verwendet, weil es es unterstützt.

Vielleicht teilen sie ihren Code.

Noise ! the bane of precise measurements.

You might want to consider the MCP Δ-Σ board.

When using an arduino for A/D conversion, the sample time is in the µs range. Kind of like taking a flash photo of someone moving. The RC can only average multiple "flash" measurements / photos.

The Δ-Σ conversion integrates the signal over the full conversion time. The longer the time the better the integration of the voltage.

So if during the conversion time an AC coupled spike was coupled into your pressure signal, the spike (being AC would have NO effect on the converted signal.

The company I worked for required a lot of temperature measurements on test vehicles (cars , pickup trucks etc). They had been using 100k conversion rate A/D boards to measure the thermocouple data. No matter how much you filtered after the fact it was near impossible.

I switched them over to a Δ-Σ data acquisition system and the temperature now turned meaningful.

Good luck

JohnRob:
Noise ! the bane of precise measurements.

You might want to consider the MCP Δ-Σ board.

When using an arduino for A/D conversion, the sample time is in the µs range. Kind of like taking a flash photo of someone moving. The RC can only average multiple "flash" measurements / photos.

The Δ-Σ conversion integrates the signal over the full conversion time. The longer the time the better the integration of the voltage.

So if during the conversion time an AC coupled spike was coupled into your pressure signal, the spike (being AC would have NO effect on the converted signal.

The company I worked for required a lot of temperature measurements on test vehicles (cars , pickup trucks etc). They had been using 100k conversion rate A/D boards to measure the thermocouple data. No matter how much you filtered after the fact it was near impossible.

I switched them over to a Δ-Σ data acquisition system and the temperature now turned meaningful.

Good luck

Awesome information JohnRob!
Got my covid negative test and am heading to he airport in a few hours to go back to California for a few weeks to ski.
There will be several pressure sensors waiting for me and after this post, I'll add a MKR and Mega to my luggage and order the MCPs you mentioned. Nice experiments by the fire.
I didn't get an answer to the question about how far I2C can travel? I have 6m to the sensors. Putting the MCP next to the sensor would get rid of the pump induced EMI...
Cheers.

I2C is designed for intra-PCB communications, and works well on short wires.

6m or even more reportedly is possible, but you will have to take some measures to get a clean signal: strong pull-up resistors on both sides, reduced speed (default is 100 kbps, lower that to 50, 20, maybe 10 kbps), wires in twisted pairs. Using thinner wires rather than thicker should help as well (lower capacitance).

Note that if you have two sensors at 6m distance on separate wires, that counts for 12m of wire.

wvmarle:
I2C is designed for intra-PCB communications, and works well on short wires.

6m or even more reportedly is possible, but you will have to take some measures to get a clean signal: strong pull-up resistors on both sides, reduced speed (default is 100 kbps, lower that to 50, 20, maybe 10 kbps), wires in twisted pairs. Using thinner wires rather than thicker should help as well (lower capacitance).

Note that if you have two sensors at 6m distance on separate wires, that counts for 12m of wire.

Thanks Wvmarle,
Darn, i just swapped the Cat6A for shielded 22/4... Let me play with the MCP near Mega and near Sensor and report back... Good investigation.
Cheers

Highly recommended to do some bench testing before installing any wires!

I don't know if shielding is good or not when it comes to I2C. It keeps interference out (as does twisted pairs), but I think it may increase wire capacitance and that is bad for I2C.

wvmarle:
Highly recommended to do some bench testing before installing any wires!

I don't know if shielding is good or not when it comes to I2C. It keeps interference out (as does twisted pairs), but I think it may increase wire capacitance and that is bad for I2C.

It's that the "bench" is really uncomfortable in a pump room - damp, noisy, stuffy.
I did test the new shielded 22/4 6m wires in the workshop. After I cleaned up the power supply noise. There was minimal movement...
In the pump room, the conduit will add to the shielding. I'm using leftover PexAlPex tubing and piercing the Pex to get to the Al at the Mega.

Good afternoon from Colombia;

I’d like to give a brief update on the topic of these sensors.

Recap. I had 5 sensors of various ranges from 10psi to 150psi. They were not working as advertised to say the least. What to expect for $20, you might say… huge drift, sensitive to grounding etc.

When I measured their impedances from any of the leads to chassis, the two good ones measured open circuit (on a 20Mohm meter). The drifty ones measured anywhere from a few 10kohm to 5Mohm. The lower the resistance, the driftier…

So, as indicated, I ordered 4 each of the units I needed, 10psi and 80psi. While from the same apparent manufacturer (66 Jinghui Rd, Wuxi China), they were bought from https://www.amazon.com/gp/product/B07Y887NT6/ref=ppx_yo_dt_b_asin_image_o07_s00?ie=UTF8&psc=1 and https://www.amazon.com/gp/product/B07KJHJNFQ/ref=ppx_yo_dt_b_asin_title_o08_s00?ie=UTF8&psc=1.

As soon as I got them, I ohmed them out. Lo and behold ALL of them measured open circuit.

Back home, I put them to the test, two 10psi and two 80psi side by side on my application. on 1-6m shielded 4/22AWG wires.

  • All 4 read between 90-92 counts at 0 bar (instead of 102 ideal) that’s less than 1% offset.
  • When subjected to 200cm of water column, they are within 0.1% once corrected for offset.
  • Less than 0.2% drift when the outside temps change by 10degs C.
  • no sensitivity to touching.

I also added TelnetPrint (thanks @Juraj ), so I don’t have to connect the USB cable to the Arduino, although this proved to not affect drift in any way (Arduino is powered through the power jack with 9V, Sensors are off the Arduino’s 5V. they only consume 1.5mA)

Next step is going to the Pump house and see, how the whole thing performs in a noisy environment. But I’m tempted to add a [SOLVED] to the title of this thread.

Cheers all.