Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Circuit simulation software

  1. Jan 22, 2012 #1
    Hello

    I need to do some simulations before trying to make a real circuit. I was advised to use the free software by Linear Technology. However, it works bad.

    I have a circuit with a couple of operational amplifiers(op-amp). According to the first golden rule, an op-amp should keep equal voltage on both inputs. However, it does not do it. As a result, a simulation data is wrong.

    Can you suggest me another software? Also, Why can it be that the program doesn't work appropriately.

    Thank you, Plantis
     
  2. jcsd
  3. Jan 22, 2012 #2
    Have you considered you set it up wrong?

    Anyway, unless you are ready to spend some money for other circuit simulators, LTspice is the way to go.

    But anyway: Proteus ISIS, TINA, National Instruments mutlisim... These cross my mind.

    Post a circuit schematics, we might see what the problem is.
     
  4. Jan 22, 2012 #3
    You can get a free demo version of OrCAD PSpice, which is in my opinion way better than LTspice.
     
  5. Jan 22, 2012 #4
    Did you remember the most important three words in your golden rule, "with negative feedback"?
     
  6. Jan 22, 2012 #5
    Do you mean that op-amp attempts to make not always makes the voltage difference between the inputs zero?

    Golden rules:
    I. The output attempts to do whatever is necessary to make the voltage difference between the inputs zero.
    II. The inputs draw no current.
     
  7. Jan 22, 2012 #6
    How can output do anything to the input, if there is no feedback, negative in our case? Without feedback, its a comparator...
     
  8. Jan 22, 2012 #7

    jim hardy

    User Avatar
    Science Advisor
    Gold Member

    "an op-amp should keep equal voltage on both inputs. However, it does not do it."

    what Colin is saying is:
    it is the responsibility of the designer to place the op-amp in a circuit that gives it the ability to force its inputs equal.

    if the designer does not succeed at this , the opamp cannot keep them equal, so they will be unequal,
    and more often than not that's the trouble.

    perhaps if you post a drawing of your circuit , somebody here would offer some pointers.

    Linear is a first class outfit. i doubt they have bad software.

    when building real circuits ,,,
    it is normal to have difficulty when starting out.

    at first it doesn't work at all,
    then you get it working halfway,
    then you get it you think right,
    then you find some things you misunderstood or overlooked,
    then you get it working great.
    then you figure out how to make it better yet.

    if world of simulation is similar, i'd say that's good.

    second rule: Never give up.
     
  9. Jan 22, 2012 #8
    You can find scheme and simulation attached. Thank you

    Simulation.jpg - Voltage for point A and B(inputs for U2 op-amp)
    pdf file - scheme

    Plantis
     

    Attached Files:

  10. Jan 22, 2012 #9

    jim hardy

    User Avatar
    Science Advisor
    Gold Member

    okay now experiment a little, to gather some observable symptoms for your troubleshooting..


    first thing i'd try is set R5 and R6 both to 100 meg-ohms(1e8) and see if it changes output (it should)

    easier done with simulator than soldering iron for you, but not for me....
    i dont even understand those arguments of SINE(?).

    the bright young fellows here will get you going i'm sure.

    over and out
     
    Last edited: Jan 22, 2012
  11. Jan 22, 2012 #10

    vk6kro

    User Avatar
    Science Advisor

    The opamps shown have very low gain because of the low feedback resistor sizes.

    Gains are 0.01 or 1/100 and 0.0005 or 1/2000. This would be why it isn't working very well.

    The feedback resistors need to be higher and you might start with 100K resistors or higher.
     
  12. Jan 22, 2012 #11

    jim hardy

    User Avatar
    Science Advisor
    Gold Member

    make it work DC-wise first ?

    what must U1's output be to force his -in equal to +in?

    can he develop that across R6?
    if not, designer has failed to surround U6 with a circuit that lets him force his inputs equal.

    oops - out.
     
  13. Jan 22, 2012 #12

    vk6kro

    User Avatar
    Science Advisor

    It has a lot of problems at present, but first, the feedback resistors need to be reasonable.

    Then there is the effect of two large voltage sources, V4 and V2 in the input circuitry.
     
  14. Jan 22, 2012 #13
    The one thing that bothered me was that. That 50 Ohm resistor in feedback, too small. But I thought "oh what do I know" :D

    The standard 741 op amp can give out 20 mA if I recall. If he did put that 50 ohm resistor in feedback, wouldn't op amp fry? Not to mention that 100 Ohm resistor. Am I any close to right here?
     
  15. Jan 22, 2012 #14

    jim hardy

    User Avatar
    Science Advisor
    Gold Member

    ""Am I any close to right here?""

    i think so...
    but remember how voltage follower works.
     
  16. Jan 22, 2012 #15
    Yes, true but voltage follower, has "-" lead connected only to output, and no current flows through that wire (- to output)[only offset currents]. Right? His configuration is a diff amp, and the first one is inverter(I think).
     
  17. Jan 22, 2012 #16

    jim hardy

    User Avatar
    Science Advisor
    Gold Member

    ""but voltage follower, has "-" lead connected only to output, and no current flows through that wire (- to output)[only offset currents]. Right?""

    correct.

    i plod one step at a time...

    i'm focused on U1, trying to get it working as an opamp (i.e. able to make its inputs equal) for DC.
    since the current source is a sinewave it'll have zero DC component
    and not much DC can come in through R4 because it's so large compared to R2


    so in you mind's eye open(or remove) that wire from R4 to U1 - what would be DC voltages at both inputs of U1 then, were U1 working as an opamp?
     
    Last edited: Jan 22, 2012
  18. Jan 22, 2012 #17

    vk6kro

    User Avatar
    Science Advisor

    The feedback resistors are important because they control the possible gain of the opamps.
    They could also overload the opamps but usually these are well protected internally, so they would not be damaged.

    This circuit needs to be got going one section at a time. At present, it has no chance of working and a change of simulator isn't going to fix that.

    I have tried a couple of other simulators, but LTSpice is excellent. I find it very easy to use and it seems to give good results.
     
  19. Jan 22, 2012 #18

    jim hardy

    User Avatar
    Science Advisor
    Gold Member

    i think it'd work if R6 were clipped out, or value increased .

    R6 loads U1 opamp to point it cant make feedback to balance V2
    which lets V4 push U2's output negative...

    do you suppose simulation models that?

    i was hoping OP would try it out.

    but i dont know what those numbers inside SINE(?) argument mean.

    teacher pulled a sneaky trick with those diodes, they're both reverse biased unless the sinewave is pretty big..
     
    Last edited: Jan 22, 2012
  20. Jan 22, 2012 #19

    vk6kro

    User Avatar
    Science Advisor

    I wouldn't worry too much about R6. The opamp type is not given, so we assume the opamp can cope with a 100 ohm load.

    Assume that the output of U1 was -15 volts, follow the path R3, R4, R2, and R6. Because of V4 there will be about 0 volts on the input of U2. So it could work like that.

    The sinewave is ZERO cycles of 500 Hz sinewave of amplitude 1 mV peak and a DC offset of 10 mV.

    I would set the number of sinewaves to 5000, increase the top feedback resistor to 33 K and try it.
     
  21. Jan 23, 2012 #20

    jim hardy

    User Avatar
    Science Advisor
    Gold Member

    ""The sinewave is ZERO cycles of 500 Hz sinewave of amplitude 1 mV peak and a DC offset of 10 mV.""

    perhaps not mv but ma? I took that symbol to be a current source... else it shorts out the cap and resistor in parallel with it.
     
  22. Jan 23, 2012 #21

    vk6kro

    User Avatar
    Science Advisor

    Yes, that would be right. It is probably a printout from a screen dump, and the symbols are correct for current.

    Which raises a new question. 1 mA through 100 K is 100 volts. Maybe Plantis could confirm or deny this.
     
  23. Jan 23, 2012 #22

    jim hardy

    User Avatar
    Science Advisor
    Gold Member

    Thanks v6 !!!

    i'd like to confirm my DC analysis of it, then add in the AC signal.

    let us for a moment turn the current sources to zero, they are AC anyhow(sine should have no DC ?)
    and take your idea that the opamp has a lot of output capability . maybe it's an LM12 which is about like a 741 except it'll deliver 8 amps.

    starting at U1: input + is held at negative 10 by V2(i think i see a minus sign there)
    so U1 forces his input - to negative ten
    hold that thought

    U2 input + is at zero because it's tied to common
    so U2 forces his input- to zero

    above conditions establish 10 volts across R4
    so 100 microamps flow into U1's summing junction through R4
    D2 is reverse biased and we temporarily set current source I3 to zero,
    so that 100 microamps must leave summing junction through R2,
    100 microamps X 50 ohms is 5 millivolts
    which means U1's output voltage is more negative than his summing junction by 5 millivolts, for negative 10.005 volts?...

    next;
    U2's summing junction has 100 microamps leaving through R4
    and 150 microamps entering through R3
    and D1 is reverse biased and I1 is zero
    which means 50 microamps must leave summiing junction through R1
    which means U2 output is 50 microamps X 1k ohm = 50 millivolts, negative.

    now we can turn on the AC current sources and see what is output.

    Since U2 locks his summing junction at constant voltage, zero,
    and U1 locks his summing junction at ten volts ,
    there can be no AC voltage across R4
    so allof I3's AC current must flow out of summing junction through R2

    which means the output of U1 is : -10.005 - (50 X I3) volts
    where I3 is that sine function current

    I3's AC current will flow into U2's summing junction and get added to I1's AC current
    and their sum will leave through R1
    so U2's output will be: -0.05 - 1000 X (I1 + I3) volts

    if the simulation isn't doing this
    then something isn't set right.

    that's why i'd raise R6 to see if it's the opamp model running out of drive,

    and set the current sources to zero (and make sure they're current sources not voltage sources or replace them with thevenin equivalents)
    Note that if they're modeled as voltage sources then both summing junctions are locked at fixed voltages and it cannot work - ability for opamp to force inputs equal is not there so golden rule was violated.

    i usually drop signs and reverse thinking in these exercises.

    i hope Plantis checks out our thought process..

    sound logical?

    old jim
     
    Last edited: Jan 23, 2012
  24. Jan 23, 2012 #23

    jim hardy

    User Avatar
    Science Advisor
    Gold Member

    and i already see one sign reversal

    I3 into U2 summing junction comes out negative end of I3 current source so probably it should be differenced instead of summed with I1.

    ohh the joys of getting old...
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook




Loading...