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

  • \$\begingroup\$ Lightning strikes? ;-) \$\endgroup\$ Commented Jan 9, 2015 at 5:24
  • \$\begingroup\$ Interesting thought. But I doubt the opto will survive a strike. At best it might limit the carnage by buffering up-stream components (though I doubt this too, due to the common ground). In any case, if the opto fails the whole module becomes useless and will be discarded. These modules are not serviceable. \$\endgroup\$
    – knick
    Commented Jan 9, 2015 at 7:08

2 Answers 2


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.

  • \$\begingroup\$ Unless the modules were designed independently and none of the designers was sure what the other half provided as level shifting, if any. Still, seems like bad planning at least... \$\endgroup\$
    – Nicolas D
    Commented Jan 9, 2015 at 18:27

I'd say level shifting and/or noise immunity, by making the signal a current rather than a voltage. The receiver also becomes independent of the voltage levels on the transmitter side.

The MIDI protocol is one example of this.

  • \$\begingroup\$ If the optocoupler had its own current return separate from the supply ground, it would guard against ground bounce. Perhaps the circuit was engineered so it could use four wires if needed, but testing proved that three would suffice? \$\endgroup\$
    – supercat
    Commented Dec 10, 2015 at 17:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.