Do I need a resistor in series with led for a 4 channels optocoupler LTV847?

Discussion in 'Digital Circuit Design' started by microcoder, Jul 24, 2016.

  1. microcoder

    Thread Starter Member

    Jan 9, 2008
    10
    0
    First, I am a programmer, not an electronics guy. But I do try to make some circuits and usually manage OK with digital electronics. But this time I have a microcontroller that switches some signals using a LTV847 4-channel optocoupler and also a LTV817 1-channel optocoupler. I was under the impression, probably from another circuit that I once used that had a 1K resistor on the ground side of the LED that triggers the transistor in the chip. Truth is, I think I borrowed the circuit from someone else's design. Anyway, this time my signal is 3.3V and maybe the other time it was 5V and that might be why I needed a resistor that time. Anyway, I seem to be able to switch the signals OK on the LTV847 but not on the LTV817. I shorted across the resistor and then it worked. Do I need any of those resistors? I would rather not have them in the circuit if I don't need them. Well, especially if they do more harm than good.
     
  2. SLK001

    Well-Known Member

    Nov 29, 2011
    810
    224
    I'm sorry, but I can't seem to read your schematic.
     
  3. microcoder

    Thread Starter Member

    Jan 9, 2008
    10
    0
    Do you really need a schematic to answer that question? I will restate it a little more clearly. Is a resistor needed on the ground side of the LED in an LTV847 or LTV817 optocoupler when the trigger signal level is 3.3V?
     
  4. crutschow

    Expert

    Mar 14, 2008
    12,977
    3,220
    You always need a resistor to limit the current to the input LED of an opto coupler.
    It can be in series with either the input or the ground terminal of the LED.
    It's value should be such as to give the desired input current through the LED from the source voltage, Vs [R = (Vs - Vled) / Iled].
    The Vled and required Iled can be determined from the opto's data sheet.
    Clear enough?
     
  5. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    Yes we really do need one. Verbal descriptions often lead us astray when trying to troubleshoot problems. If you want the most accurate and definitive help available there is no excuse for not providing one. Good luck with your project.
     
  6. ScottWang

    Moderator

    Aug 23, 2012
    4,850
    767
    The current range of LTV847 4-channel optocoupler and one channel LTV817 is 20mA~50mA for your 3.3V application.

    If you using it on the static circuit then the current into led could be use as 10~20mA, calculate the resistor as
    R = (3.3V-Vf(led))/I_led
    = (3.3V-1.4V)/10~20mA
    = 1.9V/10~20mA
    = 190Ω~95Ω, choosing the practical resistor range as 180Ω~100Ω and then the current will be as 10.5mA~19mA.

    If you using it on the pulse circuit then the current into led could be use as 20~40mA, calculate the resistor as
    R = (3.3V-Vf(led))/I_led
    = (3.3V-1.4V)/20~40mA
    = 1.9V/20~40mA
    = 95Ω~47.5Ω, choosing the practical resistor range as 100Ω~50Ω and then the current will be as 19mA~38mA, when the duty cycle is 50%/50% then average current as 9.5mA~19mA.

    All the calculation just for reference, you can adjust it to match what your want.
     
    microcoder likes this.
  7. microcoder

    Thread Starter Member

    Jan 9, 2008
    10
    0
    Thank you. Yes, I understand what you are saying but the problem comes in trying to find the necessary information on the data sheet. Here is the link to the data sheet: http://www.jameco.com/Jameco/Products/ProdDS/878286.pdf. It has a couple different values for voltage and current on the input side. I assume it isn't the absolute maximum values so that leaves the second table. But there it only gives typical forward voltage and reverse current, which is clearly not the two values I want. So let's say that I use typical forward voltage from the second table (1.2V) and maximum forward current from the first (50 mA). Then, if I did my math right, your formula computes to 42 ohms. That is quite a bit less than the 1K resistor I am using but at least it is not wildly unbelievable. So that is for the maximum forward current. Don't I really need minimum or typical forward current? They don't give that information as far as I can tell. I could also use maximum forward voltage of 1.4V with maximum forward current. Then the formula computes to 38 ohms. I am guessing 40 ohms is a pretty safe bet. Did I do it right? Thanks again for your helpful answer!
     
  8. microcoder

    Thread Starter Member

    Jan 9, 2008
    10
    0
    Thank you very much. This is a static circuit so I will go with the first range. But where did you find those current ranges? (Sometimes I think that the most value you get out of an EE degree is learning how to read data sheets! I certainly struggle with them.)
     
  9. crutschow

    Expert

    Mar 14, 2008
    12,977
    3,220
    Yes, learning to read a cryptic data sheet is a difficult but necessary part of learning electronic design. Many of the problems that are posted on this forum are related to the OP not understanding (or even looking at) the data sheet.

    The Absolute Maximum are values that you never want to exceed. Normally you want to operate well below them (50%-75%).

    The Characteristic table shows typical operating values. You can generally operate at other values as long as you don't exceed the Absolute Maximums.

    Part of using data sheets is determining which apply to your application and which aren't important.
    For your application, for example, the leakage and dark currents likely are not of particular interest.

    For normal opto isolator operation you pick an output load resistor that you want (tradeoff between high resistor for lower power, and lower resistance for higher speed). The speed is limited by the time-constant of this resistance and any stray circuit capacitances (the upper limit being the typical 80KHz cutoff frequency and 4μs risetime of the opto).
    What speed do you need?
    Then you pick an input resistor to give an input current that is at least 2 times the output current from the selected output resistance and output voltage(since the minimum current transfer ratio is 50%).
     
    microcoder likes this.
  10. ScottWang

    Moderator

    Aug 23, 2012
    4,850
    767
    On the page 1, when the If = 5mA, the Vce = 5V, but it seems your voltage is not so high, so I think it doesn't suit for you.

    On the page 3, when the If = 50mA then I will treat it as Imax, but I never use it that high, when you draw 40mA current with pulse, actually the average only 20 mA, assuming that it is 50%/50% duty cycle, from 20mA to 50mA, it is still very far away.

    On the page 4, I picked up the Vf=1.4V, that is the highest forward voltage and the If = 20mA, I will treat it as a standard current, for the most of applications, I always like to use less than 80% of 20mA, it can be reducing the light fades and make led use longer, that is including any kind of led.

    My calculation had changed the current range in #6.

    LTV847_Char_ScottWang.gif
     
    microcoder likes this.
  11. ScottWang

    Moderator

    Aug 23, 2012
    4,850
    767
    We just talked about the If current of led side in the previous posted, when you concerning about the Vce and Ic of the transistor side then the right bottom of page 6 is the right graph that you have to see, in the datasheet have many graph that you can check and then you will understand more about the characteristic of the component, and knows how to use that component.

    Please take a look the left bottom of the graph, that is the Vce < 0.5V and how the If current of led and Ic of transistor that you can choose, and the right side are the practical application circuits, at the upper npn circuit, Rbe was used to pull down the Vb to ground and turn off Q1 when there is no any Ib. at the bottom pnp circuit, Rbe was used to pull high the Vb to Vcc and turn off Q1 when there is no any Ib.

    LTV847_Char__VceAndIcAndIf_ScottWang.gif
     
  12. microcoder

    Thread Starter Member

    Jan 9, 2008
    10
    0
    Thank you Scott and Crutschow! I got an education here and I am appreciative. In the early days of the internet there was this thing called USENET. It was a forum kind of place like this where people often asked questions, just like I did here. There were people in those days who gladly and freely helped those in need of help or information. They called those people angels. I think that title is equally appropriate for you guys. Thanks again!
     
  13. dannyf

    Well-Known Member

    Sep 13, 2015
    1,767
    357
    The answer is you don't need to use a resistor but you often do use a resistor.

    Essentially, you want to define the current through that led, regardless of the voltage applied.

    There are many ways of doing that. For small current leds, the most efficient way (in terms of parts count, cost, etc) is to use a resistor.

    That resistor can come from many shapes and forms, like a real resistor, a device with a well defined output resistance, a current driver, or a current limited MCU output pin, or even a pull up resistance or a switch.

    So the complete answer is it doesn't have to be a resistor but it usually is a resistor.
     
  14. dannyf

    Well-Known Member

    Sep 13, 2015
    1,767
    357
    The issue gets a little bit more complex when you are dealing with power leds.
     
  15. dannyf

    Well-Known Member

    Sep 13, 2015
    1,767
    357
    A couple examples:

    Sometimes i drive leds directly with a MCU output pin, particularly those 2ma or 4ma varieties.

    Other times, I use a spare opamp to drive leds directly: they typically have a short circuit output current of less than 20ma. And in that regard, those good jfet opamps with an serial output resistor is great for this purpose.
     
  16. ScottWang

    Moderator

    Aug 23, 2012
    4,850
    767
    Did you see what the TS asked for?
    If you don't then going back to the beginning to see it repeat and repeat again.
     
Loading...