Control 120 Vac 1200W heater with a 5v PWM signal

Thread Starter

PickyBiker

Joined Aug 18, 2015
88
I need to control a 120vac 1200w heater using the PWM signal from an Aduino over the full range of 0% to 100% PWM. I suspect this means a heavy duty triac but I'm not sure what the interface between the PWM signal and the triac should look like.
Has anyone done this?
 

Dodgydave

Joined Jun 22, 2012
8,586
You need a Zero crossing detector to trigger the triac at the correct time, feed the pulses into your micro for syncronising.


zcd1.PNG
 

Reloadron

Joined Jan 15, 2015
4,711
In the past I have just used a SSR. If you use a SSR just keep in mind you have a 120 Volt 1200 Watt heating element so 1200 / 120 = 10 Amps and you want a heatsink along with at least a 20 Amp rated SSR. There are plenty of 25 Amp flavors available out there with 3 to 30 VDC control voltage. You can also buy a zero crossing SSR so it's all in one nice package. This is a good read on selecting a SSR.

Ron
 

Thread Starter

PickyBiker

Joined Aug 18, 2015
88
You need a Zero crossing detector to trigger the triac at the correct time, feed the pulses into your micro for syncronising.


View attachment 155684
Okay, I'm not sure I understand this one. I'm guessing this circuit has a 5v pulse at OUT when the ac crosses zero in either direction? If so, how long a pulse is it?

Secondly, Would I use this to signal the start of the PWM pulse? So that it always starts at a zero crossing?
 

Reloadron

Joined Jan 15, 2015
4,711
The link This is a good read on selecting a SSR. I posted in post #6 explains zero crossing with a few illustrations. The idea is switch the SSR on and off as the power (AC Voltage) is crossing a zero point. Typical mains power in the US is 60 Hz (16.6 mSEC) and Europe is 50 Hz (20 mSEC) so the sine crosses zero every 8.3 or 10 mSEC respectively. Figure 1 in the link illustrates this.

Your PWM pulses are coming from your Arduino.

Ron
 

ebeowulf17

Joined Aug 12, 2014
2,961
I need to control a 120vac 1200w heater using the PWM signal from an Aduino over the full range of 0% to 100% PWM. I suspect this means a heavy duty triac but I'm not sure what the interface between the PWM signal and the triac should look like.
Has anyone done this?
The potential issue here is that PWM control from an Arduino is typically referring to something line 490Hz or higher for the switching frequency. This is incompatible with the nature of TRIACs (and TRIACs are usually the best way to switch mains voltage AC with any significant load.)

The reason l say they're incompatible is that TRIACs continue conducting, even when you remove the gate signal, until load current through them drops to essentially zero. Since these zero crossings happen 120 times per second (60Hz mains x2 crossings per cycle,) you can't just turn off the TRIAC whenever you want, hundreds of times per second. Any time you turn it on, it's on until the next zero crossing. So if you want to send signals turning it on and off to provide proportional heat control, you must take into account when the zero crossings happen (google dimmer, TRIAC, or SCR with the phrase "phase angle" and you should find better explanations than I can provide.)

Another approach is referred to as burst fire. Basically, you could think of it as super slow PWM, sort of. You apply power for complete cycles (one zero crossing to the next) and you vary the total average power by changing the number of on cycles and off cycles. I'm bad with words. Check out the linked pdf from Crydom. They explain it quite well:
http://www.crydom.com/en/tech/newsletters/solid statements - ssrs switching types.pdf
 

Thread Starter

PickyBiker

Joined Aug 18, 2015
88
Also, there was a similar discussion recently here which covered much of the same ground. @MaxHeadRoom shared a good burst firing control circuit there, and l also did some number crunching and circuit simulation that might be relevant. Lots of other good discussion too.

https://forum.allaboutcircuits.com/threads/controlling-2-6k-heating-elements-using-ssr-heat-sink-s-potentiometer.146071/page-2
Ebeowulf17, I disagree with you about being bad with words because I understood all of this. Between your response and the others, I feel like I am getting a mini course in triacs, zero crossings and phase control for AC circuits.

Thank you all.
 

ebeowulf17

Joined Aug 12, 2014
2,961
Ebeowulf17, I disagree with you about being bad with words because I understood all of this. Between your response and the others, I feel like I am getting a mini course in triacs, zero crossings and phase control for AC circuits.

Thank you all.
Glad to help. What level of precision do you need? 0-100% in 10% increments, 5% increments, 1% increments? As you can imagine, smaller increments equals more difficulty.

Also, what will be determining output value? Is it part of a closed loop system with a temperature sensor? If so, just how stable do you need to keep the temperature you're driving. I ask these questions because it may mean you need less precision in your heater output than you'd otherwise think. If the heater duty cycle overshoots and under shoots, but you've got a good feedback loop, you might still be able to get reasonably stable with a simpler setup.

Just brainstorming here.
 

BobTPH

Joined Jun 5, 2013
2,114
If the PWM frequency is low, say less 1 Hz or less, you don't need to worry about zero crossing. For a heater, that slow should be OK.

Bob
 

ebeowulf17

Joined Aug 12, 2014
2,961
If the PWM frequency is low, say less 1 Hz or less, you don't need to worry about zero crossing. For a heater, that slow should be OK.

Bob
That's similar to where I was heading. Personally l prefer to stick with a zero crossing SSR for resistive loads, just to reduce EMI/RFI.

But, like you said, if the PWM frequency is low enough, the slight discrepancies between PWM duty cycle and resulting heater duty cycle are small enough for most applications (or at least most that I'm familiar with!)

To be clear, I'm not talking about the Arduino detecting zero crossing and synchronizing the PWM transitions, I'm just talking about running low frequency PWM out of the Arduino into a generic zero-crossing SSR. It's not perfect, but it's good enough for many/most situations.
 

Thread Starter

PickyBiker

Joined Aug 18, 2015
88
That's similar to where I was heading. Personally l prefer to stick with a zero crossing SSR for resistive loads, just to reduce EMI/RFI.

But, like you said, if the PWM frequency is low enough, the slight discrepancies between PWM duty cycle and resulting heater duty cycle are small enough for most applications (or at least most that I'm familiar with!)

To be clear, I'm not talking about the Arduino detecting zero crossing and synchronizing the PWM transitions, I'm just talking about running low frequency PWM out of the Arduino into a generic zero-crossing SSR. It's not perfect, but it's good enough for many/most situations.
 

Thread Starter

PickyBiker

Joined Aug 18, 2015
88
Okay, here is where I am:
Got the parts on order for a 25A SSR, Input dc 3-32v, output AC 24-380v. https://www.ebay.com/itm/162856886716 and another set of parts for the TRIAC, with and without Zero Crossing.

I just finished the arduino code for the PWM. It is a software PWM with a cycle time of 5 seconds. Any percent duration from 0 to 100 can be used with 1 percent resolution. So at 60Hz if 1% is selected the heater will get 29 or 30 cycles every 5 seconds (depending on where it got turned on in the cycle). If Zero Crossing is used, it should get 30 cycles every 5 seconds.

It is a closed loop system with a high temp sensor in a Black and Decker toaster oven for mounting SMD parts. The heater's response time will be on the order of several seconds so the 5-second time cycle should work just fine. The system will have a display, a rotary encoder with a push button switch that will allow me to set the time and temperature configurations.

I intend to try the SSR first and the one I ordered has built-in zero crossing logic.
 

ebeowulf17

Joined Aug 12, 2014
2,961
Okay, here is where I am:
Got the parts on order for a 25A SSR, Input dc 3-32v, output AC 24-380v. https://www.ebay.com/itm/162856886716 and another set of parts for the TRIAC, with and without Zero Crossing.

I just finished the arduino code for the PWM. It is a software PWM with a cycle time of 5 seconds. Any percent duration from 0 to 100 can be used with 1 percent resolution. So at 60Hz if 1% is selected the heater will get 29 or 30 cycles every 5 seconds (depending on where it got turned on in the cycle). If Zero Crossing is used, it should get 30 cycles every 5 seconds.

It is a closed loop system with a high temp sensor in a Black and Decker toaster oven for mounting SMD parts. The heater's response time will be on the order of several seconds so the 5-second time cycle should work just fine. The system will have a display, a rotary encoder with a push button switch that will allow me to set the time and temperature configurations.

I intend to try the SSR first and the one I ordered has built-in zero crossing logic.
Sounds like you're on the right track!

My gut feeling, and it's only a gut feeling, is that you'll have an easier time tuning the system response with a slightly shorter cycle time, maybe one or two seconds, and that any lack of intrinsic resolution with shorter cycles will be adjusted for by the closed loop. That's just a hunch though, and not meant to discourage you from your current plan - more like one possible alternative you can try if the first attempts don't go well.

Regardless, I'm sure you'll be able to make this system work for your needs. Systems like this are always a balancing act, with compromises to make between response time, oscillation, etc. There's never just one "right" answer.
 

BobTPH

Joined Jun 5, 2013
2,114
Okay, here is where I am:
Got the parts on order for a 25A SSR, Input dc 3-32v, output AC 24-380v. https://www.ebay.com/itm/162856886716 and another set of parts for the TRIAC, with and without Zero Crossing.

I just finished the arduino code for the PWM. It is a software PWM with a cycle time of 5 seconds. Any percent duration from 0 to 100 can be used with 1 percent resolution. So at 60Hz if 1% is selected the heater will get 29 or 30 cycles every 5 seconds (depending on where it got turned on in the cycle). If Zero Crossing is used, it should get 30 cycles every 5 seconds.

It is a closed loop system with a high temp sensor in a Black and Decker toaster oven for mounting SMD parts. The heater's response time will be on the order of several seconds so the 5-second time cycle should work just fine. The system will have a display, a rotary encoder with a push button switch that will allow me to set the time and temperature configurations.

I intend to try the SSR first and the one I ordered has built-in zero crossing logic.
Perfect.

Bob
 

Thread Starter

PickyBiker

Joined Aug 18, 2015
88
Just thought I would update this post. I used the SSR and set the PWM to 1 second instead of the 5 seconds. I also added a ramp-down for the PWM on cycle at it nears the target temperature. The duty cycle is limited to 40% where it will hold the current temperature.

The result is excellent. The system ramps up to 150C in 100 seconds, then ramps to 185C in 180 seconds and then it peaks at 215C at 240 seconds and begins to come down at 270 seconds.

It works very well and is quite accurate after tweaking the ramps and times.

There is no need to build the other circuits that were discussed.
BTW all 4 time steps and temp targets are adjustable via a rotary encoder and switch to account for various solder types.

Thank you all for the help!
 
Top