Rick Gessner
Published © GPL3+

Garden Fountain Closed Loop Level Control

A pressure sensor monitors fountain level and, via Home Assistant, allows automatic level maintenance with no visible wires or tubing.

IntermediateShowcase (no instructions)10 hours15
Garden Fountain Closed Loop Level Control

Things used in this project

Hardware components

Honeywell ABP2DANT001PG2A3XX Pressure Sensor
×1
Teyleten Robot ESP-WROOM-32 ESP32S ESP32 Development Board or similar
×1

Software apps and online services

Home Assistant
Home Assistant

Story

Read more

Schematics

Schematic Diagram

Code

ESP Firmware YAML

YAML
ESPHome Builder will generate most of this. Add the i2C and sensor sections. Adjust wifi section.
esphome:
  name: fountainlevel
  friendly_name: FountainLevel

esp32:
  board: esp32dev
  framework:
    type: esp-idf
# Configuration entry for ESP32
i2c:
  sda: GPIO21
  scl: GPIO22
  scan: true
  id: bus_a

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "xxxx"

ota:
  - platform: esphome
    password: "xxxx"

wifi:
  ssid: "xxxx"
  password: "xxxx"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Fountainlevel Fallback Hotspot"
    password: "xxxx"

captive_portal:
sensor:
  - platform: honeywellabp2_i2c
 #   address: 0x28   
    pressure:
      name: "Fountain level"
      min_pressure: 0
      max_pressure: 6895
      transfer_function: "A"
    temperature:
      name: "Fountain temperature"    
    update_interval: 60s

Fountain Level Inches helper YAML

YAML
Add this to your configuration YAML file to create the Fountain Level Inches helper. The 5.3 in line 8 zeroes out the distance from my bowl bottom to my sensor in inches, allowing the reading to show inches in the bowl. Adjust as necessary.
- sensor:
      - name: "Fountain Level Inches"
        unique_id: sensor.fountain_level_inches
        unit_of_measurement: "inH2O"
        device_class: pressure
        state: >
          {% set temp1  = states('sensor. fountainlevel_fountain_level) | float(0) %}
          {{ ((temp1 * 27.7076)-2.5) | round(2) }}

Credits

Rick Gessner
3 projects • 1 follower

Comments