Skip to content

v1.3.0

Choose a tag to compare

@desiFish desiFish released this 02 Jun 08:42
· 17 commits to main since this release

Release Notes

Overview

This update focuses on improving safety stability, sensor reliability, and loop architecture separation on ESP32. It enhances fault handling, fixes ultrasonic sensor instability, and improves pump safety response consistency.


Hardware Change

Hardware Architecture Change (Pump Switching Stage)

  • The pump switching topology has been modified as an experiment to improve reliability and isolate potential switching-related stress on the pump.

Previous Configuration

  • Pump was directly switched using a FOTEK solid state relay (SSR) (authenticity unknown).
  • SSR handled full motor load switching.

Current Configuration

  • Added Schneider LC1E1210M7 – EasyPact TVS 12A, 3 Pole Contactor (220V AC coil) in the power path.
  • SSR is now used only to energize the contactor coil, not to drive the pump directly.

Wiring Concept

  • SSR → controls contactor coil energization
  • Contactor → performs actual high-current switching to pump
  • Only one pole of the 3-pole contactor is used for single-phase live line switching (due to local unavailability of 1P/2P variants)

Motivation for Change

  • Previous SSR-based switching had uncertainty regarding long-term reliability (FOTEK authenticity unclear).
  • Pump showed gradual increase in current draw and audible “shrill” noise over 6–8 months, associated with:
    • Run capacitor degradation
    • Increased motor stress under imperfect switching conditions
  • After capacitor replacement, performance normalized, but repeated degradation (~yearly cycle) suggested possible switching-related stress or heat contribution.

Rationale for Contactor Introduction

  • Mechanical contactor provides:
    • Clear galvanic isolation
    • Lower leakage and switching ambiguity compared to SSR
    • Better handling of motor inrush conditions (AC-3 duty)
  • SSR now operates in a low-stress control role only (coil driving)

Notes / Experimental Status

  • This configuration is currently experimental.

  • Goal is to observe:

    • Long-term capacitor health
    • Pump current stability
    • Reduction in acoustic stress (shrill noise)
    • Overall switching reliability
  • SSR authenticity and long-term reliability remain uncertain; contactor introduction also serves as a mitigation layer against SSR failure modes.

Changes

  • Key specifications:

    • Type: 3-phase power contactor (3P, 3 NO)
    • Rated current: 12A (AC-3 motor duty)
    • Coil voltage: 220V AC
    • Motor rating: up to ~5.5 kW (typical industrial duty range)
    • Designed for motor switching, HVAC, and general power control applications
    • High mechanical endurance (~10 million operations class typical for this series)
    • DIN rail / panel mount industrial-grade device
  • Wiring adaptation for single-phase pump usage:

    • Although the device is 3-pole, only one pole is actively used for switching live (phase) line
    • Remaining poles are unused in this setup
    • This is a practical constraint due to local availability (1P/2P contactors not available)
  • Note:

    • Ideally, a 1P or 2P contactor would be preferred for single-phase pump isolation
    • However, using one pole of a 3P contactor is electrically acceptable when properly rated and wired
    • Ensures safe switching of load while maintaining industrial-grade reliability

Software Changes

Added

  • Introduced structured pump safety monitoring via monitorPumpSafety()

    • Centralized safety evaluation logic
    • Returns standardized fault codes for system-wide use
  • Improved UART ultrasonic sensor handling

    • Uses 0x55 trigger mode for JSN-SR04T (Mode 2 UART response)
    • Parses structured response format: Gap=xxxmm
    • Prevents system reboot when sensor is disconnected
    • Maintains last valid reading when no response is available
  • Non-blocking ultrasonic update logic

    • Sensor reads are interval-based
    • No blocking wait for sensor response

Modified

  • Refactored readUltrasonic()

    • Robust UART buffer handling
    • Validates and filters distance data
    • Prevents invalid or garbage readings
  • Improved loop2() architecture

    • Sensor updates separated by responsibility:
      • Current sensing
      • Float sensing
      • Ultrasonic sensing
    • RTC update limited to 1-second interval
    • Current averaging decoupled from main loop cycle
    • Safety monitoring executed only when pump is running
  • Pump safety execution improved

    • Fault shutdown moved entirely to loop2()
    • Safety decisions are independent of UI loop execution
  • Alert system improved

    • Alerts are latched in loop2()
    • Consumed and cleared in loop() after display handling
  • Improved runPumpAuto()

    • Reduced blocking behavior during countdown
    • Allows early exit via button press
  • Optimized blinkOrange()

    • Cleaner loop structure
    • Reduced nested blocking behavior complexity

Fixed

  • Fixed ESP32 reboot issue when ultrasonic module is disconnected
  • Fixed UART garbage parsing causing invalid distance readings
  • Fixed inconsistent pump shutdown paths across multiple functions
  • Fixed alert overwrite risk in safety monitoring
  • Fixed timing inconsistencies in loop2() execution cycle

Behavior Changes

  • Pump shutdown is now exclusively controlled from loop2() safety layer
  • UI (loop()) no longer directly manipulates relay state
  • Auto-start trigger uses dedicated alert code (99)
  • Sensor failure no longer affects system stability

Known Limitations

  • UI functions (pumpRunSequence, runPumpAuto) are still blocking
  • Pump control is not yet fully centralized into a single API (startPump/stopPump)
  • Shared variables between cores are not protected using mutex/locks (only volatile where applicable)

Notes

This release significantly improves system stability under real sensor conditions and resolves ultrasonic module disconnection reboot issues. Future work will focus on full pump state centralization and removal of remaining blocking UI logic.