Choosing resistors for optoisolator - Page 1
Forum section: electronics / beginners

author: PoDuck
author_rank: Regular Contributor
timestamp: September 16, 2020, 05:39:55 pm
content: I am really not sure how to use optoisolators, and I am trying to get an understanding on how to use them correctly. Which values on datasheets are the ones I am looking for on these to find the correct input current and forward voltage I'm looking for? How do I read the current transfer ratio graph when the lines are all different widths? What is the deal with current transfer ratios anyway; why does input current have any bearing on output side current?I think I want to use a TLX9000, datasheethere. I want to take a signal from a 13V source and output a logic level signal to a microcontroller.I have been reading several things on the internet about calculating the resistors on the input and output side, but transferring that to what I see on datasheets isn't as obvious to me as I would like it to be.The typical LED voltage drop on the datasheet is 1.25V, which I'm pretty certain on. On the other hand, I'm not sure what the current should be factored at. The recommended operating conditions say 10-15mA, the maximum says 30 mA, the electrical characteristics suggest at 1.25V it would be 10mA. Am I safe to assume 10mA, and use a 1.2K resistor on the input?As for the output side, I'm pretty well lost. When I go to the graph on page 6, I'm not sure how to read the current transfer ratio, as the lines don't seem to be proportional to the position on the graph, so I don't know if each line is 100% or not. At 5Vce, is that appears to be somewhere around 375%, or am I reading it wrong? Beyond that, are we talking about 10mA in on the input side coming out as 37.5mA on the output side if I am correct? If so, would a 390Ohm resistor be appropriate on the output side?

author: ledtester
author_rank: Super Contributor
timestamp: September 16, 2020, 05:51:47 pm
content: Datasheet for TLX900 is here:https://toshiba.semicon-storage.com/eu/semiconductor/product/optoelectronics/detail.TLX9000.htmlQuoteIt's a log-log graph:https://youtu.be/8jR-_Om4myk

author: ledtester
author_rank: Super Contributor
timestamp: September 16, 2020, 05:59:11 pm
content: QuoteIt means you can get 375% current on the output side -- if you want it.The resistor you use on the output side can depend on how fast you want the signal to switch. A higher pull-up resistor requires less current to pull down but will also switch slower. Lower value resistors use more power to keep low. It's a trade-off.4.7K and 10K are typical pull-up resistor values.

author: PoDuck
author_rank: Regular Contributor
timestamp: September 16, 2020, 07:28:55 pm
content: Quote from: ledtester on September 16, 2020, 05:59:11 pmSpeed isn't that terrible of a consideration in what I am currently doing, as long as we aren't talking about seconds, but if it were, being that I am trying to learn this, what am I using for the calculation to keep the resistance as close as possible to optimum?

author: PoDuck
author_rank: Regular Contributor
timestamp: September 16, 2020, 07:33:18 pm
content: Quote from: ledtester on September 16, 2020, 05:51:47 pmSorry, grabbed wrong datasheet link. LOLI will fix it.

author: ledtester
author_rank: Super Contributor
timestamp: September 16, 2020, 11:52:29 pm
content: All components have tolerances -- e.g. your resistors may be +/- 5%, caps +/- 10%, leds have slightly different voltage drops. Component operation varies with temperature. Battery voltage decreases as it becomes depleted. Your design should take these variations into account. If you expect 10mA to flow through an optocoupler, perhaps design your circuit to work with as little as 5 mA. That builds in a safety margin and makes your circuit more robust.The other consideration is how much power you can afford to use. A lower value pull-up resistor will consume more power. How long will that resistor be pulled down? What is your power source - mains? solar? a battery? These questions will help you decide what value resistor to use.

author: S. Petrukhin
author_rank: Super Contributor
timestamp: September 19, 2020, 04:13:38 pm
content: Most opto-pairs based on a phototransistor have similar parameters. In practice, they open perfectly at a current of 3-5mA, if you use a high - resistance load at the output - MCU pin. This works well and a simple quenching resistor is sufficient. And do not increase the current to 10-30mA, because this will require increasing the power dissipation of the resistor and excess heat generation. I tested threshold elements at the input of optocouplers, current stabilizers - they did not give anything better than a simple resistor. Moreover, current stabilizers greatly reduce the trigger threshold and become illogical, for example, in an industrial signal of 24V-they are triggered already at 4-5V, and with a resistor of 12-18V, which is more logical. Of course, using a resistor can create problems when the frequency increases and at thresholds near the switch-on point.Calculate the resistor based on (Uinput-Uf)/0.005.For high-speed systems, it is necessary to install a transistor (or two, so as not to get inversion) at the output of the optocoupler.I use simple connection a collector of photo-transistor to Vcc, an emitter to MCU input that has a pull-down built-in resistor enabled. This works reliably and sustainably in industrial environments.But you can use digital opto-pairs, you can install a simple and convenient current stabilizer NSI50010YT1G on the input, if you are sure that there will be no low-voltage interference.