Maker Pro
Maker Pro

Controlling the voltage into heating element

jmajor817

Apr 6, 2013
6
Joined
Apr 6, 2013
Messages
6
Hello I am currently working on a project using an Arduino Uno, RTD temperature sensor, relay, and 1500W heating element. The basics of it is the Arduino will read in a temperature from the RTD, and based on that reading will or will not send out 5V to the relay which will allow the heating element to start up. The heating element will be powered by a 120V GFCI outlet. This is all working just fine, however I am trying to hold the temperature for a long period of time with +- .5 degree F and I don't think simply turning the heating element on/off will be able to give me that precision. What would be the best way to control the power to the heating element based on the temperature read of the RTD. What sort of electronics are out there that can vary the input into the heating element based on an output from the Arduino. Any point in the right direction would be greatly appreciated. Thanks.
 

Laplace

Apr 4, 2010
1,252
Joined
Apr 4, 2010
Messages
1,252
One solution is to use a TRIAC with the micro-controller in the trigger circuit. Think of a lamp dimmer with a 1500 watt bulb. Of course, that will put a lot of noise on the AC power line.
 

jmajor817

Apr 6, 2013
6
Joined
Apr 6, 2013
Messages
6
Perfect. Felt like that was on the tip of my tongue but just couldn't find what I was looking for. Thanks.
 

Electrobrains

Jan 2, 2012
259
Joined
Jan 2, 2012
Messages
259
Laplace's answer (Triac) would be the way to control smoothly with high accuracy.
But as he points out it has a disadvantage of causing noise and deformation of the sine power.
It would also have the disadvantage of great power loss for your high power load (although that may just contribute to the heating element's task, if placed in the same room)

With Triac or Relay, you could probably still control the temperature with good accuracy with an ON-OFF method.
Using a relay would be more efficient, but a (zero-crossing) Triac would give longer life and no clicking relay sound.

You would need to use a more intelligent technology than just switching on and off at some set limits. Control Theory is a vast high tech field, that is used everywhere in process controlling up to landing on Mars.

For your "heating process", you could for instance do it this way:
You give an on/off PWM (Pulse Width Modulated) signal to the relay or the triac. The Period of the PWM signal would be long (eg. 1Min.).
Then you add "feedback" (like with an Op-Amp). The measured temperature is subtracted from the set temperature. If the difference is big you output a high DC (Duty Cycle). If the difference is small (or negative), you output a low DC (or zero).
The mathematical fixation between the Difference and your output DC will set the "P-factor" of your Software Controller.

More advanced routines could be added but you hardly would need that.
Unless you are inventing a hatching apparatus, are you?

p.s. Of course the above described control theory can also be applied to the fast, "normal" Phase Angle Regulator with a non-zero-crossing-TRIAC.
 

jmajor817

Apr 6, 2013
6
Joined
Apr 6, 2013
Messages
6
First off let me tell you a little more info. Not a hatching process. The heating process is being used to heat around 3 gal of water to anywhere from 130 F to boiling. Also hold at that temperature for around an hour.

This being said, with using a mechanical relay, switching on/off that many times per use may not be a good idea. But, say I do use that. I don't understand the "feedback" using an op-amp.

Its my understanding that the TRIAC will allow anywhere from 0-100% of the main based on an input, or PWM, from the micro controller. Using this, I was thinking I could derive an equation to program into my micro controller that varies with the closeness to the desired temperature; kind of like you were saying. For example, if the temp if anywhere over 10 F from the desired, then the PWM given off by the controller will trigger the TRIAC to allow all of the load to flow. And then vary allowing a smaller amount of power as it gets closer and stays around the desired temp. Basically like how a light dimmer would work.

I have found a few examples of this type of circuit online but any additional info you could provide on how the zero crossing detection works and anything at all that you know would be nice (I have never used this).

Thanks in advance for any replies.
 

Electrobrains

Jan 2, 2012
259
Joined
Jan 2, 2012
Messages
259
My thought was that a normal Phase Angle Regulator (light dimmer) would not be needed. With your heavy load, it gives you "a lot of noise on the AC power line" as Laplace writes.

The heating process is very slow and doesn't need every half sine wave to be regulated (in contrast to light dimming, that would flicker if not continually regulated).

With the zero-crossing triac driver, the disturbing noise would almost be eliminated and the power loss in the switched on/off flanks would also be much reduced, saving energy.
Of course you could still get a bit flickering light if you wire up a lamp on the same cable as your heavy load, that is switched on and off all the time.

The shortest time that you can switch with a zero-crossing triac, would be a half period of the sine wave (50 or 60Hz).
To get some resolution and dynamics in a zero-crossing triac control system, you would then need a PWM period of many sine cycles.
For instance to be able to regulate in 1% steps, you would need the minimum PWM period to be 50 full sine cycles (50Hz:1sec, 60Hz:833ms).
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
While keeping the water temp within +- 0.5° would be demanding for a common thermostat, with its inherent hysteresis, this shouldn't be an insurmountable task for a uC. Whether you control the heater current with a Relay, Triac or SSR I see no need for phase slicing or PWM of the mains. Creative coding is going to be the bottom line here. You may need more than one temp sensor to do this because the temp at the top of the tank will be higher than the bottom.

Chris
 

jmajor817

Apr 6, 2013
6
Joined
Apr 6, 2013
Messages
6
The only reason I was thinking of not using my mechanical relay is the amount of switches in each use is going to be great. I am concerned about how long this part will last. The reason I didn't just go with an SSR to begin with is cost issues. This is why I was searching for a suggestion like a TRIAC. Do you really think the relay would work, if it can handle the switches, then I think youre right and I could code it to work. If not I think I will work on the zero crossing triac.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
I agree with Electrobrains's comments, apart from his suggestion that the PWM cycle time would be one minute; I think it would need to be a lot shorter.

Phase angle control is a Bad Idea for a 1500 watt load. I would use a triac or similar non-mechanical switch, switching on zero-crossings only, and then probably only on zero-crossings in one particular direction, so the number of negative and positive half-cycles that it's ON or OFF for will always be equal.

Within that constraint, you would use slow PWM control. You might also want to talk to a technical person at your power company to see whether that type of control would cause any issues for them.

I can't help with the control philosophy though. I would imagine you'd need a microcontroller with at least two temperatue sensors to get stable operation. If water can move through the heating vessel, the microcontroller should be informed about that as well, as it would be important to the control philosophy.

Re Electrobrains's comments about resolution and the number of cycles required, that's only true for a very simple-minded PWM approach, where you always have a fixed number of decision points in a PWM cycle. Distributed PWM is gives a much smoother result and the heat output stabilises more quickly, especially when the duty cycle is not extremely low or high. If you'd like me to describe distributed PWM, let me know, or you can try googling it.
 
Top