1

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

Transistor
  • 168,990
  • 12
  • 186
  • 385

1 Answers1

3

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.

tobalt
  • 18,646
  • 16
  • 73
  • 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 – Haythem Ltifi May 22 '21 at 11:42
  • 1
    I havent used these parts, but here is an SE topic: https://electronics.stackexchange.com/questions/265619/bidirectional-digital-isolation 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 – tobalt May 22 '21 at 11:49
  • they said bi direction but they are not .... what a mess. thanks for your time – Haythem Ltifi May 22 '21 at 11:57