I have a requirement for a hardwired safety loop that can be wired between different devices in series, and enables each one to both know when it is "ok to run" and to be able to bring down the rest of the series devices should it have an error.
I'm considering using a 20mA current loop, wired in series though all the devices, with some master device, first in the chain that generates the 20mA (high side current source) and also is last in the chain monitors it's getting the same 20mA back. Each slave series module would use have an optocoupler and a pair of normally open relay contacts. When each slave is ready to operate without faults, they would close there relay contacts, allowing the current to flow, right back to the input of the master, which could then initiate the process. if any unit enters a fault state (or looses power etc) it would open it's contacts, breaking the loop, and hence very slave, and the master would be able to detect that and go into a safe state.
If i use normal optocouplers, i have galvanic isolation from the safety loop, and at 20mA, will have something like 1.25 to 1.6v drop across each device. Therefore, for a max of say 10 devices in series, i'll need around 15v or more to power the constant current source. Which as the whole shebang runs off 24vdc sounds spot on. I think i might add a small amount of extra resistance into each slave in series (10ohm perhaps) with the optocouplers led, and probably a PTC fuse, just in case someone connects 24v directly across the diode.
Something like this
http://www.microchip.com/wwwproducts/en/CL220 would be a super robust 20mA source i think.
The thing i haven't worked out is how to detect the correct current is being returned to the master. Could be a low side current sense shunt into a window comparitor, or similar?
Anyone done anything similar or see any glaring flaws in the plan?