BrewBlox widget documentation?

#1

I just upgraded from an old arduino/brewpi setup to a new setup with Spark v3 and BrewBlox. planning a fermentation now, and trying to make sense of some of the widgets. In the “Beer PID” widget it seems I can set both a target input and a target output temp value. What does this mean? If I just want to set the beer temp to a specific value, which widget should I use?

I’ve found the installation docs to be very helpful, but where can I find docs on actual usage? :slightly_smiling_face:

#2

So far we’ve chosen to prioritize UI usability over writing usage manuals. We may revisit this, as you’re not the first with this request.

For now: PID input is from a Setpoint Sensor Pair, and output goes to actuators. You can view the block relations diagram in the Spark service page for an overview (dropdown button top right).

To simply change desired temperature, edit the PID input. Keep in mind that in the default fermentation arrangement, there are two setpoint temperatures: fridge and beer.

#3

Thanks! I figured it out by studying the block relationships, and seeing witch widgets I needed to enable (most were disabled by default). I think adding a chapter on how to ferment your first beer to “getting started” would make it significantly easier to figure out, but I agree with prioritizing UI :grinning:

#4

Interesting, I’m in the same place. Have a Spark that I have been using with BrewPi for a while and built out Brewblox with a new Pi. Trying to understand the role of mutex, PID, PWM, etc. I get the basics, but the interface is a bit overwhelming vs BrewPi for a basic brewery with no pumps, glycol, etc…

1 Like
#5

It’s actually pretty much exactly the same as the old system, just most of the previously hidden settings are now prominently displayed in Brewblox.

Probably the most challenging part is not having a simple way of switching from “off” to “fridge setpoint” to “beer setpoint” to “beer profile” like there was in the old interface. In the new interface you need to know exactly which blocks to enable/disable to switch to each of these “modes”. After spending a day playing with the new interface, everything makes sense and I like it much better (even for a simple fermentation control setup), but I remember the first few hours were very frustrating.

Here’s a cheatsheet:

PID - these are the blocks that actually control the temperature. it may be helpful to check out wikipedia or youtube for more info on how PID controllers work. Brewpi/Brewblock uses 3 PIDs for a basic setup. The “Beer PID” calculates what target fridge temperature is necessary to bring the measured beer temperature to the target beer temperature. The Heating PID calculates what heater PWM duty cycle (see below) is necessary to bring the measured fridge temperature up to the target fridge temperature (if the measure temp is already at or above the target, this should be zero or close to zero). The cooling PID does the same but in reverse. PID settings ideally need to be tuned, which can get complicated, but the defaults probably work reasonably well, and people on the forum can often help if the defaults aren’t working by looking at a graph showing what is going wrong.

How do you set the target temperatures? - There are hidden setpoint blocks that you can edit by clicking on the pencil icon to the right of the target column in the input row of the PIDs. For “beer profile mode” keep everything enabled and set your profile using the temperature profile widget–this will automatically set the target beer temperature in the beer PID. For “beer constant mode” disable the beer profile block and set a target beer temperature in the beer PID. For “fridge constant mode” disable the Beer profile, offset, and Beer PID blocks and choose a setpoint value in either the heating or cooling PIDs (they both edit the same fridge target value). To turn everything off, unplug your actuators. Joking… I think disabling the PWM blocks is the simplest way to turn the system off at the moment.

Mutex block - stands for mutually exclusive, enforces a minimum off time for one type of actuator (ie. heating or cooling pin) before the other can turn on. Unless you only have heating or cooling, this should probably always be enabled with at least a small wait time or your heating and cooling systems will frequently be fighting each other.

Offset block - this block sets limits on how far away from the measured beer temperature the beer PID can set the target fridge temperature. You could turn it off if you are using fridge set-point mode or if you don’t care if the beer PID is trying to chill the fridge to 20 degrees below the beer temp (which is potentially problematic for multiple reasons). Otherwise, I’d leave it on. Actually, I’m not even sure if the beer PID will correctly send values to the other 2 PIDs with it off (@Elco?) even if you don’t care about the constraints–so probably just leave it on.

PWM blocks - The heating and cooling PIDs have continuous output values (between 0 and 100) that represent how much heating or cooling they predict is necessary at any given time to achieve the target fridge temperature. In contrast, the heating and cooling actuator pins are binary (they have only two settings, on or off). There are a few possible ways to convert a continuous signal into a binary signal. The simplest would be to simply have the pins turn on if the PID output is above an arbitrary cutoff (say 50). However, this isn’t ideal as it sacrifices a lot of information about exactly how much heating/cooling is required. Instead, the output (0-100) is converted to a PWM (pulse-width modulation) signal. Essentially, a PID output value of 60 means that that the PWM block will turn the actuator pin on for 60% of the PWM period and keep it off for the other 40%. For long PWM periods, this is called slow PWM and represents the duty cycle of your heater/cooler. For very short PWM periods, this is called fast PWM and can be used to govern the speed of PWM moters (ie. how the speed of the CPU fan in your computer is controlled). These blocks should probably always be enabled–although disabling them is a good way to quickly disable PID control of your heaters and coolers so you can manually turn things on and off.

Graph widget This isn’t included by default, but you can easily add it and choose values (beer setting/value, fridge setting/value, heat pin, cool pin) to replicate the main graph from the old brewpi.

Hopefully this is helpful (and accurate). If there still isn’t any documentation in a couple weeks I may have some time to create better explanations with screenshots.

2 Likes
#6

That’s a pretty good summary.

Adding documentation for the default arrangement, and explaining common control chains is currently at the top of the backlog, and will likely be added some time next week.

#7

I’m having a hard time figuring out how to change the display from C to F in the various widgets in BrewBlox. I figured it out on the Spark, but can’t seem to find a global setting or even an individual one. Did I miss it, or is it forthcoming?

Figuring out what all of my standard temps are in C is going to take me a LONG time!

#8

In the Spark Page action menu (button right top), there’s a “Units” action. You can set temperature unit preferences here.

#9

Dude. Sorry I made you type that. The arrangement of Services and Providers should have clued me in to how that worked. Thanks for the reply.

1 Like
#10

@adempewolff, thanks for the writeup, that really helps. However, I can’t seem to get ANY of my control blocks to enable. My “Ferment Beer PID”, “Ferment Heat PID”, “Ferment Cool PID”, “Ferment Fridge Offset”, both PWM blocks, are all listing some version of a message that states that they are disabled and I can’t get an “Enable” command to have any effect. Any thoughts on what I’m doing wrong?

#11

By this do you mean that clicking the “enable” button (either in the widget or the widget settings dialogue) doesn’t do anything?

I’m not sure if there is a specific order that blocks in a control chain need to be enabled. I don’t seem to remember this being the case, but I’ve got a fermentation going so I can’t play around too much at the moment.

It might be worth starting a new thread and then people can help you troubleshoot.

#12

The issue turned out to be out-of-date firmware, caused by a bit of a gotcha on our side: if you run brewblox-ctl flash outside the brewblox dir, it will give you the wrong version.

The upcoming release contains a refactor of brewblox-ctl that’ll allow us to fix the issue.

1 Like
#13

I have expanded the control chains documentation to include some common configurations (fridge control, glycol, HERMS).

https://brewblox.netlify.com/user/control_chains.html

We’ll need to restructure and expand the documentation so it’s not a huge single doc to explain all control configuration, but I think this is a good start to understand most setups until we do.

BrewBlox Basic questions