2
\$\begingroup\$

Here is the setup:

I'm using the Arduino Mega's SPI functionality to send signals to multiple DACs. For digital isolation, I am considering the HCPL-2631 or the ACPL-064L. The problem with these two is that output signal is inverted.

One solution is to feed the optocoupler's output signal through a set of inverters.

Could I accomplish the same by inversing the input polarity of the optocoupler?

Also, are there optocouplers with non-inverting logic that are suitable for digital isolation between an Arduino and a DAC?

\$\endgroup\$
  • \$\begingroup\$ This opto has a diode input, so the polarity of the signal will depend on how you drive the diode, you can connect it in an inverting or non-inverting way. How did you intend to drive the diode? \$\endgroup\$ – user1582568 Jan 21 '16 at 18:11
  • \$\begingroup\$ That's not the only problem. SPI uses totem-pole/tri-state drivers. The HCPL-2631 has open-collector outputs. \$\endgroup\$ – WhatRoughBeast Jan 21 '16 at 18:19
  • \$\begingroup\$ @WhatRoughBeast Right, is that why you think using inverters is my only option? \$\endgroup\$ – user3720702 Jan 21 '16 at 18:23
  • \$\begingroup\$ @user3720702 - Why in the world do you believe that I think that? What did I say to give you that idea? \$\endgroup\$ – WhatRoughBeast Jan 21 '16 at 18:26
  • \$\begingroup\$ @WhatRoughBeast I assumed that the hcpl-2631 inverts the signal because it has an open-collecter output..? \$\endgroup\$ – user3720702 Jan 21 '16 at 18:47
4
\$\begingroup\$

If you connect the LED in the opto from your output drive to Vcc (through a resistor, of course) the signal will not be inverted.

schematic

simulate this circuit – Schematic created using CircuitLab

For minimum power consumption and maximum optocoupler life it's better to have the opto spend more time with the LED de-energized and there may be consequence as to what happens when power is removed from the the driving side, so there are more factors at play than just logic inversion.

\$\endgroup\$
  • \$\begingroup\$ Got it. So I am better off with the original setup: inverting the signal(s) with hex-inverters? \$\endgroup\$ – user3720702 Jan 21 '16 at 18:22
  • \$\begingroup\$ Maybe, maybe not. The factors mentioned in my final paragraph are not part of this question. Since it's just DACs it may not matter much. No matter what you do on the driving (LED) side the output will be high on the other side if power is lost on the driving side. In some cases it might make sense to add an inverter on the other side. \$\endgroup\$ – Spehro Pefhany Jan 21 '16 at 19:24
  • \$\begingroup\$ Understood, thank you. Someone told me that passing the signal from the optocoupler's output into an inverter will "clean" signal. Will it? \$\endgroup\$ – user3720702 Jan 21 '16 at 23:54
  • \$\begingroup\$ A logic gate with Schmitt trigger inputs (e.g., 74xx14) will indeed generate sharper edges, but only if you have slow optocouplers (your's aren't), and if the receiving chip do not have Schmitt trigger inputs to begin with (many MCUs have them, your DACs probably not). \$\endgroup\$ – CL. Jan 22 '16 at 9:25
4
\$\begingroup\$

Making a non-inverting optocoupler from a phototransistor is easy, and you can do it in several ways. First, just do as Spero Pefhany suggested, and drive the input as an active-low device. Second, drive the input as you consider normal, but use a pull-down rather than a pull-up output:

schematic

simulate this circuit – Schematic created using CircuitLab In this case, a high input turns on the LED, which causes the phototransistor to turn on, pulling the output high.

A third approach involves Googling "non inverting optocoupler", and the first return I get links to this app note. Note the circuit on page 4: an isolation circuit for use with SPI.

\$\endgroup\$
  • \$\begingroup\$ Perfect. Thanks. I actually did come across the app note you mentioned and the schematic is very similar to the one I started with (before this post), but I was using a pull-up output. What you and Spero Pefhany suggested clarified things for me! I appreciate it. \$\endgroup\$ – user3720702 Jan 22 '16 at 10:02
  • \$\begingroup\$ @user3720702 - But note that you can only do this (the above schematic) with single optos like the 2601. Duals will have their emitters tied together. This will allow an isolated OR function, but not dual noninverting couplers. \$\endgroup\$ – WhatRoughBeast Jan 22 '16 at 15:39
  • \$\begingroup\$ Yes! Thank you for confirming! I had written and deleted a comment about that earlier because I answered my own question as I was writing it. I'm taking the 'single opto' route for isolation. The last thought I had (curious really).. is this setup as good as the RF-based digital isolator? \$\endgroup\$ – user3720702 Jan 22 '16 at 17:10
3
\$\begingroup\$

If you do not want to invert the logic for driving the LED, you have to use an optocoupler with a non-inverting output.

High-speed optocouplers have separate amplifiers and digital output logic, so there is no technical reason why they couldn't use buffer logic. And indeed HP did this with the HCPL-2200, which was cloned by Everlight, Toshiba, and Vishay. Furthermore, Toshiba has has a long list of non-inverting optocouplers: TLP555/715/2095/2105/2110/2310/2355/2405/2710/2955 (5 Mb/s), TLP2345/2745 (10 Mb/s).

Additionally, (non-optical) digital isolators often are available with both inverting and non-inverting outputs.

\$\endgroup\$
  • \$\begingroup\$ Thanks! I didn't know about the HCPL-2200. Could a 3rd option be: to use the "new" digital isolators? From my understanding they don't invert the signal, or do they? \$\endgroup\$ – user3720702 Jan 22 '16 at 0:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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