Ternary Logic with a Single Optoisolator?

Thread Starter

johnyradio

Joined Oct 26, 2012
615
Is it possible to output ternary logic with a single opto-isolator? Seeking a very simple, low-cost solution. I want to avoid a uC.

On the primary side, i have two devices, L1 and L2. They each output a logic 1 or 0. They will never be high at the same time. Their possible states are:
  • 00
  • 01
  • 10

I want to output these three possible states to the secondary of a digital opto-isolator. I can think of some possibilities, but not sure which would be simplest/cheapest to implement.
  • -1, 0, +1
  • 0, +1, high-impedance
  • different PWM's
  • different frequencies

PWM/Frequency: Seems potentially noisy.
Linear: I understand i could use a linear opto-isolator for 3 voltage levels, but that seems possibly noisy.
 

ronsimpson

Joined Oct 7, 2019
4,647
should work quite reliable:
I like your idea, but it will not work in the real world.
I picked the first optocoupler in Digikey's list. LTV357 It shows a current transfer ratio of 50% to 600%. That is the input to put current. If the LED current was 1mA the collector current could be 0.5mA to 6mA depending on the part.
1761177940683.png
There are different versions of the part. By choosing a "A" version you get 80% to 160% which is still a great error.
1761178161502.png
This shows the effect of temperature. If the temperature changed form 20C to100C the gain will drop to 50%.
1761178253269.png
 

Thread Starter

johnyradio

Joined Oct 26, 2012
615
This is not going to save you over the obvious solution — using two isolators.
That's what i thought. Two optos might be cheaper than frequency/PWM, and possibly simpler.
for 3 levels a simple switching two resistors in Led supply should work
That's linear iso, correct?
will not work in the real world. LTV357 It shows a current transfer ratio of 50% to 600%
You mean a linear opto, correct? Still trying to wrap my brain around CTR. Is CTR just about temperature?
 
Last edited:

crutschow

Joined Mar 14, 2008
38,321
Is CTR just about temperature?
No.
CTR is the Current-Transfer-Ratio for input current to output current, and it varies significantly from unit-to-unit and also with temperature.

To minimize that variation, you could use an analog type opto isolator with two identical outputs.
One is used for negative feedback to the input circuit to stabilize the input to output voltage of the other output (example).
They typically use an op amp at the input to provide the linear output, but Figure 30 in the referenced document shows it also done with two transistors.
That should allow the transmission of three distinct voltage levels with good stability.
 

Thread Starter

johnyradio

Joined Oct 26, 2012
615
I have no idea what do you mean noisy
Two kinds:
- a linear, 3-level opto might be susceptible to external noise
- a frequency-based opto might create noise
CTR is the Current-Transfer-Ratio for input current to output current, and it varies significantly from unit-to-unit
Manufacturing tolerances?
you could use an analog type opto isolator with two identical outputs. One is used for negative feedback to the input circuit to stabilize the input to output voltage
A servo-type opto was already my choice, if i go with linear isolation. But, i chose the ISOM811x because price, and as a binary opto, linearity is a non-issue, and:
ISOM811x opto-emulators offer significant reliability and performance advantages compared to optocouplers, including high bandwidth, low turn-off delay, low power consumption, wider temperature ranges, flat CTR, and tight process controls resulting in small part-to-part skew. Since there is no aging effect or temperature variation to compensate for, the emulated LED input stage consumes less power than optocouplers.
https://www.ti.com/lit/ds/symlink/isom8111.pdf
@ quantity 1,000, the IL300 is $1.40. The ISOM8111 is $0.18.
https://www.digikey.com/short/0392p82b
https://www.digikey.com/short/59pzz7hd
 

Ian0

Joined Aug 7, 2020
13,097
"Simple low-cost solution" and "single opto isolator" seem mutually exclusive as it would require a linear opto-isolator (as per @crutschow 's suggestion) which is far more expensive than a dual opto-isolator.
It the object is to output 0, 2.5V or 5V depending on the state of the inputs, then this is the simplest solution. It can use a PC827 or similar dual opto-isolator (the cheapest one there is) which is in the same size package as a SINGLE linear isolator.
Screenshot from 2025-10-23 07-27-57.pngIf you can't be sure that the two inputs will NEVER be active together, then some current limitation in V3 would be advisable!
 

ronsimpson

Joined Oct 7, 2019
4,647
Most isolators were made to be driven on or off and not used in a linear area. I have used isolators made for passing analog, but the circuit is a little complex. linear I can post the circuit later if you want. It takes an op-amp.

I have use PWM to make a voltage. 100%=5V 50%=2.5V 0%=0V. It is not real accurate. Mayve 2%. In your case drive the LED at 100, 50, 0% and then on the transistor side use a RC to average the signal.

I have used an IC that has an ADC in the input, sends the data digitally through isolation, then a DAC on the output side.

I would probably use a dual isolator.
1761232062224.png
 

Ian0

Joined Aug 7, 2020
13,097
I would probably use a dual isolator.
View attachment 357534
so would I but I don’t have a dual in my copy of SPICE, and why would I need it because SPICE doesn’t care! Two singles and one dual are all the same to SPICE, and all perfectly matched with the same CTR.

I‘ve used a bog-standard dual isolator in the same feedback circuit as in the IL300 app-note, and it worked reasonably well.
 

ronsimpson

Joined Oct 7, 2019
4,647
The IL300 is about $3.00. I like the part.
I can get single isolators for $0.30 and dual for $0.50.
I‘ve used a bog-standard dual isolator in the same feedback circuit as in the IL300 app-note, and it worked reasonably well.
In SPICE yes, but will not work in production.
 

Thread Starter

johnyradio

Joined Oct 26, 2012
615
It the object is to output 0, 2.5V or 5V depending on the state of the inputs, then this is the simplest solution.
I assume i could achieve "balanced" ternary (-1, 0, +1) with a similar circuit, and an inverter on one of the iso's.
If you can't be sure that the two inputs will NEVER be active together, then some current limitation in V3 would be advisable!
  • If both are high, and they are 2.5V and 5V, then i think the "reader" would see the higher of the two voltages, 5V. Maybe you could use a logic gate to get desired output.
  • If both are high, and they are -1 and +1, then i think the "reader" would see 0V.
I have use PWM to make a voltage.
Seems interesting if forced to use a single iso, but the primary would be more complex, so no cost savings. Two opto's would be simpler and cheaper. I wonder what happens if you mix a 20% PWM with a 70% PWM at the same frequency, and pass through an RC low-pass?
No signal: 0V
20% PWM: 2.5V
70% PWM: 5V
20% PWM + 70% PWM: 2.5V? 5V? 7.5V? Maybe depends on whether they are in-phase or not.
 
Last edited:
Top