I am looking for a clever way to merge the two circuits. I want the freedom to configure the pin as input or output but still have the isolation. Not sure if this can even be done but I am for suggestions. Thanks.

enter image description here

enter image description here

  • \$\begingroup\$ You've shown two outputs. Where is the input? \$\endgroup\$
    – Transistor
    Commented May 22, 2021 at 10:55
  • \$\begingroup\$ Consider treating input and output paths separately, and look at open-collector logic aka wired-OR or wired-AND) \$\endgroup\$
    – user16324
    Commented May 22, 2021 at 11:32

1 Answer 1


There are bidirectional digital isolators. But if you ask about an optical solution specifically, I am not sure if there is an integrated solution for this.

You could build your own bidirectional optoisolator:

Two LEDs facing each other in an otherwise lightshielded environment. When you set one side to be a high impedance input, the other side can illuminate the input LED and cause it to develop a photovoltage. Don't expect a very high data rate, because you can only use rather large pull-downs in parallel to each LED.

  • \$\begingroup\$ any reference or part name please off the bidirectional digital isolators? i googled but its nice to know something that was tested and it works well \$\endgroup\$ Commented May 22, 2021 at 11:42
  • 1
    \$\begingroup\$ I havent used these parts, but here is an SE topic: electronics.stackexchange.com/questions/265619/… and distributors like mouser have categories full of bidirectional digital isolators. Upon brief inspection it might actually that these parts don't have the ability to use one single line bidrectionally, but offer two lines - one each per direction \$\endgroup\$
    – tobalt
    Commented May 22, 2021 at 11:49
  • \$\begingroup\$ they said bi direction but they are not .... what a mess. thanks for your time \$\endgroup\$ Commented May 22, 2021 at 11:57

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.