Optocouple Question

Discussion in 'General Electronics Chat' started by slysyuk, Aug 28, 2008.

  1. slysyuk

    Thread Starter New Member

    Aug 28, 2008
    3
    0
    Could someone clever help me out.

    I have a 5Vdc signal which needs to switch 24Vdc and two 24Vdc signals that need to switch 5V using an optoisolator.
    The circuit is designed around the 4N33 and although I have read the datasheet and produced the test circuit in the datasheet, I cant seem to get it to switch.

    The 5Vdc feeds the input and 24V is connected to the collector via a 1K resistor, this should produce around 24mA which I feel is too small, so the resistor was changed to 370Ohm to produce around 60mA, but still no joy.

    Ideally it would be great to be able to have an external LED on both the input and output stages to ensure that those signals are present as a visual aid.

    Can anyone offer some advice?

    Thanks so much in advance.

    Sly
     
  2. Externet

    AAC Fanatic!

    Nov 29, 2005
    758
    57
    Hello Sly.
    Optoisolators do need to be fed with proper current limiting resistors, and their inputs from sources capable of supplying the rated current. The data sheet specifies the range of operation
    The output side circuit should observe the current handling capability of the optotransistor, typically cannot drive a relay by themselves, and an extra stage may be needed.

    Some optocouplers have a exposed base connection that can tailor / affect control on the switching parameters.
    Use application notes as clues if you are not succeeding, and as you say, leds in the inputs and outputs will allow to easily tell what is going wrong.
    Miguel
     
  3. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    I guess you burnt the chip because you didnt use a resistor at the input.
    With 5V at the input. according to the datasheet, you should use a 85 ohm resistor to obtain the maximum current at the output.
     
  4. slysyuk

    Thread Starter New Member

    Aug 28, 2008
    3
    0
    Thanks guys,

    OK, I do have a Resistor on the 5V, currently 100Ohm as thats the closest i had.
    I calculated the R = (VCC-Vf)/If
    Where VCC = 5V
    Vf = 1.2V (datasheet)
    If = 60mA (datasheet)

    Am I right in thinking that if the 5V is applied to the LED, then the output should switch so I have the required outut voltage.
    At the moment, it appears to be inverting.
    I was hoping that if 5V is ON, then Output is 24V.

    Does that make sense?
     
  5. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    Yes, you are right the output is inverting.Thus when you have 0 V at the input the output is 24V (almost) and when you have 5 V at the input the output is close to zero.
     
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    If you need the output to be non-inverted, you can use the output to drive the base of an NPN transistor or Darlington transistor; this will then invert the signal a 2nd time, resulting in a non-inverted signal.

    You will need a resistor to limit current through the transistor base, of course - as well as a resistor on the collector - unless a relay's coil will serve as a load. Be sure to use a diode across a relay's coil to absorb the reverse EMF, otherwise your transistor will be subjected to very high voltage peaks which will most likely destroy it.

    You might consider a TIP120 Darlington.
     
  7. mindmapper

    Active Member

    Aug 17, 2008
    34
    0
    It looks like you put in 60mA If to get 60mA Ic (collector current). In the datasheet you can see that the CTR (current transfer ratio) is 500% for the 4N33. If you use 20mA If you can get 100mA Ic witch is fair enough since you limit it to 60mA by the resistor. Its better to use more If than you really need since you will saturate the transistor better in that case.

    If the transistor don't get really saturated, you run the risc of getting to much Pd power dissipation. If you use another transistor to invert the signal, decrease the Ic current through the coupler.
     
  8. rezer

    Member

    Aug 26, 2008
    10
    1
    The 4N33 uses a darlington pair on the detector side. You should have no problem driving a relay with this. Of course, this will depend on what type of relay you are using. Calculate your current requirements based on the ohmic value of the relay coil, assuming Vce saturation. As long as the coil isn't lower than 160Ω, you are fine (Don't forget your flyback diode across the coil!).
    Also, depending on the mfg, the Ic/If ratings may be a little different. For instance:
    QC is rated at 150mA/80mA and Siemans if rated at 125mA/60mA respectively.

    http://www.datasheetcatalog.com/datasheets_pdf/4/N/3/3/4N33.shtml
     
  9. slysyuk

    Thread Starter New Member

    Aug 28, 2008
    3
    0
    Thanks guys for your replies.

    I am right in thinking that in theory the opto should not be inverting or should I be biasing the emitting on the output stage?

    I will try adding and addition NPN to invert the signal too.

    Thanks in advance.
     
  10. mindmapper

    Active Member

    Aug 17, 2008
    34
    0
    The detector in the coupler could be treated like an ordinary transistor. In your case like an darlington bjt.
    If you connect the emitter to gnd and the load on the collector, the signalvoltage will be inverted (common emitter stage).
    If you connect the load on the emitter (between emitter and gnd) and the collector to Vdd, the signalvoltage will not be inverted (common collector stage). The current (Ic) will not be inverted in any case. When you have If you will have Ic.

    Since you do not tell what you really want to do it's hard to tell the best why to do it. You will only get very general advice in that case.
     
Loading...