{"id":29859578,"url":"https://github.com/eoommaa/water-sump-pump","last_synced_at":"2026-05-16T18:06:29.430Z","repository":{"id":304927211,"uuid":"1012803102","full_name":"eoommaa/Water-Sump-Pump","owner":"eoommaa","description":"Water Sump Pump Countdown Timer designed for SLAC","archived":false,"fork":false,"pushed_at":"2025-07-16T04:23:51.000Z","size":2848,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-30T03:28:59.030Z","etag":null,"topics":["button-control","countdown-timer","i2c-lcd","kicad","kicad-schematics","kicad-symbols","lcd-display","lcd-library","micropython","pi-pico","raspberry-pi-pico","relay","relay-control","rp2040","slac","stanford-slac","sump-pump"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eoommaa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-02T23:01:07.000Z","updated_at":"2025-07-16T04:23:55.000Z","dependencies_parsed_at":"2025-07-17T12:01:16.429Z","dependency_job_id":"c7e176f0-38fd-4765-8281-8270aa43dffa","html_url":"https://github.com/eoommaa/Water-Sump-Pump","commit_stats":null,"previous_names":["eoommaa/water-sump-pump"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eoommaa/Water-Sump-Pump","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoommaa%2FWater-Sump-Pump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoommaa%2FWater-Sump-Pump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoommaa%2FWater-Sump-Pump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoommaa%2FWater-Sump-Pump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eoommaa","download_url":"https://codeload.github.com/eoommaa/Water-Sump-Pump/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoommaa%2FWater-Sump-Pump/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274893250,"owners_count":25369278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["button-control","countdown-timer","i2c-lcd","kicad","kicad-schematics","kicad-symbols","lcd-display","lcd-library","micropython","pi-pico","raspberry-pi-pico","relay","relay-control","rp2040","slac","stanford-slac","sump-pump"],"created_at":"2025-07-30T03:01:08.717Z","updated_at":"2026-05-16T18:06:29.381Z","avatar_url":"https://github.com/eoommaa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Water Sump Pump Countdown Timer\nA countdown timer for managing a water sump pump using a Raspberry Pi Pico programmed in MicroPython, designed for SLAC National Accelerator Laboratory during Summer 2024.\n- **Features:** Automates sump pump intervals and relay activation with a 60-minute countdown timer, 3-button control (`START`/`STOP`/`RESET`), and thermal safety from 80°F fan activation to prevent overheating\n  - Each button (`START`/`STOP`/`RESET`) is mapped to an LED and activates a specific state when the user presses on it\n  - 60-minute countdown timer displayed in `MM:SS` format with the temperature on the LCD (`Countdown: 60:00` \u0026 `Temp: 80 F`)\n  - **LCD Library from [`RPI-PICO-I2C-LCD`](https://github.com/T-622/RPI-PICO-I2C-LCD/tree/main) by [`T-622`](https://github.com/T-622):** [`lcd_api`](/src/lcd/lcd_api.py) \u0026 [`pico_i2c_lcd`](/src/lcd/pico_i2c_lcd.py)\n- **Components:** [Full BOM](docs/BOM.md) with relay and sump pump specs\n\n\n# Schematics[^1][^2]\n\n## SLAC Water Sump Pump Countdown Timer Schematic\n![image](https://github.com/eoommaa/Water-Sump-Pump/blob/main/kicad/schematics/SLAC%20Water%20Sump%20Pump.svg)\n\n## RP2040 Water Sump Pump Countdown Timer Schematic\n![image](https://github.com/eoommaa/Water-Sump-Pump/blob/main/kicad/schematics/RP2040%20Water%20Sump%20Pump.svg)\n\n\n# Relay Behavior\nRelay controls the 120 VAC outlet like a feedback loop.\n- **[`SLAC Water Sump Pump Countdown Timer` Schematic](#slac-water-sump-pump-countdown-timer-schematic):** Pin 3 from `K1` relay has an input of 120 VAC L input (10 A) and Pin 4 is an input to the same 120 VAC output\n- **`START`:** Relay NC[^3] \u0026rarr; Sump pump activates\n- **`STOP` \u0026 `RESET`:** Relay NO[^3] \u0026rarr; Sump pump deactivates\n\n\n# `START`/`STOP`/`RESET` Button Controls\n## `START`/`STOP`/`RESET` Button State Diagram\n```\n               ┌──────────────────────────┐\n               │                          ▼\n┌────┐   ┌─────┴───┐   ┌────────┐   ┌─────────┐\n│Idle├──►│START Btn├──►│STOP Btn├──►│RESET Btn│\n└────┘   └─────────┘   └────┬───┘   └────┬────┘\n              ▲             ▼            │\n              └──────────────────────────┘\n```\n\n## `START` Button\n- **Function:** Default state where the system starts 60-minute countdown timer\n- **LED:** Blinking green\n\n\n## `STOP` Button\n- **Function:** Pauses the countdown timer\n- **LED:** Solid red\n- **LCD:** Displays messages repeatedly\n  \u003e Countdown stopped!\n  \n  \u003e Press START or RESET\n- [`countdown_stop = True`](https://github.com/eoommaa/Water-Sump-Pump/blob/d4ba52d33f075a21b61ff5ee6c35b372b952a699/src/water_sump_pump.py#L166-L175) pauses the countdown timer\n\n### `START` \u0026 [`RESET`](#reset-button) Button on `STOP`\n- **`START`:** Countdown timer continues from the time it was paused on\n  - **LED:** Red off and blinking green\n\n\n## `RESET` Button\n- **Function:** Emergency reset (Countdown timer restarts at `60:00` after the user presses `START` button)\n- **LED \u0026 Buzzer** Blinking blue \u0026 buzzer beeps repeatedly\n- **LCD:** Displays messages repeatedly\n  \u003e Countdown reset!\n  \n  \u003e Press START to start over\n- [`system_locked = True`](https://github.com/eoommaa/Water-Sump-Pump/blob/d4ba52d33f075a21b61ff5ee6c35b372b952a699/src/water_sump_pump.py#L178-L186) allows the user one button to press on to restart the countdown timer\n  - User can press on `STOP` or `RESET` button, but the program ignores the two button presses when in `RESET` mode\n\n\n## Countdown Idle and Completion LCD Messages\n- **Countdown Idle:** `Press START!`\n- **Countdown Completion:** `Press START to start agn`\n\n\n# Notes\n- **[`SLAC Water Sump Pump Countdown Timer` Schematic](#slac-water-sump-pump-countdown-timer-schematic):** A `K1` relay is connected to the L298N motor driver, which is the component connected in the final hardware\n- **[`RP2040 Water Sump Pump Countdown Timer` Schematic](#rp2040-water-sump-pump-countdown-timer-schematic):** A 5V DC motor is used since the relay acts like a switch along with an IC2 1602 LCD connected to the RP2040\n  - Ex: Motor on when countdown timer is running and vice versa when it is off\n- **Power Indicator:** Green LED stays on during both idle and after completion states to indicate that the Pi Pico is powered\n\n\n# Credit\n- **LCD Library:** Adapted from [`RPI-PICO-I2C-LCD`](https://github.com/T-622/RPI-PICO-I2C-LCD/tree/main) by [`T-622`](https://github.com/T-622)\n\n\n[^1]: [`SLAC Water Sump Pump Countdown Timer` Schematic](https://github.com/eoommaa/Water-Sump-Pump/blob/main/kicad/schematics/SLAC%20Water%20Sump%20Pump.pdf) and [`.kicad_sch`](https://github.com/eoommaa/Water-Sump-Pump/blob/main/kicad/SLAC%20Water%20Sump%20Pump.kicad_sch)\n[^2]: [`RP2040 Water Sump Pump Countdown Timer` Schematic](https://github.com/eoommaa/Water-Sump-Pump/blob/main/kicad/schematics/RP2040%20Water%20Sump%20Pump.pdf) and [`.kicad_sch`](https://github.com/eoommaa/Water-Sump-Pump/blob/main/kicad/RP2040%20Water%20Sump%20Pump.kicad_sch)\n[^3]: Normally open (NO) \u0026 normally closed (NC)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feoommaa%2Fwater-sump-pump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feoommaa%2Fwater-sump-pump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feoommaa%2Fwater-sump-pump/lists"}