Can't Control the Base Current in optoIsolator - PIC16F877A

Discussion in 'Embedded Systems and Microcontrollers' started by Tajiknomi, Jan 6, 2016.

  1. Tajiknomi

    Thread Starter Member

    Mar 18, 2010
    29
    0
    Its my first time of using optoIsolator. I have connected a PIC MCU to Control the External DC motor through it.
    The problem is; I am not able to control the Base current ! I don't know the Current Gain in OptoIsolator, i have somehow used transistors in the past.

    So I have calculated the input current via --> [(Input-1.7(led))/130] = 25.3mA.
    Now i am not able to guess the current at output Emitter of OptoIsolator. It gives me very less current (0.03mA) at the output. Its too low.

    I have attached the Snapshot of the circuit herwith.
    [​IMG]
     
  2. sailorjoe

    Member

    Jun 4, 2013
    361
    63
  3. crutschow

    Expert

    Mar 14, 2008
    12,993
    3,227
    The output of the opto feeds the base of an emitter follower transistor, whose base current equals the emitter current divided by the transistor current gain.
    Assuming the transistor emitter voltage is about 12V when the opto is on, this gives an emitter current of 6ma.
    Dividing the emitter current by the measured base current gives a transistor gain of 6mA/.03mA = 200 which is a high but reasonable gain for the transistor.
    So there's nothing wrong with the circuit.
     
  4. Tajiknomi

    Thread Starter Member

    Mar 18, 2010
    29
    0
    The Problem isn't with the 2nd transistor, It works fine, But why do the Opto gives me such a low current ?
    I was anticipating the high current so that it can be further be increased Beta times (by the second transistor) to drive the DC motor.

    25.3mA (Opto Input) > 0.03mA (Opto O/P)
    I was expecting optoIsolator to be increasing the current NOT to decrease it by 99.88%
     
  5. Jony130

    AAC Fanatic!

    Feb 17, 2009
    3,957
    1,097
    The answer is simple R3 resistor limits the current.
     
    Tajiknomi likes this.
  6. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    I will using the circuit as below, the current for motor is 100 mA, if you want some more, then you can decrease the value of R3, R2 is providing a quick stop for the motor.

    If the motor could afford 14V then you just shorted the D1 and D2, D3 used to protecting the motor from emf.

    PIC16F877A_PhotoCoupler_Motor_ScottWang.gif
     
  7. dannyf

    Well-Known Member

    Sep 13, 2015
    1,775
    360
    Because it is incorrectly designed -> put the 2k resistor in the base.
     
  8. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,647
    759
    Hola Tajiknomi,

    Just for me to know: do you intend to control (I mean, adjust it) the current through the motor or you simply want switch it ON / OFF?

    By the way, what simulation software is that? Most of the drawings I run across, they look weird. Not enough straight lines available? :)

    Last time I had to use a 6-V relay with 9V, instead of using diodes as ScottWang is proposing (I like that) I calculated the resistor needed to create the necessary 3V drop.
     
  9. Tajiknomi

    Thread Starter Member

    Mar 18, 2010
    29
    0
    Thanks for your kind replies. It helped.

    I often works on micro controllers but what trouble me most is ---> "Circuit Designing". I often can't able to design a circuit for specific currents. I have read Circuit analysis, But i will go through this again.

    If anyone can provide me OR Suggest me a good materiel which can help me to improve my knowledge in circuit designing. I will be very thankful.
     
Loading...