Weird temperature behaviour during cold crash


#1

I have a BrewPi Spark 3 and a RaspPi running the web interface. Both are regularly updated. So far, I never had any problems and the temperature control worked pretty much flawlessly out-of-the-box.

Some time ago, I fermented a 20l batch of a simple pale ale and, after two weeks, wanted to cold crash it to 2 degrees. Before reaching 2 degrees, though, the temperature ramped up quite quickly, without any signs of the heater being active and the fridge apparently cooling the whole time. The beer temperature looks nicely linear (almost as if programmed as such)…
This repeated a couple of times, independent of outside temperature (I know my fridge struggles sometimes).

I am at a loss to what caused this.

NB: The beer didn’t suffer from this. :slight_smile:


#2

By fridge apparently cooling do you just mean as shown by the logs or you actually observed the compressor on? Just because the brewpi is powering on the cooling relay doesn’t necessarily mean that the fridge is cooling. Possible that the fridge has anti-overheating or anti-cycling circuitry that is causing it to do strange things.


#3

In addition to the above, did you disable the fridge’s original temp control? If that’s still in place, it could be that that is cycling the power.


#4

I did not observe the fridge actually cooling, no. I was thinking as much, but earlier (during what passes for summer here in the NL) the fridge was also constantly cooling without any issues. What also puzzles me is the very neat beer temperature curve and the steep rise in temperature at the inflection points. If the fridge just stopped cooling, the temperature should’ve risen a lot slower, this looks like active heating (but why is beyond me, if the brewpi didn’t trigger it).

I removed all the internal temperature control, the compressor and a tube heater (plus fan) are exclusively controlled by the brewpi.


#5

Is your beer probe deep inside the beer? It doesn’t make sense that it rises as quickly as the fridge air.


#6

@Elco, I’m using one of the wall-mounted brewpi sensors which sits deep enough in the beer (at least halfway in). Normally I do see a nice lag between fridge and beer.
But this wouldn’t explain the weird temperature behaviour, would it?


#7

No, it doesn’t. You see some quick cooling, followed by slow cooling (which could be just that the back of the fridge is still cooler than the air, but the compressor is off).

The sharp rise suggests active heating but doesn’t make sense. If the compressor gets very hot and heats the fridge indirectly, that could be a possible cause? The compressor shutting off could be explained by thermal protection too. I’m just guessing, more info and photos would help.


#8

The compressor shutting off might be an explanation. I think I’ll have to go sit next to it for a while when it’s cooling or heating. Fortunately, I’m brewing right now so the fridge will be in action the next few weeks.
Firmware on the Spark is 0.5.10 (most recent) with the latest BrewPi docker image.

Here are some photos of my setup:
Back of the fridge with the SSRs:

Inside of the fridge with fan, temperature sensors and tube heater. The fan switches on when the heater is triggered. The flip switch controls the fan’s bevaviour: Always on, on when heating or off.

Inside of the fermentation vat with the temperature sensor in situ.

Here’s the controller script:

Script
{
  "kind": "Control",
  "pids": [
    {
      "kind": "Pid",
      "name": "heater1pid",
      "enabled": false,
      "input": {
        "kind": "SensorSetPointPair",
        "sensor": {
          "kind": "TempSensorFallback",
          "onBackupSensor": false,
          "sensor": {
            "kind": "TempSensorDelegate",
            "name": "fridge",
            "delegate": {
              "kind": "OneWireTempSensor",
              "value": 18.5,
              "connected": true,
              "address": "28C8B37F08000036",
              "settings.calibrationOffset": 0
            }
          }
        },
        "setPoint": {
          "kind": "SetPointSimple",
          "name": "fridgeset",
          "value": null
        }
      },
      "output": {
        "kind": "ActuatorPwm",
        "dutySetting": 0,
        "period": 12,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "waitTime": 0
          },
          "target": {
            "kind": "ActuatorDigitalDelegate",
            "name": "heater1",
            "delegate": {
              "state": 0,
              "kind": "ActuatorPin",
              "pin": 25,
              "invert": false
            }
          }
        }
      },
      "inputError": null,
      "Kp": 30,
      "Ti": 1800,
      "Td": 60,
      "p": 0,
      "i": 0,
      "d": 0,
      "actuatorIsNegative": false
    },
    {
      "kind": "Pid",
      "name": "heater2pid",
      "enabled": true,
      "input": {
        "kind": "SensorSetPointPair",
        "sensor": {
          "kind": "TempSensorDelegate",
          "name": "beer2",
          "delegate": {
            "kind": "TempSensorDisconnected",
            "value": null,
            "connected": false
          }
        },
        "setPoint": {
          "kind": "SetPointSimple",
          "name": "beer2set",
          "value": null
        }
      },
      "output": {
        "kind": "ActuatorPwm",
        "dutySetting": 0,
        "period": 4,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "waitTime": 0
          },
          "target": {
            "kind": "ActuatorDigitalDelegate",
            "name": "heater2",
            "delegate": {
              "kind": "ActuatorNop",
              "state": 0
            }
          }
        }
      },
      "inputError": null,
      "Kp": 30,
      "Ti": 1800,
      "Td": 60,
      "p": 0,
      "i": 0,
      "d": 0,
      "actuatorIsNegative": false
    },
    {
      "kind": "Pid",
      "name": "coolerpid",
      "enabled": false,
      "input": {
        "kind": "SensorSetPointPair",
        "sensor": {
          "kind": "TempSensorFallback",
          "onBackupSensor": false,
          "sensor": {
            "kind": "TempSensorDelegate",
            "name": "fridge",
            "delegate": {
              "kind": "OneWireTempSensor",
              "value": 18.5,
              "connected": true,
              "address": "28C8B37F08000036",
              "settings.calibrationOffset": 0
            }
          }
        },
        "setPoint": {
          "kind": "SetPointSimple",
          "name": "fridgeset",
          "value": null
        }
      },
      "output": {
        "kind": "ActuatorPwm",
        "dutySetting": 0,
        "period": 1200,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "waitTime": 0
          },
          "target": {
            "kind": "ActuatorTimeLimited",
            "minOnTime": 300,
            "minOffTime": 300,
            "maxOnTime": 65535,
            "state": 0,
            "target": {
              "kind": "ActuatorDigitalDelegate",
              "name": "cooler",
              "delegate": {
                "state": 0,
                "kind": "ActuatorPin",
                "pin": 24,
                "invert": false
              }
            }
          }
        }
      },
      "inputError": null,
      "Kp": 20,
      "Ti": 3600,
      "Td": 300,
      "p": 0,
      "i": 0,
      "d": 0,
      "actuatorIsNegative": true
    },
    {
      "kind": "Pid",
      "name": "beer2fridgepid",
      "enabled": false,
      "input": {
        "kind": "SensorSetPointPair",
        "sensor": {
          "kind": "TempSensorDelegate",
          "name": "beer1",
          "delegate": {
            "kind": "OneWireTempSensor",
            "value": null,
            "connected": false,
            "address": "28179F6209000001",
            "settings.calibrationOffset": 0
          }
        },
        "setPoint": {
          "kind": "SetPointSimple",
          "name": "beer1set",
          "value": null
        }
      },
      "output": {
        "kind": "ActuatorOffset",
        "target": {
          "kind": "SensorSetPointPair",
          "sensor": {
            "kind": "TempSensorFallback",
            "onBackupSensor": false,
            "sensor": {
              "kind": "TempSensorDelegate",
              "name": "fridge",
              "delegate": {
                "kind": "OneWireTempSensor",
                "value": 18.5,
                "connected": true,
                "address": "28C8B37F08000036",
                "settings.calibrationOffset": 0
              }
            }
          },
          "setPoint": {
            "kind": "SetPointSimple",
            "name": "fridgeset",
            "value": null
          }
        },
        "reference": {
          "kind": "SensorSetPointPair",
          "sensor": {
            "kind": "TempSensorDelegate",
            "name": "beer1",
            "delegate": {
              "kind": "OneWireTempSensor",
              "value": null,
              "connected": false,
              "address": "28179F6209000001",
              "settings.calibrationOffset": 0
            }
          },
          "setPoint": {
            "kind": "SetPointSimple",
            "name": "beer1set",
            "value": null
          }
        },
        "useReferenceValue": false,
        "setting": 0,
        "achieved": null,
        "minimum": -6,
        "maximum": 6
      },
      "inputError": null,
      "Kp": 5,
      "Ti": 10800,
      "Td": 600,
      "p": 0,
      "i": 0,
      "d": 0,
      "actuatorIsNegative": false
    }
  ]
}