Notice that relay board has a jumper between "Vcc" and "JD-Vcc". Remove it. For complete optical isolation, connect "Vcc" to Arduino +5 volts but do NOT connect Arduino Ground. Connect your Arduino Digital Output pins to "IN0", "IN1" etc. Connect a separate +5 supply to "JD-Vcc" and board Gnd