I'm having some complications when I'm trying to control 16 Relays using 2 595, these relays control loads connected to 5V, 12V and 220V. There are 8 loads at 220V using the 8 LSB from my SPI communication with the 595.
Everything works great as long i have connected 5V and 12V to the relays, when i connect 220V relays turn on and off randomly, sometimes they work just right, as I change the registers. Using an oscilloscope I've seen some noise in VCC (5V), but I've been unable to eliminate it.
-Connecting different power supplies to my arduino and to the relay module. I'm using a pc power source for 5V and 12V.
-Changing Serial freq.
-Using a low pass filter at latch. To avoid a noise induced data storage.
I'm using there relays:
SainSmart 8-Channel Relay Module
I'm completely out of ideas, so any kind of insight will be appreciated.
Here is my circuit schematic, i've checked that everything works except when i connect my relays to 220V
This is the schematic i've found:
As you can see and I had forgot to mention relays are drive by pulling 595 pins to ground.