Experimenting With The Heater PID Controller

A project log for Precision Voltage and Current Reference

A little something to check your digital multimeter accuracy occasionally.

Bud BennettBud Bennett 05/03/2019 at 00:012 Comments

Before I committed to fabricating the PCBs for the voltage reference I decided to conduct a simple experiment to get a handle on possible problems controlling the temperature of the enclosure. I chose two CA3140 opamps from my inventory (probably 40 years old) for the two opamps. I also found some LM34 temperature sensors in metal cans that probably hailed from the 1970s. A IRLZ44 FET completed the component search and I integrated them all into the following schematic.

The LM34 was taped to the middle of the array of resistors that made up R4. U2 provides a 1.13V reference for the LM34, which should cause the PID to regulate the temperature of R4 at about 113°F. 

The 4.5V drain voltage on M1 in combination with R4 should generate 5.4W of power across R4 to lessen the amount of time required for the heater to reach temperature. 

I wired the LM34 with 8 inches of lead wire and taped it to the center of the PCB containing the R4 resistors.  I then wrapped the enclosure with Duck tape to seal the edges of the foam enclosure around the R4 PCB.

I flipped the switch on the two power supplies and watched the show. It was pretty boring. The temperature of R4 slowly ramped from 56°F to about 115°F in about 15 minutes. When my temperature probe indicated 120°F the gate of M1 started to drop to about 5.6V and the PID took over the temperature regulation of R4.

For the next 15 minutes I watched the display of the temperature probe. It varied from about 119.6°F to 120°F. That's only 0.22°C. I observed no anomalous behavior or strange oscillation of either the gate voltage of M1 or the temperature reading of the probe.

It appears that the PID controller is ready for prime time.

[Edit 2019-05-12]:

Later in the day I attempted the same experiment with the PID temperature controller. The shop temperature had increased to around 60°F by then. When I applied power to the bread board it oscillated rail-to-rail -- not what I expected. I determined that the cause for the stable response was that the Z44 FET was in its triode region and the system gain was relatively low. When the ambient temperature increased, the FET came out of its triode (linear) region, which increased the open-loop gain.

I also found that the opamp U4 was oscillating because of the load capacitance -- the drain-gate capacitance of the FET. This was fixed with a resistor divider 10K on top, 12k on bottom, between the opamp output and the FET gate. Unfortunately, the system now oscillated rail-to-rail with a 5 minute period. After 2 days of fiddling with the breadboard I determined that the problem was a 60 second delay in the heater. A delay is really bad news since it is an exponential phase error. A 60 second delay is totally awful. I was unable to get a stable system by substituting components and waiting 20 minutes for the system to settle into a steady-state bang-bang oscillation.

Now I turned to LTSpice to simulate the problem. LTSpice will yield a reasonably accurate result (if your models are accurate) in a few seconds instead of waiting 15 minutes on the bench. Here's what I eventually came up with as a working model:

The heater is modeled with a behavioral voltage source, B1, that converts power to voltage to emulate what the LM34 is doing. B1 also inlcudes the 60-second delay in the heater. The RC network tries to model the time constants involved with converting power to temperature. Heat transfer is a linear differential equation which can be modeled as a simple RC time constant between each physical interface. Note that C2 is now 200µF, a considerable increase from the initial 4.7µF. V3 simulates a changing ambient temperature from 50°F to 80°F to get a feel for how the loop gain affects stability as the ambient temperature changes. This circuit accurately modeled what I was seeing on the bench with the original component values -- a rail-to-rail oscillation with a period of several minutes.

The above is a two hour simulation. Note that the system settles in about 1/2 hour and the overshoot and ringing are consistent with a 50° phase margin for the 50°F ambient case, and overdamped when ambient is 80°F.

I plugged similar component values into the breadboard and lo and behold the system settled to a stable value at 110°F. I then changed the setpoint to 85°F and when I came back after an hour the system was holding that temperature. (Ambient was 60°F in both cases.)

Changes to the PCB components:

I modeled the heater system on the PCB with the circuit below.

B1 emulates the temperature sensor in the REF5025 voltage reference IC, with the included 60 second delay. Since the PCB has been ordered I have little leeway with component sizes. In particular C2 will be a stack of 2 100µF 1206 capacitors in place of the original 0805 capacitor. The simulation results are similar to the breadboard simulated results.

Again, the system settles to within a fraction of a °F within about 1/2 hour after turn on. I haven't yet assembled the heater PCBs and installed them in the plastic box. Things may change. I'll edit this log if things don't work out as planned.

[Edit: 2019-05-14]:

Well...I wasn't thinking clearly when I posted the previous edit. I am having trouble finding a 200µF ceramic capacitor (or even two 100µF) with more than 15V rating. So the simple fix is to increase the resistor values by a factor of ten and reduce the capacitor from 200µF to 22µF. It did not quite work out that way in the simulations, but I'll wait until I can assemble a heater board and test it on the bench, and in the box, before publishing any more changes.

The TLV170 opamps have an input bias current of 10pA so the increased resistance won't significantly affect the temperature setpoint error. I don't normally use any resistor value above 1MegΩ, but this circuit will be enclosed in a nice case and I will make sure to clean off any solder flux residue.


K.C. Lee wrote 05/03/2019 at 09:25 point

FYI: There are temperature sensor + voltage reference combo:  REF02

  Are you sure? yes | no

Bud Bennett wrote 05/03/2019 at 12:09 point

This was just a breadboard experiment to check the PID for correct operation with the chosen components. I had these components already on hand. The final version will use TI's REF5025 voltage reference which also has a temperature sensor.

  Are you sure? yes | no