At wit's end chasing hysteresis

Thread Starter

wayneh

Joined Sep 9, 2010
17,496
I'm perplexed, and need a fresh pair of eyes and neurons. I've breadboarded the attached thermostat circuit - my design - and in general it's working very well, but the deadband temperature range seems to vary with even a small change in the temperature setting.

It was working great when I was controlling at about 20°C; the temp. stayed in a range of less than ±0.1°C and I was thrilled. But if I turn it down slightly to 15°C (by lowering the reference voltage at R9), the dead range grows to 1°C or more! This temperature setting change seems like minor change - the reference voltage at which the comparator switches drops from ~3v to ~2v. It doesn't make sense to me how this would destroy the tightness of the control.

My hunch is that there's something going on between the power supply voltages and how the comparator is feeding back. (It still makes no sense to me how the temperature change relates to this.) The 10M and 5.1K resistors are there to help insure solid switching of the FET gate voltage, to eliminate oscillation. I added them before I added the op-amp, and it helped. Maybe I don't need this feedback anymore. On the other hand, if I could get tight control at the comparator I could probably remove the op-amp altogether.

The power supply is an old computer PSU and has the odd behavior of increasing the voltage from 12v to 16v when the load is applied to the 5v part of the supply. I guess I can try using a battery for the 12v supply instead, to eliminate this effect. Thought I'd ask for ideas here first.
 

Attachments

Wendy

Joined Mar 24, 2008
23,415
Something I looked for on the datasheet and didn't find is how near ground the input could go and still work.

MC33178 Datasheet

The old LM358 has the following mention in its specs by way of example.

Common-Mode Input Voltage Range
Includes Ground, Allowing Direct Sensing
Near Ground
Many op amps do not handle near Vcc or ground well, I can't help wondering if this isn't the issue.

You could try a LM358 to see if it makes a difference, or find a different op amp.

Or you could raise the low voltage input off of ground to get the existing op amp away from near ground conditions. Add a diode between the ground connections on most of the circuit, while keeping the op amp connected directly to ground.
 

Attachments

Thread Starter

wayneh

Joined Sep 9, 2010
17,496
Something I looked for on the datasheet and didn't find is how near ground the input could go and still work.
Excellent point, and this could explain why a small drop in temperature and thus voltage at the op-amp input, starting causing big trouble. Maybe I'm falling into the range where it won't work well. I'll look into this. My comparator supposedly includes ground, but maybe not that op-amp.

I've got a negative supply available on the PSU, maybe I should just go ahead use it.
 

Thread Starter

wayneh

Joined Sep 9, 2010
17,496
Something I looked for on the datasheet and didn't find is how near ground the input could go and still work.
I have the original Motorola datasheet, which makes the following comment:

The low input offset voltage and moderately high slew rate
and gain bandwidth product make it attractive for a variety of
other applications. For example, although it is not single
supply (the common mode input range does not include
ground), it is specified at +5.0 V with a typical common mode
rejection of 110 dB. This makes it an excellent choice for use
with digital circuits.


So much grabbing a random op-amp out of my parts drawer. This is undoubtedly the wrong op-amp to use as I have drawn the circuit. I'll try using the negative supply or something else.

Very happy to at least have a path forward instead of a brick wall. I don't know how anyone ever survived without forums. :D
 

Thread Starter

wayneh

Joined Sep 9, 2010
17,496
You could always use a LM358... :p
I could also use a scotch on ice!

Turns out I was chasing two ghosts. You gave me one of them: The negative supply for the op-amp cured the problem of going to low temps. But things still weren't right.

So I went for a run and had an idea at the 2-mile mark.

USELESS ASIDE When faced with a brick wall, it's often most effective to stand back and set your mind onto some other mindless activity. And what could be more mindless than jogging? The first known advocate of this technique was Archimedes who, the story goes, got the idea of using water displacement to measure the volume and density of an irregular object, such as a counterfeit gold crown, while slipping into his bath tub.

Anyway, it dawned on me that the POWER circuits in my schematic, the TEC (3-5 amps) and the fan (0.06 amps), could and should be mechanically and electrically isolated from the CONTROL circuits on my breadboard. Some rearranging of LM35 sensor wires away from the TEC leads helped but I had to go to bed without a full solution. The answer hit me when my head hit the pillow: The POWER circuits should not share any ground whatsoever with the CONTROL circuit breadboard. Nothing changes on paper, but I disconnected the FET source pins from the ground rails on the breadboard and instead brought a separate ground wire to them from the ground pin of the PSU.

Voila. I've now got tight, steady temperature control of <±0.05°C down to 10°C (the lowest I need). Half of the dead range is the control hysteresis and the other half is overshoot in the system, eg. continued cooling even after the cooling device has been shut off, and a bit of warming even after the TEC turns on. I couldn't get tighter control without going to a proportional control, but anyway I don't need it any better than this. Heck, it's controlling within 1mv at the LM35 output and I can barely measure any better than that.

This could become a finished project soon I guess. I've never submitted one of those. Anything I need to know?
 

Wendy

Joined Mar 24, 2008
23,415
They aren't the best op amp out there, they are very slow. Unless your circuit is faster than I think they should work, but never expect too much from them. They are basically a second or third generation chip after the 741 and 709.

Never the less, I like them. They can have their moments.

If you care to publish we have a The Projects Collection forum, it would be nice to see it used for what it is intended, we keep having noobs trying to ask questions there. They get promptly moved, but leave a title like a bird dropping obscuring the other titles.

Just write the title similar to:

Project: Temperature controller

I'd make the title a little more informative, but you get the idea.

The Project shows it is a finished piece of work. Be sure to be as complete as possible, don't use outside links for photographs and schematics. AAC (All About Circuits) has a free gallery section as well as accepting attachments. If you have questions I have links in my Blog (AAC has that too) to show you how to post pictures full size and whatnot.

Bill's Index
 
Last edited:

Thread Starter

wayneh

Joined Sep 9, 2010
17,496
They aren't the best op amp out there, they are very slow. Unless your circuit is faster than I think they should work...
Yup, my switching time is seconds to minutes, very slow. The Fairchild datasheet shows not much dropoff until you're over ~4kHz. So maybe not so good for hifi audio but more than adequate for this app.

I'll write it all up soon. Seems like a thermostat circuit might have broad appeal.
 
Top