Setting Up Cascade

So I have set up the cascade setup like the herms setup in the chain controls document. im doing something wrong and can’t quit figure it out. the duty percentage is high as hell!!!

Also what I found out works realllllly well is running the Kettle Element and the Rims Element at the same set point when mashing. the rims isn’t doing all the work by itself. so if I could somehow make that fire off the same set point for the Mash that would be awesome. but I dont need to complicate it to bad. I can make that happen with quick actions!!

sorry for being needy…

brewblox-blocks-spark-one-2.json (15.1 KB)

What is the Kp of your “Mash 2” PID? Because it’s driving a Setpoint Driver (setting is measured in degC), its numeric value will be significantly lower than if it’d be driving a PWM (setting is measured in % ON time).
The default Kp for the PID generated by the RIMS wizard is 10/degC. If you’re also turning on your kettle heater, you can probably lower it even further.

It’s also fine if desired output percentage is > 100%. As long as it doesn’t overshoot, it’s fine to heat at full power.

If that also includes using the same sensor, then it’s as simple as re-assigning the input for either your kettle or your mash PID.
You seem to have two sensors in your kettle: Kettle Temp and Mash Temp. You could create a Temp Sensor (Combined) block to use average or highest value of the two sensors as input for a Setpoint used by both PIDs.

I really wouldn’t worry about that. Typically it’s already possible, or we’ll add it soon, or we’ll add it soon™.

So it was set to 20kp as soon as I changed it to ten it dropped the output to half.

As far as running element at 100% it’s not good. It overshoots CRAZY like 60°F so I was running it at set max of 40% which is good at maintaining temp but probably not best for increasing heat. Like for mash out going from 152° to 168°

Try with Kp = 5, Ti = 0 and Td = 0.
It should have a steady climb, overshoot a bit, and then find a steady-ish state just below setpoint.

Add a bit of Ti to bring steady state to setpoint. This will increase initial overshoot. You add Td to counteract that.

Default settings for Mash PID are Kp=10, Ti=5m, Td=30s. With two heaters, your system will behave somewhat differently, but they can serve as a ballpark estimation anyway.

You don’t need a Max % constraint to handle tuning.

If your system is still volatile, you can also take it a step at a time. Disable the Setpoint Driver, and first tune the kettle PID and tube PID in isolation. The mash PID treats the tube PID as a black-box heating element, controlled by its setpoint. If the tube PID is properly tuned, it will make it easier to tune the mash PID.

boy oh boy is this stuff awesome… so I did seperate and tuned the rims pid by itself. took a little bit but I started understanding things as I went. just to verify that part Kp is the difference in temperature its allowed to deviate… Ti is how long it takes to get too temp… and td is how long it takes to slow down kinda… or something along all of those lines…

I wound up doing Kp=1 Ti=13s and Td=20s and it was pretty much spot on for the RIMs

So then I once I had kettle and rims steady at 152º I started the “MashOut @168º” which drives Kettle PID @ 168º, Mash PID @ 168º, and Pump @20%… which in turn drove the RIMs PID to 187º which I would think is to high and going to cause tannins. but then again you guys have way more experience in what it takes to adjust a grain bed this way. I have always just gone to 170º and just took my time…

I read somewhere in one of your documents about the difference in fluid mass/levels being how you adjust this but I can’t find it again. or maybe I was drunk…

again thanks for the help. making good progress!!!

Ti at 13s is too short.

For a PID controlling a PWM output
Kp is proportional gain: if the temperature is 2 degrees too low and Kp is 25, the output is 2*Kp = 50%.
The proportional part should do nearly all of the work.
But if the temperature is only 0.1 degrees too low, and P becomes 2.5%, it might be heating the same amount as is lost to the environment, so it gets stuck just below setpoint.

Ti is the integral time constant. It takes Ti seconds for the output to increase by P, 2.5% here in the 0.1 too low situation. Ti should be long enough to only really affect these steady state errors close to the setpoint. Usually, about 10 minutes works well for mashing.

Td is the derivative time constant, which slows the output down if it already moving in the right direction. It should be about the duration of the overshoot after you stop heating. Try zero first to see if it is needed at all. Otherwise 30s or 1 minute a good guess.

For a PID controlling a setpoint offset
The calculation is about the same, but Kp is usually a lot smaller. In your situation a value of 2 or 3 seems appropriate: If the mash is 1 degree too low, the mash input can be 3 degrees above the setpoint. You don’t have much liquid in the rims tube, so you don’t build up much heat there and this will not cause overshoot.

If you set a maximum constraint of 10 degrees on the setpoint driver, the target for the mash input will never exceed mash setting + 10.

Ok I may have lost the bubble a bit. I left for work sense the last time I dealt with this. But I made the adjustments. And went for a test on a brew. But noticed I can’t get the set point driver to stop over driving the temperature. I set it for max 15 and still shooting up to 500° setpoint differance. Dumped 200° On the mash before I caught it. brewblox-blocks-spark-one.json 2.txt (15.2 KB)

Is this just the Setpoint Driver showing absurdly high values, or also the tube setpoint? I imported your blocks, and it looks like we show the non-constrained value in the driver block, but the tube setpoint is still limited to mash setpoint + 15.

The RIMS tube setpoint is showing absurd numbers. showed 800 something at one point. Hahah

That is weird, and apparently not reproduced when I imported your blocks. Could you please take a screenshot of where you were seeing these values? (It’s fine if they’re now disabled)

Ok so the extreme setpoint was without the max restraint. So sorry about that. I started early today.

But with that 15° max restraint it still shows 181°

For technical reasons, the Setpoint Driver always uses Celsius when linked to a setpoint. This includes constraints. 15 delta_degC translates to 27 delta_degF.

To achieve a limit of 15 Fahrenheit, you’ll need to set the constraint to 8.3.

We’re working on fixing this issue on our end, but it’ll have to be part of a larger rework of how units and conversions are handled. (I already pushed a fix to clearly show desired setting + limited setting in the Setpoint Driver.)

Ahhhhhhh that makes much more sense!!
I saved my mash this time. I’ll do some early morning tuning with an actual grain bed tomorrow

Am I able to set a max temp. So it will never go above 170°

The Setpoint Driver max constraint is supposed to handle that, but it’s based on current mash temp, which in turn is dependent on mash setpoint.

You can set up a safety valve like configuration using a logic actuator, but that would be more convoluted than strictly necessary. (Not like we are in any position to point fingers)

  • create a Mock Pins block

  • create a Digital Actuator

  • create a Logic Actuator

  • note which real pin your tube actuator is using

  • edit the tube actuator block to target the mock pins

  • edit the new digital actuator to target the real pin for the RIMS element

  • edit the logic actuator

    • add comparison: tube setpoint (A)
    • edit comparison: setting <= 170 F
    • add comparison: tube actuator (a)
    • edit comparison: actual == ON
    • set logic to a&A
    • set logic actuator output: the new actuator

You now have an actuator which only turns on if the original actuator is on, and setpoint <= 170.

Like I said: it’s slightly convoluted, and redundant with the setpoint driver settings. If it makes you feel more confident about your system, then go for it.

Thanks for this. I’m worried about setting it for 168° and then it shooting over 170° and causing tannins.

But I also need it to be able to increase by 15 degrees to be able to step mash. So like on a hefe I would do a rest at 111° and then a guest step to 154°.

This should def make it better!!!

Be careful with settings, and do keep using the Setpoint Driver constraint as primary config - this safety valve style means you may end up in a situation where temp is still OK, but it won’t turn on at all because target temp is too high.

U might find this interesting. But I’m brewing a hoppy pale ale right now. I was messing around with the settings based off of where u guys told me that it should make sense… temps alllllll over the place I went back to my kp1m ti10s td20s and this thing is rock solid under .5° degrees

10s is too short for ti.

It should be at least a couple of minutes, or disabled (zero).

This one is even newer!!! @Bob_Steers