# Python code for finding the pressure differential using a Honeywell pressure sensor

**URL:** <https://forum.digikey.com/t/python-code-for-finding-the-pressure-differential-using-a-honeywell-pressure-sensor/15272>\
**Category:** Sensors Transducers\
**Tags:** sensors-transducers, honeywell, automation-and-control, associated-products\
**Created:** [July 7, 2021, 7:23pm UTC](https://forum.digikey.com/t/python-code-for-finding-the-pressure-differential-using-a-honeywell-pressure-sensor/15272 "2021-07-07T19:23:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johnweb](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@Johnweb](https://forum.digikey.com/u/Johnweb)\
**Post date:** [July 7, 2021, 7:23pm UTC](https://forum.digikey.com/t/python-code-for-finding-the-pressure-differential-using-a-honeywell-pressure-sensor/15272/1 "2021-07-07T19:23:53Z")

</div>

Hi, I’m working with the Pressure Sensor 1PSI (6.89kPa) Differential Male - 0.19" (4.8mm) Tube, Dual 0 mV ~ 18 mV (12V) 6-SIP. The part number is 480-6686-ND. I’m pairing it with a Raspberry Pi Model 3 and was wondering if I could have any help with the python code. I’m connecting two different bits of tubing to each male connector and was wondering if anyone has used it to continuously display the pressure differential.

---

<div class="post-metadata">

**Author:** ![Steven\_14444](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/steven_14444/32/47465_2.png) [@Steven\_14444](https://forum.digikey.com/u/Steven_14444)\
**Post date:** [July 7, 2021, 9:03pm UTC](https://forum.digikey.com/t/python-code-for-finding-the-pressure-differential-using-a-honeywell-pressure-sensor/15272/2 "2021-07-07T21:03:49Z")

</div>

How are you connecting the sensor to the Raspberry Pi? The sensor has an analog output and the Pi doesn’t have an ADC. If you need one this may work for you [1528-1461-ND](https://www.digikey.com/en/products/detail/adafruit-industries-llc/1085/5761229?s=N4IgTCBcDaIIwFYwA4C0cAsA2OqByAIiALoC%2BQA). There is a good tutorial on [Adafruit](https://learn.adafruit.com/adafruit-4-channel-adc-breakouts/python-circuitpython) for this ADC.

---

<div class="post-metadata">

**Author:** ![PaulHutch](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/paulhutch/32/3357_2.png) [@PaulHutch](https://forum.digikey.com/u/PaulHutch)\
**Post date:** [July 7, 2021, 9:15pm UTC](https://forum.digikey.com/t/python-code-for-finding-the-pressure-differential-using-a-honeywell-pressure-sensor/15272/3 "2021-07-07T21:15:38Z")

</div>

With a sensor full scale output span of only 18mV, you’ll likely also need some amplification between the sensor and ADC.

---

<div class="post-metadata">

**Author:** ![Johnweb](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@Johnweb](https://forum.digikey.com/u/Johnweb)\
**Post date:** [July 8, 2021, 3:36pm UTC](https://forum.digikey.com/t/python-code-for-finding-the-pressure-differential-using-a-honeywell-pressure-sensor/15272/4 "2021-07-08T15:36:07Z")

</div>

I’m currently using the PCF8591 ADC/DAC Module

---

<div class="post-metadata">

**Author:** ![Johnweb](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@Johnweb](https://forum.digikey.com/u/Johnweb)\
**Post date:** [July 8, 2021, 3:36pm UTC](https://forum.digikey.com/t/python-code-for-finding-the-pressure-differential-using-a-honeywell-pressure-sensor/15272/5 "2021-07-08T15:36:45Z")

</div>

Since I’m rather new to this, what would be the best way to do so?

---

<div class="post-metadata">

**Author:** ![rick\_1976](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/rick_1976/32/1571_2.png) [@rick\_1976](https://forum.digikey.com/u/rick_1976)\
**Post date:** [July 8, 2021, 4:14pm UTC](https://forum.digikey.com/t/python-code-for-finding-the-pressure-differential-using-a-honeywell-pressure-sensor/15272/6 "2021-07-08T16:14:04Z")

</div>

One would typically use an op amp in a non-inverting configuration for such a task. Your search engine of choice should come up with lots of resources on the topic if asked nicely.

That said, the PCF8591 only provides 8-bit resolution and uses its supply voltage as a reference, which is likely to introduce errors. I’d suggest using a similar sensor such as the [5525DSO-DB001DS](https://www.digikey.com/en/products/detail/te-connectivity-measurement-specialties/5525DSO-DB001DS/5824908) with an integral ADC. That device offers 24-bit resolution, lower cost, better availability, and potential to connect directly to a Pi with no additional boards needed.

---

<div class="post-metadata">

**Author:** ![PaulHutch](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/paulhutch/32/3357_2.png) [@PaulHutch](https://forum.digikey.com/u/PaulHutch)\
**Post date:** [July 9, 2021, 1:31pm UTC](https://forum.digikey.com/t/python-code-for-finding-the-pressure-differential-using-a-honeywell-pressure-sensor/15272/7 "2021-07-09T13:31:04Z")

</div>

The best way depends on dozens of factors revolving around price, calibration labor & tools, resolution, accuracy, ambient environmental conditions etc.

Basically this is a sensor style designed in the late 1970s, was state of the art last century, and is obsolete for most uses in this century. The amplification level required with a 3.3V reference for full scale resolution is 183X. That’s a bucket load of gain to get without excessive noise errors, time, and even room temperature drift errors.

I designed a circuit for a very similar absolute pressure sensor back in the early 90s. That circuit had to get maximum performance at minimum production cost and would cost over $10K to design in 2021 dollars. Of course if the dozens of application specific requirements are low enough it could be just a few thousand dollars to design.

Best bet is as @rick_1976 suggests, get a sensor with a digital output.
