Espresso Temperature Controller
While working at university, I modified the control systems chair's espresso machine to be an experimental plant for designing temperature controllers. The modified plant allows the implementation of custom controller scripts using a web panel. A classical PID-style controller already achieved much better setpoint tracking than the original thermostat.
The scripting system also allows running automated plant identification. This enabled the design of model based controllers. Model predictive control also achieved very good setpoint tracking with faster settling time than PID control. Data driven aproaches were also successfully implemented. Modeling of the brewing process turned out to be somewhat tricky, since it is highly dependent on the coffee used.
Controller
I designed a custom controller board to replace the original bang-bang-style thermostat. The new board incorporates solid-state relays and optocouplers to interface with the espresso machine's existing hardware. Boiler and brewing assembly temperatures are sampled using Pt-100 temperature sensors. The controller also monitors the original thermostat outputs to retain the machine's original functionality for reference.
Software
I wrote a custom server application that runs on a Raspberry Pi Zero W board. It implements a scripting system for controller design using the embeddable Python C API. The server application also provides hardware abstraction. System state is monitored such that no controller script can steer the plant outside of the operating range. The server was written in C++. The frontend was built using the react.js framework and Material UI. Data is pushed to the UI frontend using web sockets.
Custom C bindings were implemented for hardware abstraction. The pump, valves, panel indictors and switches are also accessible from the Python API providing full control over the plant. An online code editor with debug console allows easy code editing. The web panel also features a live dashboard showing the current plant state.