Skip to content

Feature Req: Add ability to run pump at set intervals #13

@jadehawk

Description

@jadehawk

Feature Request: Interval-Based Dosing for Apollo PUMP-1

I'm extending the Apollo PUMP-1 firmware to support automated fluid dispensing at set intervals, inspired by the functionality of commercial products like iFLO. Unlike iFLO, which requires proprietary bottles, this solution is designed to work with any refillable container—making it more flexible and cost-effective.

As a user repurposing the PUMP-1 for scheduled dosing, I needed a way to:

  • Run the pump at configurable time intervals
  • Track how many doses have been dispensed
  • Prevent overdosing when the tank is empty or near-empty
  • Support users with or without fluid sensors

This feature is especially useful for applications like hydroponics, aquarium dosing, or nutrient delivery systems but for me to deliver cleaning solution to my air conditioner drain pan. Here in FL my AC runs 24/7 and keeping that drain pan clear is crucial.

New Features:

  • enable_pump_interval: Switch to activate interval dosing
  • pump_interval_hours: Number input for dosing frequency
  • alert_active: Global flag for dry tank or exceeded threshold
  • Confirm Refill ↯: Button to reset cycle count and clear alert
  • Play Buzzer ↯: Button to manually test buzzer
  • run_buzzer_alert: Script for audible alert when tank is dry
  • tank_size_oz: Used to compute max safe cycles
  • pump_cycle_threshold: Computed sensor based on tank size and dose volume
  • pump_cycle_count: Tracks how many doses have been run

Reused in the logic, but still work as originally intended.

  • pump_run_seconds: Existing input reused for dose duration
  • fluid_input_sensor: GPIO-based sensor to detect fluid presence
  • stop_pump_when_dry: Toggle to enable/disable sensor gating

Logic Behavior:

  • If stop_pump_when_dry is enabled and fluid is not detected → pump is disabled
  • If no ultrasonic sensor is installed → fallback logic compares cycle count to computed threshold
  • If threshold is exceeded → pump is disabled, buzzer activates, red LED pulses
  • LED feedback reflects system status (safe(sensor or estimate), near-empty(estimate), alert)

As someone new to ESP32 programming, this feature was built through trial and error with help from Copilot. The system now supports both sensor-aware and sensor-free setups, with clear visual and audible feedback for users.

Tested on ESP32-C6 hardware obviously my own pump
Web UI components render correctly
Logic verified with and without fluid sensor

All new components labeled with ↯ for clarity

Some Images of my implementation:

Image
Image
Image

I have forked and added the code to a separate branch for a Pull Request. Will Update once that is done.

Edit:
Pull Request #14

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions