Fridge not heating to reach set point

Hi all. I think there may be an issue with my settings. I have a brewpi spark running with 2 x SSR’s (one to the fridge and another to a 60w tube heater in the bottom of the fridge.
I am now trying to maintain a fridge constant of 21 degrees C to carbonate some bottles but the heater is not turning on enough to get anywhere near this. It is also located in the shed so the room temp drops at night in there.

{
“kind”: “Control”,
“pids”: [
{
“kind”: “Pid”,
“name”: “heater1”,
“enabled”: true,
“setPoint”: {
“kind”: “SetPointSimple”,
“name”: “fridgeset”,
“value”: 32
},
“inputSensor”: {
“kind”: “TempSensorFallback”,
“onBackupSensor”: false,
“sensor”: {
“kind”: “TempSensor”,
“name”: “fridge”,
“sensor”: {
“kind”: “OneWireTempSensor”,
“value”: 25.125,
“connected”: true,
“address”: “28FF7DB26B14030E”,
“calibrationOffset”: 0
}
}
},
“inputError”: -6.875,
“Kp”: 10,
“Ti”: 600,
“Td”: 60,
“p”: 68.75,
“i”: 11.6016,
“d”: 27.1875,
“actuatorIsNegative”: false,
“outputActuator”: {
“kind”: “ActuatorPwm”,
“value”: 100,
“period”: 4,
“minVal”: 0,
“maxVal”: 100,
“target”: {
“kind”: “ActuatorMutexDriver”,
“mutexGroup”: {
“kind”: “ActuatorMutexGroup”,
“deadTime”: 1800000,
“waitTime”: 1799767
},
“target”: {
“kind”: “ActuatorPin”,
“state”: true,
“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”: 28.1875,
“connected”: true,
“address”: “28FFDAC86B1403DF”,
“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”: 1800000,
“waitTime”: 1799697
},
“target”: {
“kind”: “ActuatorNop”,
“state”: false
}
}
}
},
{
“kind”: “Pid”,
“name”: “cooler”,
“enabled”: true,
“setPoint”: {
“kind”: “SetPointSimple”,
“name”: “fridgeset”,
“value”: 32
},
“inputSensor”: {
“kind”: “TempSensorFallback”,
“onBackupSensor”: false,
“sensor”: {
“kind”: “TempSensor”,
“name”: “fridge”,
“sensor”: {
“kind”: “OneWireTempSensor”,
“value”: 25.125,
“connected”: true,
“address”: “28FF7DB26B14030E”,
“calibrationOffset”: 0
}
}
},
“inputError”: -6.875,
“Kp”: 10,
“Ti”: 1800,
“Td”: 200,
“p”: 68.75,
“i”: 0,
“d”: 90.625,
“actuatorIsNegative”: true,
“outputActuator”: {
“kind”: “ActuatorPwm”,
“value”: 0,
“period”: 1200,
“minVal”: 0,
“maxVal”: 100,
“target”: {
“kind”: “ActuatorMutexDriver”,
“mutexGroup”: {
“kind”: “ActuatorMutexGroup”,
“deadTime”: 1800000,
“waitTime”: 1799621
},
“target”: {
“kind”: “ActuatorTimeLimited”,
“minOnTime”: 120,
“minOffTime”: 180,
“maxOnTime”: 65535,
“state”: false,
“target”: {
“kind”: “ActuatorPin”,
“state”: false,
“pin”: 10,
“invert”: false
}
}
}
}
},
{
“kind”: “Pid”,
“name”: “beer2fridge”,
“enabled”: true,
“setPoint”: {
“kind”: “SetPointSimple”,
“name”: “beer1set”,
“value”: 22
},
“inputSensor”: {
“kind”: “TempSensor”,
“name”: “beer1”,
“sensor”: {
“kind”: “OneWireTempSensor”,
“value”: 21.3125,
“connected”: true,
“address”: “28FFB7976B140360”,
“calibrationOffset”: 0
}
},
“inputError”: -0.6875,
“Kp”: 2,
“Ti”: 7200,
“Td”: 1200,
“p”: 1.375,
“i”: 0,
“d”: 76.9766,
“actuatorIsNegative”: false,
“outputActuator”: {
“kind”: “ActuatorSetPoint”,
“targetSetPoint”: {
“kind”: “SetPointSimple”,
“name”: “fridgeset”,
“value”: 32
},
“targetSensor”: {
“kind”: “TempSensor”,
“name”: “fridge”,
“sensor”: {
“kind”: “OneWireTempSensor”,
“value”: 25.125,
“connected”: true,
“address”: “28FF7DB26B14030E”,
“calibrationOffset”: 0
}
},
“referenceSetPoint”: {
“kind”: “SetPointSimple”,
“name”: “beer1set”,
“value”: 22
},
“output”: 10,
“achieved”: 3.125,
“minimum”: -10,
“maximum”: 10
}
}
]
}

In the control state that you posted, the heater is 100% on.

Check your hardware.

1 Like

Thanks Elco. Yes. Been checking and can see that now

I tried restarting both the spark and the pi and I got the same. Heater SSR pulsed a few times for a minute then nothing. Strangely, I went into advanced settings and reset photon to factory defaults. After that, I re-added all of the devices and it kicked into life and has been fine since.

Very strange but ok now.

1 Like

@Richard Thanks for posting your update! I had the exact same issue …
heater SSR turns on for a fraction of a second, off for 3 seconds, then repeats.

Your suggestion …
reset photon to factory defaults
cleared the problem and the heater runs normally.

I’m using a 17 watt, 120 volt seedling heat mat as my heat source.

This is normal behavior. It’s the PWM cycle. The heater is not heating 100%, but goes ON and OFF repeatedly to heat with less than full power.

@Richard_Crump described the duty cycle decreasing to zero and then staying off. I would have expected the opposite, because the fridge increases the heating when it is not reaching setpoint. My suspicion is that the output was set to inverted.

17W is a bit on the low side. I recommend 50-100W. With just 17W, you might want to increase heater1 Kp, so it heats on full power, even with a small temperature difference.

Thanks @Elco. The default value for heater1 Kp is 10. I increased to 25, 50, 100 with little noticeable results. Then I found Understanding PID in 4 minutes and saw Kp values of 100, 500, and 2000. That gave me more perspective on typical values for Kp and so I set heater1 Kp to 500. After the change, I immediately saw the heater stay on for the whole 4 second PWM cycle. A few hours later, I saw that the heater SSR would turn on for about 1 second (out of 4 secs). Most noticeable was that the Brewpi graph showed idle time (not calling for heat constantly like it had been previously).

The gain is very specific for the system to be controlled. 500-100 is way to high for BrewPi.

It is normal for the graph to show heating constantly, this could be heating only a few percent.

If you set the gain to 500, you are basically downgrading the PID to a very simple ON/OFF controller: 100% ON when above set point, OFF when under set point.

Hi all.

My problem is back…

If I reset everything, the SSR for the heater turns on for 10 mins then turns off again although in the device screen, it says the heater is on 100.

I am rapidly loosing heat as my shed is now -1C. I’ve tried resetting to defaults and re-configuring devices. The heater then turns on for 5 - 10 min and stops again.

{
  "kind": "Control",
  "pids": [
    {
      "kind": "Pid",
      "name": "heater1",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "name": "fridgeset",
        "value": 28.4688
      },
      "inputSensor": {
        "kind": "TempSensorFallback",
        "onBackupSensor": false,
        "sensor": {
          "kind": "TempSensor",
          "name": "fridge",
          "sensor": {
            "kind": "OneWireTempSensor",
            "value": 15.5625,
            "connected": true,
            "address": "28FF7DB26B14030E",
            "calibrationOffset": 0
          }
        }
      },
      "inputError": -12.8672,
      "Kp": 20,
      "Ti": 600,
      "Td": 60,
      "p": 257.3438,
      "i": 0,
      "d": -1.3281,
      "actuatorIsNegative": false,
      "outputActuator": {
        "kind": "ActuatorPwm",
        "value": 100,
        "period": 4,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "waitTime": 1799504
          },
          "target": {
            "kind": "ActuatorPin",
            "state": true,
            "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": 1.125,
          "connected": true,
          "address": "28FFDAC86B1403DF",
          "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": 1800000,
            "waitTime": 1799434
          },
          "target": {
            "kind": "ActuatorNop",
            "state": false
          }
        }
      }
    },
    {
      "kind": "Pid",
      "name": "cooler",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "name": "fridgeset",
        "value": 28.4688
      },
      "inputSensor": {
        "kind": "TempSensorFallback",
        "onBackupSensor": false,
        "sensor": {
          "kind": "TempSensor",
          "name": "fridge",
          "sensor": {
            "kind": "OneWireTempSensor",
            "value": 15.5625,
            "connected": true,
            "address": "28FF7DB26B14030E",
            "calibrationOffset": 0
          }
        }
      },
      "inputError": -12.8672,
      "Kp": 10,
      "Ti": 1800,
      "Td": 200,
      "p": 128.6719,
      "i": 0,
      "d": -2.2656,
      "actuatorIsNegative": true,
      "outputActuator": {
        "kind": "ActuatorPwm",
        "value": 0,
        "period": 1200,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "waitTime": 1799358
          },
          "target": {
            "kind": "ActuatorTimeLimited",
            "minOnTime": 120,
            "minOffTime": 180,
            "maxOnTime": 65535,
            "state": false,
            "target": {
              "kind": "ActuatorPin",
              "state": false,
              "pin": 10,
              "invert": false
            }
          }
        }
      }
    },
    {
      "kind": "Pid",
      "name": "beer2fridge",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "name": "beer1set",
        "value": 20
      },
      "inputSensor": {
        "kind": "TempSensor",
        "name": "beer1",
        "sensor": {
          "kind": "OneWireTempSensor",
          "value": 15.5625,
          "connected": true,
          "address": "28FFB7976B140360",
          "calibrationOffset": 0
        }
      },
      "inputError": -4.4336,
      "Kp": 2,
      "Ti": 7200,
      "Td": 1200,
      "p": 8.8672,
      "i": 0,
      "d": -0.3984,
      "actuatorIsNegative": false,
      "outputActuator": {
        "kind": "ActuatorSetPoint",
        "targetSetPoint": {
          "kind": "SetPointSimple",
          "name": "fridgeset",
          "value": 28.4688
        },
        "targetSensor": {
          "kind": "TempSensor",
          "name": "fridge",
          "sensor": {
            "kind": "OneWireTempSensor",
            "value": 15.5625,
            "connected": true,
            "address": "28FF7DB26B14030E",
            "calibrationOffset": 0
          }
        },
        "referenceSetPoint": {
          "kind": "SetPointSimple",
          "name": "beer1set",
          "value": 20
        },
        "output": 8.4688,
        "achieved": -4.4375,
        "minimum": -10,
        "maximum": 10
      }
    }
  ]
}

When this happens, is the pin high, like in the JSON you posted?

"target": {
    "kind": "ActuatorPin",
    "state": true,   // <-- this
    "pin": 16,
    "invert": false
}

Is the LED on the SSR on?

Can you copy the settings when the problem occurs?
Please post as code, by using 3 backticks:

```
json here
```

Hi @Elco.

It is doing it now. Running in beer constant set to 20.

The Pin is high… the SSR is not on. No red led.

JSON below

{
  "kind": "Control",
  "pids": [
    {
      "kind": "Pid",
      "name": "heater1",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "name": "fridgeset",
        "value": 28.4688
      },
      "inputSensor": {
        "kind": "TempSensorFallback",
        "onBackupSensor": false,
        "sensor": {
          "kind": "TempSensor",
          "name": "fridge",
          "sensor": {
            "kind": "OneWireTempSensor",
            "value": 15.5625,
            "connected": true,
            "address": "28FF7DB26B14030E",
            "calibrationOffset": 0
          }
        }
      },
      "inputError": -12.8672,
      "Kp": 20,
      "Ti": 600,
      "Td": 60,
      "p": 257.3438,
      "i": 0,
      "d": -1.3281,
      "actuatorIsNegative": false,
      "outputActuator": {
        "kind": "ActuatorPwm",
        "value": 100,
        "period": 4,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "waitTime": 1799504
          },
          "target": {
            "kind": "ActuatorPin",
            "state": true,
            "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": 1.125,
          "connected": true,
          "address": "28FFDAC86B1403DF",
          "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": 1800000,
            "waitTime": 1799434
          },
          "target": {
            "kind": "ActuatorNop",
            "state": false
          }
        }
      }
    },
    {
      "kind": "Pid",
      "name": "cooler",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "name": "fridgeset",
        "value": 28.4688
      },
      "inputSensor": {
        "kind": "TempSensorFallback",
        "onBackupSensor": false,
        "sensor": {
          "kind": "TempSensor",
          "name": "fridge",
          "sensor": {
            "kind": "OneWireTempSensor",
            "value": 15.5625,
            "connected": true,
            "address": "28FF7DB26B14030E",
            "calibrationOffset": 0
          }
        }
      },
      "inputError": -12.8672,
      "Kp": 10,
      "Ti": 1800,
      "Td": 200,
      "p": 128.6719,
      "i": 0,
      "d": -2.2656,
      "actuatorIsNegative": true,
      "outputActuator": {
        "kind": "ActuatorPwm",
        "value": 0,
        "period": 1200,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "waitTime": 1799358
          },
          "target": {
            "kind": "ActuatorTimeLimited",
            "minOnTime": 120,
            "minOffTime": 180,
            "maxOnTime": 65535,
            "state": false,
            "target": {
              "kind": "ActuatorPin",
              "state": false,
              "pin": 10,
              "invert": false
            }
          }
        }
      }
    },
    {
      "kind": "Pid",
      "name": "beer2fridge",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "name": "beer1set",
        "value": 20
      },
      "inputSensor": {
        "kind": "TempSensor",
        "name": "beer1",
        "sensor": {
          "kind": "OneWireTempSensor",
          "value": 15.5625,
          "connected": true,
          "address": "28FFB7976B140360",
          "calibrationOffset": 0
        }
      },
      "inputError": -4.4336,
      "Kp": 2,
      "Ti": 7200,
      "Td": 1200,
      "p": 8.8672,
      "i": 0,
      "d": -0.3984,
      "actuatorIsNegative": false,
      "outputActuator": {
        "kind": "ActuatorSetPoint",
        "targetSetPoint": {
          "kind": "SetPointSimple",
          "name": "fridgeset",
          "value": 28.4688
        },
        "targetSensor": {
          "kind": "TempSensor",
          "name": "fridge",
          "sensor": {
            "kind": "OneWireTempSensor",
            "value": 15.5625,
            "connected": true,
            "address": "28FF7DB26B14030E",
            "calibrationOffset": 0
          }
        },
        "referenceSetPoint": {
          "kind": "SetPointSimple",
          "name": "beer1set",
          "value": 20
        },
        "output": 8.4688,
        "achieved": -4.4375,
        "minimum": -10,
        "maximum": 10
      }
    }
  ]
}

settings:

ModeActive temperature control mode. Use to control panel to switch (apply button).
Send to Photon
Beer Temperature SettingBeer temperature setting when in profile or beer constant mode. Use the control panel to adjust.
20

Fridge Temperature SettingAutomatically adjust when in profile/beer constant mode. Use the control panel to adjust.
20


Send to Photon

Beer-to-Fridge proportional gain (Kp)Actuatour output in % = Kp * input error
2

Send to Photon
Beer-to-Fridge integral time constant (Ti)The input error is slowly accumulated in the integrator. A steady state error that is not corrected by Kp, is corrected by the integral. The integral part grows by the proportional part every Ti seconds. If you let it grow to quickly, this can create overshoot. Be careful.
7200

Send to Photon
Beer-to-Fridge derivative time constant (Td)The derivative is the temperature difference per second. The derivative part of PID is -Kp * Td * dT/dt. This can be interpreted as looking Td seconds ahead. For very slow processes (like fermentation), it is recommended to disable the derivative gain by setting it to zero. The limited sensor resolution will make it hard to distinguish bit flips from rises in temperature.
1200

Send to Photon
Maximum difference between fridge and beer set point (= output of PID)The output of this PID is added to the beer set point to automatically set the fridge set point. You can define the maximum difference between the beer temperature setting and fridge temperature setting here.
10

Send to Photon
Beer-to-Fridge Input filter delay timeInput to the PID is filtered. This causes a delay, because of the moving average. More delay means more filtering.
Send to Photon
Beer-to-Fridge Derivative filter delay timeInput to the differential gain is filtered, to prevent bit flips from causing a high derivative. This causes a delay, because of the moving average. More delay means more filtering.
Send to Photon
Cooler proportional gain (Kp)Actuatour output in % = Kp * input error
10

Send to Photon
Cooler integral time constant (Ti)The input error is slowly accumulated in the integrator. A steady state error that is not corrected by Kp, is corrected by the integral. The integral part grows by the proportional part every Ti seconds. If you let it grow to quickly, this can create overshoot. Be careful.
1800

Send to Photon
Cooler derivative time constant (Td)The derivative is the temperature difference per second. The derivative part of PID is -Kp * Td * dT/dt. This can be interpreted as looking Td seconds ahead. For very slow processes (like fermentation), it is recommended to disable the derivative gain by setting it to zero. The limited sensor resolution will make it hard to distinguish bit flips from rises in temperature.
200

Send to Photon
Cooler PWM period (seconds)Each PWM cycle takes this many seconds. A value lower than 4 seconds is not recommended.
1200

Send to Photon
Cooler minimum OFF timeA fridge compressor needs to be OFF for a minimum time to protect it from building up pressure and overheating.
180

Send to Photon
Cooler minimum ON timeA minimum ON time is also recommended, because many short cycles limit the compressor lifespan.
120

Send to Photon
Cooler Input filter delay timeInput to the PID is filtered. This causes a delay, because of the moving average. More delay means more filtering.
Send to Photon
Cooler Derivative filter delay timeInput to the differential gain is filtered, to prevent bit flips from causing a high derivative. This causes a delay, because of the moving average. More delay means more filtering.
Send to Photon
Heater 1 proportional gain (Kp)Actuatour output in % = Kp * input error
20

Send to Photon
Heater 1 integral time constant (Ti)The input error is slowly accumulated in the integrator. A steady state error that is not corrected by Kp, is corrected by the integral. The integral part grows by the proportional part every Ti seconds. If you let it grow to quickly, this can create overshoot. Be careful.
600

Send to Photon
Heater 1 derivative time constant (Td)The derivative is the temperature difference per second. The derivative part of PID is -Kp * Td * dT/dt. This can be interpreted as looking Td seconds ahead. For very slow processes (like fermentation), it is recommended to disable the derivative gain by setting it to zero. The limited sensor resolution will make it hard to distinguish bit flips from rises in temperature.
60

Send to Photon
Heater 1 PWM period (seconds)Each PWM cycle takes this many seconds. A value lower than 4 seconds is not recommended.
4

Send to Photon
Heater 1 Input filter delay timeInput to the PID is filtered. This causes a delay, because of the moving average. More delay means more filtering.
Send to Photon
Heater 1 Derivative filter delay timeInput to the differential gain is filtered, to prevent bit flips from causing a high derivative. This causes a delay, because of the moving average. More delay means more filtering.
Send to Photon
Heater 2 proportional gain (Kp)Actuatour output in % = Kp * input error
10

Send to Photon
Heater 2 integral time constant (Ti)The input error is slowly accumulated in the integrator. A steady state error that is not corrected by Kp, is corrected by the integral. The integral part grows by the proportional part every Ti seconds. If you let it grow to quickly, this can create overshoot. Be careful.
600

Send to Photon
Heater 2 derivative time constant (Td)The derivative is the temperature difference per second. The derivative part of PID is -Kp * Td * dT/dt. This can be interpreted as looking Td seconds ahead. For very slow processes (like fermentation), it is recommended to disable the derivative gain by setting it to zero. The limited sensor resolution will make it hard to distinguish bit flips from rises in temperature.
60

Send to Photon
Heater 2 PWM period (seconds)Each PWM cycle takes this many seconds. A value lower than 4 seconds is not recommended.
4

Send to Photon
Heater 2 Input filter delay timeInput to the PID is filtered. This causes a delay, because of the moving average. More delay means more filtering.
Send to Photon
Heater 2 Derivative filter delay timeInput to the differential gain is filtered, to prevent bit flips from causing a high derivative. This causes a delay, because of the moving average. More delay means more filtering.
Send to Photon
Dead time when switching between actuatorsOnly one can be active at each moment. The dead time is the minimum to wait when switching between one actuator and another. This prevents quickly alternating between heating to cooling.
1800

Send to Photon
With the button below, you can reset the entire Photon to factory defaults.

This will reset all settings and will remove all installed devices.

Can you measure the voltage on the output pin connected to the SSR?
Can you perhaps look into the controller to see whether a red LED behind the green connectors is ON?

Just tested it. The voltage it 0.3v. Residual current I think as the cooler SSR measures the same.

The SSR is definitely not on.

If I reset the spark… It comes back on with the same state (JSON from Spark reset attached) and the SSR turns on with 4.8v across it. This only lasts for about 15 mins or so before reducing to a pulse and turning off completely.

{
  "kind": "Control",
  "pids": [
    {
      "kind": "Pid",
      "name": "heater1",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "name": "fridgeset",
        "value": 30
      },
      "inputSensor": {
        "kind": "TempSensorFallback",
        "onBackupSensor": false,
        "sensor": {
          "kind": "TempSensor",
          "name": "fridge",
          "sensor": {
            "kind": "OneWireTempSensor",
            "value": 8.75,
            "connected": true,
            "address": "28FF7DB26B14030E",
            "calibrationOffset": 0
          }
        }
      },
      "inputError": -21.25,
      "Kp": 10,
      "Ti": 600,
      "Td": 60,
      "p": 212.5,
      "i": 0,
      "d": 0.0391,
      "actuatorIsNegative": false,
      "outputActuator": {
        "kind": "ActuatorPwm",
        "value": 100,
        "period": 4,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "waitTime": 1799928
          },
          "target": {
            "kind": "ActuatorPin",
            "state": true,
            "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": 0.125,
          "connected": true,
          "address": "28FFDAC86B1403DF",
          "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": 1800000,
            "waitTime": 1799858
          },
          "target": {
            "kind": "ActuatorNop",
            "state": false
          }
        }
      }
    },
    {
      "kind": "Pid",
      "name": "cooler",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "name": "fridgeset",
        "value": 30
      },
      "inputSensor": {
        "kind": "TempSensorFallback",
        "onBackupSensor": false,
        "sensor": {
          "kind": "TempSensor",
          "name": "fridge",
          "sensor": {
            "kind": "OneWireTempSensor",
            "value": 8.75,
            "connected": true,
            "address": "28FF7DB26B14030E",
            "calibrationOffset": 0
          }
        }
      },
      "inputError": -21.25,
      "Kp": 10,
      "Ti": 1800,
      "Td": 200,
      "p": 212.5,
      "i": 0,
      "d": 0.1172,
      "actuatorIsNegative": true,
      "outputActuator": {
        "kind": "ActuatorPwm",
        "value": 0,
        "period": 1200,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "waitTime": 1799782
          },
          "target": {
            "kind": "ActuatorTimeLimited",
            "minOnTime": 120,
            "minOffTime": 180,
            "maxOnTime": 65535,
            "state": false,
            "target": {
              "kind": "ActuatorPin",
              "state": false,
              "pin": 10,
              "invert": false
            }
          }
        }
      }
    },
    {
      "kind": "Pid",
      "name": "beer2fridge",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "name": "beer1set",
        "value": 20
      },
      "inputSensor": {
        "kind": "TempSensor",
        "name": "beer1",
        "sensor": {
          "kind": "OneWireTempSensor",
          "value": 12.0625,
          "connected": true,
          "address": "28FFB7976B140360",
          "calibrationOffset": 0
        }
      },
      "inputError": -7.9414,
      "Kp": 2,
      "Ti": 7200,
      "Td": 1200,
      "p": 15.8828,
      "i": 0,
      "d": 0,
      "actuatorIsNegative": false,
      "outputActuator": {
        "kind": "ActuatorSetPoint",
        "targetSetPoint": {
          "kind": "SetPointSimple",
          "name": "fridgeset",
          "value": 30
        },
        "targetSensor": {
          "kind": "TempSensor",
          "name": "fridge",
          "sensor": {
            "kind": "OneWireTempSensor",
            "value": 8.75,
            "connected": true,
            "address": "28FF7DB26B14030E",
            "calibrationOffset": 0
          }
        },
        "referenceSetPoint": {
          "kind": "SetPointSimple",
          "name": "beer1set",
          "value": 20
        },
        "output": 10,
        "achieved": -11.25,
        "minimum": -10,
        "maximum": 10
      }
    }
  ]
}

Everything looks correct in the object list above. Can you add me on Skype (elcojacobs) and then give me access to the web interface? I am puzzled by this.

It sounds like the output of the pin is inverted. That would explain that it starts OFF and then slowly decreases the heat (while it thinks it is increasing it).

Interestingly… If I put the spark back into testing mode… When I hit the touch screen button to turn that actuator on, it flicks to on then back immediately to off.

It’s worth noting I have a home built spark built to your schematic which I built with leftovers from other projects + the specifics for the spark as I was on a budget!

I have pulled the spark from my setup for the time being and put the old STC1000 in as now I have got into more testing and it is of course showing that it should be on, I’ve noticed that if I press on the side of the quad buffer that’s feeding act1 - act3, it comes back on. I think there’s a poor connection somewhere in that area of the board.
I’ve removed all of the chips and the photon, now I’ll go over that area of the board making sure it’s all correct. Once I’ve got it back on in a couple of days, I’ll post the outcome.

I don’t think the Pin can be inverted as this has been working just fine for the last few weeks.

If we need to at any point, I’ll sign up to Skype and add you in.

Thanks,
Rich

Could have mentioned that earlier! If I had know, I would have asked more questions in that direction.

Rally Sorry… . I went back through the post thinking I had put that in on the outset and realised I hadn’t!