Op-Amp Question/Problem

Discussion in 'The Projects Forum' started by kamzy_98, May 7, 2011.

  1. kamzy_98

    Thread Starter New Member

    Mar 23, 2011
    10
    0
    Hey Guys, I'm new to the forum, I have recently joined but I have always had a browse through the forum when ever I needed help with a circuit or when I was curious about a circuit.

    I have come across this type of OP-AMP circuit and I'm having problems trying to figure out how it works... I have tried books, simulation programs and deriving it, but I can't figure it out. Is this a voltage comparator? Open Loop configuration?

    Circuit 1) First I will show you how I believe it should work.
    Circuit 2) I'll show you the actual circuit.

    Circuit 1) How I think circuit (2) should work...

    Circuit 1 with Vs = 0V LED = ON

    [​IMG]

    I have taken out the resistors from circuit 2 as all they do is:

    -Rth - Limits the current to the LED (In Circuit 1 the current is about 435A, needs to be limited by Rth)
    -R1 and R2 in Circuit 2 create a voltage divider from 15V to get 1.05995V (Vth: Thevenin's equivalent voltage) as I have in Circuit 1.

    Circuit 1 with Vs = 1V LED = OFF

    [​IMG]

    From this I figured that when Vs = 0V, Vout will be -15V, providing -15V for the LED that is revered biased for it to turn on... of course I need a resistor in series because -15V is too much voltage for the LED... In circuit two I did some calculations and managed to get the current to be about 4mA across the LED, which is what I need as well as a 13.8V drop across the resistor (Rth) so that 1.2V is left to turn on the LED. (1.2V is the typical voltage drop across this type of LED Im using).

    Where Rth is the Thevenin's equivalent of R1 and R2.
    and Vcancelouterror in Circuit 1 is Vth, the Thevenin's equivalent voltage.

    where Rth = (R1*R2)/(R1+R2) and Vth = 15V*(R2/R1+R2)

    Vth is the voltage divider rule, and the 15V comes from circuit 2 if you have a look.

    -----------------------------------------------------------------------

    2) What the circuit actually looks like...

    [​IMG]

    One thing I noticed is that I think the voltage drop across this diode is actually about 0.7-0.9V? Where my LED needs about 1.2V... I don't think this matters, what I don't understand is why I'm not getting -15V and 0V at the output any more? :(

    And back to my main question:

    Why doesn't Circuit 1 behave like Circuit 2?

    -----------------------------------------------------------------------

    How I found my R1 and R2 values where using Excel and the above formulas for the Rth and Vth I required which are 3450 Ohms and 1.05995V respectively. Vs is 1.05995 instead of 1V because the 59.95mV comes from the errors of the op-amp (Offset Voltage, I know this offset value seems massive, this is because I am using a special opamp designed for students)

    Vth of 1.05995V I need so that I can cancel the Vs signal of 1.05995V, so that my Vout is 0V.

    I need Rth to be 3450 Ohms because if I have 15V going through the diode then 1.2 will drop across the diode so then I'm left with 13.8V which needs to be dropped across resistor Rth... 13.8V/4mA = 3450 Ohms

    Excel Calculations:
    [​IMG]

    -----------------------------------------------------------------------

    If anything seems unclear please tell me and I will reply and clear up anything I haven't clearly stated... I know sometimes I have trouble explaining things properly. Any positive criticism I am open to

    I thank you guys in advanced and appreciate your time :)

    -Kamil
     
  2. wayneh

    Expert

    Sep 9, 2010
    12,094
    3,033
    Welcome to the AAC forum.

    Please learn how to post your schematics here directly. You'll get a LOT more feedback from folks here if you don't send them away.

    I've taken the liberty of grabbing your files:

    Circuit 1
    circuit1.png

    Circuit 2
    circuit2.png

    Circuit 3
    circuit3.png



    It would also be helpful to limit your post to a few, clear questions. You ask why circuits 1 and 2 behave differently. As far as I can tell, it's the same circuit?
     
    Last edited: May 7, 2011
    kamzy_98 likes this.
  3. Adjuster

    Well-Known Member

    Dec 26, 2010
    2,147
    300
    These appear to be circuit simulations using a very simple model for an amplifier. Most practical op-amps will not be capable of more than tens of milliamps of current output - a few hundred mA might be obtainable with a high current device.

    A current of 435A would not be possible from an ordinary practical amplifier. At this current level, the little 1N4002 1A rated diode shown in the circuit would of course go up in a puff of smoke.
     
    kamzy_98 likes this.
  4. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    Why are you trying to analyze this circuit? What are you actually wanting to accomplish?
     
    kamzy_98 likes this.
  5. kamzy_98

    Thread Starter New Member

    Mar 23, 2011
    10
    0
    Sorry to cause the confusion. I'm not trying to get 435A through the diode eve though thats what it looks like... I've missed out the Rth resistor in the first circuit... ( my appolagise ). I understand how the practical op amp can only give out so much miliamps... Im looking to only get about 4mA through the LED... which I have achieved in circuit 3... but I haven't got the required -15V at the output that I'm looking for.
     
    Last edited: May 7, 2011
  6. kamzy_98

    Thread Starter New Member

    Mar 23, 2011
    10
    0
    Thanks for the feedback and Ill post the pictures directly because I know myself I like it when they are as well, for some reason I couldn't get it to display the way I wanted it, next time I'll have to spend more time with "preview post".

    You are right I have a couple of questions in this thread. What my question really is, is if circuit 1 and 3 are the same...(3 is the same as 2 but Vs=0v like in circuit 1) ... shouldn't I be getting a saturated Vout of -15V when Vs=0V in circuit 3? In circuit 1 Vs=0V and Vout = -15V, which is what I am trying to achieve... In circuit 3 it says I am getting only about -840mV instead of the required -15V. I need more then -840mV so that the LED lights up, I think I need at least -1.2V.

    Hopefully that clears up what I'm trying to ask, what I'm trying to do is when Vs=0V, so that the LED turns on and when Vs=1V the LED must turn off. If anyone still has any questions please ask... I can already see some mistakes I've made with this post hopefully I don't create too much confusion, and thanks for the reply! This is the most help I have gotten from anyone :)
     
  7. kamzy_98

    Thread Starter New Member

    Mar 23, 2011
    10
    0
    I am trying to get circuit 3, like wayne has posted the circuits directly and create a circuit that turns on the LED when Vs=0V and turn off the LED when Vs=1V.

    In circuit 3 I need to include resistors R1 and R2 so that I can create a voltage divder so that I can create a voltage for the negative input of the opamp that matches the positive input voltage, so that I get Vout=0V.

    In other words these are the two states I need my opamp circuit 3 to do:

    State 1:
    • Vs = 1.05995V
    • V- (negative terminal voltage) = 1.05995V

    the two above make Vout = 0V

    Since Vout = 0V, the LED will not have enough voltage to turn on...

    So in state 1 the LED is turned off

    State 2:
    •Vs = 0V
    • V- (negative terminal voltage) = 1.05995V

    Since V- is greater then Vs, Vout = -15V

    Since Vout = - 15V, the LED will have enough voltage to turn on...

    So in state 2 the LED is turned on,

    Thanks again for your reply I appreciate it :)
     
  8. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    There are various ways to do this. You don't need an op amp feedback circuit to do it.
    How much current do you want through your LED?
    What supply voltage(s) do you have available?
     
  9. marshallf3

    Well-Known Member

    Jul 26, 2010
    2,358
    201
    I will assume you're feeding the op amp (at least) +15V and -15V as well as having the common of each supply connected to the common ground of the circuit?
     
  10. kamzy_98

    Thread Starter New Member

    Mar 23, 2011
    10
    0
    I need about 4mA through the LED, my supply voltages are +15V and -15V, the opamp is biased by +15V and -15V. Sorry that I haven't mentioned it.

    Please let me know if I'm on the right track or how I could achieve this with no feedback. Thanks for your help Ron
     
  11. kamzy_98

    Thread Starter New Member

    Mar 23, 2011
    10
    0
    Yes thats correct, sorry for not mentioning that, I understand that if I supply +15V and -15V I should get about Vout(max) = +-13V
     
  12. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    You can do it like this. See attachment.
    What is the source of your 0/1V input signal? If it can provide a little current, you could instead do it with a transistor or two.
    You can use +5V instead of +15V, if that is more convenient. Some resistor values would have to be changed. Come back with questions, if you have any.
     
  13. kamzy_98

    Thread Starter New Member

    Mar 23, 2011
    10
    0
    Thanks Ron, that's just what I needed... I can more or less see how you have calculated the currents and resistor values, if I have any more questions I will ask, thank you for your help :). I understand how the circuit works as well. I will let you know if I have any questions.
     
  14. kamzy_98

    Thread Starter New Member

    Mar 23, 2011
    10
    0
    I think I've got it to work thanks to you guys, I realized I made some mistakes in the circuit 2 schematic, the voltage divider with R1 and R2 give out about 14V not 1V... silly. Now I adjusted the first pole when the signal starts to decay 20dB/decay... so now its shifted so I can use a 1KHz signal instead of the 0/1V DC input which was changed manually by me (very slowly). Now I just need to refine the voltage inputs and outputs...

    When I get some time I'll try go back and correct the circuit and display all the calculations and results so everyone can have a better understanding hopefully.

    Thanks again guys :)
     
  15. wayneh

    Expert

    Sep 9, 2010
    12,094
    3,033
    I'm wondering why you didn't just use a single small transistor for this. A 1v swing in the signal to the base of a transistor is more than enough to turn it on or off. OK, if you lots of op-amps or comparators in your parts box, fine, they're plenty cheap. But you could accomplish this circuit with a single transistor and few resistors. If your signal is extremely high impedance and unable to drive the base of even a small transistor, that would be an answer.
     
  16. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    That was the gist of my remark in post #12:
     
  17. kamzy_98

    Thread Starter New Member

    Mar 23, 2011
    10
    0

    Your right there are much easier ways of doing this like using a transistor or even a simpler op amp circuit like Ron provided... but it's a project for school and they've made it difficult for us for some reason... Thats why Im using the opamp...
     
  18. wayneh

    Expert

    Sep 9, 2010
    12,094
    3,033
    Yup, and it's a good question. I never saw an answer until now, such as it is.
     
  19. kamzy_98

    Thread Starter New Member

    Mar 23, 2011
    10
    0
    I hate to say it but the more time I spend on this question, the harder it gets... I just realised some things wrong with my resistor values for this circuit to work properly... At the moment I don't think I'll have enough time to finish the solution to this circuit. When the mid-semster holidays come I'll try figure it out and post how I figured it out, if I ever do...

    In the end I can get the voltage output I need the only problem is getting calculations to go with it... As soon as I figure it out if I ever do I'll update you guys on how I figured it out.

    Thanks for those who helped, I did figure some things out, but I have realised that I still need to figure out the opamp errors like (offset voltage and current, and bias current errors) and also the feedback variable... which I'm still trying to figure out how feedback looks with a diode in the feedback loop. I'll see how I go and update you guys when I finish.

    Kam
     
Loading...