I had read this somewhere on the forums sometime back. For isolation between 5V and 24V, you could use an optocoupler like an IC H11G2. Since the IC should be able to drive
an industrial relay, you can use a current driver (power
transistor) like the transistor TIP125. It can be connected at the
output of the H11G2 to give the required current drive.