Thanks for the feedback Tom & John!
TomGeorge:
The relay PCB does not need a lot of current as you have noticed with their input circuitry, they are designed for direct drive from microcontrollers.
When I powered both arduino and relays from the same power source I noticed that some relays were not switching although the optocoupler led was active. Then I used the JD-VCC power jack using a second power supply, and it was working. Maybe it's due to the second power supply having a slightly higher voltage, I don't know, but I also thought generally it was a good practice to power the relays from another power source and I never really looked back.
Maybe it's worth it to retry with only 1 power supply (jumper the JD-VCC to VCC on the relay module). I'll retest this.
TomGeorge:
I think you will find that some of your problems are that you are still in prototype stage and those jumper/connector wires are not the best when minimising wiring cross-talk and reliable connections.
Héhé. I make a dirty change and test the concept first using the material I had left over. Hence it all looks a bit messy. The plan was to shrimp them together and maybe wrap a bit of tin foil around them when all was successful. But I've been pulling my hair out (the few ones I've left :>) with that interference issue and kept on modding. I'd used a similar strategy in the teleruptor cabinet and that worked flawlessly. But that was 24V and now it's 5V. Probably a whole lot more sensitive to noise and require a clean environment from the start. I'll tidy up. What would you recommend for the connectors UTP CAT5's?
TomGeorge:
Also here you have input wiring to the relays in amongst the relays output wiring, this tends to defeat the idea of isolation with the opto and relay.
The wires between teleruptor cabinet and arduino cabinet are SVV 16x0.8mm wires. Not twisted, but shielded as a whole. Of course inside the cabinet they are close to each other as they follow different paths (also shielding removed). I have around 4x16 of these + 8 CAT5 UTP's for sensor data. That makes for a huge amount of cables. And its allmost impossible to split them up so they wouldn't interfere. I put them like this, because it was the cleanest way to put them (horizontal & vertical). Top area is 24v, button area is 5V. At the relays they overlap indeed. Repositioning them horizontalle would lead to the same problem though. I can maybe wrap the 24V wiring side of the relays in a bit of tin foil...
@John: I'd definitely consider switching to eletronica ballasts. But don't they have like the same interference issues? I thought I had read that somewhere....