Relay amperage output control with PWM?

Hi,

Thank you in advance for your help. I am new to Arduino world so please forgive my ignorance.

I have a 5500W heater that sits on a 240VAC line with 30A breaker I control manually using Fotek SSR-40VA with potentiometer. I would like to automate this process and control the output of this SSR amperage using PWM. So in a nutshell I want to convert the variable dc control output from Arduino to variable resistance and map it to this particular relay.

Is it possible with this relay and Arduino Uno?

What would be the best approach?

Thank you!!

You can't use PWM with a SSR. It is either ON or OFF. There is no phase control. You would need a TRIAC phase controller with devices rated for the voltages and currents required.

So in a nutshell I want to convert the variable dc control output from Arduino to variable resistance and map it to this particular relay. Would MOSFET be a part of a circuit?

I presume this is your way of saying you want to build an AC phase controller.
http://playground.arduino.cc/Main/ACPhaseControl

https://www.google.com/search?q=220+Vac+40A+triac+phase+control&biw=1426&bih=951&tbm=isch&tbo=u&source=univ&sa=X&ei=fKoxVNH0HaXNiwL9goC4DQ&ved=0CD4QsAQ#facrc=&imgdii=&imgrc=YgRXY-CHVpeCdM%253A%3BUziX0l_2eAbiGM%3Bhttp%253A%252F%252Fi.stack.imgur.com%252FHfZaM.png%3Bhttp%253A%252F%252Felectronics.stackexchange.com%252Fquestions%252F45035%252Ftriac-dimmer-circuit-design-help-resistive-load%3B1038%3B300

http://www.nuwaveproducts.com/ssrman-1p.htm?gclid=CjwKEAjw2MOhBRCq-Nr87_j-lDASJAAl4FNhARBIO6Qfr1Vr43OO3rsY8RhHil90cxDAweDU6qqJhxoCwi7w_wcB

http://www.thefind.com/appliances/info-triac-phase-control

http://ccipower.com/products/index.php?gclid=CjwKEAjw2MOhBRCq-Nr87_j-lDASJAAl4FNhNJ_7UxtpVXStc9aJf6N7tcJ-_Ya3hPLKz0eRZq-YtxoCpDLw_wcB

http://www.nxp.com/documents/application_note/APPCHP6.pdf

HI, you can use that SSR, but not with PWM as said, however if you look up PID control I think that will have what you need.

Use the "Search the Arduino Forum" box in the top right hand of this screen and search for heater control and PID.

PID does not use PWM but a much slower ON and OFF to control your heater, you will need to measure the temperature of your heater tank so that the controller can work out what to do.

Tom...... :slight_smile:

I have a 5000W heater that sits on a 240V line with 30A breaker I control manually using Fotek SSR-40VA with potentiometer. I would like to automate this process and control the output of this SSR amperage using PWM. So in a nutshell I want to convert the variable dc control output from Arduino to variable resistance and map it to this particular relay. Would MOSFET be a part of a circuit?

It is possible to do this as you have the correct type of relay where the control method is phase control (via a variable resistance).

I won't give a circuit, but you could research how VACTROLS work. Here is the datasheet for the VTL5C9 which has max 100V cell voltage, so you would have to ensure this voltage is not exceeded. Both current limiting and voltage protection will have to be considered for the vactrol. This could replace the 500K pot.

With this, you could use PWM for the vactrol just as you would use PWM to drive an LED. The vactrol's response will inherently filter the vactrol's output resistance. Now, varying the PWM duty cycle of the Arduino will vary the phase control resistance which will vary the relay's output duty cycle and load power.

Of course proper knowledge and qualifications to work on the 220VAC circuit would be required.

PWM of a HEATER is about as useful as mammary glands on a boar hog!

There is absolutely no compelling reason to PWM a heating element because it will never respond to the PWM frequency. Just turn it "full on" when the temperature falls below the set point but leave it on ONLY long enough to raise the temperature. As the previous poster reported, you will want the Arduino to control it with a PID loop, and there are many examples of how to do that. Let me say it another way: You can probably turn on/off that SSR at least 10 times per second. How long you leave it "on" is just like your PWM high pulse, and how long you leave it "off" is your PWM low. Most heaters have such a long thermal time constant and controlling with PWM is a waste.

There is absolutely no compelling reason to PWM a heating element because it will never respond to the PWM frequency. Just turn it "full on" when the temperature falls below the set point but leave it on ONLY long enough to raise the temperature. As the previous poster reported, you will want the Arduino to control it with a PID loop, and there are many examples of how to do that. Let me say it another way: You can probably turn on/off that SSR at least 10 times per second. How long you leave it "on" is just like your PWM high pulse, and how long you leave it "off" is your PWM low. Most heaters have such a long thermal time constant and controlling with PWM is a waste.

I disagree.

Compelling reason #1:
There's no change to how its working now. This relay is really just a phase controlled TRIAC with the control electronics built in except for the pot. The pot is manually adjusted to control the power. The way in which the power is controlled is by, in essence, setting the duty cycle of the AC waveform. Just like PWM.

Compelling reason #2:
Swaping out the pot for another pot (VACTROL) that's under automated control changes nothing in the relay load circuit.

Compelling reason #3:
Phase control offers fast and smooth control and loading characteristics on the system (it doesn't cycle ON/OFF over long periods).

Compelling reason #4:
Can smoothly control brightness of incandescent lighting, fans and heaters

Compelling reason #5:
Changing from the TRIAC phase control method to PID type may involve additional expenses like replacing the circuit protection breakers and/or supply transformers to a more suitable type.

Compelling reason #6:
The Fotek SSR-40VA relay isn't the desireable type for straight ON/OFF control, the zero cross switching type is more suitable.

You can probably turn on/off that SSR at least 10 times per second

With 50Hz AC, its turning ON/OFF the load 100 times per second. No Arduino required, just 1 resistor (pot).

Thank you guys for your great help

@raschemmel - thanks for the links - I will definitely read up on AC Phase Control

@TomGeorge - Thank you Tom. I will read about the PID control

@dlloyd - thank you! That's brilliant. I was hoping for a straight exchange of the pot to a pot.

I have bunch of questions related to this topic:

I have found this digital pot Digital Potentiometer - 10K - COM-10613 - SparkFun Electronics Would something like this be suitable for the job?

I also have found those http://ca.mouser.com/Optoelectronics/Optocouplers-Photocouplers/Solid-State-Relays/Solid-State-Relays-Industrial-Mount/_/N-b6nf9?P=1z0x15xZ1z0x37s - could that be a proper direction if I did not already have the SSR I do?

Now, the major question for me as a complete newb is - how do I find a proper component rated for the job. Say I want to go with VACTROL and I am dealing with 5V control signal coming of off my board and 500kohm variable resistance range on my SSR. What is the most efficient way to find a perfect VACTROL. Or digital pot?? Are there any electronic components suppliers you recommend? I went to Amazon and eBay looking for a perfect match but could not find any.

What if the control voltage of a component is not in my board's range? How can I match the range of the component? Could you point me at a good resource here?

What if the resistance is different? is there any way to map it to the required 500kohm? Could you point me at a good resource here?

Thank you all very much for your help!

@dlloyd - thank you! That’s brilliant. I was hoping for a straight exchange of the pot to a pot.

Unfortunately, there isn’t a straight exchange … close, but some some circuit design /development is required (see below).

I have found this digital pot Digital Potentiometer - 10K - COM-10613 - SparkFun Electronics Would something like this be suitable for the job?

No, see below

I also have found those http://ca.mouser.com/Optoelectronics/Optocouplers-Photocouplers/Solid-State-Relays/Solid-State-Relays-Industrial-Mount/_/N-b6nf9?P=1z0x15xZ1z0x37s - could that be a proper direction if I did not already have the SSR I do?

There are 2 types:

  1. Zero-crossing (resistive loads) type would work OK with your heater. They’re controlled in ways as mentioned by TomGeorge and raschemmel.
  2. Random-fire (inductive loads) type is basically a triac (2-SCRs). With this type, there’s various methods of control - your existing relay uses a 500K pot (AC control). More common are the DC control type which are not compatible with PWM, but would also work with methods mentioned by TomGeorge and raschemmel.

Now, the major question for me as a complete newb is - how do I find a proper component rated for the job. Say I want to go with VACTROL and I am dealing with 5V control signal coming of off my board and 500kohm variable resistance range on my SSR. What is the most efficient way to find a perfect VACTROL. Or digital pot?? Are there any electronic components suppliers you recommend? I went to Amazon and eBay looking for a perfect match but could not find any.

Here is where some circuit development would be required - there’s safety concerns because the control circuit is high voltage AC. Note that 240 VAC has 339V peak! Therefore, I would leave any circuit design work here to qualified engineers, however it doesn’t hurt to investigate and research.
Note: The Vactrol I previously linked to can only withstand 100V max. These devices are really just a cds photosensor and IRLED in a module. Since these photosensors are available with max voltage of 500V, its possible to build a custom “Vactrol” but this brings us back to what I said in the previous paragraph. Unfortunately I know of no direct replacement for the pot control at this time.

What if the control voltage of a component is not in my board’s range? How can I match the range of the component? Could you point me at a good resource here?

The 3-32VDC controlled SSRs should work fine with 5V Arduino boards … I’m sure there are many examples to be found.

What if the resistance is different? is there any way to map it to the required 500kohm? Could you point me at a good resource here?

There’s no way to map resistance.

Hi, Xplorex can you post a picture or a diagram of you original setup with the SSR.

Changing from the TRIAC phase control method to PID type may involve additional expenses like replacing the circuit protection breakers and/or supply transformers to a more suitable type.

Sorry, please explain......

I'm seeing everybody trying to do phase control, the SSR that Xplorex has will not do that, but it will do PID where you are not looking at phase control.

If you don't need precise heat control you could probably get away with a bang-bang type control instead of PID.

  • if temp is lower than setpoint turn element ON
  • if temp is equal or higher than setpoint then turn element OFF.
    No phase control, just ON or OFF.
    This would depend on the volume of water being heated and how constant you want the temperature.

You need temperature sensor, arduino, output transisitor, power supply for arduino and opto side of SSR and a pot to input the required setpoint. QED.

Then program bang-bang method, if it doesn't work to requirements then program PID.

So to change methods of control you program.

Tom....... :slight_smile:

Hi, I have attached a simple circuit that should do the job, if you calibrate the setpot with a circular scale, this way you don’t need a display.

Although a display can be added, either 7seg or LCD, and a button to select if you need to display setpoint or actual temperature.

Tom… :slight_smile:

I'm seeing everybody trying to do phase control, the SSR that Xplorex has will not do that, but it will do PID where you are not looking at phase control.

Finally, Ive found a document that details the part numbering scheme, specifications, connection diagram and operational details of Xplorex's existing Fotek SSR-40VA relay (it really should be called a TRIAC or AC Dimmer).

Its important to note that from the connection diagram (page 9 and shown here), there is no isolation to terminals 3 and 4 (trimmer control) so peak voltages of 339VAC will exist here when the load is connected to 240VAC.

Note that the trimmers used are fairly large and rated for 2W, not the type you would see on a PCB.

The most important part is the control method with regards to safety and its operation.

Here, the "V" in the SSR-40VA is for Variable Resistance Control Method (trimmer-phase control) shown on page 11.

I would recommend replacing this relay for a more suitable type with optically isolated DC control.

Hi, okay fine, they call it an SSR, but its really a phase controller version of a SSR.

Noted that its not isolated input too.

Tom..... :slight_smile:

TomGeorge, dlloyd - thank you again gentlemen.

From what I understand it would be a really good idea to optically isolate the DC circuit. Based on the document dlloyd has kindly linked I would need something like this:

Is this correct?

.. or even better, could I use PWM to alter the average voltage going to the LED instead of resistance to control the LED and drive the TRIAC on the side of AC?

Am I on the right track here?

Thank you in advance for pointing me towards a proper solution

A compatible replacement to your existing relay is the SSR-40DA as shown on page 2. This relay is optically isolated and can be directly connected to a 5V Arduino board. It cannot work with PWM, but it can be turned ON and OFF at a relatively quick rate (up to about 10Hz) directly by an Arduino output (no resistor required).

The reason it can't work with PWM is that the PWM frequency is much higher than the AC frequency and there isn't enough zero-crossings for it to respond correctly, so its output would be completely random.

Direct ON/OFF control of your heater won't be a problem because it has a slow thermal response.

EDIT: See reply#8 by TomGeorge for some ideas on controlling this type of relay.

Direct ON/OFF control of your heater won't be a problem because it has a slow thermal response.

Exactly the point I made in my previous post. The OP said he was controlling a HEATER, not a LIGHT BULB, which is why I suggested phase control in this instance is overkill.

Of course it's not unusual on this forum for the OP to ask for the time of day, and you tell him how to build a watch. Not that he can ever get said watch working, but it impresses.

Exactly the point I made in my previous post. The OP said he was controlling a HEATER, not a LIGHT BULB, which is why I suggested phase control in this instance is overkill.

Of course it's not unusual on this forum for the OP to ask for the time of day, and you tell him how to build a watch. Not that he can ever get said watch working, but it impresses.

You completely misunderstood the type of relay that the OP has.

Thank you very much again, gentlemen!

Now, how would it work in my particular application. Up until this point I have manually controlled the current with the pot. I basically had two positions - full power with circuit completely open when I drew about 23 amps (the maximum I could @ 5500W and 240VAC) and then I would step it down to about 13 amps. With the on/off switching the current is sort of modulated. When it is on it is 23 amps when it is off it is zero amps.

Is there a mathematical way to match the effect of 13 amps (or any other) output with on/off switching? Or is it strictly based on empirical experiences with just longer off to on ratio?

Thank you kindly!

Is there a mathematical way to match the effect of 13 amps (or any other) output with on/off switching? Or is it strictly based on empirical experiences with just longer off to on ratio?

Manual control could easily be implemented by setting the on/off ratio over a repetitive time interval. So in essence, this is PWM but at a much lower frequency that's compatible with the SSR-40DA (or equivalent) relay.

Examples:

Emulated ± 1 amp control ( 0 amp to 23 amp maximum), 24 steps.
Use 0 to 23 second ON time range and 23 second interval, where:

AMPS ON(sec) OFF(sec)
0    0       23
1    1       22
2    2       21
etc, up to
23   23      0

Emulated ±1% control ( 0 amp minimum to 23 amp maximum), 101 steps.
Use 0 to 100 second ON time range and 100 second interval, where:

%    ON(sec) OFF(sec)
0    0       100
1    1       99
2    2       98
etc, up to
100  100     0

If the 100 second interval is too long, then you could still get ±1% control with 20 second interval, where:

%    ON(sec) OFF(sec)
0    0.0     20.0
1    0.2     19.8
2    0.4     19.6
etc, up to
100  20.0    0.0

For control, the existing pot could be re-used and connected to an analog input.

For automatic control you'll need a temperature probe and that can be monitored at another analog input. The existing pot could then be used to set the required temperature.

If higher resolution is required, there could be more adjustment (timing) steps added.
If better performance (temperature regulation, etc) is required, PID mathematics could be used.

Thank you very much dlloyd!