Overshooting 1C the first time it cools down

hello!
my brewpi is serving me well for more than a year now!
Its been very hot this time of the year here and i’m not able to cool my wort to pitching temps so the fridge has to do it.
is there a way to reduce the overshooting that occurs as you can see in the graph during the initial cooling of the beer? after reaching the desired temp it only fluctuates 0,05C-0,1C witch is really impressive with the crapy Chinese fridge that i have (glass door in front)
an option for max time compressor on would be nice feature too because when there is a big difference in temps like that the compressor stays on for very long (needs almost a day to cool 60liters of beer from 27c to 10c.

thank you!

The latest version might have better overshoot behaviour. I cannot really judge the chart, because you changed the beer setpoint often and you didn’t share your settings.

i was changing the set point to make it stop cooling , was afraid of burning my compressor.

here is the settings.
thanks

{
  "kind": "Control",
  "pids": [
    {
      "kind": "Pid",
      "name": "heater1",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "name": "fridgeset",
        "value": 18
      },
      "inputSensor": {
        "kind": "TempSensorFallback",
        "onBackupSensor": false,
        "sensor": {
          "kind": "TempSensor",
          "name": "fridge",
          "sensor": {
            "kind": "OneWireTempSensor",
            "value": 31.5,
            "connected": true,
            "address": "28B4F7C207000076",
            "calibrationOffset": 0
          }
        }
      },
      "inputError": 13.5,
      "Kp": 100,
      "Ti": 600,
      "Td": 0,
      "p": -1350,
      "i": 0,
      "d": 0,
      "actuatorIsNegative": false,
      "outputActuator": {
        "kind": "ActuatorPwm",
        "value": 0,
        "period": 4,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1000000,
            "waitTime": 0
          },
          "target": {
            "kind": "ActuatorPin",
            "state": false,
            "pin": 16,
            "invert": false
          }
        }
      }
    },
    {
      "kind": "Pid",
      "name": "heater2",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "name": "beer2set",
        "value": null
      },
      "inputSensor": {
        "kind": "TempSensor",
        "name": "beer2",
        "sensor": {
          "kind": "OneWireTempSensor",
          "value": 34.875,
          "connected": true,
          "address": "289C68C107000031",
          "calibrationOffset": 0
        }
      },
      "inputError": null,
      "Kp": 10,
      "Ti": 600,
      "Td": 60,
      "p": 0,
      "i": 0,
      "d": 0,
      "actuatorIsNegative": false,
      "outputActuator": {
        "kind": "ActuatorPwm",
        "value": 0,
        "period": 4,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1000000,
            "waitTime": 0
          },
          "target": {
            "kind": "ActuatorNop",
            "state": false
          }
        }
      }
    },
    {
      "kind": "Pid",
      "name": "cooler",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "name": "fridgeset",
        "value": 18
      },
      "inputSensor": {
        "kind": "TempSensorFallback",
        "onBackupSensor": false,
        "sensor": {
          "kind": "TempSensor",
          "name": "fridge",
          "sensor": {
            "kind": "OneWireTempSensor",
            "value": 31.5,
            "connected": true,
            "address": "28B4F7C207000076",
            "calibrationOffset": 0
          }
        }
      },
      "inputError": 13.5,
      "Kp": 50,
      "Ti": 1800,
      "Td": 200,
      "p": -675,
      "i": 0,
      "d": 4.2969,
      "actuatorIsNegative": true,
      "outputActuator": {
        "kind": "ActuatorPwm",
        "value": 100,
        "period": 300,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1000000,
            "waitTime": 0
          },
          "target": {
            "kind": "ActuatorTimeLimited",
            "minOnTime": 200,
            "minOffTime": 600,
            "maxOnTime": 65535,
            "state": false,
            "target": {
              "kind": "ActuatorPin",
              "state": false,
              "pin": 17,
              "invert": false
            }
          }
        }
      }
    },
    {
      "kind": "Pid",
      "name": "beer2fridge",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "name": "beer1set",
        "value": 18
      },
      "inputSensor": {
        "kind": "TempSensor",
        "name": "beer1",
        "sensor": {
          "kind": "OneWireTempSensor",
          "value": null,
          "connected": false,
          "address": "280DF95D0700003E",
          "calibrationOffset": 0
        }
      },
      "inputError": null,
      "Kp": 5,
      "Ti": 7200,
      "Td": 1200,
      "p": 0,
      "i": 0,
      "d": 0,
      "actuatorIsNegative": false,
      "outputActuator": {
        "kind": "ActuatorSetPoint",
        "targetSetPoint": {
          "kind": "SetPointSimple",
          "name": "fridgeset",
          "value": 18
        },
        "targetSensor": {
          "kind": "TempSensor",
          "name": "fridge",
          "sensor": {
            "kind": "OneWireTempSensor",
            "value": 31.5,
            "connected": true,
            "address": "28B4F7C207000076",
            "calibrationOffset": 0
          }
        },
        "referenceSetPoint": {
          "kind": "SetPointSimple",
          "name": "beer1set",
          "value": 18
        },
        "output": 0,
        "achieved": 13.5,
        "minimum": -20,
        "maximum": 20
      }
    }
  ]
}

the minimum off time should take care of protecting the compressor. A compressor should be able to run continuously, only quick cycling can overheat it. I would increase the filtering in the beer-to-fridge PID, both for the derivative and the input. You can set them to maximum filtering.

You have set your maximum temperature difference to 20. Reduce that to 5 or 8. Then integrator will not wind up when clipped to this maximum.

Also make sure you have the latest version. You didn’t reply to that.

so you think its ok for the compressor to run 24 hours straight?
i will make the changes you suggested and report back on my next batch.
version is the latest stable one not the rc.

thanks

They should behave similarly. The RC only has changes to wifi compared to 5.2.

Think about it: if you accidentally leave your fridge door slightly open, it doesn’t break your fridge.

Repeatedly starting the compressor without giving it time to release the built up pressure can cause it to overheat, which is why the minimum off time is necessary.

The compressor in refrigerators and freezer are very simple and have a thermal protection switch to prevent over heating in case the condenser fan motor goes out or air flow is blocked. Running excessively could also indicate other problems- low refrigerant or week thermostat? Although a weak thermostat usually exhibit wide temperature swings. What ruins most compressors is poor handling during transportation- laying on its side or sediment gets into the capillary tube blocking refrigerant flow.

1 Like