{"id":29132627,"url":"https://github.com/craigwinchester/presspi_2025","last_synced_at":"2026-05-08T14:45:26.036Z","repository":{"id":296575336,"uuid":"993636925","full_name":"craigwinchester/PressPi_2025","owner":"craigwinchester","description":"Wine Press Program 2025","archived":false,"fork":false,"pushed_at":"2025-06-25T18:55:55.000Z","size":1314,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-25T19:31:13.495Z","etag":null,"topics":["arduino","pressure-sensor","raspberrypi","winemaking","wines"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/craigwinchester.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-05-31T07:22:42.000Z","updated_at":"2025-06-25T18:55:58.000Z","dependencies_parsed_at":"2025-06-01T05:03:29.369Z","dependency_job_id":"a4b2a0ff-5fcc-4704-904b-80dfb53c3e74","html_url":"https://github.com/craigwinchester/PressPi_2025","commit_stats":null,"previous_names":["craigwinchester/presspi_2025"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/craigwinchester/PressPi_2025","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigwinchester%2FPressPi_2025","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigwinchester%2FPressPi_2025/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigwinchester%2FPressPi_2025/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigwinchester%2FPressPi_2025/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/craigwinchester","download_url":"https://codeload.github.com/craigwinchester/PressPi_2025/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigwinchester%2FPressPi_2025/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262727708,"owners_count":23354665,"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","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":["arduino","pressure-sensor","raspberrypi","winemaking","wines"],"created_at":"2025-06-30T07:01:28.700Z","updated_at":"2026-05-08T14:45:26.026Z","avatar_url":"https://github.com/craigwinchester.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🍇 PressPi: Automated Wine Press Control System 🍇 \n\nPressPi is a Python-based automation system designed to control a pneumatic wine press using a Raspberry Pi, Arduino (or ESP32), and a set of relays, sensors, and GUI components. It’s built to support both manual and automated pressing cycles with safety features like emergency stop and pressure monitoring.\n\nWhat started as a pandemic side project to pass the time has recently been completely rewritten, with a help from ChatGPT. I’ll admit it: I’m not a programmer... I’m a winemaker.\n\nold version here: https://github.com/craigwinchester/raspberry-pi-wine-press\n\nI haven’t connected the system to the actual wine press yet — but that’s coming soon. If you’re reading this and have experience with motor controllers and wiring, get in touch. I could use some help in that department. Will pay in wine!\n\n---\n\n## ⚠️ Disclaimer\nThis software is provided as-is, without any guarantees or warranties. Wine presses are powerful, high-pressure machines and can be dangerous if misused. Over-inflating the bladder, improper wiring, or failure to follow safety protocols could result in equipment damage, injury, or worse.\n\nBy using this code, you acknowledge that you do so at your own risk. The author assumes no responsibility for any damage to property or personal injury that may result from using or modifying this system. Always consult a qualified electrician or technician when working with industrial machinery.\n\n---\n\n## Features\n\n- Full GUI built with Tkinter\n- Fully editable press cycle programs.   \n- Real-time pressure monitoring via ADS1115 \u0026 pressure transducer\n- Drum position control using bump-detection and timed rotation\n- Emergency stop support (software + physical button)  \n    \u003e ⚠️ *Still under development – not yet fully functional!*\n- Async control loop using `asyncio`\n- Web interface (Flask-based) for remote monitoring (optional)\n\n---\n\n![Wine Press GUI](static/gui_screenshot.png)\n*Above: Screenshot of main GUI\n\n---\n\n## Hardware Requirements\n\n- An old wine press! \n        Mine is a 1993 Velo 2100 Liter. We will reuse all it's old motor starters, 12 volt transformer. etc...\n- Raspberry Pi (tested with a 4 Model B)\n- Arduino Uno \n- ADS1115 analog-to-digital converter\n- Pressure transducer (0–30 PSI)  \n    \u003e 5 volt, 3-wire, 1/8\" NPT\n    \u003e Add 0.1 µF and 10 µF ceramic capacitors to filter noise  \n    \u003e Use push-connect pneumatic fittings (6mm)\n- Relay board (to control valves, pump, etc. 8 channel)\n- OLED screen (optional, 0.96\" I2C for local BAR Pressure display)\n- Touchscreen (Im using a 7 inch)\n- \"Bump detector\" button for drum position reference. \n    \u003e I'm reusing the original roller plunger limit switch from the press. \n    \u003e Also using a small momentary switch and a resistor for testing with the breadboard.\n- 3D-printed mounts and enclosures (see `3d_prints/` directory)  \n    \u003e More designs coming soon\n- Wires \n- breadboard for testing purposes\n- a large Syringe (at least 50ml) plus small hoses to connect to the pressure transducer, to simulate the wine press bladder for testing.\n\n---\n\n## Software Stack\n\n- Python 3.x\n- Tkinter\n- `pyserial` for serial comms\n- `aiofiles`, `asyncio` for async control loop\n- Arduino/ESP32 sketch to handle sensor readings \u0026 display\n- Flask web server for remote monitoring\n\n---\n\n## Development Tools\n\n- VS Code (Python)\n- Arduino IDE\n- VNC Viewer (for remote Pi access)\n- WinSCP or other FTP client\n- MU or Thonny on the Pi\n\n---\n\n## System Diagram\n\u003ch2 align=\"center\"\u003eWiring of Components\u003c/h2\u003e\n\n\u003cdiv align=\"center\" style=\"display: flex; flex-wrap: wrap; justify-content: center; gap: 20px;\"\u003e\n\n  \u003cfigure style=\"text-align: center;\"\u003e\n    \u003ca href=\"static/Pi_Relay_fritzing.png\" target=\"_blank\"\u003e\n      \u003cimg src=\"static/Pi_Relay_fritzing_THUMB.png\" width=\"200\" alt=\"Pi to Relay Wiring\"\u003e\n    \u003c/a\u003e\n  \u003c/figure\u003e\n\n  \u003cfigure style=\"text-align: center;\"\u003e\n    \u003ca href=\"static/Pi_ButtonSwitch_fritzing.png\" target=\"_blank\"\u003e\n      \u003cimg src=\"static/Pi_ButtonSwitch_fritzing_THUMB.png\" width=\"200\" alt=\"Pi to Button Switch Wiring\"\u003e\n    \u003c/a\u003e\n  \u003c/figure\u003e\n\n  \u003cfigure style=\"text-align: center;\"\u003e\n    \u003ca href=\"static/Arduino_OLED_ADS_Pressure_fritzing.png\" target=\"_blank\"\u003e\n      \u003cimg src=\"static/Arduino_OLED_ADS_Pressure_fritzing_THUMB.png\" width=\"200\" alt=\"Arduino OLED Pressure Sensor Wiring\"\u003e\n    \u003c/a\u003e\n  \u003c/figure\u003e\n\n\u003c/div\u003e\n\u003cdetails\u003e\n\u003csummary\u003eRaspberry Pi to Relay Pin Mapping\u003c/summary\u003e\n\n```text\nGPIO Pin Mapping\n| Raspberry Pi GPIO | Physical Pin | Relay Channel  | Function  |\n|-------------------|--------------|----------------|-----------|\n| GPIO 17           | Pin 11       | IN1            | LEFT      |\n| GPIO 27           | Pin 13       | IN2            | RIGHT     |\n| GPIO 22           | Pin 15       | IN3            | *extra    |\n| GPIO 23           | Pin 16       | IN4            | DEFLATE   |\n| GPIO 24           | Pin 18       | IN5            | DEFLATE   |\n| GPIO 25           | Pin 22       | IN6            | DEFLATE   |\n| GPIO 16           | Pin 36       | IN7            | INFLATE   |\n| GPIO 26           | Pin 37       | IN8            | INFLATE   |\n\nPower and Ground\n| Function     | Physical Pin | Description             |\n|--------------|--------------|-------------------------|\n| 5V Power     | Pin 2        | Connect to Relay VCC    |\n| Ground       | Pin 6        | Connect to Relay GND    |\n\n```\n\u003c/details\u003e\n\u003cdetails\u003e\n\u003csummary\u003eRaspberry Pi to Roller Plunger Limit Switch / Button \u003c/summary\u003e\n\n```text\nGPIO Pin Mapping\n| Raspberry Pi GPIO | Physical Pin | button/switch  \n|-------------------|------------------------------------|\n| GPIO 21           | Pin 40       | side 1       \n\nPower \n| Function     | Physical Pin | Description              |\n|--------------|--------------|--------------------------|\n| 3.3V Power   | Pin 1        | Connect to side 2 button | \n     *optional: place a 1kΩ or a 10kΩ resistor here in line to button\n\n```\n\u003c/details\u003e\n\u003cdetails\u003e\n\u003csummary\u003eArduino - ADS1115 - OLED - Pressure Transducer \u003c/summary\u003e\n\n```text\nThis gets a bit confusing... hopefully I get this correct!\nSee above image.\n\nPressure Transducer - Wiring: Red for +5V; Black for ground; Green for signal output.\n    Red to both Capacitors(side 1) then ADS1115 VDD\n    Black to both Capacitors(side 2) then ADS1115 Ground\n    Green to ADS1115 A0\n\nOLED 0.96 inch 128x64\n    SCL to ADS1115 SCL \u0026 ARDUINO SCL\n    SDA to ASD1115 SDA \u0026 ARDUNIO SDA\n    VCC to ARDUINO VIN\n    Ground to ARDUINO Ground or shared ground on breadboard. My Arduino has 2 grounds\n\nARDUINO\n    USB to Raspberry Pi USB\n    A4 to ADS1115 SDA\n    A5 to ADS1115 SCL\n    Ground to Pressure Transducer Ground \u0026 ADS1115 Ground\n    5V to ADS VDD\n\n```\n\u003c/details\u003e\n\n---\n\n## 🗂️ File \u0026 Directory Overview\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand full file structure and descriptions\u003c/summary\u003e\n\n```text\nPressPi_2025/\n├── main.py                    # Launches the full application (GUI + controller logic)\n├── gui.py                     # Tkinter GUI for user interaction\n├── controller.py              # Async core logic for press stage sequencing\n├── press_logic.py             # Press-specific actions (inflate, hold, rotate, etc.)\n├── config.py                  # Centralized configuration values (thresholds, ports, etc.)\n├── program.py                 # Press cycle program logic (stage definitions)\n├── program_editor.py          # GUI for creating/editing press programs\n├── drum_position_editor.py    # GUI tool for calibrating drum position timings\n├── relays_off_boot.py         # Optional script to reset all relays on boot\n├── sms_alerts.py              # Sends SMS alerts using contact list\n├── status.py                  # GUI/status bar updater module\n├── utils.py                   # Helper functions (e.g. formatting, time conversion)\n├── web_server.py              # Flask web interface (optional for remote monitoring)\n├── hardware.py                # Interfaces with GPIO pins and relay logic\n├── start_PressPi2025.sh       # Shell script to auto-start the program on boot\n├── Press_Pi_2025.desktop      # Desktop shortcut for GUI launch\n├── README.md                  # This file – project documentation\n├── .gitignore                 # Files/folders excluded from Git tracking\n│\n├── json_data/                 # Saved configuration and contact data\n│   ├── drum_position.json     # Time-based drum position settings\n│   ├── email_contacts.json    # Email alert list (if used)\n│   ├── programs.json          # User-defined press programs\n│   └── sms_contacts.json      # List of phone numbers for SMS alerts\n│\n├── tmp/                       # Temp folder for logging\n│   ├── pressure_history.json  # Rolling pressure history log\n│   └── pressure_log.json      # Main pressure log output\n│\n├── static/                    # Icons, fonts, images\n│   ├── FONT/                  # Custom fonts (used in GUI)\n│   ├── wine-press.ico         # Application icon\n│   └── wine-press.png         # GUI/README image\n│\n├── Transducer_Arduino/        # Arduino sketches for pressure sensing\n│   ├── Transducer.ino                         # Basic serial pressure output\n│   ├── Ardunio_Screen_Pressure.ino            # OLED + pressure\n│   ├── Ardunio_Screen_Pressure_ADS1115.ino    # OLED + ADS1115 version\n│   └── backup_115200.hex                      # Precompiled backup\n│\n└── __pycache__/               # Python bytecode cache (auto-generated)\n```\n\u003c/details\u003e \n\n---\n\n## Getting Started\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/craigwinchester/PressPi_2025.git\n    cd PressPi_2025\n2. Upload the Arduino sketch to the microcontroller.  /Transducer_Arduino/Arduino_Screen_Pressure_ADS1115.ino\n3. optional: add relays_off_boot.py to crontab.  Turns off all relays at boot. just a saftey precaution. You will need to edit the file first to change the logging pathway.\n    '''bash\n    crontab -e \n    @reboot /your/pathway/here/relays_off_boot.py \u0026    \n4. Make sure the Arduino is connected via USB and recognized on /dev/ttyUSB0 (or update the port in config.py)\n5. run the GUI.  python3 main.py.  Or better yet test with Thorny on the pi first.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraigwinchester%2Fpresspi_2025","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcraigwinchester%2Fpresspi_2025","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraigwinchester%2Fpresspi_2025/lists"}