Thanks for responding @Elco and for all the hard work.
I’m looking forward to seeing what the next update includes.
Please don’t take this as harping, but the website update should happen before you work on anything else BrewPi Spark related. The pictures aren’t the only issue. The language on https://store.brewpi.com/ lead the consumer to believe you can use the product for mash control. The same can be said for https://store.brewpi.com/mashing. It would be simple to add either language or an image that clearly states the facts. Here are some examples:
“DO YOU WANT TO CONTROL FERMENTATION? GREAT THE BREWPI SPARK IS READY TO GO.”
“PLEASE BE AWARE IT DOES NOT CONTROL MASH AT THIS TIME"
and/or
"THE BREWPI SPARK CAN ONLY BE USED FOR FERMENTATION CONTROL AT THIS TIME.”
“WE ARE WORKING HARD ON IMPLEMENTING NEW FEATURES, LIKE MASH CONTROL FOR HERMS AND RIMS SYSTEMS. KEEP FERMENTING AND PLEASE KEEP CHECKING THE WEBSITE AND COMMUNITY FORUM FOR UPDATES.”
I have added PWM actuators and they seem to work well. I have tested them by cooking steak sous vide.
I plugged my rice cooker into BrewPi, put in a steak and a temp sensor and set it to 54.5C.
The result was pretty tasty, even by throwing deep frozen beef right into the sous vide.
My conclusions from that test:
Fridge constant with PWM heating can hold the temperature very steady.
I tested with simple proportional control: PWM = scale * (temp - setpoint). The downside of that approach is that due to temperature losses, the fridge will never reach setpoints. In this case, it stayed 0.5 degree below setpoint. You need the integrator.
I am going to sous vide everything. As a customer noted: a HERMS is a big ass sous vide. He recommended making a [turducken] (https://en.wikipedia.org/wiki/Turducken).
So this changed my plans for the software into the following:
The states (heating/cooling/waiting/idle) will be removed.
Instead of only one PID, there will be 4:
Fridge heater (e.g. HLT heater) PID
Fridge cooler PID
Beer heater PID
Beer to fridge PID (generates setpoint for fridge PID)
These PIDs will function mostly independently. They just read inputs and drive outputs.
Filtering will move from temp sentors to PID inputs.
Short term plan is to keep the current setup with 2 sensors (+ 1 for logging), but already switch to these separate PIDs, but hardcoded.
The only changes required for the web interface are therefore in advanced settings and the control algorithm page.
In the longer run, the setup of these PIDs will become truly flexible and you can add them and configure them in any way you like. But as you understand, that will require a whole lot of stuff to change in the web interface, the data logging, the charts, etc.
But after the first change (4 PIDS + PWM), BrewPi will already do mash control very well.
The current state is:
PWM actuators are done. I have also introduced a new smart actuator that has internal time limits (minimum ON/OFF time). This actuator can in turn be driven by a very slow PWM driver. The PWM class will auto correct any duty cycle differences due to the time limits. This allows us to have PWM for the fridge, while still protecting the compressor.
I have refactored PID into a separate class, but have not integrated it into temp control yet. This will be my next step.
I have chosen not to publish the release with PWM actuators yet, because due to the lack of a PID driver for the fridge, it will not reach the setpoint. I want to get that PID in before this is released.
Apologies if this is a stupid question, probably I just don’t understand it, but why does the fridge need PWM when the current PID works great? I can understand it for controlling hlt/mash temps and controlling a rolling boil, but why is pwm needed for the fridge?
One problem I see with having a much more generic solution is setting it all up for a specific configuration (ie different types of fermentation temp control and mash setups). Do you plan on having different default parameters for a given setup (PID settings PWM period etc)?
It may just be easier to wrap all of the controls together but mostly for someone using a powerful freezer who wants to cool a large vessel quickly, cold crashing for example. My limited understanding is that this would allow the freezer to really drop the chamber temperature very low, but to do so smartly so as to not overshoot the set point.
Great to see PWM nearly there. I too will be using my HLT as a sous vide!
Hi @Elco has there been any progress? All of the routine (2 weekly) and feature dates for firmware releases seem to have come and gone. Due to me having multiple FVs I have now had to revert to using regular STC-1000 controllers for these as it is not practical to buy multiple BrewPi’s.
I’m just about to start work on that single vessel build too and so it would be good to know if there is an imminent release coming up with PWM and/or multiple vessels before I have to go get another package to control the RIMS, probably arduino based.
I am planning to step up to all-grain brewing and plan to use a BrewPi to control the temperatures. As the Spark is still out of stock, I need to wait anyway but I hope that by the time the new stock arrives, the mashing feautures will be available.
I have changed how temperatures are represented internally, by adding a fixed point class.
I have also added various new actuator types for PWM.
I have written a PID class that has a temp sensor as input and has an actuator as output.
Filtering has moved into the PID class and updating the actuators too.
The architecture has been improved a lot, from a monolithic tempControl class to a much more modular approach.
This has all been tested with unit testing, but the PID class has not been tested on device yet.
What still needs to be done is:
Rewrite the top level control (creating the PIDs, sensor and actuator instances).
Refactor the device manager
Refactor the serial interface for the new types
Refactor the web interface to configure the multiple PIDs
Great to hear about what is going on behind the scenes, I really appreciate it. Github means nothing to some of us who are much less tech minded!
It sounds like there is quite a bit of work still to go before this next release of firmware with PWM will be ready? It’s hard to gauge from here as I have no idea how long or difficult that to-do list is.
Will any of this modularisation or changes to the interface help with the control of multiple fermenters (regular chambers or PWM actuators) or is that an entirely different release?
That is a different release, but while coding this I have taken the future into account.
Actually, for multiple fermenters, the bulk of the changes is in the interface and data logging: splitting the data into groups, configuring multiple processes.
In the controller code, it will mostly be more instances of the same things: PIDs, sensors, actuators.
And yes, there is still quite a bit of work to do, but I am going to try very hard to finish it soon. I am going on vacation in about 3 weeks and I’d like this stuff released at least a week in advance.
But in that same period, we got the BrewPi Spark v2 release, expansion boards release, heating elements, pumps, motorized valves, and some big changes behind the scenes. Phew…
You mention pumps. My club is just looking at shipping 24 chuggers from the US, so would be interested if you could give a sneak peak at spec and costs of what you will be selling. We may be able to give you a bulk order if the specs and prices are competitive
Likewise to @molc with the pumps and being about to order elsewhere!
All I can say @Elco is that if you get all those items done and published before you go on vacation there will be some very happy faces on here That will be a good excuse to relax.
I can see that the changes for multiple vessels is very much different to that of PWM. Both are needed on the road to brewery control though.
I’m really excited to hear that you are hoping to get the new release with PWM to us in the next 2 weeks and I’m really hoping this is your priority. The other bits (BrewPi Spark v2 release, expansion boards release, heating elements, pumps, motorized valves, and some big changes behind the scenes) all sound interesting and intriguing but there are a lot of people who’ve been waiting on the mash control since it was promised in April.
I’m not sure @Brewer and I don’t pretend to know but I think the PWM implementation at this stage may be more useful/ready for people using direct actuators for fermentation - such as heater pads/cables, tec, glycol etc. It seems to be more about moving beyond the fridge/chamber set up than brew day control and automation.
I may be wrong and the user interface is getting an overhaul ready for mash control but I don’t think so. Presumably you could hook it up to your HERMS and use beer constant mode to achieve basically what you want, though that is just as easily done with a cheap eBay unit?
I have refocused my future expectations of the spark now as being a kick ass, web/remote controller of multiple ferments in multiple ways. There is demand for that and it requires less work.
@Dean It was my understanding that the PWM is required for element control but I may have misunderstood that. If that is the case I can then replace my cheap REX PID controller with the BrewPi for remote HLT activation and then for my HERMs pot control. To be honest that was the main reason I ordered one. I’m actually starting to get excited about it again, may have to get it back out the cupboard