LM317 with external voltage reference. What's the benefit? - Page 1
Forum section: electronics / beginners

author: tverbeure
author_rank: Regular Contributor
timestamp: June 29, 2023, 07:03:52 am
content: I'm looking at the schematic of a frequency reference.The frequency reference has an MC1403 voltage reference that's use for two things:1. create the voltage for the frequency control of an OCXO. Standard stuff.2. used in a control loop that creates the adjustment voltage of an LM317 that's used to generate the 5V power supplyAn LM317 regulates VOUT so that there's a voltage drop of 1.25V between VOUT and ADJ. Usually, there's 2 resistors (R11 and R10), that form a voltage divider to ground.In this circuit however, the voltage divider is connected to the output of an opamp that has the external voltage reference as one of its inputs. The designers wanted to be able to trim the 5V exactly right. But instead of having a trim pot on one of the regular resistors, they're trimming the voltage on the other input of the opamp.I understand how the circuit works, but I don't understand the benefits of involving the external reference in the control loop?Is there maybe a good reason to have constant values in the voltage divider?(Full schematic attached..)

author: Kleinstein
author_rank: Super Contributor
timestamp: June 29, 2023, 07:11:45 am
content: The LM317 naturally gets hot when there is significant current drawn. So there will be relatively much change in the voltage from warm up. Because of the relatively low current (part of the sense pin Current) for the actual reference inside the LM317 is also a bit noisy.In the circuit the LM317 is kind of used as a protected transistor to provide the current limit and thermal shut down.

author: tverbeure
author_rank: Regular Contributor
timestamp: June 29, 2023, 07:18:40 am
content: Quote from: Kleinstein on June 29, 2023, 07:11:45 amIf I understand your comment correctly, this circuit make the output voltage independent from temperature induced changes of the LM317 1.25V reference? I didn't think that was the case.

author: Kleinstein
author_rank: Super Contributor
timestamp: June 29, 2023, 07:25:35 am
content: Yes the circuit is idependet of the 1.25 V internal reference inside the LM317. The relevant DC feedback path is via R6, R4 and U1A.Also the resistors R10 + R11 are not that critical. They still help with the AC response, stability against oscillation. The LM317 is still doing the fast part of the regulation.

author: tverbeure
author_rank: Regular Contributor
timestamp: June 29, 2023, 07:27:57 am
content: Ah, I see it now. It makes total sense.And since the ext voltage reference was needed anyway, the extra cost for improved 5V regulation is close to zero.Thanks!

author: iMo
author_rank: Super Contributor
timestamp: June 29, 2023, 07:48:28 am
content: Quote from: Kleinstein on June 29, 2023, 07:25:35 amR10 and R11 set the voltage at the 317's output without the U1A, thus the (((1.25V/R11+U5_adj_current)*R10+1.25V) has to fit inside the U1A regulation output "range".

author: David Hess
author_rank: Super Contributor
timestamp: June 30, 2023, 10:28:41 am
content: Besides removing the drift of the LM317's internal reference, noise is removed within the bandwidth of the external feedback loop, and the higher gain within the bandwidth of the external feedback loop also improves the line and load regulation.While it is not explicitly shown in the schematic, moving the ground connections for the external reference and resistive divider to the load implements Kelvin sensing of the voltage at the load which removes the effects of wire resistance further improving load regulation. The schematic below shows this.

author: tverbeure
author_rank: Regular Contributor
timestamp: July 01, 2023, 05:25:11 am
content: Quote from: David Hess on June 30, 2023, 10:28:41 amThat's two short statements, but there's a lot to unpack in that (at least for this digital design guy.)How/why is the noise removed?How does one make a conclusion about higher gain within the bandwidth of the external feedback loop?

author: dietert1
author_rank: Super Contributor
timestamp: July 01, 2023, 06:11:59 am
content: Roughly like this:LM317 noise is specified as 0.003 % Vrms of output voltage, so in 5 V this makes 150 uVrms or about 900 uVpp.LT1013 noise is specified as 0.55 uVpp. This goes times loop gain = 2, since the reference has 2.5 V. 1.10 uVpp is less noise.The circuit can still be improved by running the reference and the LT1013 from the output voltage, similar to the circuit shown by David Hess. This method avoids temperature variations in the circuit depending on mains voltage variations. It requires some care to guarantee reliable power-up.Regards, DieterEdit: Noise spec of LT1013 is 0.55 uVpp in 0.1 to 10 Hz

author: iMo
author_rank: Super Contributor
timestamp: July 01, 2023, 06:28:18 am
content: The noise of all the components placed "inside the op-amp loop" is removed because the op-amp is acting "against" those external noise fluctuations thus cancelling them in the result. That happens within the bandwidth of the op-amp only, because only there the cancellation works. The op-amp cannot cancel the external changes which are faster than its BW allows, like with a 10kHz op-amp BW it cannot cancel 50kHz noise spectra components - it is not "fast enough" to follow and cancel such changes (as the BW limits the op-amp's speed, the higher the op-amp's BW the quicker the op-amp can react, and vice-versa)..

author: Kleinstein
author_rank: Super Contributor
timestamp: July 01, 2023, 06:54:09 am
content: Quote from: dietert1 on July 01, 2023, 06:11:59 amFor the noise calculation there is still the low frequency noise of the MC1403 reference to consider. The external reference version should still be lower noise. The RM/pp noise also depends on the frequency band one looks at.

author: David Hess
author_rank: Super Contributor
timestamp: July 01, 2023, 07:01:44 am
content: Quote from: dietert1 on July 01, 2023, 06:11:59 amNoise is dominated by the 2.5 volt reference so the LT1013 noise can be ignored. Even zener references have higher noise, typically at least 50nV/SqrtHz, than almost all operational amplifiers.QuoteIt does help, but the LT1013 is a pretty good precision operational amplifier so even measuring the improvement would be difficult.Powering up is aided by the regulator always trying to hold its output 2.5 volts higher than its adjustment pin in this case so it should not be a problem.Quote from: tverbeure on July 01, 2023, 05:25:11 amWithin the bandwidth of the operational amplifier's control loop, it sees the noise at the output from the regulator and tries to correct for it like any other error within the feedback loop. The excess gain of the feedback loop, which increases as the frequency decreases up to the open loop gain at low frequencies, attenuates the noise.So let's see ... gain falls off at 20dB per decade, so at 1/10th the cutoff frequency of the control loop the excess gain is 20dB, and noise from the regulator is reduced by 20dB. I think I got that right but it has been a while. Note that the noise is being reduced at middle frequencies where it is also more difficult to filter out. At higher frequencies, an LC filter removes noise, and at the lowest frequencies, noise is limited by the reference's flicker noise.In practical implementations of this circuit like the example I gave, the improvement in performance over the regulator alone is huge, but even so only the most sensitive applications benefit. Most circuits are just not that sensitive to noise and regulation of their supply voltages.The regulator's performance by itself is limited because thermal feedback within the regulator limits its open loop gain and causes the built in reference to drift. The limiting of open loop gain from thermal feedback also applies to operational amplifiers which is why precision operational amplifiers should not be used to drive heavy loads. In my example the output of the operational amplifier drives a JFET which then drives the 5 to 10 milliamp load of the common pin of the regulator. The LM317 only requires microamps at its adjustment pin, and the high values of its resistor divider keeps the current low so it can be driven directly by the operational amplifier.

author: iMo
author_rank: Super Contributor
timestamp: July 01, 2023, 07:08:54 am
content: Thus with a 317, 1013 and a 399 as the ref you may get 1A 10V reference with say 10uVpp noise within the set BW.. Somebody has to try it in-situ finally, as the David's schematic gets so popular here

author: dietert1
author_rank: Super Contributor
timestamp: July 01, 2023, 08:06:31 am
content: Yes, in order to garantee low noise one should better use a reference with noise specification. The MC1403 datasheet does not include that spec. With a LM399 reference, the reference will still dominate the output noise: typical 7 uV rms * 6 * 10 V / 7 V = 60 uVpp in 10 Hz to 10 KHz, similar from DC with some low pass filtering.If reference and opamp get their supply from the output, one can include that part of the power supply circuit inside the OCXO oven without disturbing temperature control.Regards, DieterEdit: Noise spec of LT1013 is 0.55 uVpp in 0.1 to 10 Hz

author: iMo
author_rank: Super Contributor
timestamp: July 01, 2023, 08:30:12 am
content: 1013's noise is 0.55uVpp 0.1-10Hz..

author: dietert1
author_rank: Super Contributor
timestamp: July 01, 2023, 08:58:50 am
content: Sorry, i was multitasking. Of course we want the correct numbers.Regards, Dieter

author: iMo
author_rank: Super Contributor
timestamp: July 01, 2023, 09:11:11 am
content: And finally - the dominant noise will be the 399 (aprox 5-7uVpp) and the 1013 with your 0.77uVpp - therefore my above estimate 10uVpp in total

author: dietert1
author_rank: Super Contributor
timestamp: July 01, 2023, 09:19:19 am
content: As far as i understand the LM399 datasheet says 7 uV typ but that is rms in 10 Hz to 10 KHz. So from DC with some filtering one may expect about 60 uVpp at the 10 V output. They have a diagram with about 10 uVpp so that would be less. That may be with a filter, let's DC to 0.1 Hz.Regards, Dieter

author: MrAl
author_rank: Super Contributor
timestamp: July 01, 2023, 10:16:06 am
content: Quote from: tverbeure on June 29, 2023, 07:27:57 amHi,Yes not easy to figure out from the data sheet specs. You have to consider the package self-heating effect on the internal reference.

author: David Hess
author_rank: Super Contributor
timestamp: July 01, 2023, 01:34:51 pm
content: Quote from: iMo on July 01, 2023, 07:08:54 amWhen I last did it, I used a 7805, LT1007, and LM329 to produce a 10 volt output. Load regulation was microvolts for a 1 amp load change and noise was completely dominated by the LM329. In retrospect, a noisier but lower input bias current LT1001, improved OP-07, or even an LT1008/LT1012/LT1097 operational amplifier would have been just as good if not better.

author: iMo
author_rank: Super Contributor
timestamp: July 01, 2023, 03:05:25 pm
content: Quote from: David Hess on July 01, 2023, 01:34:51 pmI did simulate that in past and it did oscillate wildly with 7805, 108/308/op07 and p-jfet..And it did not work with 317 at all. Perhaps the models are not accurate.

author: tverbeure
author_rank: Regular Contributor
timestamp: July 02, 2023, 11:18:08 pm
content: Thanks all! There's a lot of unpack here.Ultimately, the 5V is here is primarily used to power the OCXO.I've done some automated setups in the past where I shmoo'd the output frequency of different OCXOs for different values of (Vtune, Vsupply) and, as expected, there was almost no impact of Vsupply on the output frequency.That was for static values of Vsupply, of course, but I don't think small variations due to noise would make a difference.So using an external voltage reference in this case is probably already overkill (but reasonable, since it comes for free.)

author: David Hess
author_rank: Super Contributor
timestamp: July 03, 2023, 04:01:50 am
content: Quote from: iMo on July 01, 2023, 03:05:25 pmWhen I did it with an LT1007, I implemented frequency compensation with 2 poles and 2 zeros which was overkill. (1) With a slower 308 or OP-07, unity gain frequency compensation should be sufficient. So the LT1007 was lower noise, which did not matter because of noise from even the best reference, but its higher bandwidth was not helpful because the 7805 could not keep up.I have never gotten good agreement between SPICE models of regulators and the real parts.(1) Today I might implement the frequency compensation with a 45 degree lag integrator or 45 degree lead differentiator so that the phase margin is greater, but I do not know that this would actually perform better in practice and it might not be worth the extra complication. I need to try it.

author: iMo
author_rank: Super Contributor
timestamp: July 03, 2023, 08:00:23 am
content: In the simulation below two cases work - with LM317 you have to power the opamp from the voltage source V1, and for the compensation R1 and C2 look like the minimal values for most opamps I tried..PS: C1 ESR=200m, C3 ESR=50m