I know it is deviating more from the original issues raised by the OP but since we are redesigning it for him, here is another variant: PCF8575 cannot control relay switching - #13 by 6v6gt . It uses a clever design with an (AC) optocoupler that allows individual configuration of trigger high or trigger low on each channel.
1 Like