OK. So now we've got the right stuff for the pin output side of things, to isolate the board from the 12V system of mag locks, etc.
Now for the input.
If I am feeding 12V to a bunch of sensors ( cables up to 50m in length ) and my board is waiting for a break of the ground signal, I assume it would be best to have the 12V circuit running through an optocoupler, with only a short isolated loop from the board ground to the input pin.
I have found the following online : CNY75GA
Can anyone tell me if this should be suitable, or what the preferred part should be, and any links to how this should be wired ?