Strange LM312H behavior - Page 1
Forum section: electronics / beginners

author: jchw4
author_rank: Regular Contributor
timestamp: October 15, 2020, 02:23:56 pm
content: I am trying to repair Ronan X85 calibrator and I am puzzled with the strange LM312 behavior.(Judging from date codes, it is from 1981.)I don't have any manuals on it, but I traced voltage output part to be like the attached schematics.So with the given values (approx. 15k is measured, I skipped adjustable part), output is correct "100mV", "1V" and "10V" matching the switch position.The strange thing happens with 100mV range. If I power it up on this range, the output is correct 100mV.But after I switch to 1V and back, the output becomes ~9V instead of expected 100mV!"1V" and "10V" are always correct.I figured out that I can add potentiometer in parallel with R3 to play with different feedback resistor values.The sweet spot seems to be around 630 Ohm. I.e. swiching to the range with feedback resistor > 630 ohm is stable. When it's less than 630 Ohm - I get 9V on the output.630 to 500 is flaky region. 500 seems to always yeld 9V.I verified that OpAmp input (V-) to (V+) is around -8V , i.e. (V-) is 8V greater than (V+), but OpAmp does not regulate.Replacing LM312H with AD OP27 solved the issue.But I am puzzled, is it something known?Also, is OP27 a suitable replacement? (I took it from the analog parts kit that I had.)On the one hand, on the 100mV range fluctuations are around 10s of microvolts. I.e. 100.0mV is stable with my 34401a, output fluctuates around 100.0XXXmV.On the other hand, I expect that there should be cheaper alternatives for the OpAmp from 1981.

author: Kleinstein
author_rank: Super Contributor
timestamp: October 15, 2020, 03:48:32 pm
content: The OP may be oscillating when coming from the 1 V step. So it may need some extra cap at the compensation pin.The OP27 is not a very good replacement. I would more go for something like OP07 or OP177. A DIP version would be good enough, unless high temperatures. A modern replacement (upgrade in many aspects) would be OPA202 - but this is SMD only.

author: jchw4
author_rank: Regular Contributor
timestamp: October 15, 2020, 07:33:32 pm
content: Quote from: Kleinstein on October 15, 2020, 03:48:32 pmDatasheet suggests 1nF capacitor on pin 5. I tried it, but it did not affect the behavior.QuoteSince we are in the beginners section: How do you know that OPA202 is better to be used here? What parameters are important here?

author: David Hess
author_rank: Super Contributor
timestamp: October 15, 2020, 09:34:37 pm
content: The LM312 is an internally compensated LM308, so you could use an LM308 and add external compensation. Modern improved replacements include the LT1008, LT1012, LT1097, and OP97. The LT1008 requires external compensation and the LT1012, LT1097, and OP97 are internally compensated.Other modern parts which could work well include the LT1001 and OP07 and similar precision operational amplifiers because they have input bias currents on the order of the old LM312 and LM308. Faster parts like the OP-27 are not really suitable. Modern precision single supply parts like the LT1006 and OP90 should also be acceptable.The circuit is not really all that demanding but still benefits from a precision part with better offset voltage and input bias current than a general purpose part. I think they over-specified it but the LM312 might be considered that age's "universal" operational amplifier like the LT1097 now.

author: eblc1388
author_rank: Frequent Contributor
timestamp: October 16, 2020, 05:45:25 am
content: Quote from: jchw4 on October 15, 2020, 02:23:56 pmThe Opamp does not regulate because it had latched up. The common cause of this is one of its inputs had momentary exceeded the common mode voltage limit. From your circuit, a -4V input on the LM312H with -6.6V supply is a bit bit too close for comfortable operation. The range switching transience might have caused a violation and resulted in the observed output latch up.I would suggest adding a diode from the (V-)input pin to ground. In normal operation, the voltage across the diode is virtually zero and diode leaking current should not be a concern.

author: jchw4
author_rank: Regular Contributor
timestamp: October 16, 2020, 08:40:18 am
content: Quote from: eblc1388 on October 16, 2020, 05:45:25 amThank you very much! I'll try diode on the weekend.(And google for the opamp lock-up too.)Quote from: David Hess on October 15, 2020, 09:34:37 pmThank you, I'll take a look at it all.

author: jchw4
author_rank: Regular Contributor
timestamp: October 19, 2020, 09:06:26 am
content: Adding diode did not really help, but adding second diode in parallel and in the opposite polarity did helpHere are 4 traces:- "Initial" - Just LM312H- "Diode" - With diode as suggested by eblc1388Quote from: eblc1388 on October 16, 2020, 05:45:25 am- "Two diodes" - With two parallel but opposite polarity diodes (where suggested).- "OP27" - No diodes, just another opamp.Looking at the traces, OP27 does seem to be too fast. I will order some suggested new opamps to try.Another observation is that switching ranges shoots full V+ (and sometimes V-) to output, but I guess this is unavoidable with multilayer mechanical switches.I tried adding capacitors, which did not help. Capacitor to feedback does not help, large electrolytic capactor on the output still overshoots.I guess I need to add some ceramic in parallel, but with mechanical switches this still does not seem to be a solution.Upd: Attached images corrected.

author: jchw4
author_rank: Regular Contributor
timestamp: November 03, 2020, 12:04:54 pm
content: This is interesting. I tried replacing original LM312H with (available on ebay) OP07CP, OP177G.(There also appears OP27, but I only run it through the 100mV range as I am not going to use it there.)For this test I did not add any diodes as suggested above. So this is pure replacement test.100mV range definitely benefit from this replacement. Noise went down from 0.7uV to 0.35uV. Which is great, because it means that it's stable within 1uV and it's 10 times more stable than the built-in 4.1DMM!But on 1V and 10V I don't see much difference.Any ideas on why is it happening? The "Voltage adjust" part is the same in all ranges. The only difference is the feedback resistor used.Is it really "Voltage adjust" noise multiplied by the feedback divider? This "adjust source" is basically LM336 2.5V zener buffered by OpAmp half of LM392N (this is comparator + opamp in a single package).I am tempted to try replace LM392N with just dual OpAmp (comparator part is just for the "battery low" indicator), but as a beginner I don't know which one to try. Any suggestions?Schematics from the first post:

author: Kleinstein
author_rank: Super Contributor
timestamp: November 03, 2020, 12:23:28 pm
content: The OP07, OP177, OP27 already have internal diodes (can be 2 in series) between there inputs.The LM336 2.5 V reference has quite some noise, so I would not be surprised if this noise source dominates for the 1 V and 10 V range. The OP in the LM392 looks like it is similar to 1/2 the LM358, so may also contribute somewhat, but this should be less than the reference itself.The LM336 is still a relatively low grade reference.

author: jchw4
author_rank: Regular Contributor
timestamp: November 03, 2020, 12:33:22 pm
content: Quote from: Kleinstein on November 03, 2020, 12:23:28 pmThis is interesting. I totally missed this in the datasheet!Just re-checked: these diodes are there, but they are only present on the "Simplified schematic" of the chip.As a beginner, I just ignored the chip schematics and diodes are not mentioned in the text.Thank you, I will pay more attention to the datasheetsQuoteAny suggestions for a simple and/or cheap replacement?

author: Kleinstein
author_rank: Super Contributor
timestamp: November 03, 2020, 01:48:04 pm
content: Despite the relatively low cost the LM336 seems to be not so bad. The high grade references tend to be not in a similar shunt regular form for 2.5 V. So it would not be a simple replacement. In addition the modern chips tend to be nearly all SMT. So a simple step up would be more like using a 2 nd LM336 and average- still not really satisfactory.In the old days the LM329 was a good alternative for some 7 V, but it got expensive lately. It would be lower noise, but would need a modified circuit because of the higher voltage.Another point may be shielding the reference from temperature fluctuations.I don't see the conditions (number of samples and rate) for the noise measurement. With more details one may be able to compare to the data-sheet values.

author: jchw4
author_rank: Regular Contributor
timestamp: November 03, 2020, 02:18:06 pm
content: Quote from: Kleinstein on November 03, 2020, 01:48:04 pmSMT is actually interesting. If it's not too large, it can probably be built around smaller boards likehttps://www.digikey.com/en/products/detail/dfrobot/FIT0290/6588424and wired into place.QuoteCONFIGURE:VOLTAGE:DC 100mV,MINVOLTAGE:DC:NPLC 100SENSE:DETECTOR:BANDWIDTH MAXSENSe:ZERO:AUTO ONINPUT:IMPEDANCE:AUTO ONTRIGGER:SOURCE IMMEDIATESAMPLE:COUNT 2015 times: READ?(substitute 100mV for other ranges).So it's 100/60 seconds per measurement (auto-zero doubles this). About 66 seconds for each batch of 20.300 samples in each graph line.Aggregation was done per calendar minute, so first and last points on the graphs are not good.Thermals were a big issueOn my first attempt I just saw a graph of my air conditioner activity.To make it work I fully assembled X85 each time and used "newbee thermal chamber" (Amazon bubble envelope) for the Ronan X85, and another piece of bubble wrap around the 34401A sockets. And a piece of a solid twisted pair as a wire.Going through the 3 ranges took about an hour (and then I disassembled it all to try another OpAmp).So I guess the voltage reference was reasonably thermally stable inside. At least I don't see any noise changes on the graphs.

author: Kleinstein
author_rank: Super Contributor
timestamp: November 03, 2020, 04:46:47 pm
content: So the measurements cover 20 points and thus about one decade in frequency (some 15-150 mHz with low case m).The measured noise level of some 15-20 µV(RMS) at 10 V is about the expected level for the reference.Possible 2.5 V references would be the REF5025 or max6225 or ADR4525. One may have to look for a reasonable temperature coefficient grade for the ref5025.These are series references, thus need a separate supply. At least the voltage would be also nominally 2.5 V. The long term drift may not be better, but the noise should.

author: jchw4
author_rank: Regular Contributor
timestamp: November 04, 2020, 10:21:47 am
content: Ordered some MAX6225. The good thing is that it's also adjustable, could be drop-in replacement (with respect to the form factor).

author: David Hess
author_rank: Super Contributor
timestamp: November 04, 2020, 10:16:01 pm
content: Quote from: jchw4 on November 03, 2020, 12:33:22 pmIt is increasingly common for functional schematics not to be shown. I am looking at you Texas Instruments.QuoteUnfortunately you have to know exactly where to look and the context. The maximum differential input voltage specification indicates if input diodes are present.Quote from: Kleinstein on November 03, 2020, 12:23:28 pmI think reference noise always dominates; at least offhand I do not know of any cases where it did not unless the circuit design was flawed.

author: jchw4
author_rank: Regular Contributor
timestamp: November 08, 2020, 02:07:37 pm
content: Received and tested MAX6225.I added bare MAX6225 instead of LM336, no capacitors were added.(It was pretty easy, I just lifted one end of a resistor to decouple the old path and added one wire to power the reference.)It's very unusual for me to see 10V on 34401a with stable last digit.This is now my most stable voltage source!It's not very adjustable though. It's capable of stable 6.1 digits of voltage, but adjustments are done with per-10% decade switch and 10 turn resistor.So 1 turn is equal to 1% of scale, 3deg = 0.1% of scale, ... If scale is 10.000V, so you can really adjust to 1mv (0.3deg per 1mV). After that you end up with a random number, but it will be very stableIf I could make a new front panel, I would add another 10turn potentiometer. But will see.Thank you everyone who helped!I did not find a thread about this calibrator, so I'll try to sum it all up and create one.