I am looking to control a custom high power electric water heater (it's basically a DIY tankless water heater for a research application). I'm controlling three 5.5 kW single phase heater elements from a 3 phase supply by essentially breaking up the supply into 3 balanced single phase loads (almost like how they distribute residential power).
My question is can the Mega 2560 handle a 3rd interrupt to control the final triac. I've already done a proof of concept with a single triac and single interrupt routine which worked fine. I presume that the second (simultaneous) triac shouldn't be an issue as there is another interrupt input on the Arduino but I'm wondering will it be an issue with the 3rd triac?
I'm not an expert on using Arduinos so please feel free to highlight any major mistakes in my logic or alternative solutions.
What is your intent? Are you planning on turning on the heater until a certain temperature is reached, then turning it off? I would go with three MOC3052s, one for each leg of the 3 phase power, driven by one digital pin. Something like figure 14 here. https://www.fairchildsemi.com/datasheets/MO/MOC3052M.pdf
Yes there will be a PID control loop based on an inlet and outlet thermistor. There'll also be a flowrate sensor too but I'm not sure yet what role that will play. It will likely only be there for safety (don't run heaters if no flow detected).
Is it possible to drive them all from a single pin? Won't the 120 degree phase separation mean that if all 3 Triac are fired simultaneously, some of them will be nearly half way through the cycle and only be delivering a fraction of their power output?
Is it possible to drive them all from a single pin? Won't the 120 degree phase separation mean that if all 3 Triac are fired simultaneously, some of them will be nearly half way through the cycle and only be delivering a fraction of their power output?
It will always be like that. The triacs will activate all at the same time, no matter where in the phase that leg is, just like a manual switch would. It isn't a problem for your project because the heater is almost strictly resistive and the optocoupler isolates your Arduino from any flyback anyway. Once they are active (on), they will deliver full power.
I see no reason to use interrupts at all for this application, can someone tell me why it is needed?
To control the three heating elements, why not take a simple and well proven approach of using SSR (Solid State Relays), is there a reason you prefer to construct this from discrete components?
These SSR's can switch on zero crossing.
Either three separate single phase units or a single three phase unit would be far easier and safer.
Then, simply control the SSR as a unit, switching elements at the same time.
Your control would seem simple enough, with a temperature sensor on the inlet and another on the outlet.
I assume you wish to heat the water from the inlet temperature to a setpoint temperature by the time the water reaches the outlet point, is my assumption correct?
Have you checked that the pipework length and heating system can not just attain, but exceed your maximum allowable setpoint with the flow rate you have?
If it doesn't, then there will be no way you can heat the water to your setpoint at the flow rate you have.
If you have checked that it can, then all you need then is a PID loop control function in your code to attain your setpoint temperature.
What happens if you overheat the water, how will it be cooled to the setpoint by the time it reaches the outlet?
There will be need to be careful design of the heating system in terms of how you couple the heating elements over the pipework length and where you place the temperature sensors. You will need to know and understand the thermal inertia of the system at different temperatures.
Hi, are using PID and proportional phase control, because you are heating a tankless system.
If you new the phase direction of your power source that is L1, L2 then L3, you could interrupt on L1 and then use millis to calculate the next 6.6mS for L2 and next 6.6mS for L3 for a 50Hz system.
Just a suggestion.
Tom......
Is it essential that it is a tankless system?>
are [you] using PID and proportional phase control, because you are heating a tankless system
I don't think the fact that it is tankless makes any difference to whether PID control is used for temperature control. You could still use PID if it were a tank. The PID will be tuned diferently between those two ideas as the thermal mass between a tankless and tanked system is wildly different.
Tom also wrote:
If you new the phase direction of your power source that is L1, L2 then L3, you could interrupt on L1 and then use millis to calculate the next 6.6mS for L2 and next 6.6mS for L3 for a 50Hz system.
What on Earth for?
It is a heating system, where the time to get heat out of the element will far exceed any need to know anything about the phase relationship between the 3 phases at 50hz.
Does anyone really think that if phase 1 comes on 6.6mSec berfore phase 2 which again, comes on 6.6mSec before phase 3 that it have the slightest difference to the heat transfer from a heating element, through the pipework and into the water, I don't?
Hi, if it is a tankless system, you are heating a flow of cold water. The dynamics are different to a tank.
Hi, are (you) using PID and proportional phase control, because you are heating a tankless system.
I'm sorry if this was misunderstood, the reference is to "phase control", meaning controlling the heater by controlling a portion of the AC waveform, hence you have to know the zero crossing and use interrupts.
The other PID would be to use ON/OFF PWM with much lower frequency, a pulse interval of say 5seconds, using this you would not need to worry about zero crossing detection, and use zero crossing opto triac drivers.
A tankless system may not be controllable with the lower PWM frequency.