Temperature Control - A Sudden Thought - Page 1
Forum section: electronics / projects

author: German_EE
author_rank: Super Contributor
timestamp: February 12, 2016, 06:08:01 pm
content: I have been thinking about how to control the temperature in a small heated chamber, maximum power required is about 50W and the classical way of doing this is as follows:Mains Supply > Switched Mode Power Supply > Temperature Controller > Power driver > Heater > Sensor|_____________________<__________________|This is too many steps so why not connect the heater directly to the power supply and use the chamber temperature to regulate the heater voltage? Something like this:Mains Supply > Switched Mode Power Supply > Heater > Sensor|__________<___________|Temperature sensing is done with a thermistor on the voltage sense divider and arranged so that a decrease in temperature gives a decrease in the feedback voltage, leading to a rise in the power supply output feeding the heater.Comments?

author: uncle_bob
author_rank: Unknown
timestamp: February 12, 2016, 06:17:12 pm
content: HiWhy bother with the power supply?Just control the mains voltage into the heating elements with a switch or relay. That's even more simple. Sensor is cold, power comes on. Sensor it hot, power turns off. That is by far the most common way to do this. (Think of home appliances ...).Bob

author: German_EE
author_rank: Super Contributor
timestamp: February 12, 2016, 06:23:17 pm
content: Because I want proportional control of the temperature so that (ideally) the temperature is kept within a degree or so. Also there is the small matter of safety and I really don't want a mains powered heater inside a chamber where there may be liquids spilt.

author: uncle_bob
author_rank: Unknown
timestamp: February 12, 2016, 06:29:43 pm
content: HiOk, the gotcha with the "direct to the supply" approach is the inability to take most of them to zero volts. That's one of the things you very much want to be able to do on a temperature controller.The next most simple way is to just drive the heater with a PWM signal. Nothing much fancy there.If you are likely to have spill issues, the heaters and electronics will need to be well protected no matter what you do. This is often done by putting them in a chamber all their own. You circulate air between that chamber and the "people chamber" with a fan.Bob

author: Pjotr
author_rank: Frequent Contributor
timestamp: February 12, 2016, 07:40:25 pm
content: Or use "cycle dense modulation": Switch full cycles at the zero crossings with an opto triac. You have then in fact a 1st order oversampling 1-bit DA converter sampling at 50/60 Hz. Resolution at wish. No switching noise and balanced load of the mains. Temperature control is usually slow enough that sampling at the mains frequency is more than adequate.It has the advantage that you control power linearly, which is what you need for temperature control. Makes PID contol even simpler to manage.

author: Fungus
author_rank: Super Contributor
timestamp: February 12, 2016, 07:54:12 pm
content: Quote from: German_EE on February 12, 2016, 06:23:17 pmMains electricity can be switched on and off too.(It's a good idea to match the switching to the mains frequency, is 50Hz/60Hz switching fast enough for temperature control?)

author: German_EE
author_rank: Super Contributor
timestamp: February 12, 2016, 08:01:33 pm
content: I may be able to get around the inability to get down to zero volts but I will need to experiment. In use there will be an application of full power to bring the chamber up to temperature then (hopefully) the regulation will balance power in with heat lost through the insulation. Running voltage will therefore be a lot lower than full voltage but not zero.I'm now going to spend a Saturday evening researching cycle dense modulation and PIV theory. Yes, I do stuff like this for fun.

author: Fungus
author_rank: Super Contributor
timestamp: February 12, 2016, 08:14:31 pm
content: Quote from: German_EE on February 12, 2016, 08:01:33 pmhttp://www.atmel.com/images/doc2508.pdf

author: Jeroen3
author_rank: Super Contributor
timestamp: February 12, 2016, 08:49:05 pm
content: The most simplistic way to do this uses an electromechanical temperature switch.However, the end result might have too much ripple. Or the source cannot handle the sudden changes in load.

author: Pjotr
author_rank: Frequent Contributor
timestamp: February 12, 2016, 08:49:22 pm
content: Quote from: Fungus on February 12, 2016, 07:54:12 pmDepends on the heating element, heat capacity and heat loss. Each cycle delvers a finite amount of joules. This heats up your oven a finite amount of degK. If that heating each cycle is within the temperature resolution you wish it's ok. If it's too much you can do with a smaller heating element and/or make heat capacity of the oven larger. This makes the process slower but smooths out temperature ripple.

author: Fungus
author_rank: Super Contributor
timestamp: February 12, 2016, 09:46:54 pm
content: Quote from: Pjotr on February 12, 2016, 08:49:22 pmMaybe a simple feedback loop on each mains cycle would do it. Too cold? Turn on for the next cycle. Too hot? Don't.(Much too hot? Turn on the emergency fan!)

author: Pjotr
author_rank: Frequent Contributor
timestamp: February 12, 2016, 10:17:00 pm
content: No, that's in fact a simple bang-bang controller synchronised to the mains. Due to the time lag of the oven it will give a much larger temperature swing (or ripple) than a PID controller. OP did ask for a proportional control for a reason.B.t.w. If safety is an issue due to liquids, use a safety transformer. Heating elements also work from 24V AC, either do triacs

author: Kleinstein
author_rank: Super Contributor
timestamp: February 12, 2016, 10:31:52 pm
content: One can also consider using transistors as heaters - the advantage is that there is not more external heat loss and output is linear as opposed to square law with a resistor in linear mode.

author: uncle_bob
author_rank: Unknown
timestamp: February 12, 2016, 10:50:15 pm
content: HiGiven that you can buy an eBay PID controller that will do this off mains voltage for < &30, this is sort of a "solved problem". Anything you do from scratch will cost more than a pre-built solution. So, we are doing this for fun, which is fine.You can get cycle switching SSR's and drive them on a per cycle (or half cycle) basis. You can also get phase driven units that work more like a light dimmer. For safety, an isolation transformer likely costs less than a high power supply. It's also a lot more reliable.A typical small oven will have a time constant in the 100's of seconds range. On a 50 Hz line, you have > 5K cycles to pay with. It is unlikely you will need to go to the phase angle versions.Bob

author: dom0
author_rank: Super Contributor
timestamp: February 12, 2016, 11:37:52 pm
content: Quote from: uncle_bob on February 12, 2016, 06:29:43 pmDo we? A typical minimum voltage would be 1.25 V to 1.5 V. Say German_EE uses a 24 or 48 V supply because he isn't nuts and doesn't use some stupidly low voltage to heat things. A resistor powered by 24 V would dissipate only about ~0.3 % of that power at 1.25 V. In many applications the minimum outward heat flow will be much greater than that (You'd not use a heater that can go to 11 if all you needed was one that goes to 3, right?).In terms of fire hazard / safety ... well, the heater needs a secondary shutdown mechanism anyway.@Triacs and low voltage transformers: note that losses in the triac are _much_ higher relative to the delivered power compared to 230 V operation. If so I'd suggest _full_ wave control from the primary of the transformer. That way, you have much less power to dissipate.

author: uncle_bob
author_rank: Unknown
timestamp: February 13, 2016, 01:31:18 am
content: Quote from: dom0 on February 12, 2016, 11:37:52 pmHiWith a switcher, without changing the output caps, you aren't going to get a 48V to 1V output range. The thing will go unstable. Once you start switching output caps and feedback parts, it gets really messy really fast.There is no reason to do it. Simply do a PWM on the output of the regulator. Much easier, no nasty things to mess with.My assumption on the tirac is that you simply have a 1:1 transformer on the thing to ground isolate the system. The triac will blow any switcher made away efficiency wise. It will hold efficiency to a much lower power level than a crazy switcher.=====Now, if he wants an oven that is precise, there's more to it. Gradients quickly become the dominant factor. You can have a 0.0000000001C set point and have 5C gradients at pretty normal temperatures. The answer is either a stirred liquid or a lot of moving air.The pump or fan will put the whole discussion about "how efficient" (93 or 96%) in the waste basket.So far there is not a lot of numbers behind this. How hot does it get? Does it start from a heated room? (My back porch is at -10C ...). How much heat load is there (if any)? What sort of uniformity is needed? The answers to those sort of questions could easily impact what needs to be done.Bob

author: timb
author_rank: Super Contributor
timestamp: February 13, 2016, 02:01:12 am
content: Quote from: Pjotr on February 12, 2016, 07:40:25 pmYup. I'm designing a heater controller exactly like this to retrofit the mechanical switch in a Power Designs reference oven.There's a few app notes on the subject. Here's one from (I think) Vishay:(Note: The schematic clearly has some major issues, but the principle is sound.)

author: Pjotr
author_rank: Frequent Contributor
timestamp: February 13, 2016, 09:48:09 am
content: Quote from: German_EE on February 12, 2016, 08:01:33 pmIt is no more than a Delta modulator. It consists of an integrator, a subtracter and a comparator (zero crossing detector):https://en.wikipedia.org/wiki/Delta_modulation. This can be easily done in software with a MCU and calling the routine at the mains frequency. Hook on an opto isolated triac and you are there

author: dom0
author_rank: Super Contributor
timestamp: February 13, 2016, 10:10:21 am
content: FYI you can use the thermal mass as the integrator.@uncle_bob: Right, I forgot about the conditional (output voltage dependent) stability of many SMPS.

author: Pjotr
author_rank: Frequent Contributor
timestamp: February 13, 2016, 10:37:28 am
content: Quote from: dom0 on February 13, 2016, 10:10:21 amAgain, then you will end up with a basic bang-bang controller with a much larger temp swing at regulation. The time constant of such an integrator is much too large. Control theory isn't that easy...

author: dannyf
author_rank: Super Contributor
timestamp: February 13, 2016, 12:59:59 pm
content: Putbthe heatervinside ofba bridge and put a MOSFET in serial with it. You just need to control the duty cycle on the MOSFET.A complete DC solution.

author: uncle_bob
author_rank: Unknown
timestamp: February 13, 2016, 02:56:45 pm
content: Quote from: dom0 on February 13, 2016, 10:10:21 amHiI've missed that little "feature" many times .... always with nasty results :0Bob

author: TerraHertz
author_rank: Super Contributor
timestamp: February 13, 2016, 09:53:07 pm
content: Quote from: German_EE on February 12, 2016, 06:23:17 pmSo use a stove-top element, with the sheath grounded. That's a problem solved long ago.They come in all sizes, and if it ever fails (unlikely) you can buy another the same. Also very easy to find for free.QuoteIf you used zero crossing cycle control, you have to drive with full cycles, not half cycles. The supply authorities hate DC-draw from the mains - which you tend to get if you use half cycles. Perhaps the power input from a full cycle would be a bit too much to achieve fine temperature regulation?In which case use phase control, which gives you fully linear fine control. Though you'd need to be sure the phase controller can go to zero.Don't forget to include a safety secondary over-temp cutout in the mains drive circuit, using a bi-metalic switch. In case your triac shorts, or other fault with the electronics. There's always one or two of these in every tossed-out microwave oven. Those ones typically switch around 120 to 180 deg C. See pic.

author: uncle_bob
author_rank: Unknown
timestamp: February 13, 2016, 10:07:59 pm
content: Quote from: TerraHertz on February 13, 2016, 09:53:07 pmHiThe time constants involved are actually quite long. A simple drop /add dither approach on a cycle by cycle controller will do quite well.Some math (sorry!):You start from 25 C and want to go to 125. You size the heating element so you can get to 175C. You have a possible 150 C heat rise with the element full on. To control at 125, you need a 100C rise. (Yes these are totally arbitrary numbers). To control to +/- 1C, you need to (among other things) control the power to 2/3%. On 50 Hz power, that will take you just a about 3 seconds. For gross overkill (which is s very good idea in this case) take it out to 30 seconds. For fine control (integrator output) drop or add a cycle to each 30 second "frame" over some longer time period.For even more fun, do a series of 3 second "sub frames" to make up your 30 second main frame. That way, most of the time, you have the 3 second speed and you get the full accuracy over 30 seconds. You are close enough at 3 seconds that things should average down pretty well.If you have a heating element or an oven mass that has a time constant of less than a few minutes, I'd be quite surprised. Put another way: Do you expect the oven to heat to 150C in a minute or two or in a fraction of a minute? A commercial test chamber is doing pretty well at 5C per minute.Bob

author: Pjotr
author_rank: Frequent Contributor
timestamp: February 13, 2016, 10:54:02 pm
content: Quote from: uncle_bob on February 13, 2016, 10:07:59 pmWell, in some way this is what a Delta modulator does (apart from the PID control): It ads cycles when asked by the set value. If that's one in a minute as a set point (0.033% output at 50 Hz), no problem. Provided resolution/range of the integrator is sufficient. But that shouldn't be a problem with a MCU. It adapts its frequency to the commanded output automatically.TerraHertz has a point to switch full cycles, not half. Although I doubt the energy supplier cares for a 50W oven. a 5kW one is different matter.

author: dom0
author_rank: Super Contributor
timestamp: February 13, 2016, 11:05:00 pm
content: Quote from: Pjotr on February 13, 2016, 10:37:28 amThe time constant of this integrator is depedent on the system (heater capability ~ R, thermal mass + resistance ~ C), and can be quite sufficient for good regulation. For real ovens (not something small like an oscillator / reference heater or a soldering iron) this tends to move quickly away from a good time constant for the control loop, I agree.

author: SeanB
author_rank: Super Contributor
timestamp: February 14, 2016, 03:54:52 pm
content: Grab one of those cheap water coolers which uses a peltier cooler, and simply use the control circuit inside that. It uses a second secondary on the SMPS to give a regulated 5V supply, and then uses this to drive the temperature controller to vary the peltier voltage from around 3V to 12V, giving the cooling required, by varying the feedback voltage applied to the optocoupler feedback loop. Can be had for free as the tank fins on the outside clog up with dust and the inner fins erode away in the water. Then use a heatsink on the cool side and the original one and run the element in reverse. Will give you a reversible one ( use a switch) that is poor at cooling ( like all are) and great at getting you up to 70C with ease. Just add a better controller to it.

author: uncle_bob
author_rank: Unknown
timestamp: February 14, 2016, 05:01:54 pm
content: HiNo need to tear anything apart. You can get the whole packaged AC controller from China for < $20. The silly things even run a PID control .... Yes, they are relay based. The ones I have on the beer equipment have been running 24/7 for many years now.Bob (burp!!)

author: Pjotr
author_rank: Frequent Contributor
timestamp: February 14, 2016, 06:23:39 pm
content: I'll guess it's liquid proof also ....

author: uncle_bob
author_rank: Unknown
timestamp: February 14, 2016, 06:45:41 pm
content: Quote from: Pjotr on February 14, 2016, 06:23:39 pmHiI have them buried down it the bottom of various gear. Oddly enough they were made for aquarium use so yes, they are supposed to be waterproof. Nine taps ...so many decisions ...Bob