Using optocouplers

Discussion in 'General Electronics Chat' started by Dritech, Jan 12, 2014.

  1. Dritech

    Thread Starter Well-Known Member

    Sep 21, 2011
    756
    5
    Hi,

    I decided to use the HCPL2631 optocoupler to isolate PWM signal. I went for this IC since it has a small propagation delay. Can I use this opto with only two resistors (one with the LED and one with the colector) ?? the datasheet shows this IC connected to a capacitor and some other components. Is it safe not to use them?

    Datasheet:
    http://www.fairchildsemi.com/ds/6N/6N137.pdf
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    The capacitor shown in the datasheet is a bypass capacitor. It is needed for stability of the output. If not used the output may not be stable but oscillating. So yes include the bypass capacitor by all means.
     
  3. crutschow

    Expert

    Mar 14, 2008
    13,000
    3,229
    It's "safe" not to use the bypass capacitor but the circuit may not work properly. Is adding that capacitor a problem? What components beside this capacitor are you referring too?
     
  4. Dritech

    Thread Starter Well-Known Member

    Sep 21, 2011
    756
    5
    Thanks for the replies.

    I was referring the the other capacitor (CL).
    What is the purpose of capacitor CL please? and is it connected to pin 6 or in series with RL?
     
  5. #12

    Expert

    Nov 30, 2010
    16,261
    6,770
    CL is a parasitic capacitance on the circuit board. You don't install it, you wish it wasn't there.:p
     
    Dritech likes this.
  6. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    That cap is drawn in the schematic to illustrate parasitic capacitance and should not be included as a component https://www.google.com/search?q=parasitic+capacitance :rolleyes:
    You always will have more less of parasitic capacitance in any circuit. In low speed electronics it is often overlooked. But in high speed electronics you design to avoid so much of it as you can
     
    Dritech likes this.
  7. Dritech

    Thread Starter Well-Known Member

    Sep 21, 2011
    756
    5
    Another quick question.

    The opto-isolator will be connected to the IN of the H-bridge. The datasheet of the H-bridge states that a 10Kohms resistor should be connected to the IN pin to protect from excess currents. If I leave the 10Kohms together with the 350ohms resistor which is connected to the opto collector, will it affect the periodic time? Should I remove the 10Kohms resistor?
     
  8. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    It is best you provide more info here I guess
     
  9. ian field

    Distinguished Member

    Oct 27, 2012
    4,413
    782
    Can you post a schematic?

    The PWM signal I'm thinking of would take violent exception to a logic level opto in the feedback path.

    If its for primary/secondary isolation; choosing a part with the appropriate safety certification should be your first consideration.
     
  10. Dritech

    Thread Starter Well-Known Member

    Sep 21, 2011
    756
    5
    Hi,

    Thanks for the replies. I think I managed to sort that out, but I am still not sure about the resistor value I selected.
    Assuming that a pull-up resistor is connected as shown in the figure attached. The datasheet states that with the resistor value of 350ohms, one will get the maximum switching speed.
    Now my question is: is a 350ohms resistor big enough to provide resistance between the positive supply and the ground when the optoisolator is on?
     
    Last edited: Jan 14, 2014
  11. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    In your drawing. Then the opto LED is on. The microcontroller input will be pulled low. The voltage on the controller input pin will be equal to the transistor collector emitter voltage. Around 0.2 volt I will guess.
     
  12. #12

    Expert

    Nov 30, 2010
    16,261
    6,770
    I think you're looking at an over voltage protection specification. For any input pin, a certain small amount of current is needed to register the state of the input signal. For input voltages outside the range of common to the Vdd for the chip, excess voltage MUST be dissipated by shunting current to ground or into the Vdd supply. The chip has internal diodes to stop the voltage being outside the operating range of the chip but they have a current limit. For instance, you could apply 12 volts to the input of a 3 volt MPU if and only if you have 10k in series with that voltage to limit the shunted current to less than 1 ma.
     
  13. Dritech

    Thread Starter Well-Known Member

    Sep 21, 2011
    756
    5
    Thanks for the information provided.
    If the voltage at the input of the optoisolation is varying from 0V to 5V, but I only want the OPTO to be active when the voltage is above 4V. Shell I use a zener diode or is there another method to achieve this?
     
    Last edited: Jan 14, 2014
  14. Dritech

    Thread Starter Well-Known Member

    Sep 21, 2011
    756
    5
    I did some research and apparently a zener diode let voltage below its value pass, so it will not work for this application. Is there a single component which can archive this?
    I know that I can use a voltage comparator, but I would prefer a smaller/simpler component.
     
  15. #12

    Expert

    Nov 30, 2010
    16,261
    6,770
    The LED already has a breakover voltage around 2.1V doesn't it? Add some 1N4004's in series with the LED and watch until you are demanding 4 volts for the breakover point. (I don't think you can buy zeners under 2 volts.) Then reduce the series resistor so the last 1 volt or .8 volts or whatever you have left throws the right current through the LED.
     
  16. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    What will be driving the LED on the opto. And also what is your motivation behind the 4 volt threshold. It could be that you over-think this ;)
     
    Last edited: Jan 15, 2014
  17. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,786
    1,103
    You don't normally need to worry about the voltage for driving the opto LED. Design to control the LED current.
     
  18. Dritech

    Thread Starter Well-Known Member

    Sep 21, 2011
    756
    5
    So basically I am using a motor driver IC which has a pin for sensing current in the load. This same pin goes to 5V when a fault occurs.
    Now I am not going to use the pin for the current sensing but for the fault flag function only.
    With the pin I am going to connect an OPTO which will drive another component when the pin goes to 5V (i.e. fault detected).
    Since the same pin is used for current sense, the voltage varies from 0V to approx. 3V. This will cause the LED of the OPTO to turn on. For this reason I want to set a threshold of 4V. This way, the LED ignores the current sense voltage and only goes high when the fault flag is active.

    I know that the best option is to use a voltage comparator, buy I would prefer a smaller and more basic component if possible.
     
  19. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,786
    1,103
    A 3.3V zener diode should do the trick, like this:-
     
  20. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    If the Vcc=5V, the request threshold voltage is 4V then 3.3V + Vf_LED + V_47Ω =?
     
Loading...