I'm currently using an Arduino Uno to operate the switch ON/OFF of two power contactors.
A relay shield is doing the switch control of the contactors.
The code seems to be working properly.
A cycle would be considered when the loop is done. I'm facing some issues having the loop executing more than a couple of hundred cycles.
The goal is to have around 7500 cycles performed and the maximum I observed so far is 450 cycles, then the code is stopped and does not operate the relay anymore.
Does this stop could be related to EMC issues? I observed that sometimes the counter is not written properly on my serial monitor, which might cause the program’s stop. The Arduino is powered with USB cable. Thanks in advance for the feedback.
you have to be carefull when operating power contactors, the 'spikes' on power lines can reset the Arduino - in particular if the loads are inductive, e.g. motors, pumps, etc
on a system I built some time ago
powered the Arduino from an good quality external power supply
used opto-isolated relays to drive the contactors
use screened cable to connect the relays to the contactors
the above was only a prototype - for the production system a PCB was designed and implemented
how do you connect the Arduino to the relays? dupont 'jumper' wires? very unreliable!
use a developmenmt board with screw or solder terminals
I don't think this is the issue, but you'll need to fix the PWM pins you're using for your analogWrite output. On an UNO, the PWM pins are: 3, 5, 6, 9, 10, 11. NOT 7.
Does the cycle complete if the mains power is off? (to eliminate interference as a cause)
Currently using the black relays that are connected directly to the Arduino
Does these relay Opto-Isolated ? not so sure about this
First I was using the blue ones and tought that having relays directed connected to the Arduino would help. This is not the case it seems to have even more shut down when directed connected.
One of the contactor is a resistive load of 32A.
I'm generating inrush current on the other one. This would make total sense with your feedback.
Thank you for the feedback
Sorry - I meant the high-power lines that you are controlling. Do you still have the problem if you only flip the relays on and off without the high-power connected to (through) them?