In the diagram below there are two modules, A and B, which are separated by a physical distance of about 15m. Module A has a 12V DC power input. Module A powers module B (they share a common ground).
There are also a number of signals that are passed between the modules. For each signal there is an optocoupler at both the transmitting and receiving end. One such signal is illustrated below.
I would like to know what the purpose of this optocoupler is? Personally I have only used optocouplers for cases requiring galvanic isolation. This is clearly not the case here, since both modules share a common ground. Any ideas on why the designer might have included these optocouplers?
The only thing I can think of is for level-shifting and noise-rejection. But this could more simply be achieved with ordinary transistors and a passive filter. Do optocouplers offer any advantages here?
simulate this circuit – Schematic created using CircuitLab
Best Answer
I don't think it's productive to ask "what are these for?". The reason I don't think it's productive is that frankly I don't think the designer had any idea what he was doing. Putting an optocoupler in the B module - well, sort of. Trying for noise immunity, I guess, and maybe level shifting, as has been mentioned. Driving it with an optocoupler in the A module is just silly.
I suppose the lightning hypothesis is the best bet, but with both common ground and common power acting to lead any such surges back into module A, it's wasted effort.