# LM4040 Grids

i like to quickly hack a grids on perfboard and i actually have everything but the LM4040 5V (hardware wise, i’ll also try to compile the code)
could i also use regulated 5V from a 78L05 or is that too unprecise here as reference voltage?

The 4040 is used to generate -5V (negative)… and its used to get added to the CV Input Mixers as Offset. A 7*9*05 will do.

yeah these little details, sometimes they do matter
thanks!

YOu wouldnt have killed anything with +5V - the CV Mixer just would not have worked

Let us know how it goes!

By the way - if you want to be as smart as Olivier is now (and was kind enough to enlighten me) you can save one resistor for each CV mixer by not feeding the -5V Offset Voltage via the 100k directly to the virtual ground summing point, instead power the oboard Pots with -5V/GND instead of GND/+5V.

cool thanks!

I resurrect this thread sine I’m also hacking a grids on prototype boards these days.
I have some problems with the way LM4040 works and how to calculate the correct load current (IL) in the grids schematics.
As I understand from the data sheet the current through the shunt resistor should typically stay within 0,1 mA and 1 mA.
I you pretend that the 12V supply is stable you can calculate RS with
RS=(12-5)/(ILoad+IQ) > RS=7/(IL+IQ)> RS/7 = 1/(IL+IQ) -> IL+IQ = 7/RS
In Grids RS is 10kOhm -> IL+IQ= 0,7 mA which looks good.
What confuses me are IL or specifically RL:
RL = 5V/0,7mA =7113Ohm
As I can see from the schematics there is 6 parallell 200kOhm (when pots are GND) = 33kOhm

I’m probably way off on these calculations, please point me in the correct direction.
I would appreciate some calculated RLoad and RShunt values for VS=12V, just so I can verify that my reference diods are not broken.

You’re looking at this, right?

The -5V voltage goes to six 100k resistors to (virtual) ground, that is to say, IL = 6 x 5 / 100k = 0.3mA. Or if you want to think in terms of RL, this is equivalent to six 100k resistors in parallel, that is to say 16.7k

Where does this current come from?

Assuming the 12V rail is stable, we have (12 5) / 10k = 0.7mA flowing through the shunt resistor.

Thus, 0.7 - 0.3 = 0.4mA will flow through the reference. And 0.4e-3 x 5 = 2.0mW of heat will be dissipated by the reference which is way below the maximum rated dissipation.

You can think of it this way: the reference takes an excess of current, supply some of it to the load, and the rest flows through it. It is important not to starve the device (providing through Rs less current than the load will take) - but the opposite (providing through Rs more current than the load will take) is absolutely possible, and that’s kind of the point of using a reference.

You’re wondering why 0.4mA are “wasted” like that. To reduce the waste, I could have used a lower Rs like 22k, which would have given 0.32mA flowing through Rs, 0.3mA through the load and 0.02mA through the reference. But then, what if the PSU regulation is bad and it supplies only -11V? We would starve the reference!

So I usually allow 20 to 30% more current. And I really don’t see the point of picking a specific resistor value just for this one resistor. So if I need 15k and there’s nowhere else in the circuit where I need 15k… then I pick 10k, which is very often used somewhere else. Or sometimes I put two resistors in parallel to get the value I need. Your module will be wasting a few extra tenths of mA, but we don’t have the extra cost and wastage of loading another resistor reel in the pick and place when making the boards.

You’ll often find in the schematics of more recent modules, near the reference, an annotation about the worst case load current.

Thanks! That’s the one I was studying.
I didn’t think about the virtual ground. I just assumed the op input was near infinite and didn’t realize they where “feedbacked”.
I think it’s a typo in the third paragraph (1k instead of 10k).
In forth paragraph I think you mean 0.4e-3 x 5 (0.3mA was the load current?). I doesn’t effect the reasoning anyway…

Hey, it was late night…

All typos fixed!

I slightly related question:
In your schematics you never tell the supply voltages to the op-amps. I connected them to +/- 12 V but realised that they probably should be fed 0V and +5V since t’s rail-to-rail and they connect to the MCU AD-ports (I was breadboarding the analog parts separately)? Is there some way to tell supply voltages from the schematics?
That is probably a source of my problems with the ref voltage and load currents.

Does the datasheet for the part number not state the supply voltages?

Simpler than that: the op-amp supplies are in cell E5/E6 in the Grids schematics.

The supply pins are usually in a corner of the schematics page, with all the bypass capacitors. Unfortunately, in the standard eagle library they do not carry the IC identifier (“IC7” etc…), but I very rarely mix up parts using different supply voltages on the same page.

In the case of Grids, it’s easy to see that the +12V rail is never used: it’s not even connected to the power connector.

Yes. I usually study the data sheets (which says 0 resp. 7V) of new components but in this case I started with a TL072 and just replaced it when my new components arrived. I have only myself to blame that the poor opamp ended up in the graveyard.

I have picked up an old analog electronics book cause I’m not sure how that mixing with the -5V reference works:

• If the pot is grounded, the output of the opamp will be 5V and feed the required current through the feedback resistor to keep the virtual ground at 0V balanced with the ref right?
• If the pot is at +5V it will be canelled by the -5V ref and no feedback current is required hence the output can be low?

It makes sense when I write it down but there are so much that can go wrong, if one of the components fail it will likely burn the other. It makes it hard for me to experiment. Now I also realize it can be a problem if you don’t have a load on the output.

We assume that the op-amp doesn’t clip, hence V+ = V- ; furthermore no enters the op-amp through V-.

Kirchhoff’s current law for V-:

Vpot / 100k + Vcv / 100k + -5 / 100k + Vout / 100k = 0

Thus, Vout = 5 - Vpot - Vcv.

For example, Vout = 0V when the pot is in maximum position ; Vout = 5V when the pot is in minimum position.

Yes. That’s a cleaner explanation.

Anyway, I’ve found the root cause of my problem:
The data sheet http://www.ti.com/lit/ds/symlink/lm4040-n.pdf page 4 looks like the attached image…
… But the NC and cathode are swapped() or TI have a very different kind of “top view” that I’m not aware of.
I have also verified the polarity with the LM4040 mounted on my MI Module tester.
If you look at the bright side, I’ve learned a ton of things meanwhile.