Circuit analysis with LDR

Discussion in 'Homework Help' started by PsySc0rpi0n, Sep 30, 2015.

  1. PsySc0rpi0n

    Thread Starter Well-Known Member

    Mar 4, 2014
    1,184
    3
    Hi everyone...

    I'm trying to analyse a simple circuit with an LDR but replacing the LDR by 2 resistance values to simulate the bright light and the absence of light!

    We have the following:
    Vcc = 12V
    Rb1 = 10KΩ
    Rb2 = 400Ω or 1MΩ (from the datasheet of an NORP-12 LDR)
    BJT -> BS170, hFE = 200
    VLed = 1.8V
    Rc = ??? for Ic max = 20mA

    I've calculated Rc for Ic max = 20mA and I got Rc = 510Ω by means of Vce = 0.

    So:
    12 = 20*Rc + 1.8 + Vce
    Rc = 510Ω

    Then I've simplified the circuit by means of replacing Rb1 and Rb2 for their equivalent as:

    For Rb2 = 1MΩ
    Rb = Rb1*Rb2/(Rb1 + Rb2) = 9.901kΩ

    and

    Vbb = 1MΩ*12/1,01MΩ = 11.88V

    From here I can check if the transistor is on the active region or not by checking if Ib = Ic/hFE, which is not because if I assume that the transistor is on the active region, Vbe ≈ 0.66V and Ib = (Vbb - Vbe)/Rb = 1.13mA. But Ib = Ic/hFE = 20/200 = 100μA.

    So I think I can assume that the transistor is on the ohmic/triode region and use the net equations to find Vbe... Am I correct???

    If so, I could try to do the following:

    -Vbb + Rb*Ib + Vbe = 0
    Vbe = Vbb-Rb*Ib

    How am I going to find Ib and Vbe if there is no relationship between Ib and Ic and Vbe may not be ≈0.66V????

    LTSpice confirms my Ib = 1.13mA and Ic = 20mA...
     
  2. MrAl

    Well-Known Member

    Jun 17, 2014
    2,433
    490
    Hi,

    I am not 100 percent sure what you are looking for, but to see if the transistor is in the active region you can measure the output voltage. If you have a common emitter circuit then you can measure the collector voltage, and if it is somewhere between about 1v and Vcc-1v then you can assume you are in the active region. If it is around Vcc/2 it must be in the active region for example.

    Be aware that the Beta of the transistor changes with current and with temperature. It's a little unusual the way this works. That means the Beta can change as you bias it more or bias it less.
     
  3. dannyf

    Well-Known Member

    Sep 13, 2015
    1,810
    362
    Two cases:

    1) Rb2=400ohm:

    The voltage drop over Rb2 would be so small (the voltage across the b-e junction would be 1.2ma * 400 = 500mv < 670mv to turn on the npn - it is actually not that simple). So you can assume Ib=0 and Ic=0.

    2) Rb2=1Mohm:

    The voltage will be all on Rb2/Vbe so Ib = (12-0.7)/10k=1.2ma. The npn will be fully on and Rc=(12-1.8)/20ma = 500ohm to achieve 20ma Ic. effective beta for the transistor = 20ma/1.2ma<20x < 400 so we are good.

    *in case 1 (Rb2=400ohm), the voltage across Rb2 is fairly close to the level to turn on the transistor - so the assumption made earlier may not be a good one, for some devices or at high temperatures.
     
  4. PsySc0rpi0n

    Thread Starter Well-Known Member

    Mar 4, 2014
    1,184
    3

    Don't need to attend to all those details. This is in an academic context, so, we ignore many details to keep the problems simple and the math not too complex!

    The point that I was missing is that Vbe is roughly the same for Active and Saturation region! Having this in mind, it's easy! I guess!
     
  5. PsySc0rpi0n

    Thread Starter Well-Known Member

    Mar 4, 2014
    1,184
    3

    Why you say that the current through B-E junction would be 1.2mA for Rb2 = 400Ω?


    Edited;
    Forget it, I got it! Vbb/Rbb = (400*12/10400)/(1M*400/(1M+400)) = 1.2mA
     
  6. dannyf

    Well-Known Member

    Sep 13, 2015
    1,810
    362
    I didn't say that -> I actually said the exact opposite.
     
  7. dannyf

    Well-Known Member

    Sep 13, 2015
    1,810
    362
    A much more interesting and much more difficult case would be if Rb2 = 500 - 600ohm. This is where the transistor starts to conduct.
     
  8. dannyf

    Well-Known Member

    Sep 13, 2015
    1,810
    362
    No. 12v/(10k+400) = 1.2ma.
     
  9. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,503
    380
    hi Psy,
    Consider this option for your simulation.
    E
     
  10. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    If you are going to use LTSpice to analyize a circuit like this, you might as well learn how to do it. Here is your circuit, but I changed the method of analysis.

    Here I am using the .DC method to ask about voltages and currents (not .TRAN, because that is for situations where things change rapidly with time).

    Second, it seems you would like to know at what LDR resistance the transistor begins to turn on, and at what LDR resistance it is fully turned on, so I make the LDR resistance the independent variable of the simulation. Perhaps you would like to plot V(base) and I(D1) as a function of LDR resistance, so I show how to do that.

    It is most useful to show the varying LDR resistance on a log plot, so I show that, too.

    led.gif

    Note the use of the cursors to show the onset of turn-on and fully-turned on points.
    Note that with this LTSpice setup, you can instantly answer the question: at what LDR resistance does the LED turn on?

    ps. Might have guessed that Eric would say essentially the same thing. Great minds think alike...
     
  11. PsySc0rpi0n

    Thread Starter Well-Known Member

    Mar 4, 2014
    1,184
    3
    How's that? Isn't the voltage at the upper terminal of Rb2 the voltage divider between Rb1 and Rb2 using Vcc voltage??? Which is 400*12/10400 = 0.462V

    Then Ib = (Vbb-Vbe)/Rbb = (11.88-0.66)/9.901 = 1.133mA which matches LTSpice value!
     
  12. PsySc0rpi0n

    Thread Starter Well-Known Member

    Mar 4, 2014
    1,184
    3
    EricGibbs and MikeLL, I appreciate your efforts but my goal is just confirm the values I'm calculating!

    I would need to know the oct and dec options you use on you sims to understand what is going on!
    I can take a look but I don't want to waste to much time with LTSpice details! Just want to confirm calcs!


    Edited;
    Ok, I think I got the point... MikeLL plot looks pretty nice and intuitive! I need to look better to Mr. EricGibbs plot!

    I can understand that I don't need to go as high as 1MΩ to check that the LED is already ON, in fact at around ≈720Ω of resistance, the LED reaches the maximum current allowed by Rc of 510Ω. Also Vbe reaches a steady point and is roughly constant at about 760mV.
     
    Last edited: Sep 30, 2015
  13. PsySc0rpi0n

    Thread Starter Well-Known Member

    Mar 4, 2014
    1,184
    3
    I just want to know one more thing about the simulation options.

    what is the difference between .step dec and .step oct?? What is the difference in terms of plot????
     
  14. Jony130

    AAC Fanatic!

    Feb 17, 2009
    3,957
    1,097
    But BS170 is a N channel MOSFET not a BJT.
     
  15. PsySc0rpi0n

    Thread Starter Well-Known Member

    Mar 4, 2014
    1,184
    3
    If I talked about mosfets, I was wrong... It's an 2N2222... Sorry if I misinformed you guys!
     
  16. PsySc0rpi0n

    Thread Starter Well-Known Member

    Mar 4, 2014
    1,184
    3

    What about this?
     
  17. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,503
    380
    LTS Help file.
    upload_2015-9-30_15-42-59.png
     
  18. MrAl

    Well-Known Member

    Jun 17, 2014
    2,433
    490
    Hi,

    Oh really? Well this wasnt in the homework section so i didnt want to assume anything.

    Strictly speaking, Vbe can only be calculated using the exponential diode formula. I dont think we want to get into that yet however. Vbg (voltage from base to ground) is a different story though.

    If you want to assume a constant beta that's ok too, or just design the circuit so it is forced to stay lower than the lowest beta to be expected from that particular transistor part number.
     
  19. PsySc0rpi0n

    Thread Starter Well-Known Member

    Mar 4, 2014
    1,184
    3
    I don't know what is "per octave"...

    Also I'm not sure if "step logarithmically from 1 to 20" means 10^0, then 10^1 and finally 10^1.301???
     
  20. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    .step oct PsySc 1 64 2 would make the parameter PsySc take on values of 1, 1.414, 2, 2.828, 4,..., 45.26, 64. The 2 means 2 steps per octave, starting at 1, ending at 64.

    .step dec PsySc 1 1000 2 would make the parameter PsySc take on values of 1, 3.1622, 10, 31.622, 100, 316.22, 1000. The 2 means 2 steps per decade, starting at 1, ending at 1000.

    When you plot, you can elect to make either the X-axis or Y-axis log or linear.

    Once the plot is up, you can elect to add none, one, or two cursors.

    The main point I wanted to show you is that a .DC analysis is much more useful than a .TRAN analysis in this case...
     
Loading...