The coil on those relays require 5V to the relay coils to switch. Connect Vcc to 5V. Connect gnd to Arduino ground. Connect CHx to digital output pins. A high on a pin should actuate the relay. The Arduino 5V power supply probably will not be sufficient. An external 5V supply capable of supplying enough current for the number of relay coils that will be on at once will be necessary. Connect the external supply ground to the other grounds.
@groundfungus Not all relay modules are 5V. Here you can select the voltage (when ordering). And I see no voltage dropper/regulator so I think the model voltage is directly related to the relay they use. So no, 5V would not work with his module.
And yes, you are right.
CHx to Arduino pin
Vcc to 24V (or called +24V / positive power supply terminal)
GND to -24V (but I kind of hate that term..) / GND / negative power supply terminal AND the Arduino GND
Without the GND connected to both power supplies there is no reference for the Arduino pins. Current has to flow in a circle...
Thanks for your replies. That has set my mind at ease. Should I add any protection to the digital pin side? To stop any voltage leaks / spikes, or does the circle have the required protection.
Thanks. Yeh, there the 24v ones. Thanks for your comments and help. Its great to see such a strong online community, and people willing to share there knowledge.