Software progress

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.

9 Likes

Thanks for replying Elco. It is frustrating not to see releases, but it does help to take a look at the commits on Github and know thereā€™s forward work being done. I thankfully have an operational setup using brewtroller, but Iā€™d like more out of it.

1 Like

Keep up the Good work @Elco! I have to say that when I got the new controller in I was very impressed and I am looking forward to seeing this thing grow into what it should be ā€œSmall box controllerā€ that Packs a big punch when it comes to controlling all parts of brewing. I am very interested in what the UI is going to look like.

1 Like

Thank you for the update on the current progress @Elco! Keep up the Good work!

I agree that there is a market, I did some extended research after realising that my BrewBit will be going down since the company is closing. My main interest is in cooling, not mashing. Even though I knew the BrewPi is not yet finished completly I decided for this controller. Some of the reasons:

  • It offers a complete package. Webinterface, Logging, Remote Control, Profiles, heating, Colling and so on. On every single controller I found there was something missing.
  • The expandability once the multichamper-support is published is unmet by any of the other controllers. They always require to spend another few hundred bucks just to get another controller.
  • The project has been arround for quite some time. I was afraid to invest in any of the new controllers since BrewBit ignores their customers and they have just been arround for two years and are shutting down.
  • Server is running at home on a raspberry.
  • When reading technical information from you it seems highly professional.
2 Likes

Thanks for the update! Looking forward to the new releases.

@elco or anyone else who may knowā€¦

Will the next release after all of this re-writing allow a safe way of boiling wort?

Iā€™m comfortable with mashing BIAB style at the moment, but for my personal needs I need boil capability!

Next release, probably not in a pretty way.

But if you disable the integrator for the heater and work with just proportional gain, you can ā€˜manuallyā€™ set the PWM output by setting temperature to a temperature slightly above 100 degrees. Say 101, with a proportional gain of 10, sets the output to 10%.

Todayā€™s test with the rice cooker again looks promising:

1 Like

Thanks for the replies @Elco and PWM performance looks good! How are things looking with the wireless capability or have I missed something in a release?

My main question would be that is seems like most of your attention is on the firmware at present but most of the features users are desperate for require some significant work to the web and LCD interface, the web server too etcā€¦ Probably more minor changes for multiple chambers but quite substantial redesigns to do fermentation AND brewing concurrently.

How are things shaping up in that department? Do you have an idea of timescales?

All the best and thanks,

Dean.

What is your plan for handling boiling in the future? It would be really useful to be able to adjust the PWM output during boil to control how vigorous the boil is.

1 Like

How is the work on the web interface? any news here? I suspect there must be a completely new set of screens for mashing control?

1 Like

I read somewhere above that there is supposed to be an update before the end of Novemberā€¦ is this still happening?

End of November will be though, Iā€™ve got 2 hours left in my timezone.
However, the software is nearly done. I am ironing out the last bugs, which turned out to be trickier than I thought. I do expect to release this week.

My latest test on the HERMS was pretty successful:

http://chart.brewpi.com/?beername=mashtest-26-11-2015

In this chart, the fridge temperature is the HLT temperature. The beer temperature is the mash out temperature and the room temperature is the mash in temperature.

So at least the algorithms are sound now. What is left is mostly making sure that the update process is smooth.

5 Likes

RIMS tube is waiting for a test run as soon as this is released;)

Ohhā€¦ I am soooooo w8ingā€¦

I am also waiting for this release to see where brewpi is heading :smile:
If it looks promising I will surely click buy in the shop.

I think brewpi is one of the most interesting e-brew projects for the homebrewer out there. It has a huge potential. The blog looks like it needs an update, for instance on how to install and how the connections should be on the connector and such. Please donā€™t loose focus by making all sorts of hardware like counterflow chillers and other gadgets that others do so well. :wink:

yeahhh, I am so much hopping that part of the multichamber-support has made it in the upcomming release. but I also understand that this is not the main part about this release.

Have to disappoint you chixxi, this release brings PWM, which makes BrewPi suitable for mashing. There are not many changes to the web interface. Almost all changes are in firmware.

What this release brings is better control and PWM outputs.

There is a lot of groundwork in this release to run multiple control loops, but it is not ready yet for the much more difficult interfacing/configuration and the new UI.

I expect to release tomorrow.

To bad, I was hopping because of this post from you. But I understand. I just hope this gets a good priority, when looking at all the things you are working on at the moment I am sometimes afraid that it will take long. The reason I am in such a hurry is that my BrewBit is dying, but maybe Iā€™ll just setup more spark until then. Thanks for the good work!

Are there any advantages within the upcomming release for fermentation control or is this only good for mashing?

I have some groundwork in there for controlling that second heater, but I donā€™t want it to hold up the release. I do plan to make it part of the release after this one.

1 Like

Thank you! I really do understand, this was no complaint at all. The guys waiting for pwm would propably kill me if youā€™d hold up the release :wink: