I spent awhile reading about PID controllers in order to understand how to tune the TEC. P represents proportional gains, and deals with the present error from the set value. I represents integral gains, and deals with past errors. D represents derivative values, and uses the current data to predict future errors. They each affect how the TEC overshoots/oscillates about the correct temperature in different ways. I figured out that the oscillations that I saw yesterday in the heating and cooling data were due to improper tuning of the PID gain. I decreased the integral gain and it seemed to fix the problem.
I also discovered that the oscilloscope was on the wrong setting, with 10x attenuation. I noticed this when converting the data from output voltage to temperature. I changed the settings to 1x attenuation and took data for heating and cooling, shown below. There only seems to be one slight overshoot when changing the temperature by about 1 degree, which is entirely reasonable. The correct temperature settles after about 1 minute.
 
While these measurements were useful in tuning the PID gain so that the temperature settles quickly, there was a discrepancy in the measured resistance across the thermistor and the resistance calculated from the measurement of Vout. Using the TEC controller, I brought the resistance of the feedback thermistor to 10k, but this resulted in a Vout that predicted a thermistor resistance of 9.91k (0.2 degrees K difference). In order to zero Vout, I had to bring the thermistor resistance down to 9.892k. I'm trying to think of a way to calibrate this difference, but I'm not sure which thermistor is reading more accurately right now. I'm going to read more about using thermistors as temperature sensors to see if there is anything I can try to do for this.
I'm also still trying to think if there's a way to adjust the P, I, and D controls so that I can actually go back to previous values. The controls are unlabeled on the TEC controller we have, so they cannot be accurately returned to specific settings. It seems well calibrated for the moment, though. |