Problem with coooling/heating cycles

I have my fridge in Fridge Constant mode at 6 degree C. But it cycles between 4.5 to 7.
Right now my fridge is in a sub zero environment due to it is in a cold garage. So i actually need heating to get to 6 degrees.

My question i what the “Heating min time” is. Because it looks lie it is heating to much which in turn makes the compressor start to cool again thus make the system “swing”… Could this heating min time be set somewhere?

For me it seems like it is heating to around 6, then it drops slowly, Starts to heat again but too long due to the min time. Which then in turns starts the comressor to cool it down…

picture showing one full cycle but it continues the same way.

Full view with many cycles.

It has stabilized a bit now as the temperature in the room is a little bit higher.

I’ll be interested to see the difference with the latest release.

Will update after some tests.

Right now i am testing in Beer mode in a small glass of water. It seems my heater is on far too long.

Are you running release 0.4.0? This is printed when the script starts.

I am surprised by the behavior. Are you running on the default settings?
Is your PWM period for the heater the default of 4 seconds? What is Kp? Ti, Td?

How many watts is your heater?

Edit: I think I see what the issue is. The default heater integral time constant is just 120 seconds. Combined with a cooler and the minimum dead time, this is probably too short and causes integrator windup. It is probably better to set Ti and Td to the same values as for the cooler.

Try increasing setting Ti for the heater to 1800s, perhaps it is even better to set Ti to twice the cooler period for both heater and cooler. To prevent overshoot for the heater, set Td of the heater to 60.

Thank you for your input and I’ll adjust the algorithm and default settings to better handle a situation like this.

Yes. Running 0.4.0.

First of i was running default settings.
BtF KP 5
BtF Ti 7200
BtF Td 50

Cooler Kp 5
Cooler Ti 1800
Cooler Td 60
Cooler PWM 1200

Heater Kp 5
Heater Ti 120
Heater Td 0
Heater PWM 4

Sinse then i tried changing all Kp values to 2 but i see no change.

Changing my settings as you suggested now.

I think I have recreated this behavior locally.

Can you try:

Cooler Kp 5
Cooler Ti 2400
Cooler Td 60
Cooler PWM 1200

Heater Kp 5
Heater Ti 2400
Heater Td 60
Heater PWM 4

changing right now !

Ok. Running your settings now. Will post results.

Another piece of advice: a too low Kp value will actually result in integrator windup. This is because the proportional part will do very little, so the integrator has to wind up to create some action.

As long as the proportional part makes the actuator clip to the maximum, the integrator won’t increase and will even decrease. You can see what the P, I and D parts are on the control algorithm tab.

I cannot get the control algorithm tab working.

I says “Click refresh to receive controller from device.” if i press refresh the script stops and starts over. No JSON output is seen.

Got this in the log

Traceback (most recent call last):
File “/home/brewpi/brewpi.py”, line 725, in
ser.write(‘l’)
File “/usr/local/lib/python2.7/dist-packages/serial/serialposix.py”, line 518, in write
raise SerialException(‘write failed: %s’ % (v,))
serial.serialutil.SerialException: write failed: [Errno 5] Input/output error

Cooler Kp 5
Cooler Ti 2400
Cooler Td 60
Cooler PWM 1200

Heater Kp 5
Heater Ti 2400
Heater Td 60
Heater PWM 4

Gives this:

One cycle:

I know what causes this and will try to release a fix today. For now, try uninstalling your heater.
By the way, I don’t think you will have this problem when you are testing with a larger volume. The glass of water reacts as quick as the fridge, contributing to the the alternating behavior.

Yes i know it is extreme conditions. But i am testing it to see how it reacts so i know when i am using it live so that i know what i might run in to and how to adjust. We have typically around 60 liters when we ferment so obiviously the reults is very different.

OK. Posting the promised graph in fridge constant as i had problems with earlier. This is with 0.4.0 and your settings posted in this thread. Looks nearly the same to me.

First Mashing test (water) with 0.4.0 using settings from @Elco.
It has some overshoot but good as a first test. Test is done with about 30 liters of water. My heater draws lots of current !!!