Some thought about temperature control in Kettle-RIMS

I know nothing about kettle-RIMS until Abel Ribeiro and  mojonojo mentioned about it.

It was a coincidence that I saw people discussing this setup on HBT soon after that. After roughly surveying LODO(Low oxygen brewing), my interest about K-RIMS rises.

Can BrewManiacEx support K-RIMS? Why not? If we move out the malt pipe of Grainfather, add a solid bottom and a drain, and then call the new malt pipe MLT. We are turning a Grainfather into a K-RIMS. BrewManiacEx works even better because we can use two temperature probes to monitor BK and MLT at the same time.

IMO, the most advantage compared to E-BIAB is that K-RIMS avoids the splash during lifting malt pipe or the bag.(Saving a pulley system should be another one if you brew big batch.)

The most disadvantage, except the lower efficiency of non-sparging nature, is the temperature difference between two kettles. The separation of two kettles will make the temperature difference bigger than the Grainfather.

I have been thinking about using the probe inside grain pipe (that would be MLT temperature for K-RIMS system)  as the PID input during mashing on Grainfahter. However, I am concerning the temperature of wort at the bottle of the kettle( BK for K-RIMS). I am not sure how high it will rise when the temperature of mash rises slowly because of solid grain bed.

A solution I come out is to limit the temperature of BK(or the reading of probe inside kettle) while using the temperature of MLT(or the probe inside the malt pipe) as PID input. The AUXiliary temperature will be limited by a maximum valve or a maximum difference to mashing temperature.

How do you think?

kettle-rims

Update:

My concern about temperature difference issue was relived by a simple fact:

The enzyme exists in the LIQUID part, not the solid part. 

It means that the temperature of the liquid is the temperate needs to be controlled. Sure, it is better to have consistent temperature, but if it is not possible, the temperature of liquid part is what we need to take care of.

PID, PWM, and Doughing-In temperature

This is to clarify the time when PID or PWM is applied.

 

There are a few settings involved:

  • PID Start
    It specify when PID is applied. Before PID is applied, the heat is fully output.
  • PID Active/Passive
    If PID is applied during Doughing-In(Malt In), which is the duration you put the malt into the kettle.
  • Boiling Temperature
    PWM is applied after the temperature is higher than BOIL temperature and Setting Temperature. ( Yes, during boiling stage, there is a changeable setting temperature.)

One thing worths discussing is “Mash-In” temperature and the temperature during “Doughing-In”.

PIDandPWM

The picture above showing the condition that “Mash-in” temperature is used as “striking temperature‘, which is set a little bit higher than the first rest temperature. Because the temperature of grain is usually lower, mixing the grain with water at higher temperature will get the mash at a lower temperature, right on the first rest rest temperature.

Some people use “Mash-In” temperature in other way, in which the Mash-In temperature is lower than the temperature of first rest. For example, mash-in at 45C, and then rise temperature to first rest, e.g. 55C.

PIDandPWM_2

In normal condition, the temperature of mash after adding malt should be lower than the mash-in temperature.

If PID is used(PID Active), what temperature should it keep? Mash-in or Mash rest 1?

In the case of using Mash-in temperature as striking temperature, if the striking temperature is correctly and precisely calculated, the heating should be turned off during the time malt is added since the drop of temperature is already considered and expected. If PID should be used, the desired temperature should be Mash rest 1, which is the temperature we try to get.

When a lower mash-in temperature is used, the desired mash temperature should be the mash-in temperature.

Prior to v0.2, the temperature during Doughing-in is PID controlled and the temperature is set to Mash-In temperature. After v0.2.1, the option to enable or disable PID was added and Mash rest 1 temperature is used if PID is enabled.

After above discussion, I am thinking to change the setting temperature to Mash-In temperature during doughing-in if PID is enabled. Then, for people who use higher mash-in temperature as striking temperature can set PID off to get desired first rest temperature. People who use lower mash-in temperature can set PID ON to get the mash-in temperature.

Please share your opinions, if any.

BrewManiacEx Release v0.2.2[preview]

New features

  • Extended Mash Rest
    • When decoction mashing is used or conversion doesn’t finished, it provides the option to extend the mash rest after the time runs out.
    • During the mashing rest, long press STP(Enter) will bring a new option “Extend”(Up). Press the button to toggle extended mash. A “+” symbol will appear at the first line of LCD, indicating extended mash. The other two options is “Skip”(Start) and “Back”(Enter). “Skip”(Start) is used to skip current rest step and goto next step, while pressing “Back”(Enter) will result in returning to current rest step.
    • When the time of the rest counts to zero, it will start to count UP if extended mash is enabled. During extended mashing, STP(Enter) can be used to finish current mash rest step.
  • Paddle stirring instead of Pump recirculating (supported by compile option)
    • change the UsePaddleInsteadOfPump to true at line 38 in config.h

      #define UsePaddleInsteadOfPump true
    • Differences from PUMP
      • no “pump priming” at the start of automatic mode
      • The unit of Pump(stir) Rest/Pump(stir) cycle is second instead of minute
      • Heating control(PID) is not turned off during “Stir Rest”
      • ‘stir’ is used in place of ‘pump’ for button labels.

Bug fixed

  • Error updating automation/settings
    • caused by misuse of ArduinoJSON library
  • Error handling of Fahrenheit
    • Now the data is saved in its own unit. The down side is that temperature related settings must be set after temperature unit is changed.

Other changes

  • In manual mode, “Pump”(Stir) rest can be enabled by long pressing of “Pump/Stir” button
  • There will be no “–Pump Rest–” as button label when pump rests. During pump rest, the buttons are still accessible.

The release is temporarily available at preview branch at GitHub. It will be pushed to master branch after I use it in a real brew.

Information of BrewPiLess v1.2.6 and V2.0

I used to think that BrewPi already has everything for fermentation temperature control and there isn’t much to be done. It had been true before release v1.2.5, in which the basic functions of BrewPi are implemented.

Well, there are always fresh ideas, and now I am working on gravity related features. Two main related feature are

  • gravity recording/logging
    • manual input
    • updated by other device, iSpindle.
  • gravity-based temperature schedule

The logging function is trivial but the gravity-based schedule is not. In my opinion, the way to specify beer profile in BrewPi is a good design, but I couldn’t figure out a way to extend it. Therefore, a new way to specify the schedule is created, and I would like to put it in version 2.0 because I regard it as a break through. The gravity logging will be available in version 1.2.6 with original time only beer profile.

BTW#1.

My current design of new beer profile:

bplv2

  • “days” specify the duration of the step. It’s different from “Day” in original beer profile
  • The condition to finish a rest step can be
    • longer than a specified time
    • less than a specified gravity
    • both conditions meet (time AND gravity)
    • either one meets (time OR gravity)
  • A “ramp” step is necessary in the transition of two rest steps.
    • this design allow specifying the speed of temperature change
  • For steps that use gravity as condition, the “days” field is still necessary
    • to draw the chart
    • under certain conditions, it can be used to derive current steps.
  • Changing the profile while beer profile is running will have undetermined result when gravity is involved.

BTW#2,

The logging with manual input is available in “preview” branch. The input of iSpindle hasn’t been implemented yet. Currently, only manual input of gravity is available.

https://github.com/vitotai/BrewPiLess/tree/preview

An issue I would like to highlight is that the gravity values are more concrete than temperature especially when it is manually input. In my option, a line between two gravity  values is meaningless, but it helps to track the values. It would be very difficult to find the points of gravity values without connected them by a line.

BrewManiacEx Release 0.2.1

  • Add “PID when Doughing-in” option in “PID-PWM” setting.
    • If it is set to “NO”, the heater will be turned off after temperature reached and “Continue? OK” is confirmed, before “Mash-in OK” is pressed.
    • If “YES”, the PID will be applied during doughing in, the setting temperature will be the temperature of first mash rest.
  • Add Plato/Gravity for recipe viewing
  • Add kettle thermal mass option
    • expressed in equivalence water amount

Mashing temperature, PID tuning, and wort circulation.

This is about my recently finding and thought about mashing temperature measure and control in recirculated E-BIAB.

Here is two typical designs of recirculated E-BIAB kettles. The main difference between them is the direction of wort circulation.

A. Top-down, eg. Grainfather.

kettle_topdown

B. Bottom-up. eg. Braumeister

kettle_bottomup

I don’t have any experience with Braumeister or the like. My issues are about the design of Grainfather. My conclusion is that Braumeister might have a better design, and if you are going to build your own brew kettle, go with design B, the bottom-up method.

The issue wasn’t clear to me until I drew the picture: the design of Grainfather creates 3 zones of wort/mash.

When the wort drains down, a compact grain bed will be formed, which results in slow draining from middle part to the bottom. If the mash is mixed well when doughing in and the heat didn’t lose too much, it might be fine. However, it is a different story when multiple rest steps are needed because

the main sensor and the heater are at the bottom and the flow from middle part to bottom part is slow. The result is slow temperature ramp of the mash in the middle.

Conducting thin mash or add rice husks can speed up the wort draining but result in fast sparge.

The temperature of top portion can be risen quickly if the flow of wort is quick and drains through the overflow pipe.

I have been wondering why the PID parameters tuned with 2 gallon water worked “better” than that with 4.5 gallon water. Now it’s all clear to me: the PID was effectively controlling sound 2 gallon of wort.

Here are some charts. FYI.

I forget to switch the heater to “mash” position. The PID was tuned with 4(or 4.5) gallons of water.

whole

The heater was switched to “mash” position. The PID was tuned with 4 gallons of water (same as above.)

mash-2

The PID parameters were derived from tuning with 2 gallons of water.

gfbrew

 

BrewPiLess Release 1.2.5

  • Showing temperature chart when it is not being recorded
    • The data is saved in a circular buffer good for around 2-3 hours.
  • Moving the temperature control to main page.
  • Temperature chart for beer profile editing
  • Fast loading setting for temperature management control page(now main page)
  • Reload the temperature chart after start/stop saving log
  • Showing name of current saving log, blank if not saving
  • Fix bugs of not showing room temperature in legend area

brewpiless125

(The BrewPiLess is running “Beer Constant” mode, and the Beer profile displayed is the saved one. )

Mash-in/Dough-in temperature

The following change will be available on next release

  • Kettle(equipement) thermal mass for more precise calculation
  • A setting to specify if temperature control(PID) is applied during doughing-in, which is the time you put malt into kettle. The calculated Mash-In temperature will not work as expected in current release.

TL;DR part 1:

The calculation of strike water temperature is easy if we simplify the model.

Grain at Tg, water at Tw, and target temperature is Tm.

The mash, mix of grain and water, will be at final temperature Tm.

The heat absorbed by grain is (TmTg)* [Grain weight] * [grain heat capacity].

The heat loss of water is (TwTm) * [water amount].

Assuming no heat is lost, in a simplified world, the heat is perfectly transferred from water to grain. Make a equation of these two terms will derive the formula that is the same as Palmer’s.

But, Wait, there are other objects in the “system”: the kettle. Because the kettle is heated with water, it is the heat-loss side. The relative idea formula should be added a term like grain: (Tw – Tm) * [kettle thermal mass]. This term can be simplified as “equipment adjustment“. Using [kettle thermal mass] should be more precise.

If you know the value of [kettle thermal mass] in your system, or you know how to get it. That would be a better option.

TL;DR part 2:

I used to use the first rest temperature as Mash-In temperature because I thought that the temperature should recover in a short time. Of course, the more precise the better. Using a calculated temperature to get exact the first rest temperature might be desired. There is a problem here: should we control the temperature during doughing-in? In original Open ArdBir, there’s a setting for it, which is the PID Pipe(Active or Passive). I thought it was unnecessary and just implemented it as active. That is, PID is applied during doughing-in. If the Mash-In temperature is the same as first rest temperature, it is fine. However, if the Mash-In temperature is calculated by the formula which assumes a CLOSED system, then the equation is broken and the result might not be as expected. It might be fine if the setting temperature is the same as the first rest. In this case, PID algorithm won’t turned the heating element if the temperature is greater than setting temperature. However, in current release, the setting temperature during doughing-in is the Mash-In temperature. Therefore, the calculated Mash-In temperature will not work as expected. This will be fixed as well.

BrewPiLess Release 1.2.3

This release is to solve one issue.

Under certain circumstances, the log chart will not shown.

 

TL;DR

The cause is that the reading from SPIFFS returns zero. I suspect it has something to do with resources for file handle of SPIFFS. According to an advice I googled, I kept file handle opened and reused it to read the log. The solution is to close re-open the file when reading fails.

BrewManiacEx Release v0.2

New features

  • Recipes management
    • Import BeerXML
    • View and brew recipes

Bugs fixed:

  • No logging if the automatic process is interrupted and power-off or entering manual mode before resumption.
  • Wrong hop schedule of automation editing

Changes

  • Add a minimum limit of time(500ms) for sensor reading. Without this limitation, the system will be busy trying to get temperature readings when the sensors are not correctly connected and response with error.

About Recipes

The recipes are created by import of BeerXML. The imported BeerXML should have the following information so that it can be used and translated as automation settings:

  • Boil time
  • Mash profile

The following fields are also referenced if available

  • Hop and other additions schedules
    • The information will be translated into time of “Hop#1”, “Hop #2”, etc.
  • Water amount of first mash step
    • If the mash-in temperature is set to “calculated”, this field is used in the formula to derive mash-in temperature.

Other fields are display only.


Recipe Options

recipe-option

 

  • The unit setting is for displaying the recipe only.
  • Mash-in temperature will be inserted automatically based on the settings. The formula to calculate mash-in temperature is based on Palmer’s formula.

    Temp = R * [Grain weight] / [Water amount] * ( [First rest temp] – [Grain temp] ) + [First rest temp] + [Equipment Adjustment]
    R: is the heat capacity coefficient of grain.

    General speaking, the “Equipment Adjust” should be a minus value because the kettle is at the “mash-in” temperature when dough-in.

  • Mash-out is necessary for BrewManiacEx. If the last mash step in the BeerXML recipe is in the mash-out range( >75C), it will be regarded as Mashout step. Otherwise,”Default Mash Out” will be inserted automatically.

Import BeerXML

recipe-import

 

  • A BeerXML file might contains more than one recipes. Therefore, you might need to select desired recipe.
  • The recipe can be “Save” and “Brew” only if it has at least Boil Time and Mash Profile.
  • The saved name can’t contains special characters and space. The maximum length is 28.
  • Using the same recipe name as existing saved recipe will overwrite the existing saved recipe.
  • You can “brew” it without “saving” it. Press “Brew” button will set the automation settings.
  • The “Mash-In” temperature is derived from the settings at the time it is shown. So does the “Mash-out” step if it is missed in the BeerXML imported. The original BeerXML is saved, and you can have different Mash-In and Mash-out(if not present in the BeerXML) if you change the options before “viewing” a recipe.

Saved Recipes

recipe-view

 

  • You can “delete” and “brew” the saved recipes.
  • You can change the options to get different Mash-In temperature just before “brew” it.