How to connect 5V 8 channel relay using external supply

weedpharma:
Generally, put the external supply on the Vcc of the board and ground of the board. Connect the ground of the relay board to the Arduino ground. Do not connect the Arduino 5v to the relay board (unless you are using a regulated 5v supply and want to use it to power the Arduino).

This is generally WRONG.
By joining grounds you loose opto isolation.
And most 8-channel relay boards have the opto LEDs connected between VCC and relay input.

Connect like this:
Remove JD-VCC jumper.
External supply connected to JD-VCC (relay coil supply) and ground.
VCC (opto LED supply) to Arduino 5volt.
Relay inputs to Arduino outputs.
DO NOT connect Arduino ground to relay board ground.

Inverted logic!
Relay is 'on' when Arduino pin is 'LOW'.
Leo..