Dean, multichamber was nearly impossible on the old codebase. PWM support is not distracting me from doing multichamber. I am doing a full rewrite that makes both possible. The biggest thing I am doing right now, is making the software more modular.
The reason there has not been a release, is because this is a huge rewrite. If you want to look at the changes between the new code and the current master:
https://github.com/BrewPi/firmware/compare/feature/pid-class?expand=1
In the old code, tempControl.cpp was a huge monolith. It did a PID calculation directly to set a fridge setpoint based on the beer temperature. Then there was a state machine to determine cooling/heating/idling (with peak detection) and then the outputs were set based on the state. Because everything was interwoven with everything else, this was very hard to expand to multiple PIDs and it was very hard for potential contributors to help with.
What I have been doing for the past few months, is splitting the code into small maintainable classes, so that instead of heaving just one PID, we can have multiple. Each PID has an input sensor and an output actuator and can update independently.
If you want to see how this is used, look here.
Even a driver for a single output pin is split into small modules:
- The top actuator drives the PWM
- The actuator below makes sure that 2 actuators are not active at the same time (mutex), for example a heater and a cooler or 2 mashing elements.
- The actuator below that ensures a fridge compressor is protected by time limits (minimum on/off time).
- The bottom actuator is the digital pin (directly or over OneWire!).
All these modules are tested independently.
The only thing the control loop has to do is call update() on all classes. So by creating a structure of sensors, setpoints, pids and actuators and then just updating it, many setups are possible. Including multichamber and mashing. The biggest challenge there is to created the framework for communication and storing settings (which @mdma has been working on) and the UI (which suddenly has multiple charts, flexible dashboards, etc).
The new release will bring PWM support with still just one heater and one cooler, because the script and web UI are written for that. But that does not mean that there has been no progress towards multichamber. A whole lot has changed under the hood.
If you take a closer look at BrewFactory, it is really simple under the hood.
For example, there is no filtering on inputs, there is no integrator anti-windup. Derivative is ācurrent sample - previous sampleā. I canāt really compare it to BrewPi. I have never really looked at BrewBoss.
I do think there is a good market for an integrated controller. Mashing and fermenting controlled by a single unit. And I think we can do better than all other mashing systems on the market right now.
One killer feature for example would be: you can run two 16A elements on a single 16A socket, at the same time. As long as they together consume under 100%, the PWM cycles can overlap/alternate and you can keep both your HLT and your boil kettle at temperature.
I know there has not been a release for too long. But the stuff that is coming is good and we have not stood still. A lot of code has been written, just a lot of that code was not compatible with the old release and stuff piled up.
Once we get this big rewrite out, releases will come a lot quicker.