Worked a bit on the code and implemented a simple integer multiply routine.
So i changed the coefficients to 10*P + (1/8) * I + 50 * D. (Integer divide isn't as easy as integer multiply - hey! i can't solve all the problems at once can i?). This wasn't too good -- drifting up too much on the high side.
Then i remembered that the derivative factor amplifies noise in the temperature reading, and, much to my disappointment, there is a lot of jitter in the temperature reading from the MAX6675. So i reduced the D factor to 25.
... testing ...
wow. this is much, much better. i hate how haphazard trying to determine the coefficients is, but that said, this is much, much better.
1) less overshoot on startup, and pretty rapid drop to about 10F above SETPOINT, which is now at 420F.
2) none of the drift to ever higher temperature i saw last night at 50*D. i guess that was from the jitter in the temp reading magnified by the "50" and since the heater gets hotter way faster than it gets cooler, random errors would push it higher ??? amazing the difference switching to "25" makes!
3) i absolutely love the way it seems how, when i take a toke, i "pull" the temperature just a bit hotter to compensate for the air flow. After the 10 second hit when i look at the thermometer it is reading 5F hotter. Then it drifts back to SETPOINT. i like thick vapor.
Okay. i'm an ass. PID is clearly a great way to do temperature control. i just know there is a more accurate way to characterize the physics of this device, but i'm not smart enough to figure it out. However, trial and error, i'm good at.
Performance at this point is orders of magnitude better than anything i have experienced in 8 years of designing and using a vaporizer. Cool. Last issue resolved!