Huge fluctuations in temperature

I have been going through many similar threads and trying to piece together a solution with bits and pieces of information from them, but I am still having huge swings in temperature.

My Setup:
Raspberry pi 1
Arduino Uno with Rev C shield connected to two SSRs
An old fridge and a 150W infrared heating bulb.

Currently I have a beer carbonating in a keg. The beer-temperature probe is taped to the side (I know, not the best, but this keg doesn’t have a thermowell) and the fridge-probe is taped to the upper back wall of the fridge, behind the keg. The heating bulb is on the righ side of the keg midway in.

At the time of the screenshots I had disabled the temperature control after waking up and seeing the huge swings that have been going on all night. As you can see I had a similar story the day before, and the steady rise in temperature in the middle of the first screenshot happens while I have the brewpi turned off. Then I decide to cool it down again, and while cooling down I was ok with the progress, but after it gets close to the set temperature it start swinging wildly up and down.

It seems to me that the brewpi is heating for way to long each time, therefore the temp goes too far up and the brewpi then thinks cooling for way too long is the answer and up and down we go.

Here are some of my settings. Please let me know if you need more info.

Yes, it is heating the minimum time, which is indicated by the bright red bit at the bottom of the graph.

On BrewPi 0.2, the minimum heat time is not user configurable in the web interface. With your powerful heater, even heating for a few minutes is too much, especially at low temperatures.

As a quick fix, uninstall the heater. You won’t need it for the kegs anyway. For keeping kegs cool, I would also just use fridge constant mode. With the beer sensor taped to the side of the keg, your sensor is influenced by the fridge air temperature too much for the cascaded control algorithm to work well.

Thanks for the reply. I guess you’re right that I don’t really need the heater in this case. But in other cases I will.

So is there any way of changing the minimum heating time in my setup? I wish there was no minimum heating time, just seems pointless.

I can compile a new version with the minimum time reduced to 30 seconds.

That would be awesome. If you think it helps. Any special need for a minimum time at all?

I just tried putting a fresh batch of beer into the fridge. Now the beer temperature probe is in a thermowell. This looks much better. Still only 12 hours in and it doesn’t look like fermentation has started. Hope the heat from fermentation doesn’t throw brewpi out of balance.

Hey Guys,

Im new to the community and picking up things quickly, but please be patient.

Looks like I having similar issues when operating in profile mode. It could be an issue where the heater is too large for the system or just that heating gets stuck running too long. I could be both. I’ve attached a graph detailing the issue. It looks like the chamber temp spikes really badly when going into heat mode. I’ve tried resting the EEPROM and checked wiring and everyone looks great. The heater is a 900 watt unit or so that is on low mode.

In normal operation everything is staying nicely in check. Let me know you thoughts!

Correct me if I’m wrong, but to me it looks like a spike when you stop heating.

To me it looks like you probably have the heater inverted?

Now to point 2: are you using mechanical relays? Interference like this only seems to happen when mechanical relays are used. So please describe your setup a bit more:

  • Arduino / Photon / Core?
  • Device configuration
  • Type of relays used

Elco. Thanks for your quick reply and thanks for all your work on the project. As a fellow IT pro I really can appreciate the skill and time it takes to make such a big contribution. Im looking forward to contribiting to the project as well.

Good questions. It seems like the heating is happening but the temp is not being recorded right away since it looks like when I login to check on things, the heating timer has been going on for a long time, but maybe the chamber probe isn’t registering right away? Once I restart the brew script, then I see the temperature ramping up (logging)?? Could it be a bad sensor?

Setup is as follows:

As far as the relay config and inverted goes are you referring to the pin type? If so yes. According to the instructions listed at brew talk, the wiring setup requires this?? If not then maybe this is the issue??

Problem solved! The setting was “not inverted”! You we’re right Elco. My oversight. As far as the heater, would you have any recommendations? Seems like 120F at times is pretty much over kill. It was the smallest one I could get locally is there anyway to lower the wattage safely? Guess I could use a light… Has anyone successfully reused the carboy heater wraps? Just mounted in the chamber and not on the fermenter?

A light bulb in a paint can works well too.
But do a test to check that the paint can does not heat up beyond safe levels.

I really advise against those sainsmart boards, see my post here:

1 Like

Thanks again. After correcting the misconfig, looks like heating is happening very rarely and only running long enough to heat chamber temps to 70F. I think that’s acceptable. As far as relays go, mechanical relays are slightly less reliable than ssr’s. I see the concerns of the ground so that’s something I’ve changed to get ground from the outlet ground…although less reliable they’ve been used for years. I’m not too concerned. If it fails the SSRs will be the next investment.

Piggybacking on this topic for a similar problem:

I installed a heater mid-fermentation yesterday (65W tubular heater + fan) and it does the job well, it’s not too powerful as was the issue with the problem described above. I now see the graph saw-toothing badly; it doesn’t seem to stabilise. As I said I installed it mid-fermentation, should I reset some (or all) parameters? I am on legacy as I am using a Rpi+Arduino.

Can someone point me in the right direction? What should I change to avoid below behaviour?
The beer temp is not fluctuating that much but I guess there is no practical reason for the system to behave in this wasteful way.

From looking at your chart, this is the Arduino version. The Arduino version cannot heat with PWM, it is fully on or fully off. That will make it a bit more sensitive to overshooting. With the sensor taped to the side, you will get some overshoot.

Your screenshot of the PID settings is useless like this. You need to hit update control variables until values show.

I think your main concern is to prevent heating after cooling. You can increase the ‘dead time’ in advanced settings to set a minimum time between switching from heating to cooling and vice versa.

Can you change the dead time in the Arduino version? I cannot find it in advanced settings.

1 Like

You are right, it is fixed at 10 minutes in the Arduino version.

Your other option is to uninstall the actuator that is not needed at the moment. Or you can change the beer-to-fridge PID settings to be less aggressive.

Thanks, uninstalling the actuator was what I did a few days ago and peace has returned to my fridge.