Differential Pressure Sensor with 4-20mA Output

Right, I'm only planning on building 1 as a prototype for proof of concept, but I'm keeping an eye on what the total cost of making 12 of them will be.

I haven't considered WiFi. The WiFi in the out in the plant is at least 20 years old, and there is very little interest from management about spending any money on that.

Plus, I need POE to power my Arduino device, so that's why I'm using Ethernet.

Running CAT6 to each filter house is something I can do myself right away too, whereas if I have to involve our 2 in-house electricians to provide me the kind of electricity I need, where I need it, I'm sure I will be the lowest of the low on their priority list.

I'm taking a closer look at the least expensive sensor Jim recommended.

I haven't ever done anything with I2C before, so I'm reading up on how to write a sketch to do that.

I had been filtering off the sensors with +/- operating pressure, so I didn't even see these ones.

Thanks Jim.

Dwyer once made "PhotoHelics" with adjustable HI / LO limit switches and digital versions of same. Not cheap though.

https://dwyer-inst.com/en/products/pressure/differential-pressure/gage-switches-dial.html

https://dwyer-inst.com/en/products/pressure/differential-pressure/gage-switches-digital.html

I2C is pretty easy with the Arduino IDE. I'll guess one example and you'll be an expert.

1 Like

I think it would be worth your while to call Dwyer and tell them what you are doing and ask the apps engineer for their best option. You don't have to use that option but at least you will know what a "pro" suggests.

I bought that Amphenol ELVH-L04D-HRRD-I-N2A5 differential pressure sensor, and got it connected via I2C. It's working for the most part. I think I was able to get the correct data out of the 4 bytes that can be read out of it.

Here's my sketch programming code for reading the 4 bytes and creating the values for pressure and temperature. I know there's lots of examples on here with "bit shift" left and right, but I just did something that was easier for me to understand.

         if (Wire.requestFrom(0x28, 4) == 4)
          {
            data[0] = Wire.read();
            data[1] = Wire.read();
            data[2] = Wire.read();
            data[3] = Wire.read();
            for (indx = 0; indx < 16; indx++)
            {
              int_array[indx] = 0;
            }
            int_array[0] = bitRead(data[1], 0);
            int_array[1] = bitRead(data[1], 1);
            int_array[2] = bitRead(data[1], 2);
            int_array[3] = bitRead(data[1], 3);
            int_array[4] = bitRead(data[1], 4);
            int_array[5] = bitRead(data[1], 5);
            int_array[6] = bitRead(data[1], 6);
            int_array[7] = bitRead(data[1], 7);
            int_array[8] = bitRead(data[0], 0);
            int_array[9] = bitRead(data[0], 1);
            int_array[10] = bitRead(data[0], 2);
            int_array[11] = bitRead(data[0], 3);
            int_array[12] = bitRead(data[0], 4);
            int_array[13] = bitRead(data[0], 5);
            press = 0.0;
            factor = 1.0;
            indx = 0;
            while (indx < 16)
            {
              if (int_array[indx] == 1)
              {
                press += factor;
              }                                        
              factor = (factor * 2.0);
              indx++;
            }
            // factor = (high - low) / (io_high - io_low)
            press_factor = (4.0 - (-4.0))/(16383.0 - 0.0);
            // reading = low + (factor * io)
            pressin_reading = -4.0 + (press_factor * press);
            client.print("<br>DiffPress: ");
            client.print(pressin_reading);
            pressmm_reading = (pressin_reading * 25.4);
            client.print("\" of H2O (");
            client.print(pressmm_reading);
            client.println("mm of H2O)<br>");

            for (indx = 0; indx < 16; indx++)
            {
              int_array[indx] = 0;
            }
            int_array[0] = bitRead(data[3], 5);
            int_array[1] = bitRead(data[3], 6);
            int_array[2] = bitRead(data[3], 7);
            int_array[3] = bitRead(data[2], 0);
            int_array[4] = bitRead(data[2], 1);
            int_array[5] = bitRead(data[2], 2);
            int_array[6] = bitRead(data[2], 3);
            int_array[7] = bitRead(data[2], 4);
            int_array[8] = bitRead(data[2], 5);
            int_array[9] = bitRead(data[2], 6);
            int_array[10] = bitRead(data[2], 7);
            temp = 0.0;
            factor = 1.0;
            indx = 0;
            while (indx < 16)
            {
              if (int_array[indx] == 1)
              {
                temp += factor;
              }                                        
              factor = (factor * 2.0);
              indx++;
            }
            // tempc_reading is calculated with formula from reference manual
            tempc_reading = ((temp*(200.0/2047.0))-50.0);
            // convert from Celsius to Farenheit ((tempc * 9/5) + 32)
            tempf_reading = (tempc_reading * 1.8) + 32.0;
            client.print("<br>Temp: ");
            client.print(tempf_reading);
            client.print(" F (");
            client.print(tempc_reading);
            client.println(" C)");
          }
          else
          {
            client.println("4 bytes were not received");
          }

My question is in regards to the temperature. The temperature reading is about 4-5 degrees higher than the AM2302 temperature sensor I just bought, the HVAC thermostat on the wall near my office, and the infrared temperature device I got from the maintenance shop.

image

Am I scaling the output from the sensor wrong? Is the sensor reading the temperature wrong, and needs to be calibrated with some sort of offset?

That probably is not the ambient temperature but the internal device temperature that is used to perform whatever temperature compensation algorithm they use to calculate air pressure. The internal device temperature may well be a few degrees higher.

Well, that's a horse of a different color then... I won't worry about or even report the temperature from the differential pressure sensor.

As long as the differential pressure readings are somewhat close to what the analog gauges are showing, I think I'll be in good shape.

Thanks again for helping me with this Jim.

You should check those two status bits for an error condition

I installed the sensor on a filter house, but the readings are a lot lower than the existing analog gauge.

My sensor reports 51.52 mm of H2O, but the analog gauge is reporting 69 mm of H2O.

Do I need to somehow calibrate the differential pressure readings?

I changed my code to grab those two status bits. The bits have been 0 since I started collecting them.

What are the analog gauges calibrated against?

That's a good question... I'll have to ask around with some of the maintenance guys. Maybe the analog gauge doesn't register the correct differential pressure either.

1 Like

The consensus is that there is no calibration done at all on the analog gauges. They take a gauge out of its box, connect it to the air hoses on the filter house, and boom done.

Ok, well, that's frustrating... how am I to figure out what is the actual differential pressure?

I'm sure that question is well beyond the scope of the Arduino forum, so I'll have to figure something out.

Thanks to all for the assistance.

That probably also means that they haven't been checked over all the years that they accumulated the various sharpie pen annotations as well.

Maybe if you ask around there is a low dp calibration gauge you can borrow to check the accuracy of your sensor.

Research “U-Tube Manometor”. You can verify against that. You can make one yourself.

Does your company's maintenance department have a spare Magnehelic you could borrow?

Was it connected to the same pressure ports as the analog gauge, using the same length of tubing?

Thanks for replying to my post... I found 2 spare Magnehelic gauges in the Parts Room, but they're both "inches of water" instead of "mm of water" like the one that's currently out there on the filter house. I'm going to try and connect it to see what it reads and convert inches to mm.