DS18B20 PID Tuning on the warm side


#21

I am wondering whether a rethink may be in order. The way you are going can certainly be made to work, but if you are now going to be making wine rather than beer it may be that an alternative solution may be better. I think that with wine making any exothermic reaction in the liquid will be trivial. If that is correct then instead of trying to control the liquid in the bucket (which is difficult because of the huge delays heating up the bucket) and instead control the temperature of the box (which will be much, much easier) and let the bucket follow along in its own time.


#22

Actually wine is just as active if not more so than beer. It's sugar and yeast whether it's beer or wine and wine is a 6 gallon batch while beer is a 5 gallon batch. Secondly, if the box temperature is at the set point it will take the brew much longer to reach the target temperature, if ever, and the time delay to active yeast is when stray bacteria can infect the must.
Here is a graph of the last 16 hours. Y axis right is scaled to 100% so PID O/P is at 50% when it's off and Heat/Cool are off at 0%.
The starting PV was 55.06°F and Setpoint was 55°F.
All of the gauges are last sample.


#23

Something is not right. Show me again what settings you have on the PID node. I ask as I know you have changed at least some settings since you posted them.


#24

The only things I changed are the Proportional band from 5 to 10 and the initial integral.


#25

Are you working in C or F (so is that PB 10C or 10F?). Actually though I realise that, given the fact that it started with the integral wound up so that it started at full power what is there is not unreasonable. With 16 hours of integral it will take about three times that to stabilise onto the setpoint. Are you sure there was a good reason for ending up with the integral that high? Looking at the response of the process it looks much larger than necessary.


#26

All the nodes are in C. I translate to F for the user interface.
The bucket temperature has been steady at 64.400°F since 4:12 am this morning.
The integral time is what we settled on last summer.
If I rebooted nodered it should reset everything, shouldn't it?


#27

Before you do that add a debug node to the output of the PID (if there isn't one there already) and set it show the complete message. Then deploy just modified nodes, expand the output of each attribute of the debug message and post it here. That will show the details of what the PID node thinks it is playing at.


#28

ARG! The setpoint from the UI didn't make it to the PID. The PID was working with a setpoint of 18C and the Bucket temp was 18C. The PID did just what it was told to do.

Sorry for taking you down that rabbit hole. My mistake not making sure my test setpoint was not cleared. :frowning:

I'll reset the temperatures (open the lid on the freezer) and start over.


#29

So it was working well after all, excellent.


#30

I've been tinkering with the setpoint to see how it reacts and I can't find anything wrong! I'm calling it good to go.
Thanks for all your help Colin, I couldn't have done it without you. :slight_smile:
Charles


#31

There are a couple of things I think you should check before going into 'production', if you have not already. First check that it is still ok in the cooling region, so set the setpoint a few degrees cooler than ambient, so it requires a bit of cooling once stabilised, and make sure that is still ok. Finally, the most tricky point to stabilise can be the crossover between heat and cool, so try it with the setpoint the same as the ambient, or as close as you can get it. Sometimes you can find you get a small oscillation with the cooling coming on and pushing it below the setpoint, then the heating comes on and pushes it above. If you find that is a problem then there are solutions you can try.


#32

I took a little different path. I exchanged the carboy that had been holding 60F three boxes of bottles which was equal to 6 gallons of wine. The biggest difference was the cardboard boxes which would insulate the bottles to some degree. Each box held 12 bottles with 6 bottles not in boxes. The bucket temp shot up to 68F and, well, the chart is attached. The over shoot was 1.4F but I don't expect undampened hysteresis.


#33

Where is the temperature sensor?


#34

Inside one of the boxes.
Sorry, that should have read two boxes of 12 bottles each with 6 loose bottles.


#35

Here is the chart for the last 44 hours.


#36

Previously was it in the liquid in the bucket? If so that that is a vast change to the system.


#37

It was inside a stainless steel tube about 12" into the liquid. This one was inside a cardboard box with the lid taped shut, no air flow. I think I would expect a little over shoot because of the insulation of the cardboard compared to a thin layer of food grade plastic. That's why I didn't give it much thought. It's not a typical batch.


#38

What you have now is measuring the temperature of the air inside the box, which will react completely differently to the temperature of gallons of liquid. In fact I am surprised it controls as well as it does. It just goes to show how tolerant PID is.


#39

It's a temporary situation. As soon as I can free up some room in my aging freezer I'll move it over there. When I start a batch of black currant wine, 3 gallons, I'll update the chart.


#40

Just for curiosity sake and for future reference, what would be the best practice for adjusting parameters to compensate for the over shoot?