How about it? Experiments of the third kind , take 999999. Update Testing the temperature controller
There has been some talk about PID controllers to keep temperature constant. And I wanted to keep the 'D' out of the PID.
After the melted box experiment (see early postings on this subject), I had some idea of the amount of power needed to keep the box with sensors at about 40C, and from that the hard - and software design evolved. As I proudly mentioned before, it is not always that so many lines of code work first time. The temperature controller does, and works beautifully. The way I had implemented it is like this: PIC has PWM output at about 10kHz with 256 steps. Once every second I measure the voltage across the sensor diode, and if it is lower than my set point voltage then I decrement the PWM by one step to a minimum of zero, and if it is higher then I increment the PWM by 1 step to a maximum of 255. The big question was "Will this be fast enough and will this be stable?" The above method creates a proportional band of 256 steps, and creates the 'I' factor in the control loop. That is, as long as there is any error, the PWM will be altered in the right direction. Note that the voltage over the Si diode sensor is lower for a higher temperature.
Anyways, here is the setup, thermocouple taped to the hot plate:
Even with box open the PWM did not have to go to maximum:
As to the performance, I did set the start up PWM value to 128 (50%), and then there is once an overshoot, due to thermal delay before the diode sees the heat from the transistor, then things settle down fast. As I expected it settled within a few minutes (128 seconds means 128 delta for the PWM), seems even better with box closed, no air interference. I am happy with the thermal controller for this experiment, now I can move on to the design of the main board. To get error and control messages from the PIC micro controller in the small black box to the PIC micro controller on the main board I have decided to use the ASCII codes above 127... Multi-processor multi PIC, some here will tremble with fear. Its is fun though !