I am trying to generate a PWM signal and I came across that Arduino provides PWM output at 3.3 V and 5 V. This is in the range of the SSR (3-32 V) that I am using.

My question is if Arduino is capable to control a 3-phase SSR without any problem? I find a lot of tutorials for controlling single-phase SSRs but I did not find any 3-phase SSR application for Arduino.


I have added the link to SSR that I want to buy. The only related parameter I found is its voltage range and maximum current capacity, which is 3-32 Volt and 40A respectively. My application is a 3 phase heating element which is 3 phase, 16A.

I have a separate solar generation and energy management system. The energy manager provides how much energy I am feeding to grid. I want to utilize only this energy for heating element. So I want to control the output power of heating element from 0 to 9kW. I established RS485 communication between energy manager and arduino, but I need the power control of the heater.


From the answers, I get that the solution of SSR with Arduino has 2 major problems

  1. The SSR needs to be synchronized. I wanted to know what is the compatible solution for making a zero-crossing detector that will trigger Arduino to control its SSR.

  2. Failure of the control circuit or Failure of SSR. I will buy a standard SSR once the prototype functions correctly but in case of a situation where my Arduino sets the SSR high all the time. How can I avoid the over heating issue?

I tend to buy a very simple Heating element of 9kW without a temperature regulator. I am intending to implement my own temperature control from Arduino

  • 1
    \$\begingroup\$ Possibly, but without a part number, it's a bit hard to say. 'Safe' isn't constant from application to application. Explain more about yours, and what you consider safe. \$\endgroup\$
    – LordTeddy
    Commented Apr 27, 2023 at 10:00
  • \$\begingroup\$ I have added the details in my question \$\endgroup\$
    – Smrtngy
    Commented Apr 27, 2023 at 10:39
  • 1
    \$\begingroup\$ Why do you think you need PWM (which usually involves high-speed switching). Are you aware that, once-triggered, the SSR will remain on until the next zero-cross? I've written a little about them here: lednique.com/opto-isolators-2/opto-triacs-zero-cross-work \$\endgroup\$
    – Transistor
    Commented Apr 28, 2023 at 7:48
  • 1
    \$\begingroup\$ @Smrtngy The 50Hz signal generated by the Arduino would drift relative to the mains, causing inaccurate and wildly varying duty cycles. 10Hz is about the practical limit, meaning that you get about 10% steps (100 half-cycles per second). Beyond that, you really need to start looking at phase angle control. Three phase just makes that more complicated. \$\endgroup\$ Commented Apr 28, 2023 at 9:48
  • 1
    \$\begingroup\$ There are some fancy proportional input SSRs that run on 0-5V or 0-10V, but they're kinda pricy, and you'd need one per phase: res.cloudinary.com/fastron-electronics/image/upload/v1533362665/… \$\endgroup\$ Commented Apr 28, 2023 at 9:57

3 Answers 3


An Arduino can safely operate the linked solid state relay, though you will probably want to use a transistor between the Arduino and the SSR to provide the needed current. The datasheet for the TSR-40DA-H gives an example. The SSR you've chosen switches all three phases at once from a single input - there's no problem with the Arduino controlling all three phases.

The heating element you linked to has a temperature control. If all you want to do is to control the temperature, then all you have to do is turn the heating element on and let its built-in temperature control do its job.

If you want to regulate the power, then you will need to set the temperature control on the heater to a maximum temperature so that it will be on all the time when it has power.

The SSR you chose can only switch off when the AC voltage crosses zero volts. You would have to synchronize your PWM with the AC sine wave to do much good. As noted in the comments, without synchronization your PWM will switch on at random times during the cycle then switch off at the next zero crossing. The consumed power will not be regulated at all - it will wander up and down.

Heating elements don't heat up all that fast. You'd normally turn the heating elements on or off for several seconds at a time rather than switching the full 9000 watts dozens or hundreds of times per second. It would still be sort of PWM, but with on and off times of seconds rather than milliseconds.

The standard Arduino PWM would be too fast - it isn't readily changed to something slow enough.

The Arduino TimerOne library allows PWM with a time period of up to a bit over 8 seconds. That would allow you to use a hardware timer to control the PWM output - that's more reliable than using sleep loops to time things. Set the period to the TimerOne maximum, then set the PWM proportion and let the hardware provide the pulses. With a very slow PWM, you don't have to worry about synchronization since the pulses will always be longer than a single AC half cycle.

Electrically, the Arduino can safely do the job. The real question is whether or not it will continuously do the job without fail. If the Arduino hangs, then the PWM could be stuck at full on or at full off.

If the system hangs at full off, no problem. You are "losing" out on some energy you might have used to make hot water.

If the system hangs at full on, you had better have some kind of back up system to make sure that the hot water heater doesn't overheat and turn into a steam-bomb.

  • The heating element you chose has a temperature regulator - make sure to set it a safe limit for your water tank.
  • Make sure your water tank has a functional over-pressure release valve so that if it does overheat it will vent the steam instead of building up pressure.

Solid state relays can fail, also. From what I've read, they often fail so that they are on - that will put full power to your heating element. The same caution applies here as to the Arduino - your tank must have a pressure release valve to prevent explosions.

A final point about the SSR: The ones you get on eBay may be fakes or factory rejects. The quality is a crapshoot. You'd be safer buying one from a regular dealer rather than eBay or Alibaba or whatever. It costs a few bucks more when you buy it, but it's a good investment when failure can destroy your home.

  • \$\begingroup\$ Agreed. If OP has a contingency for the heater getting stuck on, it should be fine. \$\endgroup\$
    – Drew
    Commented Apr 28, 2023 at 15:42

Industrial temperature control using heaters the size of yours will usually have a reaction time measured in seconds or minutes. For that reason the temperature controller will usually do time-based proportional control.

Typically the controller will reset a timer every few seconds and the SSR switch on full power for a fraction of that time. E.g., if the controller calculates an output of 70% and we're running a 5 s cycle then the SSR will switch on for 3.5 s and off for 1.5 s.

You will want a zero-cross, three-phase SSR. This will switch on all three phases close to simultaneously. (Each will have to wait for the next zero-cross on its phase.) This will keep the demand balanced on all three phases and that's generally a good thing.

Regarding the Arduino, you need to consider safety and reliability. What will happen if the Arduino stops with the output stuck on? (Similarly, what happens if the SSR shirt-circuits?) A well-designed system will have an independent safety circuit such as a thermostat and / or relay.

  • \$\begingroup\$ My problem is that if I turn on SSR for a long period then it will draw instantaneously 9kW which might not be available from my solar. If I am already consuming 2kW from solar and I have only 8kW available. I want to turn on the heating element at 8kW. \$\endgroup\$
    – Smrtngy
    Commented Apr 28, 2023 at 12:08

My question is if Arduino is capable to control a 3-phase SSR without any problem? If you know what you are getting into, yes no problem.

The hardware of any arduino on the market can do this, given suitable electronics around the chip. Such as phase angle measurement from the AC voltage side and reliable SSR control ouputs.

Whether or not the software you use in an arduino can is a different story. Perhaps it can, but there are a few realtime constraints you need to take into account. And it needs to be safe. The solid state component should not be the only part between the grid and heaters for example.

Phase angle control causes significant electromagnetic interference and noise on the power lines that require filters. Even your heating element may not like the fast voltage transients that appear as a result of this mode of operation. This may cause the project to collect significant costs.

This will also require efforts in your hardware to be somewhat resilient to these interferences.

Regulations You need to conform to regulations in order to operate equipment capable of this. For example, in Germany it is illegal to operate a device like this for heating water domestically. In other parts of the world you just need to make sure the EMI remains within tolerable limits and the device is safe.

There are (expensive) proportional SSR devices on the market that can take a 0-5/10V or 4-20mA standard input signal and proportionally control an AC source for you. Crydom/Sensata makes some of these for single and three phase. This would make the arduino parts a whole lot easier since you then only need to develop a standard industrial analog ouput*. Or use other off the shelf industrial automation.

In fact this entire method of heating water with excess energy knows already a few ready made products, such as the myenergi eddi.

*Note that some SSR also take power from the analog input causing a bit extra strain on the analog output of the controller.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.