Opto coupler not driven by micro controller

Discussion in 'General Electronics Chat' started by Dinesh Vel, Mar 16, 2012.

  1. Dinesh Vel

    Thread Starter New Member

    Mar 16, 2012
    4
    0
    Hi,
    I have generated a square wave of 50Hz using P89V51RD2, since the output is of the order of 5V only, i have connected this to the opto coupler. Where as after given it to the first pin of the opto coupler, when i check the signal from the uC the voltage is only 0.75V, hence iam not getting any output from the opto coupler. iam using MCT2E IC
     
  2. strantor

    AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    The test circuit in the optocoupler datasheet shows a 47ohm resistor in series with the diode of the optocoupler. did you use the resistor? I don't know the output impedance of your microcontroller, but my thinking is that with no current limiting, the diode may be pulling your signal down to it's forward bias voltage.
     
    Dinesh Vel likes this.
  3. jimkeith

    Active Member

    Oct 26, 2011
    539
    99
    Microcontrollers are generally poor at sourcing current.
    Connect the LED emitter in a current sinking arrangement with the cathode of the LED tied to the output pin, and a pull-up resistor connected between the anode of the LED and Vcc. The LED drops about 1.2V--size the pull-up resistor for about 10mA.

    The input also needs a pull-up resistor, but much smaller because the current transfer ratio may be as low as 20%--note that the photo-transistor does not generate current--use 10K or so. Recommend that the detector be connected as a sinking input where the transistor emitter is connected to common and the pull-up resistor is tied from the collector to Vcc. Leave the base pin disconnected as this provides max CTR.

    In this arrangement, there will be no inversion of the detected signal. Good luck!
     
    Dinesh Vel likes this.
  4. Dinesh Vel

    Thread Starter New Member

    Mar 16, 2012
    4
    0
    Dear jimkeith,

    Thanks for ur reply, but it seems little tricky for me to implement. could you pls explain me with a model diagram, it would help me a lot. THANKs in advance.
     
  5. Dinesh Vel

    Thread Starter New Member

    Mar 16, 2012
    4
    0
    [​IMG]

    Actually aim of my project is to drive a MOSFET using a micro controller. Output of my controller is only 0-5V which is insufficient to drive my mosfet as the Gate source voltage range is from 8-12V only. Hence inorder to amplify and isolate the controller and power circuit i have planned to use this optocoupler. i have generated a signal with 12.5kHz sqr wave at 80% duty cycle during positive half cycle of 50Hz wave and a logical zero for the negative half cycle. i need to convert this to a 12V range signal to drive the MOSFET
     
  6. jimkeith

    Active Member

    Oct 26, 2011
    539
    99
    This is the preferred opto-coupler interface circuit.

    You may have to invert some signals to make it work in your program.

    The tick you heard in the relay was likely the initial transition of the output line--to drive heavy capacitance loads and retain tri-state capability, the initial positive transition turns on a very strong source transistor, but it remains on for only one clock cycle--after this, a weak pull-up is supposed to keep the signal level high.

    In this circuit, the pull-up transistors are not required as the output sinking transistors (to common) are much stronger.

    Also, you forgot the back diode that goes across the relay coil--this circulates the inductive current when the transistor turns off thus preventing the voltage from destroying the transistor.
     
Loading...