Author Topic: LTSpice Simulation Issues  (Read 10140 times)

0 Members and 1 Guest are viewing this topic.

Offline mettaTopic starter

  • Supporter
  • ****
  • Posts: 12
  • Country: ca
LTSpice Simulation Issues
« on: November 06, 2014, 09:40:00 pm »
Hello!

I have recently come across a pair of vintage analog VU meters, each with a PCB containing what I assume is a buffer amp to drive them from an audio signal. From the schematic I derived (which can be seen below) I am assuming the circuit takes in a differential audio signal and properly formats it for the VU meter's inputs. At the meters' inputs, I measure about 50 kOhms of resistance and applying about 700 mV to the terminals brings the needle to fullscale. This is true for both polarities so I'm thinking there is rectification happening internally.

In an effort to understand how the cross-coupled feedback of the circuit worked, I simulated the circuit in LTSpice, but got rather confusing results. The circuit uses an LF353N op-amp for which Linear states the LT1057 is a drop-in replacement. I tried simulating using that model but get the result shown below. After this I tried using the UniversalOpAmp2 component and got the same results. The output shoots to one of the rails and then slowly drops off without any oscillation.


LTSpice Simulation


LTSpice Schematic

Then I tried simulating the circuit using a Java applet I had found a while back, and for some reason it worked as expected. I don't see a difference between the two simulations so I am assuming that I am missing some initial values for my LTSpice simulation.


Java Applet Simulation

In an effort to compare both simulations accurately, I am observing the entire input signal but only the upper node of the output signal with respect to ground (I can't figure out how to view the differential output with the Java applet). Can anyone spot any funny business with the LTSpice schematic?
 

Offline Lunasix

  • Regular Contributor
  • *
  • Posts: 142
  • Country: fr
Re: LTSpice Simulation Issues
« Reply #1 on: November 06, 2014, 10:08:03 pm »
Schematics are not same ! Negative inputs of amplifiers are not connected at the same place !
« Last Edit: November 06, 2014, 10:10:26 pm by Lunasix »
 

Offline mettaTopic starter

  • Supporter
  • ****
  • Posts: 12
  • Country: ca
Re: LTSpice Simulation Issues
« Reply #2 on: November 06, 2014, 10:17:28 pm »
You're absolutely right! Thanks for pointing that out. When I get home I will check to see which one of the schematics is right.  :bullshit:

Anyone familiar with this circuit configuration? Cursory Google searches have not revealed much.
« Last Edit: November 06, 2014, 10:20:15 pm by metta »
 

Offline Andreas

  • Super Contributor
  • ***
  • Posts: 3303
  • Country: de
Re: LTSpice Simulation Issues
« Reply #3 on: November 06, 2014, 10:23:03 pm »
Hello,

I think the largest problem for spice is the floating voltage at the input.
I would either split R3 in halves and ground the middle.
Or put 2 additional high ohmic resistors around R3 and ground them.

Eventually the parameter "uic" in transient analysis could help also.

With best regards

Andreas
 

Offline mettaTopic starter

  • Supporter
  • ****
  • Posts: 12
  • Country: ca
Re: LTSpice Simulation Issues
« Reply #4 on: November 07, 2014, 01:21:07 am »
Alright, so I've updated the Java applet to have the correct feedback network (negative terminals are after R||C branch):


Updated Java Applet

I am still seeing oscillations so everything still looks good. When I change the input voltage the output slowly changes amplitude so there's a slow transient response with the buffer (expected for a VU meter to not flicker all over the place).

Andreas, here is my attempt at implementing the fixes you mention, however you'll see that my output remains the same. I'm guessing for uic you need some kind of initial conditions? I don't know where I would enter those. Do you have any other ideas?


LTSpice Updated Schematic


LTSpice Updated Output

I've tried letting the LTSpice simulation run for a couple of simulated seconds (5 to be exact) but the output simply decayed to 0 V.


LTSpice 5 Second Simulation
« Last Edit: November 07, 2014, 01:36:23 am by metta »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: LTSpice Simulation Issues
« Reply #5 on: November 07, 2014, 03:42:14 am »
Not sure if this is what you are seeing, but on LTSpice components have an orientation, so check your resistors to make sure current is not going backwards:

http://ltwiki.org/?title=Most_frequently_asked_questions_for_beginners#Why_is_the_current_going_the_wrong_way_in_a_resistor.3F

Don't know how it affects other components.
 

Offline Galaxyrise

  • Frequent Contributor
  • **
  • Posts: 531
  • Country: us
Re: LTSpice Simulation Issues
« Reply #6 on: November 07, 2014, 04:31:25 am »
Even with the mistaken 43F capacitors in the applet, I don't see how it can produce that output with the opamps working across purposes like that.  However, if I flip one of the opamps over so it has positive feedback, then the circuit amplifies the input by about 3x (albeit while oscillating at 2MHz.)  I suggest double-checking your reverse engineering.  (I wouldn't trust that java applet to be the truth.)

I don't know where V(n007) is, but note that the output resistor is also floating, so you'd want to measure across it or give it a ground reference.

(deleted a post where I misread the circuit as being the typical instrumentation amp input stage.)
I am but an egg
 

Offline mettaTopic starter

  • Supporter
  • ****
  • Posts: 12
  • Country: ca
Re: LTSpice Simulation Issues
« Reply #7 on: November 07, 2014, 05:32:08 am »
Even with the mistaken 43F capacitors in the applet, I don't see how it can produce that output with the opamps working across purposes like that.  However, if I flip one of the opamps over so it has positive feedback, then the circuit amplifies the input by about 3x (albeit while oscillating at 2MHz.)  I suggest double-checking your reverse engineering.  (I wouldn't trust that java applet to be the truth.)

Ohh thanks for pointing out the capacitor values, changing them gave me a voltage swing of about ~700 mV with the Java applet which seems to correspond with the VU meter swing. I checked my reverse engineering and both inverting inputs are used for the feedback and both non-inverting inputs are used for the inputs.

Here are pictures of the top of the PCB and another with a superimposed trace pattern. There's a pair of LEDs in parallel at the output which I haven't bothered to put in my simulations since they only appear to be there to clamp the output voltage (I'm still trying to get the output to oscillate in LTSpice). I get the same results with the LEDs in the simulation. I've also omitted the balancing potentiometer as the simulation shouldn't need it due to the ideal nature of the components.


PCB Component Side


PCB with Superimposed Trace

Two pins of the leftmost header are used for traces that went to a light bulb, the next three are for ground and part of a +/-V supply circuit. The right header is used for the differential (?) signal input. Here's a pinout of the dual op-amp IC:


LT1057/LF353N Pinout

I don't know where V(n007) is, but note that the output resistor is also floating, so you'd want to measure across it or give it a ground reference.

It's the top of the output resistance with respect to ground. Looking at the voltage only across the resistor the waveform is identical but doubled since there's the contribution of the lower op-amp. Also, I was mistaken before, the Java applet is indeed providing the voltage across the output resistor.

Not sure if this is what you are seeing, but on LTSpice components have an orientation, so check your resistors to make sure current is not going backwards:

The orientation is only a reference thing. For example, if you're expecting a current to go one way but have the simulation assuming the other, it will show a negative current. It has no impact on the analysis.

Edit: Here's the trace side of the PCB; the superimposed picture had some confusing artifacts from the post-processing.


PCB Trace Side
« Last Edit: November 07, 2014, 05:35:37 am by metta »
 

Offline Lunasix

  • Regular Contributor
  • *
  • Posts: 142
  • Country: fr
Re: LTSpice Simulation Issues
« Reply #8 on: November 07, 2014, 08:57:18 am »
Can you upload the LTSpice file ?
 

Offline LvW

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: de
Re: LTSpice Simulation Issues
« Reply #9 on: November 07, 2014, 09:01:26 am »
Metta - I think both opamps are connected in a loop which realizes also positive feedback. Hence, no surprise that there are oscillations.
« Last Edit: November 07, 2014, 09:03:49 am by LvW »
 

Offline mettaTopic starter

  • Supporter
  • ****
  • Posts: 12
  • Country: ca
Re: LTSpice Simulation Issues
« Reply #10 on: November 07, 2014, 04:42:44 pm »
Can you upload the LTSpice file ?

I have attached a zipped archive with the LTSpice .asc schematic inside. (I hope this is OK admins!)

Metta - I think both opamps are connected in a loop which realizes also positive feedback. Hence, no surprise that there are oscillations.

Yes, I think I see it - when the voltage on the top half swings positive into the non-inverting input, the bottom half sees the same magnitude of swing but negative. The bottom half's negative amplified output feeds back into the non-inverting input of the top half essentially adding the two together. I guess I need to find out what I have wrong from my reverse engineering or perhaps my assumptions about the input are completely wrong.
 

Offline Rufus

  • Super Contributor
  • ***
  • Posts: 2095
Re: LTSpice Simulation Issues
« Reply #11 on: November 07, 2014, 05:31:30 pm »
I guess I need to find out what I have wrong from my reverse engineering or perhaps my assumptions about the input are completely wrong.

Your circuit is wrong. R6 goes between the output and inverting input of the same op-amp for example.
 

Offline mettaTopic starter

  • Supporter
  • ****
  • Posts: 12
  • Country: ca
Re: LTSpice Simulation Issues
« Reply #12 on: November 07, 2014, 05:39:09 pm »
I guess I need to find out what I have wrong from my reverse engineering or perhaps my assumptions about the input are completely wrong.

Your circuit is wrong. R6 goes between the output and inverting input of the same op-amp for example.

I see it! That makes much more sense, thanks. I'll go over it again.
 

Offline mettaTopic starter

  • Supporter
  • ****
  • Posts: 12
  • Country: ca
Re: LTSpice Simulation Issues
« Reply #13 on: November 07, 2014, 05:49:00 pm »
IT WORKS!!! I can't believe I missed that. Thank you so much Rufus!  :-+


It works!
 

Offline Galaxyrise

  • Frequent Contributor
  • **
  • Posts: 531
  • Country: us
Re: LTSpice Simulation Issues
« Reply #14 on: November 07, 2014, 10:27:01 pm »
And that is the circuit I was expecting it to be, hehe.  Compare with the input stage of the typical three-amp instrumentation amplifier
I am but an egg
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf