What is confusing me very much is as to why the LED on the relays stay on sometimes. If it would be a surge or cross-talk, it should be very very short right ? But sometimes the LED's (optoisolated 5V) on the relays just stay lit. As if it's actually written by the logic (which it isn't, see below) How can that be? As long as I leave the output enable (OE) pin of the registers LOW, the register should actually force the last written state onto that pin right? So can't we like rule out noise/crosstalk then?
In my arduino sketch I just write an array to the shift registers. I always write the full bits to all pins. I can trace this behavior over Serial and it looks the behave correctly. Too bad I can't read from the Shift Register.