Advanced settings help - BrewPi (sometimes) not heating

Hi,

I can’t figure out the correct/optimized settings. I have a fridge and a 25W heater (headpad at the side of fridge).

Sometimes my setup seems fine and the temperature are kept at setpoint but sometimes my heater doesn’t seems to heat - all though it says heating the temperature keep dropping… The heater (all though small) works fine “outside” brewpi.

Any settings or something obious I’m doing wrong?

-Kjetil

{
  "kind": "Control",
  "pids": [
    {
      "kind": "Pid",
      "name": "heater1pid",
      "enabled": true,
      "input": {
        "kind": "SensorSetPointPair",
        "sensor": {
          "kind": "TempSensorFallback",
          "onBackupSensor": false,
          "sensor": {
            "kind": "TempSensorDelegate",
            "name": "fridge",
            "delegate": {
              "kind": "OneWireTempSensor",
              "value": 18.625,
              "connected": true,
              "address": "286AE3C2070000C2",
              "calibrationOffset": 0
            }
          }
        },
        "setPoint": {
          "kind": "SetPointSimple",
          "name": "fridgeset",
          "value": 26.5
        }
      },
      "output": {
        "kind": "ActuatorPwm",
        "dutySetting": 100,
        "period": 10,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "waitTime": 1799963
          },
          "target": {
            "kind": "ActuatorDigitalDelegate",
            "name": "heater1",
            "delegate": {
              "kind": "ActuatorOneWire",
              "state": true,
              "pio": 1,
              "invert": false
            }
          }
        }
      },
      "inputError": -7.8789,
      "Kp": 120,
      "Ti": 600,
      "Td": 60,
      "p": 945.4688,
      "i": 0,
      "d": 3.75,
      "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": 1799960
          },
          "target": {
            "kind": "ActuatorDigitalDelegate",
            "name": "heater2",
            "delegate": {
              "kind": "ActuatorNop",
              "state": false
            }
          }
        }
      },
      "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": false,
          "sensor": {
            "kind": "TempSensorDelegate",
            "name": "fridge",
            "delegate": {
              "kind": "OneWireTempSensor",
              "value": 18.625,
              "connected": true,
              "address": "286AE3C2070000C2",
              "calibrationOffset": 0
            }
          }
        },
        "setPoint": {
          "kind": "SetPointSimple",
          "name": "fridgeset",
          "value": 26.5
        }
      },
      "output": {
        "kind": "ActuatorPwm",
        "dutySetting": 0,
        "period": 1200,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "waitTime": 1799956
          },
          "target": {
            "kind": "ActuatorTimeLimited",
            "minOnTime": 120,
            "minOffTime": 180,
            "maxOnTime": 65535,
            "state": false,
            "target": {
              "kind": "ActuatorDigitalDelegate",
              "name": "cooler",
              "delegate": {
                "kind": "ActuatorOneWire",
                "state": false,
                "pio": 0,
                "invert": false
              }
            }
          }
        }
      },
      "inputError": -7.8789,
      "Kp": 10,
      "Ti": 1800,
      "Td": 200,
      "p": 78.7891,
      "i": 0,
      "d": 0.9766,
      "actuatorIsNegative": true
    },
    {
      "kind": "Pid",
      "name": "beer2fridgepid",
      "enabled": true,
      "input": {
        "kind": "SensorSetPointPair",
        "sensor": {
          "kind": "TempSensorDelegate",
          "name": "beer1",
          "delegate": {
            "kind": "OneWireTempSensor",
            "value": 20.3125,
            "connected": true,
            "address": "28EEA4B616160113",
            "calibrationOffset": 0
          }
        },
        "setPoint": {
          "kind": "SetPointSimple",
          "name": "beer1set",
          "value": 21
        }
      },
      "output": {
        "kind": "ActuatorOffset",
        "target": {
          "kind": "SensorSetPointPair",
          "sensor": {
            "kind": "TempSensorFallback",
            "onBackupSensor": false,
            "sensor": {
              "kind": "TempSensorDelegate",
              "name": "fridge",
              "delegate": {
                "kind": "OneWireTempSensor",
                "value": 18.625,
                "connected": true,
                "address": "286AE3C2070000C2",
                "calibrationOffset": 0
              }
            }
          },
          "setPoint": {
            "kind": "SetPointSimple",
            "name": "fridgeset",
            "value": 26.5
          }
        },
        "reference": {
          "kind": "SensorSetPointPair",
          "sensor": {
            "kind": "TempSensorDelegate",
            "name": "beer1",
            "delegate": {
              "kind": "OneWireTempSensor",
              "value": 20.3125,
              "connected": true,
              "address": "28EEA4B616160113",
              "calibrationOffset": 0
            }
          },
          "setPoint": {
            "kind": "SetPointSimple",
            "name": "beer1set",
            "value": 21
          }
        },
        "useReferenceValue": false,
        "setting": 5.5,
        "achieved": -2.375,
        "minimum": -10,
        "maximum": 10
      },
      "inputError": -0.6914,
      "Kp": 8,
      "Ti": 7200,
      "Td": 1200,
      "p": 5.5313,
      "i": 0,
      "d": -0.0313,
      "actuatorIsNegative": false
    }
  ]
}

So, last night, when temperature just kept dropping i disconnected the heater from brewpi and plugged it in directly (as seen in the chart). BrewPi just kicked in the cooler at set temp. This morning I reconnected the heater to brewpi and for some time it worked fine but now it seems dropping again, all though it says heating.

Anyone with good ideas for what’s going on?

Have you checked the heater is actually on/off when you expect it to be? It could be that the control signal for it is inverted and that heater is actually on when brewpi is cooling but that the fridge is good enough to compensate.

The settings you posted indicated that the heater was on, did you check the led on the SSR? And on the onewire SSR board?

Maybe your heater has a timer and shuts itself off after a certain time?

Are you running the latest version?

@j616s: Tried inverting it now, doesnt seems to work.

@elco: Unfortunately I have put everything into this very small box and checking the led’s isn’t the easiest thing to do. I could open the box and check but… :no_mouth:

I don’t belive this heater / heatpad does have a heater nor shuts itself off.

  1. Seems fairly ok.
  2. Doesn’t heat
  3. Can’t take it anymore and plug the heater directly into power, constant on
  4. Leave for work - reset the heater into brewpi. Seems to heat for one period before not heating anymore.
  5. Home from work, set the heater directly into power again.
  6. Change pin settings to inverted.

@elco: Yes, updated the firmware earlier this week, needed to “start a new brew” to get the state showing on the chart again.

Can you try uninstalling the heater and reinstalling it? Are you sure you chose the correct channel A or B on the onewire board?

Please test by setting the state to inverting and back with the lid off.

Tried both with uninstall and install again with “not inverted” and then uninstall with “inverted”. “Not inverted” didn’t do any change. I’ll give it some time with “inverted” and see if there is any changes.

From the first picture you can see that one SSR is connected to the B terminal with + to + and - to - from SSR expansion board to SSR. I belive this is the right way?

I don’t have the opportunity to test this right now - will try to do this test tomorrow.

PS: For the unknown, what does inverted /not inverted means?

When inverted, the board outputs 5V in the off state and 0V in the on state. When you toggle the inverted setting, your output will toggle, which is why it is a good test.

You can also install it as a manual actuator for testing the hardware.

Inverted:

Not-inverted:

So, I guess not-inverted is the right settings? However, no light appear in the SSR.

I re-configured the SSR’s to use the A-output to heater and installed B as manual actuator. (Also changed the wires from the SSR expansion board to the SSR but no change.)

Heating working fine (A-output / SSR) but I dont know if it’s the SSR or board not working for B-output. Could it be a faulty SSR (sometimes working, sometimes not?)? How can I check? I unfortunately don’t have a multimeter, I guess I could buy one tomorrow if needed.

Thanks, that narrows down the problem really well.

The LED on the board is parallel with the connector. So the only parts where it can go wrong now are:

  • Soldering of the grey connector
  • Wires not being stripped well and not making contact with the connector
  • Wires not making contact with the SSR
  • SSR broken.

Tried to change the wires from the grey connector to the SSR, no change.

Also tried to use the Digital Pin (Output 0) and installed this as a manual actuator. However, I’m not able to get light in the SSR LED. Guess this narrows it down to a faulty SSR?

I think so. You have 2 SSRs, if the same output works with one SSR and not with the other, it must be the SSR.

Hi,

Perhaps trivial but shoudn’t the red wire be connected to SSR?

cheers,

It is connected on the picture with lugs and (black) heat-shrink tubing so it was kinda hard to see on the pictures. On the other pictures you can see I changed the wires but still no effect.

Anyway, I placed a order from @Elco on a new SSR.

If the SSR was faulty, you should get a free replacement and should not have to pay for a new one.

So if you receive the new one and confirm the old one was broken, let me know and I’ll refund your order.

Did you try swapping the SSRs over?

Update: Finally got time to set a new brew and replaced the SSR with the new one I received in August. Working fine with the new SSR.