Tuning Help and Temperature Connections - Help

According to the Control Panel, none of my temperature sensors are connected. However, there are temperature read outs. Also, the tuning seems to be off, by approx. 2 degree F. Any help/input would be great. The beer is set to 66F while the temperature is at 68F. Thanks again.

{
  "kind": "Control",
  "pids": [
    {
      "kind": "Pid",
      "name": "heater1",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "value": 20.3672
      },
      "inputSensor": {
        "kind": "TempSensor",
        "name": "fridge",
        "sensor": {
          "kind": "OneWireTempSensor",
          "value": 21.6875,
          "connected": false,
          "address": "28E16BA20600001E",
          "calibrationOffset": 0
        }
      },
      "inputError": 1.8984,
      "Kp": 10,
      "Ti": 600,
      "Td": 60,
      "p": -18.9844,
      "i": 0,
      "d": -1.25,
      "actuatorIsNegative": false,
      "outputActuator": {
        "kind": "ActuatorPwm",
        "value": 0,
        "period": 4,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "lastActiveTime": 1587777108
          },
          "target": {
            "kind": "ActuatorPin",
            "state": false,
            "pin": 16,
            "invert": false
          }
        }
      }
    },
    {
      "kind": "Pid",
      "name": "heater2",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "value": null
      },
      "inputSensor": {
        "kind": "TempSensor",
        "name": "beer2",
        "sensor": {
          "kind": "OneWireTempSensor",
          "value": 18.25,
          "connected": false,
          "address": "28ABD0A106000013",
          "calibrationOffset": 0
        }
      },
      "inputError": 0,
      "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": 1800000,
            "lastActiveTime": 1587777108
          },
          "target": {
            "kind": "ActuatorNop",
            "state": false
          }
        }
      }
    },
    {
      "kind": "Pid",
      "name": "cooler",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "value": 20.3672
      },
      "inputSensor": {
        "kind": "TempSensor",
        "name": "fridge",
        "sensor": {
          "kind": "OneWireTempSensor",
          "value": 21.6875,
          "connected": false,
          "address": "28E16BA20600001E",
          "calibrationOffset": 0
        }
      },
      "inputError": 1.8984,
      "Kp": 10,
      "Ti": 1800,
      "Td": 200,
      "p": -18.9844,
      "i": -1.1484,
      "d": -4.2188,
      "actuatorIsNegative": true,
      "outputActuator": {
        "kind": "ActuatorPwm",
        "value": 24.3516,
        "period": 1200,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "lastActiveTime": 1587777108
          },
          "target": {
            "kind": "ActuatorTimeLimited",
            "minOnTime": 120,
            "minOffTime": 180,
            "maxOnTime": 65535,
            "active": false,
            "target": {
              "kind": "ActuatorPin",
              "state": false,
              "pin": 17,
              "invert": false
            }
          }
        }
      }
    },
    {
      "kind": "Pid",
      "name": "beer2fridge",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "value": 18.8906
      },
      "inputSensor": {
        "kind": "TempSensor",
        "name": "beer1",
        "sensor": {
          "kind": "OneWireTempSensor",
          "value": 20,
          "connected": false,
          "address": "28A2FCA0060000D3",
          "calibrationOffset": 0
        }
      },
      "inputError": 1.0938,
      "Kp": 2,
      "Ti": 7200,
      "Td": 1200,
      "p": -2.1875,
      "i": 0,
      "d": 3.6641,
      "actuatorIsNegative": false,
      "outputActuator": {
        "kind": "ActuatorSetPoint",
        "targetSetPoint": {
          "kind": "SetPointSimple",
          "value": 20.3672
        },
        "targetSensor": {
          "kind": "TempSensor",
          "name": "fridge",
          "sensor": {
            "kind": "OneWireTempSensor",
            "value": 21.6875,
            "connected": false,
            "address": "28E16BA20600001E",
            "calibrationOffset": 0
          }
        },
        "referenceSetPoint": {
          "kind": "SetPointSimple",
          "value": 18.8906
        },
        "output": 1.4766,
        "achieved": 2.7969,
        "minimum": -10,
        "maximum": 10
      }
    }
  ],
  "sensors": [
    {
      "kind": "TempSensor",
      "name": "fridge",
      "sensor": {
        "kind": "OneWireTempSensor",
        "value": 21.6875,
        "connected": false,
        "address": "28E16BA20600001E",
        "calibrationOffset": 0
      }
    },
    {
      "kind": "TempSensor",
      "name": "beer1",
      "sensor": {
        "kind": "OneWireTempSensor",
        "value": 20,
        "connected": false,
        "address": "28A2FCA0060000D3",
        "calibrationOffset": 0
      }
    },
    {
      "kind": "TempSensor",
      "name": "beer2",
      "sensor": {
        "kind": "OneWireTempSensor",
        "value": 18.25,
        "connected": false,
        "address": "28ABD0A106000013",
        "calibrationOffset": 0
      }
    }
  ],
  "actuators": [
    {
      "kind": "ActuatorPwm",
      "value": 24.3516,
      "period": 1200,
      "minVal": 0,
      "maxVal": 100,
      "target": {
        "kind": "ActuatorMutexDriver",
        "mutexGroup": {
          "kind": "ActuatorMutexGroup",
          "deadTime": 1800000,
          "lastActiveTime": 1587777108
        },
        "target": {
          "kind": "ActuatorTimeLimited",
          "minOnTime": 120,
          "minOffTime": 180,
          "maxOnTime": 65535,
          "active": false,
          "target": {
            "kind": "ActuatorPin",
            "state": false,
            "pin": 17,
            "invert": false
          }
        }
      }
    },
    {
      "kind": "ActuatorPwm",
      "value": 0,
      "period": 4,
      "minVal": 0,
      "maxVal": 100,
      "target": {
        "kind": "ActuatorMutexDriver",
        "mutexGroup": {
          "kind": "ActuatorMutexGroup",
          "deadTime": 1800000,
          "lastActiveTime": 1587777108
        },
        "target": {
          "kind": "ActuatorPin",
          "state": false,
          "pin": 16,
          "invert": false
        }
      }
    },
    {
      "kind": "ActuatorPwm",
      "value": 0,
      "period": 4,
      "minVal": 0,
      "maxVal": 100,
      "target": {
        "kind": "ActuatorMutexDriver",
        "mutexGroup": {
          "kind": "ActuatorMutexGroup",
          "deadTime": 1800000,
          "lastActiveTime": 1587777108
        },
        "target": {
          "kind": "ActuatorNop",
          "state": false
        }
      }
    }
  ],
  "setpoints": [
    {
      "kind": "SetPointNamed",
      "name": "beer1set",
      "setPoint": {
        "kind": "SetPointSimple",
        "value": 18.8906
      }
    },
    {
      "kind": "SetPointNamed",
      "name": "beer2set",
      "setPoint": {
        "kind": "SetPointSimple",
        "value": null
      }
    },
    {
      "kind": "SetPointNamed",
      "name": "fridgeset",
      "setPoint": {
        "kind": "SetPointSimple",
        "value": 20.3672
      }
    }
  ]
}

Your fridge setpoint is fluctuating much too quickly.

What is your beer to fridge filtering set to?

I think you have too little filtering on the derivative. It should be set to at least 15 minutes, but probably longer is better.

Thanks Elco.

Both “Beer-to-Fridge Input filter delay time” and “Beer-to-Fridge Derivative filter delay time” were set to 9 seconds. I changed both to 639 seconds. Would that help?

Yes, that is exactly what I meant. Should help a lot.

Sorry for hijacking the thread but for some reason I can’t create new topics. I think it has to do with just signing up.

After much searching on this forum and testing on my own I still can’t get the Brewpi Spark to correctly control my fermentation chamber. I think my settings are close but I just need a little guidance from users that are more familiar with all the settings that are available in the Advanced Settings tab. So here it goes:

Fermentation Chamber:
Brewpi Spark 0.4.3
Cooling Unit: True GDM-12 Refrigerator
Heating Unit: Paint Can with 100w Light Bulb
Fermenter: 14 Gallon SSBrewTech Chronical Fermenter
Fridge Temp Sensor: Near back wall of the refrigerator about half-way up
Beer Temp Sensor: Thermowell

Test:
Using ~8 Gallons of Water
Chart:

Advanced Settings:
Beer-to-Fridge proportional gain (Kp): 10
Beer-to-Fridge integral time constant (Ti): 14400
Beer-to-Fridge derivative time constant (Td): 7200
Maximum difference between fridge and beer set point (= output of PID): 18
Beer-to-Fridge Input filter delay time: 639 seconds
Beer-to-Fridge Derivative filter delay time: 639 seconds

Cooler proportional gain (Kp): 10
Cooler integral time constant (Ti): 1800
Cooler derivative time constant (Td): 600
Cooler PWM period (seconds): 1800
Cooler minimum OFF time: 300
Cooler minimum ON time: 240
Cooler Input filter delay time: 159 seconds
Cooler Derivative filter delay time: 318 seconds

Heater 1 proportional gain (Kp): 10
Heater 1 integral time constant (Ti): 600
Heater 1 derivative time constant (Td): 300
Heater 1 PWM period (seconds): 1200
Heater 1 Input filter delay time: 159 seconds
Heater 1 Derivative filter delay time: 318 seconds

Dead time when switching between actuators: 2000

So most of the settings above were set from reading various posts on this forum, like the rockstar fridge build, but I don’t have a good understanding of what each one does. Does this Chart look alright or are there settings that I could adjust to make the Beer Temp follow the Beer Setting better?

Thanks for any help,
Josh

I think the fridge set point jumps up and down so much, because you have:

  • Beer-to-Fridge derivative time constant (Td): 7200

This is really high. Try setting that much lower.
I know the fridge setting seems to do the opposite of the derivative, but this is due to the shift in time caused by the filter delays.