Author Topic: How to design for opto-couplers if the output can be so different?  (Read 1172 times)

0 Members and 1 Guest are viewing this topic.

Offline MathWizardTopic starter

  • Super Contributor
  • ***
  • Posts: 1421
  • Country: ca
I was looking at the datasheet of a common K817 opto, and they list typical Iout/Iforward . And they are about min 0.5x to max 6x, no typical value.
https://pdf1.alldatasheet.com/datasheet-pdf/view/26344/VISHAY/K817P.html

In ltspice I used a K817A, and it has a beta around 1.29 across a fairly wide forward current. I've never really used or measured any that I own. But down the road I will.

If I was making a 3904 circuit, using 20uA of base current, and the beta was 200 or 300, that's still not that bad or unexpected, 4mA vs 6mA

But with these opto's, if you planned on some 10mA Iforward, how or why would you want to deal with having possibly 5mA to 60mA output ??

And I see lots of K817 used in lots of computer SMPS.........are these more akin to JFET's where you really have to measure each 1 before hand, or order a big batch of ones that are all about the same, which is what the SMPS makers must do

So how bad are opto-s really? And why don't they make them with a tighter, better defined tolerance ?
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5869
  • Country: de
Re: How to design for opto-couplers if the output can be so different?
« Reply #1 on: January 15, 2022, 11:12:21 pm »
So?
What's your problem?
Bipolar transistors or other devices have similar spreads. No issue when designing properly.
If you expect that a simple optocoupler should act like a precision isolation amplifier, well...

 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: How to design for opto-couplers if the output can be so different?
« Reply #2 on: January 15, 2022, 11:56:26 pm »
They have tighter bins -- if not for that exact part, then other families offer it.

Pay attention to minimum CTR: the LED ages over time, reducing this.  You generally want to design to this, and deal with the effect this has on bandwidth or switching speed (i.e., turn-on being faster than turn-off).

And, at that, switching speed is not usually something to worry about as there are better devices to use; plain phototransistor types aren't good for much over 10kbps, or a bit more using a three-terminal type with B-E resistor (e.g. 4N35).

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline MathWizardTopic starter

  • Super Contributor
  • ***
  • Posts: 1421
  • Country: ca
Re: How to design for opto-couplers if the output can be so different?
« Reply #3 on: January 16, 2022, 12:05:45 am »
Ok so in general then you actually have to measure it ? I've never had an opto failure yet, but I would have just grabbed 1 from my shelf and put it in (I only have k817)
Here's part of a real sensing control circuit from a 750W PSU, the Vc of the opto is sensed by an op-amp which compares it with the PWM duty cycle

Yeah I'm not designing anything with them, but yeah, I'll have to find some literature on them, probably nothing in my books on them.
« Last Edit: January 16, 2022, 12:11:43 am by MathWizard »
 

Online magic

  • Super Contributor
  • ***
  • Posts: 6758
  • Country: pl
Re: How to design for opto-couplers if the output can be so different?
« Reply #4 on: January 16, 2022, 12:11:39 am »
Nobody measure anything, they deal with it by feedback.
TL431 will sink increasingly more current until the primary chip notices and the voltage falls enough to make the 431 happy.

For TL431 it's only a few mV increase in feedback voltage to go from zero to 10mA or more pulled from the opto.
 

Offline MathWizardTopic starter

  • Super Contributor
  • ***
  • Posts: 1421
  • Country: ca
Re: How to design for opto-couplers if the output can be so different?
« Reply #5 on: January 16, 2022, 12:18:46 am »
Ok but in some non high gain feedback case, I can't just assume it would work
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: How to design for opto-couplers if the output can be so different?
« Reply #6 on: January 16, 2022, 12:21:56 am »
Right.  R3 sets TL431 minimum current, R1 sets opto maximum current.  Stuff on the right is whatever; usually much compensation is not needed, nor very desirable.  (What is this, a voltage mode supply?  Feed-forward at the feedback divider too (C1+R6), yech.)

CTR affects the loop gain, so you should do such a design accounting for loop stability at both extremes.  CTR range can be simulated by selecting other load resistors (RN1 and such).  I don't know that most designers even bother with this, as the design shouldn't be so close to instability that the CTR spread threatens to break anything.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online magic

  • Super Contributor
  • ***
  • Posts: 6758
  • Country: pl
Re: How to design for opto-couplers if the output can be so different?
« Reply #7 on: January 16, 2022, 12:25:46 am »
Ok but in some non high gain feedback case, I can't just assume it would work
Yep, CTR is all over the place and an individual unit isn't very linear either. Basically,

If you expect that a simple optocoupler should act like a precision isolation amplifier, well...
 

Offline MathWizardTopic starter

  • Super Contributor
  • ***
  • Posts: 1421
  • Country: ca
Re: How to design for opto-couplers if the output can be so different?
« Reply #8 on: January 16, 2022, 12:57:05 am »
Here's what got me going today, I was going to practice a mosfet example, and it has an opto, so it's about time I tried an opto again

For some semi-conductor instruction I've been watching this guy, good lectures
« Last Edit: January 16, 2022, 01:00:28 am by MathWizard »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: How to design for opto-couplers if the output can be so different?
« Reply #9 on: January 16, 2022, 04:08:47 am »
And, at that, switching speed is not usually something to worry about as there are better devices to use; plain phototransistor types aren't good for much over 10kbps, or a bit more using a three-terminal type with B-E resistor (e.g. 4N35).

Pease used the example shown below.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: How to design for opto-couplers if the output can be so different?
« Reply #10 on: January 16, 2022, 04:19:29 am »
I've used 4N35 with 47 to 100k B-E myself; note this significantly reduces CTR, and they rarely show min CTR vs. Rbe in datasheets so you're kind of on your own there.  2.2M sounds like enough not to reduce CTR much (at typical drive currents), but also at least take the edge off the slowness.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: Slh

Offline MathWizardTopic starter

  • Super Contributor
  • ***
  • Posts: 1421
  • Country: ca
Re: How to design for opto-couplers if the output can be so different?
« Reply #11 on: January 16, 2022, 06:44:22 am »
Well I made the opto/mosfet/lamp circuit, and similar to his video I used a 28V, 2.24W bulb, and for the calculations I assumed the Vce was saturated, and the mosfet in ohmic region, and said the bulbs were like 350R each, and hey it works, I got the same answer as ltspice.

Now I'm trying the TL431 circuit, w/ 12V as the rail being watched, but I see the Vref would be 57mV less than the internal 2.495V ref, so doesn't that mean the op-amp would be driven low and the BJT off ???

But right that's the point, it is supposed to be off, it's looking for a slight over-voltage.
« Last Edit: January 16, 2022, 06:54:37 am by MathWizard »
 

Offline ajb

  • Super Contributor
  • ***
  • Posts: 2599
  • Country: us
Re: How to design for opto-couplers if the output can be so different?
« Reply #12 on: January 18, 2022, 05:33:00 am »
The isolated switch circuit is insensitive to CTR because you only need to get enough current at the output to pull the FET's gate up against that pulldown resistor.  Since the resistor is 15kΩ, it'll only take 800μA to get the gate all the way up to 12V (less the opto's VCE).  With something like 17mA of forward current you need a CTR of only ~21% for it to work.  Actually lower CTRs will work as well, depending on the threshold voltage of that FET and how much Rds you're willing to tolerate.  Higher CTRs won't hurt anything, because the opto can't pull the gate up higher than the supply voltage.  So it hardly matters what the precise CTR is.  Higher CTRs can switch the FET on somewhat faster, but turnoff will be determined by the pulldown resistor regardless--and if you cared about switching speed you wouldn't be using this circuit anyway.  This generally holds for all digital applications of optocouplers, it's pretty easy to design a circuit that works across the whole CTR range when it only needs to count to one. 

Analog applications, as others have noted, require some sort of feedback.  There are (or used to be?) some optocouplers that have one LED and two phototransistors in the same package that are designed for general-purpose analog isolation.  The idea is that you'll get about the same output current from both phototransistors for a given input current, so you can use one of them as feedback on the sending side to adjust the LED drive current to ensure the signal on the other one is what you want.  In practice the matching isn't necessarily great, though, so it's hard to get any degree of accuracy out of them.

One one project I tried setting an input threshold on the transistor side of an AC-input optocoupler, which is sort of the inverse of the above with two LEDs and one phototransistor, but even on those the CTR could be significantly different between the two polarities.  Which polarity had the higher CTR varied between specimens, so it wasn't even just the construction (like one LED having slightly worse optical coupling to the phototransistor) that caused that difference.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf