1 Brewpi Controlling nicely, one missing targets


#1

I have 2 brewpi Spark 2 units. Both are configured exactly the same, both controlling identical 7 gallon SS Brewtech fermenters. The heat on one is consistently failing to meet target. On my last brew, it was missing by about a degree. At first I thought it might be the heating pad but its able to maintain higher temps, it just never actually meets target. The one thing I noticed is that the Duty Cycle on Heater 1 is 0 on the “good” one and 36.something on the bad, but there’s no setting for this. Any suggestions on troubleshooting?

Here’s a beer I’m brewing right now. Very tightly controlled. Not sure what caused that drop, but it might have been because I reused an old profile and moved some dates around. Also, yes, I did some manual edits to the html to put labels on the log probes. And yes, my basement gets that cold.

And this is just 5 gallons of Starsan I’m playing with. As you can see its obviously able to hit higher temps than it was maintaining before the ramp.

This is the good control algorithm

{
  "kind": "Control",
  "pids": [
    {
      "kind": "Pid",
      "name": "heater1pid",
      "enabled": true,
      "input": {
        "kind": "SensorSetPointPair",
        "sensor": {
          "kind": "TempSensorFallback",
          "onBackupSensor": true,
          "sensor": {
            "kind": "TempSensorDelegate",
            "name": "beer1",
            "delegate": {
              "kind": "OneWireTempSensor",
              "value": 16.75,
              "connected": true,
              "address": "28D1FB030900003D",
              "settings.calibrationOffset": 0
            }
          }
        },
        "setPoint": {
          "kind": "SetPointSimple",
          "name": "fridgeset",
          "value": 16.668
        }
      },
      "output": {
        "kind": "ActuatorPwm",
        "dutySetting": 0,
        "period": 4,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "waitTime": 1016134
          },
          "target": {
            "kind": "ActuatorDigitalDelegate",
            "name": "heater1",
            "delegate": {
              "state": 0,
              "kind": "ActuatorPin",
              "pin": 25,
              "invert": false
            }
          }
        }
      },
      "inputError": 0.0508,
      "Kp": 60,
      "Ti": 3600,
      "Td": 120,
      "p": -3.0469,
      "i": 0,
      "d": -0.2344,
      "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": 1016131
          },
          "target": {
            "kind": "ActuatorDigitalDelegate",
            "name": "heater2",
            "delegate": {
              "kind": "ActuatorNop",
              "state": 0
            }
          }
        }
      },
      "inputError": null,
      "Kp": 10,
      "Ti": 600,
      "Td": 60,
      "p": 0,
      "i": 0,
      "d": 0,
      "actuatorIsNegative": false
    },
    {
      "kind": "Pid",
      "name": "coolerpid",
      "enabled": true,
      "input": {
        "kind": "SensorSetPointPair",
        "sensor": {
          "kind": "TempSensorFallback",
          "onBackupSensor": true,
          "sensor": {
            "kind": "TempSensorDelegate",
            "name": "beer1",
            "delegate": {
              "kind": "OneWireTempSensor",
              "value": 16.75,
              "connected": true,
              "address": "28D1FB030900003D",
              "settings.calibrationOffset": 0
            }
          }
        },
        "setPoint": {
          "kind": "SetPointSimple",
          "name": "fridgeset",
          "value": 16.668
        }
      },
      "output": {
        "kind": "ActuatorPwm",
        "dutySetting": 1.1641,
        "period": 120,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "waitTime": 1016127
          },
          "target": {
            "kind": "ActuatorTimeLimited",
            "minOnTime": 10,
            "minOffTime": 0,
            "maxOnTime": 65535,
            "state": 0,
            "target": {
              "kind": "ActuatorDigitalDelegate",
              "name": "cooler",
              "delegate": {
                "state": 0,
                "kind": "ActuatorPin",
                "pin": 24,
                "invert": false
              }
            }
          }
        }
      },
      "inputError": 0.0508,
      "Kp": 10,
      "Ti": 3600,
      "Td": 120,
      "p": -0.5078,
      "i": -0.6172,
      "d": -0.0391,
      "actuatorIsNegative": true
    },
    {
      "kind": "Pid",
      "name": "beer2fridgepid",
      "enabled": true,
      "input": {
        "kind": "SensorSetPointPair",
        "sensor": {
          "kind": "TempSensorDelegate",
          "name": "beer1",
          "delegate": {
            "kind": "OneWireTempSensor",
            "value": 16.75,
            "connected": true,
            "address": "28D1FB030900003D",
            "settings.calibrationOffset": 0
          }
        },
        "setPoint": {
          "kind": "SetPointSimple",
          "name": "beer1set",
          "value": 16.668
        }
      },
      "output": {
        "kind": "ActuatorOffset",
        "target": {
          "kind": "SensorSetPointPair",
          "sensor": {
            "kind": "TempSensorFallback",
            "onBackupSensor": true,
            "sensor": {
              "kind": "TempSensorDelegate",
              "name": "beer1",
              "delegate": {
                "kind": "OneWireTempSensor",
                "value": 16.75,
                "connected": true,
                "address": "28D1FB030900003D",
                "settings.calibrationOffset": 0
              }
            }
          },
          "setPoint": {
            "kind": "SetPointSimple",
            "name": "fridgeset",
            "value": 16.668
          }
        },
        "reference": {
          "kind": "SensorSetPointPair",
          "sensor": {
            "kind": "TempSensorDelegate",
            "name": "beer1",
            "delegate": {
              "kind": "OneWireTempSensor",
              "value": 16.75,
              "connected": true,
              "address": "28D1FB030900003D",
              "settings.calibrationOffset": 0
            }
          },
          "setPoint": {
            "kind": "SetPointSimple",
            "name": "beer1set",
            "value": 16.668
          }
        },
        "useReferenceValue": false,
        "setting": 0,
        "achieved": 0.082,
        "minimum": 0,
        "maximum": 0
      },
      "inputError": 0.0508,
      "Kp": 0,
      "Ti": 0,
      "Td": 0,
      "p": 0,
      "i": 0,
      "d": 0,
      "actuatorIsNegative": false
    }
  ]
}

and the “bad”

{
  "kind": "Control",
  "pids": [
    {
      "kind": "Pid",
      "name": "heater1pid",
      "enabled": true,
      "input": {
        "kind": "SensorSetPointPair",
        "sensor": {
          "kind": "TempSensorFallback",
          "onBackupSensor": true,
          "sensor": {
            "kind": "TempSensorDelegate",
            "name": "beer1",
            "delegate": {
              "kind": "OneWireTempSensor",
              "value": 17.75,
              "connected": true,
              "address": "283836030900004C",
              "calibrationOffset": 0
            }
          }
        },
        "setPoint": {
          "kind": "SetPointSimple",
          "name": "fridgeset",
          "value": 18.332
        }
      },
      "output": {
        "kind": "ActuatorPwm",
        "dutySetting": 36.1094,
        "period": 4,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "waitTime": 1754748
          },
          "target": {
            "kind": "ActuatorDigitalDelegate",
            "name": "heater1",
            "delegate": {
              "kind": "ActuatorPin",
              "state": false,
              "pin": 25,
              "invert": false
            }
          }
        }
      },
      "inputError": -0.5664,
      "Kp": 60,
      "Ti": 3600,
      "Td": 120,
      "p": 33.9844,
      "i": 4,
      "d": -1.875,
      "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": 1754745
          },
          "target": {
            "kind": "ActuatorDigitalDelegate",
            "name": "heater2",
            "delegate": {
              "kind": "ActuatorNop",
              "state": false
            }
          }
        }
      },
      "inputError": null,
      "Kp": 10,
      "Ti": 600,
      "Td": 0,
      "p": 0,
      "i": 0,
      "d": 0,
      "actuatorIsNegative": false
    },
    {
      "kind": "Pid",
      "name": "coolerpid",
      "enabled": true,
      "input": {
        "kind": "SensorSetPointPair",
        "sensor": {
          "kind": "TempSensorFallback",
          "onBackupSensor": true,
          "sensor": {
            "kind": "TempSensorDelegate",
            "name": "beer1",
            "delegate": {
              "kind": "OneWireTempSensor",
              "value": 17.75,
              "connected": true,
              "address": "283836030900004C",
              "calibrationOffset": 0
            }
          }
        },
        "setPoint": {
          "kind": "SetPointSimple",
          "name": "fridgeset",
          "value": 18.332
        }
      },
      "output": {
        "kind": "ActuatorPwm",
        "dutySetting": 0,
        "period": 120,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "waitTime": 1754742
          },
          "target": {
            "kind": "ActuatorTimeLimited",
            "minOnTime": 10,
            "minOffTime": 0,
            "maxOnTime": 65535,
            "state": false,
            "target": {
              "kind": "ActuatorDigitalDelegate",
              "name": "cooler",
              "delegate": {
                "kind": "ActuatorPin",
                "state": false,
                "pin": 24,
                "invert": false
              }
            }
          }
        }
      },
      "inputError": -0.5664,
      "Kp": 10,
      "Ti": 3600,
      "Td": 120,
      "p": 5.6641,
      "i": 0,
      "d": -0.3125,
      "actuatorIsNegative": true
    },
    {
      "kind": "Pid",
      "name": "beer2fridgepid",
      "enabled": true,
      "input": {
        "kind": "SensorSetPointPair",
        "sensor": {
          "kind": "TempSensorDelegate",
          "name": "beer1",
          "delegate": {
            "kind": "OneWireTempSensor",
            "value": 17.75,
            "connected": true,
            "address": "283836030900004C",
            "calibrationOffset": 0
          }
        },
        "setPoint": {
          "kind": "SetPointSimple",
          "name": "beer1set",
          "value": 18.332
        }
      },
      "output": {
        "kind": "ActuatorOffset",
        "target": {
          "kind": "SensorSetPointPair",
          "sensor": {
            "kind": "TempSensorFallback",
            "onBackupSensor": true,
            "sensor": {
              "kind": "TempSensorDelegate",
              "name": "beer1",
              "delegate": {
                "kind": "OneWireTempSensor",
                "value": 17.75,
                "connected": true,
                "address": "283836030900004C",
                "calibrationOffset": 0
              }
            }
          },
          "setPoint": {
            "kind": "SetPointSimple",
            "name": "fridgeset",
            "value": 18.332
          }
        },
        "reference": {
          "kind": "SensorSetPointPair",
          "sensor": {
            "kind": "TempSensorDelegate",
            "name": "beer1",
            "delegate": {
              "kind": "OneWireTempSensor",
              "value": 17.75,
              "connected": true,
              "address": "283836030900004C",
              "calibrationOffset": 0
            }
          },
          "setPoint": {
            "kind": "SetPointSimple",
            "name": "beer1set",
            "value": 18.332
          }
        },
        "useReferenceValue": false,
        "setting": 0,
        "achieved": -0.582,
        "minimum": 0,
        "maximum": 0
      },
      "inputError": -0.5664,
      "Kp": 0,
      "Ti": 0,
      "Td": 0,
      "p": 0,
      "i": 0,
      "d": 0,
      "actuatorIsNegative": false
    }
  ]
}