I develop an home automation for my house with arduino uno using enc28j60 eth bord and 8 relay with optocoupler. I write same .ino script using EtherCard.h library and same HTML.
I attach a picture with the lighting schematics and how I made the wiring.
I also attach the .ino file so you can see how I’ve done the script.
OK, everything looks normal and you will believe that should works.
I make this schematic and wiring because I want to have the lightning network and arduino separated, so I can start a light from push button and stop from arduino. And if I have a problem with arduino or my network I can use the lights.
The problem is that when I start a relay that is wired to 220V impulse relay my arduino stuck, I lose the ETH connection with it and after reset the problem persist.(after I upload the file it response to ping and I can access the web server) If the 220V AC is off I can start and stop the relay without problem.
What is the logical explanation, what I’ve done wrong?
rbbb_server.ino (3.93 KB)