People, I changed the Brewpi code for Arduino to use it as mash controller. So, now I am testing it. See image below, where red line is HLT temperature and blue line is mash temperature.
I will try to increase Proportional gain e disable Derivate control, because I need more speed temperature increasement. Do you agree with those actions?
But, when I type those values on BrewPi, Kd is changed by code for some negative value. Is it a bug? Or Is there some reason for this?
I should remember you (maybe those values sound strange and extremely high for traditional BrewPi usage) that I changed the code to use it as a mash controller.
The maximum range of the internal storage format is -64 to 64. I don’t know how you changed the code, but the derivative used to be per minute. Having your Kd that high sounds wrong. With a mashing setup, you’d expect very little overshoot, so I think having Kd at zero would work fine probably.
@Elco, I changed only TempControl.h, where I reduce min times on/off, because now my element is a electric coil (5500 W). And I suspect that I need change derivate by minute, because that high number (Kd=1470) was calculated by second. So, Kd goes to 24,5 by minute. Make sense for you now?
Other doubt, is should be positive or negative number? What is the difference between + or - number?
What are the Kp, Ki and Kp to spark when in mash usage?
if the only modifications that you made are the minimum on and off times, then I don’t think the code is really suitable for mashing. That is why I am now rewriting the code to support PWM.
The PWM settings in your code only give you a difference between fridge temperature setting and beer temperature setting. They do not change how the actuators are driven.
@Elco, the derivative of the error still negative when I try heat a HLT (increase temperature) to increase MLT temperature during mash? So, I need keep it negative or should I considere, in this case that I am using BrewPi as a mash controller, positive?
Nope, still needs to be negative. There is not much difference between a mash process and fermentation process in terms of physics.
I will probably change the PID parameters to Kp, Ti and Ts in the future: time constants for the derivative and integral gain. It is more widely used in industry and more intuitive.
@Elco, and how is it calculated (fridge temperature based on a PID calculation of the beer temperature)? What is the relationship between fridge/beer temperature?
I cannot help you write the code for Arduino. We did the work for the Spark and abandoned Arduino for good reasons. You are on your own if you insist on using the Arduino. I’m not going to put in anymore time.