Impact-Site-Verification: 33531259-4261-44da-bd01-8f3462366472

Tag: pool pressure

  • How to monitor pool filter pressure in Home Assistant with ESP32

    How to monitor pool filter pressure in Home Assistant with ESP32

    This guide shows how to add pool filter pressure to Home Assistant with an ESP32, an ADS1115 and a 4-20 mA industrial pressure transducer, while keeping the original mechanical gauge on the filter.

    A filter pressure gauge is one of the simplest ways to understand what is happening in a pool hydraulic system. When pressure rises above the normal clean-filter value, the filter may be getting dirty, the return side may be restricted, or the system may need attention. The problem is that the gauge is usually only visible at the equipment pad.

    The goal of this build is to turn that gauge reading into Home Assistant data: live pressure, history, trend graphs and alerts.

    What you need

    • ESP32 running ESPHome.
    • ADS1115 analog-to-digital converter.
    • 24 V power supply, such as a MeanWell LRS-75-24.
    • 24 V to 5 V buck converter for the ESP32 and ADS1115.
    • 4-20 mA pressure transducer, 8-32 VDC supply, 0-0.5 MPa / about 0-72 PSI range.
    • 150 ohm 0.1% precision resistor.
    • 1/4″ NPT brass tee for the filter gauge port.
    • G1/4 BSPP to 1/4″ NPT adapter if the sensor connection requires it.
    • Waterproof enclosure, fuse and terminal blocks.

    Step 1: keep the mechanical gauge

    Do not remove the original pressure gauge permanently. The cleanest first version is to add a tee fitting so the mechanical gauge and the electronic pressure transducer can both stay connected.

    Mechanical gauge
      |
    1/4" NPT tee
      | 
      |  4-20 mA pressure sensor
    Filter

    The mechanical gauge is useful for two reasons: it remains a local backup, and it gives you something to compare against when calibrating the electronic reading.

    Step 2: choose the right pressure range

    A 0-362 PSI sensor may look more universal, but it is not ideal for a residential pool filter. Most of that range will never be used, which reduces practical resolution in the area you care about. A 0-0.5 MPa sensor, roughly 0-72 PSI, is a much better match for pool filter monitoring.

    Step 3: power the sensor and ESP32

    The 24 V supply powers the pressure transducer directly. The same 24 V supply also feeds a buck converter, which provides 5 V to the ESP32 and ADS1115. Tie all grounds together.

    120 VAC
      |
    MeanWell 24 V
      |-- pressure sensor
      |
      `-- 24 V to 5 V buck
            |
            ESP32 + ADS1115

    Step 4: convert 4-20 mA to an ADS1115 voltage

    You do not need a separate 4-20 mA to 0-10 V converter. Put a 150 ohm precision resistor in the current loop and measure the voltage across that resistor with the ADS1115.

    4-20 mA pressure transducer
      |
    150 ohm precision resistor
      |
    ADS1115 A0
      |
    ESP32
      |
    Home Assistant
    Loop currentVoltage across 150 ohmMeaning
    4 mA0.60 V0 PSI
    20 mA3.00 Vabout 72 PSI

    Step 5: calculate PSI in Home Assistant

    With the 150 ohm resistor, the sensor output should map like this:

    0 PSI  -> 0.60 V
    72 PSI -> 3.00 V

    The starting formula is:

    PSI = (V - 0.60) * 30.21

    After the sensor is installed, compare the Home Assistant value with the mechanical gauge and adjust the calibration if needed. Do this with the pump running at a known, repeatable speed.

    Step 6: create useful Home Assistant sensors

    • Filter pressure in PSI.
    • Filter pressure in kPa.
    • Filter pressure in bar.
    • A history graph for pressure over time.
    • A dirty-filter alert based on your clean-filter baseline.
    • A diagnostic view that combines pressure, pump speed and pump power.

    The alert threshold should not be copied blindly from another pool. First record your normal clean-filter pressure at common pump speeds, then alert when the pressure rises above that baseline by a meaningful amount.

    Field test: live filter pressure in Home Assistant

    The first wired test is now working with the pump running at maximum speed and the solar panels in the loop. Home Assistant shows about 1.21 bar, 121 kPa or 17.0 PSI, from a 7.82 mA loop current and about 1.165 V across the 150 ohm resistor.

    Home Assistant ESPool filter pressure sensors showing 1.21 bar, 121 kPa and 17.0 PSI
    First live ESPool pressure test in Home Assistant: the same reading is exposed as bar, kPa and PSI.

    That value is plausible for this hydraulic state, but the next calibration step is still important: install a tee so the original mechanical gauge remains in place, then compare the electronic reading against the gauge at a few repeatable pump speeds.

    Working wired connection

    The working test uses a 24 V powered 4-20 mA pressure transducer, a 150 ohm precision resistor as the current shunt, and an ADS1115 powered from the ESP32 3.3 V rail.

    24 V positive -> pressure sensor positive
    Pressure sensor 4-20 mA output -> 150 ohm resistor
    Other side of 150 ohm resistor -> 24 V negative / common GND
    
    ADS1115 A0 -> positive side of the 150 ohm resistor
    ADS1115 GND -> common GND
    ADS1115 VDD -> ESP32 3V3
    ADS1115 SDA -> ESP32 GPIO21
    ADS1115 SCL -> ESP32 GPIO22

    With this resistor, the expected voltage is simple: about 0.60 V at 4 mA with no pressure, and about 3.00 V at 20 mA at full sensor scale. Keep the ADS1115 powered at 3.3 V when it is connected directly to an ESP32 I2C bus.

    ESPHome configuration used on the ESP32

    This test was added to an ESP32 that was already used as a Bluetooth proxy. The ADS1115 uses I2C, so it can share the ESP32 with the BLE proxy.

    esp32_ble_tracker:
    
    bluetooth_proxy:
      active: true
    
    i2c:
      sda: GPIO21
      scl: GPIO22
      scan: true
    
    ads1115:
      - address: 0x48
    
    sensor:
      - platform: ads1115
        id: pression_filtre_voltage
        name: "Pression filtre voltage"
        multiplexer: "A0_GND"
        gain: 4.096
        update_interval: 10s
        unit_of_measurement: "V"
        accuracy_decimals: 3
    
      - platform: template
        name: "Pression filtre courant"
        id: pression_filtre_courant
        unit_of_measurement: "mA"
        accuracy_decimals: 2
        update_interval: 10s
        lambda: |-
          if (isnan(id(pression_filtre_voltage).state)) return NAN;
          return id(pression_filtre_voltage).state / 150.0 * 1000.0;
    
      - platform: template
        name: "Pression filtre bar"
        id: pression_filtre_bar
        unit_of_measurement: "bar"
        state_class: measurement
        accuracy_decimals: 2
        update_interval: 10s
        lambda: |-
          if (isnan(id(pression_filtre_courant).state)) return NAN;
          float ma = id(pression_filtre_courant).state;
          float bar = (ma - 4.0) * (5.0 / 16.0);
          if (bar < 0.0) bar = 0.0;
          return bar;
    
      - platform: template
        name: "Pression filtre kPa"
        unit_of_measurement: "kPa"
        state_class: measurement
        accuracy_decimals: 0
        update_interval: 10s
        lambda: |-
          if (isnan(id(pression_filtre_bar).state)) return NAN;
          return id(pression_filtre_bar).state * 100.0;
    
      - platform: template
        name: "Pression filtre psi"
        unit_of_measurement: "psi"
        state_class: measurement
        accuracy_decimals: 1
        update_interval: 10s
        lambda: |-
          if (isnan(id(pression_filtre_bar).state)) return NAN;
          return id(pression_filtre_bar).state * 14.5038;

    Step 7: plan for differential pressure later

    A single pressure sensor is useful, but the better version is differential pressure across the filter. Add a second sensor before the filter, then compare the two readings.

    Pump
      |
    Sensor 1
      |
    Filter
      |
    Sensor 2
    Delta P = inlet pressure - outlet pressure

    This is especially helpful with a variable-speed pump, because normal pressure changes when pump speed changes. Differential pressure is a cleaner way to estimate how restricted the filter is.

    Safety notes

    • Turn the pump off and relieve pressure before opening the filter gauge port.
    • Use pressure-rated fittings and appropriate thread sealant.
    • Confirm the NPT/BSPP adapter before forcing threads together.
    • Keep electronics in a waterproof enclosure.
    • Fuse the low-voltage supply.
    • Keep the mechanical gauge installed until the electronic reading is validated.

    This pressure sensor is the next logical upgrade after the original ESPool ESP32 pool temperature guide. Together, temperature, solar behavior, pump data and filter pressure can make Home Assistant a much better pool diagnostic dashboard.