Connect with us

PC817 circuit not working with relay

Discussion in 'Power Electronics' started by steve_venkat, Oct 29, 2018.

  1. steve_venkat

    steve_venkat

    27
    0
    May 22, 2017
    I'm trying to use PC817 in relay circuit.This is my circuit which I tired the PC817...
    This circuit connected with an PIC16F877A controller for switching operation.I checked the controller output with LED which going to switch the relay.The LED is working fine,but the relay not switching ON,their is no response in relay....If the relay is directly ON by direct supply of +12VDC means working...
    Is this circuit is correct or have to change in something..?
     

    Attached Files:

  2. Harald Kapp

    Harald Kapp Moderator Moderator

    8,686
    1,691
    Nov 17, 2011
    The G2R DC 12V relay requires ~40 mA coil current.
    The LED of the photocoupler is driven by ~3.5 mA (assuming a 5 V drive signal on R6). The PC817 has a min. current transfer ratio (CTR) of 50%. Even if we assume twice that value, the output of the photocoupler will deliver 3.5 mA, not the 40 mA required for the relay.
    You'll have to add a driver stage to boost the current for the relay. Note that the circuit(s) shown here are inverting, sou you'll have to connect the photocoupler from 12 V (instead to ground as in your current circuit) to the base of the driver transistor to ensure correct operation.
     
  3. steve_venkat

    steve_venkat

    27
    0
    May 22, 2017
    Is this circuit is OK with values for resistor...
    I'm going to make an flash light by using this circuit.The light will take nearly 2A,12VDC power.
    If I switched the optocoupler frequently means,any damage will occur to optocoupler..?

    while (1) {
    flash_light= 1;
    DelayMs(50);
    flash_light = 0;
    DelayMs(50);
    }

    this the code for flashing light.
     

    Attached Files:

  4. Harald Kapp

    Harald Kapp Moderator Moderator

    8,686
    1,691
    Nov 17, 2011
    Won't work. The emitter of OK2 needs to be connected to R9, collector of OK2 to 5V.
    In addition is is favorable to add another resistor (e.g. 10 kΩ) from the base of T1 to GND.

    No, but the relay will not last long. Electromechanical relays in general are not meant to be switched rapidly. The datasheet for the GR2 relay states an electrical lifetime of min. 100000 operations. If you switch it 10 times per second (period 100 ms as in your code), this number has been reached after less than 3 hours. Even if the relay is 10 times as good as the minimum value, it will last 30 hours only.

    For this application a solid state relay or a different circuit altogether is better suited.
     
  5. steve_venkat

    steve_venkat

    27
    0
    May 22, 2017
    This is circuit is ok..? Harald Kapp
     

    Attached Files:

  6. Harald Kapp

    Harald Kapp Moderator Moderator

    8,686
    1,691
    Nov 17, 2011
    Basically yes.
    R6 should be 10 kΩ or more, not 1 kΩ.
    And the relay will still not last very long.
     
  7. steve_venkat

    steve_venkat

    27
    0
    May 22, 2017
    Ok
    I will do something for relay..
    Actually the power supply is common for both side of optocoupler....At this condition is it worthy of using optocoupler or shall we use transistor instead of optocoupler..?
     
  8. Harald Kapp

    Harald Kapp Moderator Moderator

    8,686
    1,691
    Nov 17, 2011
    A simple transistor is good enough then.
     
  9. steve_venkat

    steve_venkat

    27
    0
    May 22, 2017
    shall I use CL100 instead of BC547..?
     
  10. Harald Kapp

    Harald Kapp Moderator Moderator

    8,686
    1,691
    Nov 17, 2011
    A BC547 should be good enough.
     
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.