Proportional heat control?

Thread Starter

Trenatos

Joined Mar 23, 2012
9
Hi,

I'm new to the forums, I've got a question that I can't figure out on my own.
The plan is to build a multi-channel proportional heat controller.
But I can't figure out where to start with the actual controller part.
I need to be able to control the amount of heat given off by for example flexwatt by controlling the amount of juice going into it.

I've found some info on making light dimmers and such but they seem to be for max 100 watts, and I think some of the heat stuff might need up to 300-400 watts per device.

The microcontroller of choice is Teensy 2.0

I'm not asking anyone to do my work for me, but a prod in the right direction would be greatly appreciated, as I've never done any 120v stuff before.
 

ErnieM

Joined Apr 24, 2011
8,377
The easiest way is sometimes called "bang-bang" control, which is how many house thermostats work. If the temperature goes below a certain setting, the controller goes on (bang). If the temperature goes above a certain setting, the controller goes off (bang).

That makes the electronics simpler too as you could use something like a relay.

A true proportional control is a bit advanced to design, can be dangerous to work with, could cause a fire (literally), and probably violates the TOS here, so I hope the simple way works for you.
 

Thread Starter

Trenatos

Joined Mar 23, 2012
9
Hi Ernie,

The aim is to create a true proportional controller, I can use relays for a first design while testing out other parts of the system but not for the long run.
 

John P

Joined Oct 14, 2008
2,026
I'm not sure that you can use "proportional control" if what it means is feeding a reduced voltage to a heater when you're running off the power line. You'd need to be able to dissipate lots of power, i.e. if your heater wants 20 volts, you'd have to drop 100 volts in your electronics.

Apart from the dubious question of playing with the voltage, what power-handling element would you be using that can control an a.c. source? And I have to wonder what the thermal time constant of your heater + heated object is. Surely it can't be less than a few cycles of the power line? If the thermal time constant is reasonably long, you can control the power with a solid-state relay on a cycle-by-cycle basis. I really would expect that to be workable (and pretty safe, if you can make the connections to the relay).
 

strantor

Joined Oct 3, 2010
6,798
The method of choice in industry is PID heater controllers. The eurotherm 3208 is a popular one. There's also some available from wattlow, and the cheaper stuff will probably be found from redlion. Like everything else, there are dubious chinese ripoffs available on ebay for dirt cheap which may or may not work properly.

As far as building one from scratch, I can't help you out. That's not something I would attempt. I can tell you that it would probably be more trouble & money than it's worth if you don't already know what you're getting into.

I'll tell you how it's done and maybe you can go from there. These heater controllers read the temperature from a thermocouple, which, even that is a more complex task than one might think. It needs to have simulated cold junction compensation programmed in for it to work. You could probably save time & effort by using an RTD instead. From there, the temperature is compared to a setpoint temperature and heat is applied via fuzzy logic rapidly switching on & off a Solid State Relay (SSR). When the temp is well below the setpoint, the relay will be fully on, and as the temperature rises toward the setpoint, the relay will begin to come on & off, sort of like a duty cycle. once at temperature, the relay will be off, and come on a little bit in intervals to maintain the temperature. The problem in DIY'ing this is that it's all dependent on PID, and the controller neads to be able to "learn" the heater it's controlling. All the name-brand heater controllers out there have a "learn" or "autotune" feature. A large heater has a large thermal mass, and takes longer to heat up, and opposite for a smaller heater.
Think of it like this: you are driving a vehicle & your task is to drive between 2 other vehicles, one in front and one in back - you need to maintain perfect spacing between your leader & follower, no matter how fast they go, if they accelerate or if they decelerate. So, let's say you're used to (programmed to) driving a porsche; light, nimble, quick but today the vehicle you've been assigned to drive is fully loaded mail van. You (because you're a dumb heater controller and not a human) are programmed to go light on the pedal, so the leader is taking off and leaving you behind & the follower is stuck behind you honking. So, I autotune you - which makes you go into a routine where you floor the gas and record how fast the van accelerates, and you slam on the brakes and record how long it takes to decelerate. Now you know how the van handles, and for the rest of the day you perform you task just like the good little computer that you are. The next day I put you back in the porsche but you're still programmed (tuned) for the mail van. Now you're flooring the accelerator and crashing into the leader, pushing him along and leaving the follower behind. So, I have to autotune you again. ok, so now you've heard my little speak on the how & why of autotune - I have to give this speech at least once a week to my operators.

It is well within the realm of possibility to program PID into a microcontroller, but it is not easy or simple. It is further complicated by how long some heaters take to heat up. I can tell you from experience that trying to tune a heater controller without autotune is absolutely maddening, if possible at all - and you'll never get it perfect.

bang-bang control as described before is an option, but rarely used, and only in scenarios where absolute setpoint maintaining is not necessary. It often results in gross overshoots, because of latent heat in the workpiece or die. The setpoint temperature is reached and the heater power is cut, but heat continues to rise, up, up, waaaay past where you would expect, and ruins your workpiece.

So far every bang-bang type controller & PID controller without autotune that I have encountered, I have replaced with Eurotherm 3208 controllers - they are the rolls royce of heater controllers & my company can afford them and it saves my sanity. You could certainly get away with something cheaper though.
 

t06afre

Joined May 11, 2009
5,934
A P regulator works in the way that. The more far you are from a set-point the more energy is applied to correct the error. Using the principal used in light dimmers. And perhaps also a micro-controller. You may be able to make something. Relatively easy I would think. That is a quite good approximation to a P controller. You will at least have something with much less Hysteresis than a on-off(bang-bang) controller. So I think your plan is doable
 

John P

Joined Oct 14, 2008
2,026
It's interesting that a traditional home thermostat includes an "anticipator". It's a small heating element that actually heats the thermostat itself when the furnace is operating, so it stays slightly warmer than ambient. The idea is that the when the thermostat decides that it's time to turn off the furnace, the radiators will be at their maximum temperature, and they'd be likely to overheat the house even after the heat was shut off. So the anticipator shuts the heat off a little early to compensate. As you'd expect, an anticipator has to be adjusted to suit the building and the heating system. It's not PID, but it has some of the same characteristics.
 

strantor

Joined Oct 3, 2010
6,798
I was thinking, if you don't need precise temperature control, and if your thermal load will remain constant (*) you could easily do power control. Using a microcontroller or even just a simple 555 circuit, you could generate a very low frequency (I'm thinking no more than 5Hz) PWM and signal and control the duty cycle. Just feed this PWM to a SSR. The reason I say very low duty cycle is to minimize switching.

(*) what I mean by thermal load being constant, is like a hot plate with a beaker of 5L of fluid. Let's say, by trial & error you find that to keep this water @ your desired temperature of 173 degrees, you need to set your PWM duty cycle to 36%. now while maintaining this temperature, you transfer 3L to somewhere else, now your temperature is going to increase because your thermal load decreased while your power remained the same.

If you do this simple power control scheme, it is going to take a lot of experimentation/ trial & error & operator involvement to make sure your power setting is appropriate for the desired heat range. You won't be able to "set it & forget it" - that's what PID is for, and we've already discussed that.
 

Thread Starter

Trenatos

Joined Mar 23, 2012
9
Thanks for all the replies, I really appreciate it.

The heating devices that will be used are heat cords and heat tape (flexwatt) which cool down within a few seconds, there is no residual heat buildup after you remove power to them.

From what I understand though, simply turning off and on the heatsource will make the temperature "jojo" rather than stay fairly even, which is why I'd prefer to be able to control the amount of juice they get. That way I can use a microcontroller to control the heat output depending on the current temperature and keep it fairly stable.

I'll be continually monitoring the temperature inside the bin of one of the animals, and adjust the heat output accordingly, the further off from the target temperature the higher the heat output.

I realize it's going to take trial and error to find a level at which it has just enough output to keep the current temperature without jojoing (If you turn the heat down too far, the temp will drop below target and it'll kick on again).

I'm new to controlling 120v things, so I'm just trying to relay what I know and what I think here, while reading up on all the posts you guys (and gals) made.
 
Last edited:

strantor

Joined Oct 3, 2010
6,798
Even if your flexwatt cools down within a couple of seconds, it still has thermal mass, which will serve to "average out" the on-time & the off-time. switching them on & off @ 5Hz will not give you a "jojo". If you are worried about it, you could always switch them a little faster. The thing is, when you control power in the way you want to, it's incredibly wasteful. Let's say you want to run the heaters @ 10% power - you need to burn (waste) the other 90% in some kind of radiator or resistor. With the switching on & off, you simply leave the heaters on for 10% of a second, and off for 90% of second - the observable effect is exactly the same, your heaters maintain a constant temp @ 10% power, but you save the other 90%.
 

Thread Starter

Trenatos

Joined Mar 23, 2012
9
Strantor, I think I'm going to owe you a beer.
I'm going to see about testing the quick switching rather than reducing power output.
 

ErnieM

Joined Apr 24, 2011
8,377
strantor gave a very good detailed description of a bang-bang system where the powered device (the heater) is either on or off.

I have to ask, how would it violate the TOS?
It would violate the TOS since to do it effiently (meaning you don't diddipate heat that's not going into the heater itself) would need some sort of semi conductor direct line voltage switch, such as a triac. If you delay the turn on of the triac each half cycle by some ammount you can get a continious, and if properly controlled, proportional control of the heater.

Just about any micro is capable of using a line voltage sensor to synch with the line zero crossing, and using a pre-calculated number wait a delay till firing the triac and thus cycle by cycle control the power. That's basically how a light dimmer works, and the concept is also good for a heater.

(A dimmer strictly uses analog methods to make that same delay.)

Such fine scale control is probably not necessary so you could turn the control on and off for several line voltage cycles and achieve the same overall result.

The big BUT here is that is a direct to AC line connection, and since we don't want the new people here killing themselves off in their learing process we don't discuss such circuits.

I've made such switches and it scared me plenty and I know what to look for, but even I can do dumb things at times. While I didn't make any nice smoke at least once I got a good shock from a part of the circuit I thought was disconnected.

Good luck with your project, and I hope your critters stay warm and safe.
 

Thread Starter

Trenatos

Joined Mar 23, 2012
9
Fine, beer all around ;)

I understand why you'd like to keep your newcomers alive, I'll keep it in mind, and I think I have plenty of information to go on to continue working on this idea and enough to keep researching.

Just one last question, any recommendations of say a forum or site that do allow that kind of discussion? I'm not trying to complain here, just that it's a natural step for me to keep expanding my knowledge and thus go into higher voltage stuff. Can't keep my training wheels on forever ;)

I'm impressed by this forum, and I'll be sticking around, this has been a very nice welcoming =)

--edit--
Yes, I meant "yoyo"
 

strantor

Joined Oct 3, 2010
6,798
Strantor, I think I'm going to owe you a beer.
I'm going to see about testing the quick switching rather than reducing power output.
Sounds good, I'm not picky. Just as long as it's cold.

Remember to use a SSR and not a regular electromechanical relay. The SSR is basically a beefy triac. The electromechanical relay will fail prematurely due to constant switching & arcing across the contacts.
 

t06afre

Joined May 11, 2009
5,934
How do you plan to cover the flexwatt heating elements. It is quite strict rules regarding this. If you are not approved to install such elements. And something goes wrong. Say like a fire. The consequences for you may be devastating
 

evilclem

Joined Dec 20, 2011
118
I would suggest a permanent thermal fuse in the system as well, never rely only on a thermostat or control system to prevent fire. A bi-metallic strip (thermal circuit breaker, resettable) can be used if your temperatures are not too high and it's position is not likely to trip it during normal operation. A bi-mettalic fuse does NOT replace a permanent thermal fuse.
 

Thread Starter

Trenatos

Joined Mar 23, 2012
9
The flexwatt simply slides into pre-made slots in the animal rack, under each bin.
What are the rules for installing these? I've never heard of any rules to be honest, and we use them for hundreds of animals.

The instructions that come with them tells you how to cut them to length and how to wire them up and set up with a thermostat.

The difference here is that I'll be making my own thermostat for fun and practice.

The plan is to be as safe as possible without going overboard.
 
Top