LM3900 integrator. Help me understand this

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: luketeaford, Joe., lisa, Kent

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1487
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

LM3900 integrator. Help me understand this

Post by devinw1 » Tue Dec 04, 2018 4:36 pm

So I've been trying some ideas with the LM3900 Norton Op Amp and starting simple, I noticed I'm not getting an expected output from LTSpice just using a simple integrator (straight from the datasheet) and feeding it with a square wave, and no matter what I do, the output is just pegged at a diode drop below the positive rail (which I believe is the saturation state for one of these, right?). AFAIK, though, I should be able to tweak the cap value and get a triangle wave output when feeding an integrator with a square, right?

So, am I doing something wrong here, or should I suspect the LTSpice model? I had to download it from the LT yahoo group, but it's the only LM3900 model I could find.

Here's the circuit:
Image

And my (failed?) simulation:
Image

User avatar
cygmu
Super Deluxe Wiggler
Posts: 1510
Joined: Mon Feb 15, 2016 3:33 pm
Location: UK

Post by cygmu » Tue Dec 04, 2018 4:45 pm

I don't know my way around these ICs very well but perhaps the LM359 does not work identically to the LM3900? I'm in for some evening reading now, it seems!

Anyway, the triangle and sawtooth generators in AN-72 on the LM3900 look different: there's also a resistor to the positive supply on the inverting input. Take a look at figures 44 and 45 here:
http://www.ti.com/lit/an/snoa653/snoa653.pdf

User avatar
cygmu
Super Deluxe Wiggler
Posts: 1510
Joined: Mon Feb 15, 2016 3:33 pm
Location: UK

Post by cygmu » Tue Dec 04, 2018 4:50 pm

This looks like a big difference in operation: the LM359 data sheet says
The basic operation of this current mirror is that the current (both DC and AC) flowing into the non-inverting input will force an equal amount of current to flow into the inverting input
The LM3900 if I recall correctly works the other way: current going in to the inverting input is subtracted from that going in to the non-inverting input.

This difference is enough to explain how the integrator circuit in the first post works for a 359, because the current into + is replicated at the - input, which means the voltage across the cap ramps up or down. For an LM3900, if you apply current to the + and nothing to the -, the output will just saturate high as you're seeing.

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1487
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Post by devinw1 » Tue Dec 04, 2018 5:05 pm

I should have mentioned I tried the same with LM359 and get a similar result, but the output hangs at about 13.4V. :despair:

The reason I thought this circuit would be a OK test is because they use a very similar circuit in the "big" LM3900 book (http://www.ti.com/lit/an/snoa653/snoa653.pdf) in the staircase circuit, and it doesn't work for me in LTSpice as well.

User avatar
guest
Super Deluxe Wiggler
Posts: 4329
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Tue Dec 04, 2018 5:07 pm

just wanted to say thanks for posting about the 359. i hadnt seen that IC before, and it looks really interesting, with independent in and out bias currents.
openmusiclabs.com

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1487
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Post by devinw1 » Tue Dec 04, 2018 5:13 pm

Similar issue with the LM359 in LTSpice (sorry scale is cut). The voltages have a 1 in front of them:

Image

Beginning to think these models might just be bogus.

User avatar
guest
Super Deluxe Wiggler
Posts: 4329
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Tue Dec 04, 2018 5:34 pm

you need a current into the negative pin as well. and then something to keep it within bounds (some form of DC negative feedback).
openmusiclabs.com

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1487
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Post by devinw1 » Tue Dec 04, 2018 5:37 pm

I wonder why they would neglect that from the datasheet though?

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1487
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Post by devinw1 » Tue Dec 04, 2018 5:44 pm

Hey guest, now we are getting somewhere!:

Image

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1487
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Post by devinw1 » Tue Dec 04, 2018 5:47 pm

Now we're having fun

Image

User avatar
guest
Super Deluxe Wiggler
Posts: 4329
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Tue Dec 04, 2018 6:08 pm

where did you get the non-working schematic from? i cant seem to find it in the copy of the 359 datasheet i have. typically that is used as a staircase generator, as it can only charge in one direction.

due to leakage currents, any pure integrator will eventually saturate without DC feedback.
openmusiclabs.com

User avatar
cygmu
Super Deluxe Wiggler
Posts: 1510
Joined: Mon Feb 15, 2016 3:33 pm
Location: UK

Post by cygmu » Tue Dec 04, 2018 6:26 pm

The non-working integrator schematic is in the app note for the LM359
http://www.ti.com/lit/an/snoa666b/snoa666b.pdf

Looking at that I realise that I misunderstood the material about the input stage, and indeed it seems that the 359 and 3900 have essentially the same input stage, at least at the level of detail of these app notes. So that Figure 4 integrator seems like it is only heading in one direction, as you say.

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1487
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Post by devinw1 » Tue Dec 04, 2018 7:00 pm

guest wrote:where did you get the non-working schematic from? i cant seem to find it in the copy of the 359 datasheet i have. typically that is used as a staircase generator, as it can only charge in one direction.

due to leakage currents, any pure integrator will eventually saturate without DC feedback.
http://www.ti.com/lit/an/snoa653/snoa653.pdf

Page 25&26

User avatar
cygmu
Super Deluxe Wiggler
Posts: 1510
Joined: Mon Feb 15, 2016 3:33 pm
Location: UK

Post by cygmu » Wed Dec 05, 2018 1:47 am

This thread is very interesting to me -- I find these amplifiers fascinating, and they are used a lot in Serge circuits which I spend some time with -- but I'm getting really confused now!
devinw1 wrote:
guest wrote:where did you get the non-working schematic from?
...
http://www.ti.com/lit/an/snoa653/snoa653.pdf

Page 25&26
Those circuits look to me exactly like the ones that are working in your latest simulations, other than the fact you have the LM359 model in there rather than the LM3900. (Do they work with the LM3900 by the way?) They are different to the non-working schematic in your first post.

I am also not sure how the changes you've made to the first circuit differ from my earlier suggestion of connecting a resistor to the positive supply to the inverting input. guest proposed the idea of adding some DC feedback, but I can't see that in the working simulations. It seems reasonable that the simulations might work without that, if its job is just to deal with leakage currents, because they may be zero in the sim.

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1487
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Post by devinw1 » Wed Dec 05, 2018 11:07 am

cygmu wrote:This thread is very interesting to me -- I find these amplifiers fascinating, and they are used a lot in Serge circuits which I spend some time with -- but I'm getting really confused now!
devinw1 wrote:
guest wrote:where did you get the non-working schematic from?
...
http://www.ti.com/lit/an/snoa653/snoa653.pdf

Page 25&26
Those circuits look to me exactly like the ones that are working in your latest simulations, other than the fact you have the LM359 model in there rather than the LM3900. (Do they work with the LM3900 by the way?) They are different to the non-working schematic in your first post.

I am also not sure how the changes you've made to the first circuit differ from my earlier suggestion of connecting a resistor to the positive supply to the inverting input. guest proposed the idea of adding some DC feedback, but I can't see that in the working simulations. It seems reasonable that the simulations might work without that, if its job is just to deal with leakage currents, because they may be zero in the sim.
I can't get the Staircase to work with LM359 either. I played with adding the resistor and V+ to the inverting input on the LM3900 as well on the simple integrator and helped, but didn't behave like the LM359. It was like a square wave with a linear falling edge.

Did you have any specific ideas on how to implement the DC feedback otherwise?

User avatar
cygmu
Super Deluxe Wiggler
Posts: 1510
Joined: Mon Feb 15, 2016 3:33 pm
Location: UK

Post by cygmu » Wed Dec 05, 2018 11:29 am

I suppose what guest means for DC feedback is to put a resistor in parallel with the integrating capacitor, presumably a fairly large one. But for the purposes of the simulations my guess is that this is not what is making a circuit work or not work.

Interesting what you say about the LM3900's behaviour in the integrator setup. Does it make any difference if you experiment with the values of the input resistors? App note 72 refers to "sawtooth" generators which are really skewed triangle generators, where the ramp is much steeper in one direction than the other, determined by the ratio of those resistors. Maybe that is what you are seeing -- a fairly steep ramp up, saturation for a while, and then a slower ramp down, thanks to the resistor ratios.

But I am none the wiser as to why the LM359 would behave differently.

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1487
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Post by devinw1 » Wed Dec 05, 2018 11:30 am

Well, I can get the basic LM3900 stair (fig 47) to work, but I had to add the 2Meg resistor and V+. It doesn't work (in LTSpice land anyway) as pictured in the document:
Image

I'll play with the up/down one some more now that I got this to work

User avatar
MickMad
Learning to Wiggle
Posts: 30
Joined: Fri May 18, 2018 11:40 am
Location: Italy

Post by MickMad » Wed Dec 05, 2018 11:35 am

I suppose that if instead of the direct square wave generator you'd used a Pulse generator with pulse width control you'd get a cool triangle-to-saw waveshaper.

Try using a comparator (or an opamp to act as one) and compare the square wave to a fixed value that you can change with a potentiometer, then feed this signal to the integrator.

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1487
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Post by devinw1 » Wed Dec 05, 2018 11:43 am

Hot diggity! I got it to work! It required the following changes from the document:
-Add 1N914 between - and + of the integrator norton amp
-Add V+ via a 2Meg resistor to - of the integrator norton amp
-Add a .1uF cap before the 30k R1
Makes me wonder, do they even test all these circuits in the datasheet? Or do they just leave stuff out to f**k with you? :despair:

Image

User avatar
cygmu
Super Deluxe Wiggler
Posts: 1510
Joined: Mon Feb 15, 2016 3:33 pm
Location: UK

Post by cygmu » Thu Dec 06, 2018 10:16 am

I came across the LM3900 integrator circuit in use in an envelope generator (employed as an envelope follower) in this Electronotes contribution from 1975
http://www.nicolascollins.com/texts/electronotes.pdf
specifically the section around A3.

It does indeed include DC feedback but not the separate current to the inverting input.

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1487
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Post by devinw1 » Thu Dec 06, 2018 11:40 am

cygmu wrote:I came across the LM3900 integrator circuit in use in an envelope generator (employed as an envelope follower) in this Electronotes contribution from 1975
http://www.nicolascollins.com/texts/electronotes.pdf
specifically the section around A3.

It does indeed include DC feedback but not the separate current to the inverting input.
That's pretty sweet! Interestingly, the descriptor says that A3 is being used as a buffer, not an integrator. But, it surely should act like an integrator!.

Here is that section of the circuit in LTSpice if you feed it a 0 to 5 volt square:

Image

User avatar
cygmu
Super Deluxe Wiggler
Posts: 1510
Joined: Mon Feb 15, 2016 3:33 pm
Location: UK

Post by cygmu » Thu Dec 06, 2018 12:01 pm

Ah, it works in Spice, that's great! I am surprised, after the initial troubles you had above. Maybe the DC feedback is the answer after all? What happens if you take out the 27M resistor?

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1487
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Post by devinw1 » Thu Dec 06, 2018 12:10 pm

cygmu wrote:Ah, it works in Spice, that's great! I am surprised, after the initial troubles you had above. Maybe the DC feedback is the answer after all? What happens if you take out the 27M resistor?
Heh... It rails at 14.something volts just like my other problems. DC feedback indeed. :party:

User avatar
devinw1
Super Deluxe Wiggler
Posts: 1487
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Post by devinw1 » Thu Dec 06, 2018 12:15 pm

You can make it do something similar by adding a current to the (-) pin and choosing the right resistance: :hmm:

Image

User avatar
cygmu
Super Deluxe Wiggler
Posts: 1510
Joined: Mon Feb 15, 2016 3:33 pm
Location: UK

Post by cygmu » Thu Dec 06, 2018 12:25 pm

Hmmm, I now believe the description, that this stage wasn't intended to do much integration but mostly as a buffer. It clearly does do some integration, though. I am not really any closer to understanding these circuits but at least you have some working simulations now!

Post Reply

Return to “Music Tech DIY”