BlakeCLewis / PILN

Raspberry Pi Kiln Controller
GNU General Public License v3.0
1 stars 2 forks source link

Can you explain why you use AmbientTmp in the update pid? #4

Open fayena opened 5 years ago

fayena commented 5 years ago

I don't completely understand how this function works and I'm trying to work through it.

Thank you!

BlakeCLewis commented 5 years ago

The last section in the readme is about the logic of the algorithm.

The heat loss of the kiln is proportional to the difference in temp inside-outside. the math is like (TEMP.i-TEMP.o) x H = (amount of heat loss) where H is the thermal conductivity of the kiln

I added the Cterm to have a "known" place to start (at any temp) based on the heat loss of the kiln. Then the PID terms can do the climb and error correction.

Do a 10 segment profile bisque (1000C) fire, holding for 10 minutes every 100C. For each hold average the amount of time the kiln was 'on'. The database has this data. The result for my kiln is about 6% per 100C of temp diff inside-outside. At 1000C diff it takes about 60% to hold. So, during a 30 sec window at 1023C, and 23C room temp, (1023C-23C) x 6/100 x 30sec = 18sec to hold current temp 1023C.

I fired last winter in an unheated shed with fairly good ventilation -17C about 2F, and I fired this summer at 38C about 100f. I do 100C holds for hours to dry out the pots. It makes a big difference to have the room temp. Initially, when I added room temp to the program, I hard coded it for each run. I think it is more important at lower temps. Before I added it, there was a saw tooth up to about 600C then it smoothed out.

I also use the internal chip temp of the kiln thermocouple and compare it to the room temp to see if the thermocouple chip is heating up. This summer I had the kiln thermocouple shut down, and I think it is because the chip got hot. The comparison operates a fan to cool the electronics. I think I want to try a PID control to PWM the fan speed. right now I am turning it on for the full window.

fayena commented 5 years ago

Ahh ok that makes sense. Thank you!