NPI-19 Pressure Sensor

The npi19 sensor platform allows you to use your NPI-19 (datasheet, product page) pressure sensors with ESPHome.

../../_images/npi19.jpg

NPI-19 Pressure Sensor.

Configuration

I²C bus is required to be set up in your configuration for this sensor to work.

# Example configuration entry
sensor:
  - platform: npi19
    raw_pressure:
      name: "Raw Pressure"
    temperature:
      name: Temperature

Configuration variables

  • raw_pressure (Optional): The information for the pressure sensor. See Converting units.

  • All other options from Sensor.

  • temperature (Optional): The information for the temperature sensor. Readings in degrees celsius (°C).

  • All other options from Sensor.

  • i2c_id (Optional, ID): Manually specify the ID of the I²C Component. Defaults to the default I²C bus.

  • address (Optional, int): Manually specify the I²C address of the sensor. All known sensors currently configured to 0x28. Defaults to 0x28.

Converting units

The NPI-19 pressure sensor is not calibrated to units, you have to convert the measurement to units yourself.

Estimated

On page 1 of the product application note the value 1638 maps to approximately 10% of the maximum value of the sensor (e.g. 0.5 psi for a 5 psi sensor); the value 14746 maps to approximately 90% of the maximum value of the sensor (e.g. 4.5 psi for a 5 psi sensor). Use calibrate_linear filter to map these sensor values:

# Extract of configuration
filters:
  - calibrate_linear:
    - 1638 -> 0.5
    - 14746 -> 4.5

Calibrated

  1. Expose the sensor to a low known pressure, for example 5 psi.

  2. Observe the value of the raw pressure sensor, for example 1500.

  3. Expose the sensor to a high pressure, for example 90 psi.

  4. Observe the value of the raw pressure sensor, for example 14500.

  5. Use calibrate_linear filter to map the incoming value to the calibrated one:

# Extract of configuration
filters:
  - calibrate_linear:
    - 1500 -> 5.0
    - 14500 -> 90.0

Notes

The NPI-19 I²C has a temperature output, however the manufacturer does not specify its accuracy on the published datasheet. They indicate that the sensor should not be used as a calibrated temperature reading; it’s only intended for curve fitting data during compensation.

See Also