01-09-2019 12:42 AM
I am using Arduino Mega 2560 to control 16 solenoid valves by ON/OFF 16 relays.
The VI operate very well on my laptops (Samsung I5-7200U and Acer I3-2330M) but unstable on PCs (Core duo). After a few iterations, time-out error (1073807339) has appeared. I tried using both LIFA and LINX, but this error still occurs.
That problem does not occur when I disconnected loads (solenoid valves) to the circuit.
I attached the VI.
Solved! Go to Solution.
01-09-2019 11:16 AM
Are the solenoids DC powered? If so do they have built in snubbers or diodes to quench the back EMF voltage spike when they are turned off? I mention this because you state it works fine when the solenoids are disconnected. Also wonder if you have a ground loop since the laptop (floating from AC mains) works but the PC's do not. May be a shot in the dark but worth mentioning.
Can you supply make/model of solenoids and a sketch of how things are wired up?
-AK2DM
01-09-2019 08:46 PM
Hi. Thank you for your fast reply.
My solenoids use 24 VDC power. Model: SMC 10-VQ1200Y-5.
I uploaded the circuit diagram.
01-09-2019 10:38 PM - edited 01-09-2019 11:06 PM
The LV application works well without the solenoid attached, so there is no problem with the code.
You have to narrow down to the electrical circuit and HW connection problem.
It seems that this post is similar to your problem.
01-10-2019 08:46 AM
I'd try putting some reverse biased diodes (ie 1N4004) across each of the solenoid coils first.
Not sure of the spec's on your relays, they may need some also.
-AK2DM
01-13-2019 01:55 AM
The problem has been solved by adding a ceramic capacitor to each relay.
Relay module has built-in capacitors, diodes, and optoisolators. But it seems that is not enough.
When the load is connected to the circuit, the arc generates at the contact each time the relay is turned on / off.
Then Arduino is reset, leading to a disconnection from the computer.
The laptop's USB port seems to filter noise better than PC.
I'm not sure about these things but my system has been working well anyway.
Thank you very much for your help.
01-14-2019 08:26 AM
Good detective work, I did not even consider contact arcing. Alternative is to use Solid state Relays for the solenoids.
-AK2DM