medlor / bleeding-edge-ranciliopid

open-source do-it-yourself modification (PID, ...) of your espresso machine for a better tasting espresso.
GNU General Public License v2.0
93 stars 14 forks source link
bleeding-edge ranciliopid

PERFECT COFFEE PID

(former bleeding edge ranciliopid)

Do it yourself, open-source PID for your espresso machine

Version 3.2.5

Support / Contact

You can chat with us directly using our discord server.

Videos

Introduction

Click for more videos! | Description | Video | :-----------------------------------------------:|:---------------------------------------------: ESP32 Functions with full Softwarecontrol | [![ESP32 Functions with full Softwarecontrol](https://img.youtube.com/vi/rxVFKlREcDk/hqdefault.jpg)](https://www.youtube.com/watch?v=rxVFKlREcDk) Cleaning Mode | [![Cleaning Mode](https://img.youtube.com/vi/qoNPq2WBcS0/hqdefault.jpg)](https://www.youtube.com/watch?v=qoNPq2WBcS0) Waterlevel Sensor | [![Waterlevel Sensor](https://img.youtube.com/vi/JpUrzaUCCnQ/hqdefault.jpg)](https://www.youtube.com/watch?v=JpUrzaUCCnQ) Two cups of a double cappuccino with the new Steamfunction | [![Two cups of a double cappuccino with the new Steamfunction](https://img.youtube.com/vi/dgLpD719_sw/hqdefault.jpg)](https://www.youtube.com/watch?v=dgLpD719_sw)

 

Most important features compared to the rancilio-pid software:

  1. New PID Controller "Multi-state PID with steadyPower (Bias)"
    • Target-Temperature for brewing and steaming (!) is automatically controlled by PID.
    • Auto-Tuning of all PID settings. No knowledge or special tunings required.
    • Distinct PID settings dependend on the current "state" of the machine.
    • Most of the settings are either static or semi-automatically tuned, which does not require an PHD (German: Diplom) to understand.
    • Currently 5 states are implemented:
      • Coldstart (machine is cold)
      • Coldstart stabilisation (directly after coldstart)
      • Inner Zone (temperature near setPoint)
      • Outer Zone (temperature outside of "inner zone")
      • Brewing
      • Steaming (!)
    • steadyPower is introduced which compensates the constant temperature loss due to environment
    • steadyPowerOffset is introduced which compensates the increased temperature loss when the machine (brew head etc.) is still very cold.
    • PidController offers feature like I-value filtering, special handling of setPoint crossings and more (hard-coded)
    • PID Controller is now integral part of the software and not an external library.
  2. FULL ESP32 (and of cause esp8266) support in bleeding-edge main-branch.
  3. Support of three hardware modifications which matches you requirements and offers the best flexibility.
    • PidOnly: This is the most basic modifcations in which only the heater is controlled by the esp.
    • Standard: In this modifcations in addition to the heater, "brewing" is also controlled by the esp which enables pre-infusion (by cutting the "hardware-button switched" power to the valve and the pump on demand).
    • FullControl: (ESP32 only) All functionality is directly controlled by the esp. This allows full customization and implementation of any feature. Also all functionality can therefore remotely be activated/deactivated. The ESP32 can run 24/7 if required.
  4. Freely choose if you want the software to use WIFI, BLYNK and/or MQTT. Everythink can be enabled/disabled and still have a flawlessly working PID controller.
  5. Additionally if you want to to depend on a remotely running service (eg. blynk server on raspi), you can activate a MQTT-Server on the arduino itself!
  6. By using the actionController you can freely configure the system to trigger custom ACTIONS (=functions) when a GPIO port is triggered (eg by a switch) or when commands are received over network (mqtt/blynk).
    • fully dynamic mapping of any(!) available analog/digital gpio port to trigger following custom ACTIONS:
      • BREWING := start brewing
      • STEAMING := automatically manages heat up machine for steaming
      • HOTWATER := start pouring hotwater
      • HEATER := activate heater (not yet)
      • PUMP := activate pump (not yet)
      • VALVE := activate Valve (not yet)
      • CLEANING := activate cleaning mode
      • SLEEPING := activate sleeping mode
      • MENU := activate menu
      • MENU_INC := increase value shown in menu
      • MENU_DEC := decrease value shown in menu
    • while also supporting the switch types: toggles (eg switches) and triggers (eg push buttons)
    • added MQTT support to control ACTIONS using topics ../actions/ with supported payloads of 0|1|-1 (off|on|switch) Example: "custom/Küche.Rancilio2/actions/STEAMING"
    • added Blynk support to control ACTIONS using virtual pins
  7. MultiToggle triggers any ACTION based on multiple simultaneous hardware-button states (eg. if hotwater+steaming button is pressed then start the action CLEANING). MultiToggle can trigger up to six ACTIONS just by using the three rancilio's hardware-switches and therefore reduces the need for external control (mqtt, blynk, resistor-circuit, ..).
  8. GpioAction: When actions are activated, specific GPIOs can be triggered also. This can be used eg. to light up LEDs in Rancilio's custom modified hardware-switches.
  9. "Brew Profiles" can be used to easily set optimum brew settings for different beans.
  10. Scale support to optionally brew by weight (in addition to by time).
  11. Offline Modus is fixed and enhanced. If userConfig.h's FORCE_OFFLINE is enabled, then PID fully is working without networking. Ideal in situations when there is no connectivity or you dont want to rely on it.
  12. Huge performance tunings and improvements under the hood which stabilizes the system (eg in situations of bad WIFI, hardware issues,..).
  13. MQTT support to integrate machine in smart-home solutions and to easier extract details for graphing/alerting.
  14. ACTION "SLEEPING" can be used to shutdown heater and turn the display off either after a period on user inactivity (default 120min) or by user request. Any user activity (controlActions, Hardware-Buttons, MQTT Actions, brew Detection,..) will wake up the maschine.
  15. Added RemoteDebug over telnet so that we dont need USB to debug/tune pid anymore (https://github.com/JoaoLopesF/RemoteDebug). While using OTA updates you can remotely debug and update the software!
  16. "Brew Ready" Detection implemented, which detects when the temperature has stabilized at setPoint. It can send an MQTT event or have hardware pin 15 triggered (which can be used to turn a LED on).
  17. All heater power relevant settings are now set and given in percent (and not absolute output) and therefore better to understand
  18. Support for customizable item collections to beautify display output (thanks to helge!)
  19. Safetly toogle added to shutdown heater on sensor malfunction (TEMPSENSORRECOVERY)
  20. Many useful functions to be used internally getAverageTemperature(), pastTemperatureChange() + updateTemperatureHistory())

ATTENTION:

Sample data log

Instructions on how to migrate from official rancilio to bleeding-edge

Installation is as explained on http://rancilio-pid.de/ but with following adapations:

  1. Make screenshots of the official "Blynk App Dashboard" so that you can revert anytime.
  2. Copy file userConfig.h.SAMPLE to userConfig.h and edit this file accordingly.
    • I propose to set MQTT_ENABLE=2 instead of blynk. But it is up to you.
      #define MQTT_ENABLE 2
  3. Copy contents of folder ranciliopid\arduino-libs to your arduino sketchbook location (normally C:\Users\YOUR_NAME\Documents\Arduino)
    • Important: Open arduino IDE and configure the setting Tools->"lwip Variant" -> "1.4 High Bandwidth"
  4. Flash and enjoy your espresso.
  5. No tuning should be required normally. If you want/need to then use the method described below.

Instructions on how to update to the latest version of bleeding-edge

  1. Just overwrite all existing files with a newly released version.
  2. Open your userConfig.h file, which had not been overwritten in previous step, and manually check (line by line!) that all updates to the new file userConfig.h.SAMPLE are reflected in your own userConfig.h.
  3. Compile, upload and enjoy!

Remote Control APIs

Tunings instructions

Debugging Howto

How to use a simple LED as brewReady signal

Instructions on how to create new icon collections

Changelog

Credits & Special Thanks

To the great work of the rancilio-pid.de team. Also to the nice people in our rancilio discord channel and the ones who contribute and give very much appreciated feedback like

!! Thank you so much for the tasty cup of coffee I enjoy each day !!

Also special thanks to the great icon artwork

Disclaimer

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.