Statistical DVM Reference

DVM referenceHow accurate are your voltmeters? Have they drifted because of age or a workshop "accident"? If your meters are giving different readings, which one is right?

This is a common problem for both the professional and hobbyist. One solution might be to compare your meters to one which you know is in calibration, and is preferrably at least an order of magnitude more accurate than yours, but that isn't always feasible for the home enthusiast. Another approach is to use a voltage reference to check your meters against. You can buy these commercially, but they can be extremely expensive (or scarily cheap from eBay).

Alternatively, you can DIY something. There are plenty of designs out there - mostly based around expensive ICs in simple implementations of the suggested application from the data sheet. But for me, that approach lacks a certain elegance - it feels rather "brute force". Instead, I had an idea that I wanted to explore - an idea that uses rather more economical voltage references, but several of them.

It's well known that the cheapest way to get an accurate resistor is to put many together; ten standard-grade metal film 10kΩ 1% resistors in parallel gives a 1kΩ resistor with a 0.3% tolerance for less money than a 0.5% part would cost.

If you're able to pre-select the resistors, you can do even better. Indeed, depending on what your DMM is, the final resistor might be more accurate than what you can measure. It's a powerful technique, and one that should work equally well with voltage references.

This approach was used for this project, and the results were very pleasing indeed. The completed unit has 10 different output voltages, low-battery indication and, unlike just about every other DIY project I've seen, protection from external voltages. Overall cost was very low because most of the parts were found in my junk stores, but even if you're buying everything new, the total is quite reasonable. Naturally, you can get references for less on eBay, but where's the fun in that?

Using a precision voltage source

First, some context: This unit is for quickly checking that your meter is more-or-less correct; this is not necessarily intended to be used as a reference standard to calibrate meters against. For that, your reference needs to be an order of magnitude better than the multimeter, and that's potentially rather serious - the price of entry goes up considerably. As does the neurosis! Be warned that the quest for accuracy is a slippery slope, and many people find themselves in "Volt Nut" territory if they are not careful. Pragmatism is required!

It's also worth saying that good meters don't drift much over their life, providing nothing goes wrong. The same can't be said of lesser intruments - of which there are plenty. Yes, you might be able to use a voltage reference to adjust the calibration of a cheap DMM, but you have to wonder if it's worth bothering. These meters will have poorer linearity and inferior long-term stability than the decent ones, and it might just be better to accept them for what they are - relegating them to non-critical, low energy work.

Ultimately, a voltage source such as this is useful to quickly check that a voltmeter is basically doing the right thing. It needs to be reasonably accurate, but we're not after calibration-lab standards.

How accurate?

At work, we have a lot of old Fluke 75s (Series II), and these are commonly found in home workshops. They have a basic DC accuracy of 0.4%. This seems like a reasonable goal; one that should be attainable with relatively little effort. But what about better meters? The ubiquitous Fluke 87V is quite a lot better at 0.05%. Can we approach this? Perhaps. There are reference ICs that are specified to this level, but they're not cheap.

Clearly, if you are interested in analogue meters, 1 or 2% is as good as it gets, so that's an easy target. At the other end of the scale, bench voltmeters are a lot more accurate. The Keithley 2015THD is specified to 30ppm - that's 0.003%. We're not going there!

So, 0.1% should be the target, but more accuracy would be a bonus.

The "Statistical" Voltage Reference

As mentioned earlier, this project uses a number of relatively humble devices working together to give an improved overall tolerance. But unlike our earlier example of ten resistors in parallel, these references need to be in series. For that to work, we must use 2-terminal shunt references - basically ICs that look like Zener diodes.

For many years now, whenever I've needed a "good but cheap" bandgap voltage reference, I've turned to the the humble LM4040. They are available in various voltages, but I generally use the 2.5V version. They are also available in several grades, but the most easily found versions are "A" and "D", rated to ±0.1% and ±1% respectively - hardly state of the art, but remember, these are cheap - £1.14 and £0.40 respectively if you buy 10 of them. Those prices are for the DIY-friendly TO92 package; if you're happy with SMT, the SOT-23 equivalents can be considerably cheaper.

I always use the cheaper "D" version because in my applications the absolute voltage is rarely critical - there are trimmers for that - but stability is. The temperature coefficient of both grades is the same - a reasonable 15ppm/0.0015%. They always seem to meet their specification with ease, and are well behaved and dependable.

Let us create a 10V reference by putting four 2.5V 0.1% references in series. This gives us an accuracy of 0.05% (0.1% divided by the square root of 4), which is on a par with the Fluke 87V. Now, that's without any sort of selection - if we're willing to put together the "best" samples, we'll definitely be able be able to improve on this.

Of course, with 4 of these in series, we also have 2.5V, 5V and 7.5V available. Why not add another to give 12.5V? And we might as well include 0V, as it's easy to do so. To complete the project, we just need a couple of PP3 batteries and a switch, plus a series resistor to provide some operating current to the LM4040s. The whole thing could be built in minutes, with the components mounted on the tags of a 6 way rotary switch (e.g. SW04142 from CPC for £1.22). The total outlay might actually compare favourably with the cheap eBay modules, especially if you already have a suitable box and other ancillaries in your junk stores.

Simple DVM reference

This diagram shows the basic concept, though naturally, my version ended up being a bit more complex than that :-)

Using a series of LM4040s to build Statistical Reference should yield the following results:

Table 1 - Predicted performance of the Statistical Reference
Output voltage Tolerance (D-grade devices) Voltage range Tolerance (A-grade devices) Voltage range
2.5V ±1% 2.475-2.525V ±0.1% 2.4975-2.5025V
5V ±0.71% 4.965-5.0355V ±0.071% 4.9965-5.0036V
7.5V ±0.58% 7.4565-7.5435V ±0.058% 7.49565-7.50435V
10V ±0.5% 9.95-10.05V ±0.05% 9.995-10.005V
12.5V ±0.48% 12.44-12.56V ±0.048% 12.494-12.506V

If practice matches the theory, this is quite neat. Definitely worthy of further investigation...

Just how good is the LM4040?

As mentioned earlier, my anecdotal impression was that for the "D" grades at least, the specification seemed a bit conservative, as all the LM4040Ds that I've deployed always exceeded their specification by quite some margin. However, it seemed sensible to spend a bit of time gathering data. Between my stores at home and work, I assembled an array of them, and used my Keithley 2015THD to measure the terminal voltages.

The LM4040D

Here are the result of the 1% D-grade parts:

Table 2 - LM4040D Measurements
Sample Voltage Error Sample Voltage Error
1 2.50886V 0.354% 16 2.51011V 0.404%
2 2.50953V 0.381% 17 2.50674V 0.27%
3 2.50312V 0.125% 18 2.50568V 0.227%
4 2.50150V 0.06% 19 2.50480V 0.192%
5 2.50764V 0.306% 20 2.50646V 0.258%
6 2.51130V 0.452% 21 2.50372V 0.149%
7 2.49795V -0.082% 22 2.51460V 0.584%
8 2.50398V 0.159% 23 2.51172V 0.469%
9 2.51457V 0.583% 24 2.49133V -0.347%
10 2.50570V 0.228% 25 2.50518V 0.207%
11 2.50717V 0.287% 26 2.50721V 0.288%
12 2.51139V 0.456% 27 2.49880V -0.048%
13 2.50679V 0.272% 28 2.50522V 0.209%
14 2.50737V 0.2948% 29 2.51294V 0.518%
15 2.49220V -0.312% 30 2.50515V 0.206%

Not bad! All comfortably meet their 1% specification, and in fact all but three of them are are better than 0.5%. The average value is 2.50596V, and the average tolerance is 0.238%. In theory, the overall tolerance should be 0.18% (1/√30), but that's not the case with this particular batch. That's the problem with statistics!

Looking at these numbers, you might conclude that perhaps my DMM is reading slightly high - it's certainly interesting that all but four of them are above 2.5V. With that in mind, I double-checked my Keithley against my calibrated Fluke 287, and found that both agreed with each other. OK, the Keithley has an extra digit of resolution, but even so, whatever the Fluke said, the Keithley said the same; that extra digit not changing the result. Overall, I'm confident with these results. For completeness, the test current was 2.5mA and the temperature was a stable 20°C according to my Fluke 971. Each IC was observed over several minutes to ensure stability.

What if we try some selection?

Table 3 - Selected LM4040D in series
Sample Voltage Total voltage Error Predicted error
4 2.50150V 2.50150V 0.06% ±1%
27 2.49880V 5.00054 0.0108% ±0.71%
7 2.49795V 7.49849V -0.020133% ±0.58%
3 2.50312V 10.00161V 0.0161% ±0.5%
15 2.49220V 12.49381V -0.04952% ±0.48%

So from this sample of 30 devices, we are able to make a reference that is 0.06% or better - and much better than the simple predictions suggest. Very pleasing. This was prototyped, and happily the results closely matched the predictions. To be honest, I could have left it there because this easily exceeds my initial design brief of 0.1% or better - despite only using the 1% D-grade parts.

But that's cheating. Not everyone would be willing to buy a large batch and select their ICs from it - and of course that would be hopeless for any sort of mass-production. And not everyone will have the means to measure with such precision, of course. Bearing all that in mind, it's only fair to consider what we'd get if we did some random sampling:

Table 4 - Random examples of the LM4040D in series - Set #1
Sample Voltage Total voltage Error Predicted error
3 2.50312V 2.50312V 0.125% ±1%
6 2.51130V 5.01442V 0.29% ±0.71%
9 2.51457V 7.52899V 0.39% ±0.58%
12 2.51139V 10.04038V 0.404% ±0.5%
15 2.49220V 12.53258V 0.261% ±0.48%
Table 5 - Random examples of the LM4040D in series - Set #2
Sample Voltage Total voltage Error Predicted error
5 2.50764V 2.50764V 0.306% ±1%
10 2.50570V 5.01334V 0.267% ±0.71%
15 2.46220V 7.47554V -0.326% ±0.58%
20 2.50646V 9.98200V -0.18% ±0.5%
25 2.50518V 12.48718V -0.103% ±0.48%
Table 6 - Random examples of the LM4040D in series - Set #3
Sample Voltage Total voltage Error Predicted error
2 2.50953V 2.50953V 0.3812% ±1%
4 2.50150V 5.01103V 0.221% ±0.71%
6 2.51130V 7.52233V 0.298% ±0.58%
8 2.50398V 10.02631V 0.263% ±0.5%
10 2.50570V 12.53201V 0.256% ±0.48%

Feel free to carry on at your lesiure!

The conclusion is simple: if you bought a batch of 5, you'd get pretty respectable performance for the outlay (just £2).

The LM4040A

How do the A-grade parts compare?

Table 7 - LM4040A Measurements
Sample Voltage Error Sample Voltage Error
1 2.49824V -0.0704% 16 2.50021V 0.0084%
2 2.49777V -0.0892% 17 2.49622V -0.1512%
3 2.49764V -0.0944% 18 2.49537V -0.1852%
4 2.49840V -0.064% 19 2.49903V -0.0388%
5 2.49851V -0.0596% 20 2.49728V -0.1088%
6 2.49666V -0.1336% 21 2.49953V -0.0188%
7 2.50055V 0.022% 22 2.49826V -0.0696%
8 2.49712V -0.1152% 23 2.49654V -0.1384%
9 2.49801V -0.0792% 24 2.49827V -0.0692%
10 2.49729V -0.1084% 25 2.49578V -0.1688%
11 2.49981V -0.0079% 26 2.49925V -0.03%
12 2.49956V -0.0176% 27 2.49784V -0.0864%
13 2.49898V -0.0408% 28 2.50005V 0.002%
14 2.49951V -0.0196% 29 2.49821V -0.0716%
15 2.49735V -0.106% 30 2.50043V 0.0172%

Surprisingly, nearly a third of this batch failed to meet the ±0.1% specification (highlighted in red). What could be wrong?

The specification is at 25°C. My workshop was at 20°C - could that have made a difference? As mentioned earlier, the tempco is 15ppm/°C, or 0.0015%/°C, or 37.5µV/°C. Five times that is 187.5µV. Would adding this to the out of spec samples bring them back into spec? Well, only for sample #15. Hmm...

Perhaps thermal hysteresis is a factor. The references will change their voltage slightly when being soldered into a PCB - the datasheet quotes a typical value of 0.08%. If the change is +0.08%, it will bring back all but #18 back into spec, but that's a big assumption. Needless to say, as all the out-of-spec samples are too low, then a negative change will simply push them further away from the correct value.

I suspect the answer might be to "burn in" the references. It seems to me that they should meet the spec from the factory, but the voltage does change over the first few minutes of operation, and I wouldn't mind betting that it continues to do so for some time afterwards. When time permits, I'll investigate further.

It's also interesting to note that most of these measure slightly low. Earlier, we found the opposite with the D-grade samples, and these two datasets suggest that we don't have a systematic error here. But, I'll keep the samples organised and numbered, and double-check the results in the future with a different meter of similar performance to the 2015THD.

As before, let's select the obviously good ones:

Table 8 - Selected LM4040A in series
Sample Voltage Total voltage Error Predicted error
28 2.50005V 2.50005V 0.002% ±0.1%
11 2.49981V 4.99986V -0.0028% ±0.071%
16 2.50021V 7.50007V 0.00093% ±0.058%
12 2.49956V 9.99963V -0.0037% ±0.05%
30 2.50043V 12.50006V 0.00048% ±0.048%

Well that's pretty staggering! Naturally, this accuracy might not be realised in practice, but it's certainly thought-provoking.

When dealing with this level of precision, everything matters. Temperature coefficient (typically 37µV/°C) has already been mentioned, as has ageing - with several samples of the grade A parts I noticed that some minutes were needed before the readings stabilised - I'd want to power them for a few days or weeks before making final assessments. Some of that, of course, was as a result of handling, which warmed up the devices slighly. By simply gripping the package firmly between finger and thumb, the reading goes up by roughly half a millivolt; that implies an entirely plausible temperature rise of 13°C. There are devices out there with better tempcos, but they are much more expensive.

As before, let's do some random sampling:

Table 9 - Random examples of the LM4040A in series - Set #1
Sample Voltage Total voltage Error Predicted error
3 2.49777V 2.49777V -0.0944% ±0.1%
6 2.49666V 4.99443V -0.1114% ±0.071%
9 2.49801V 7.49250V -0.1% ±0.058%
12 2.49956V 9.99206V -0.0794% ±0.05%
15 2.49735V 12.48941V -0.0847% ±0.048%
Table 10 - Random examples of the LM4040A in series - Set #2
Sample Voltage Total voltage Error Predicted error
5 2.49851V 2.49851V -0.0596% ±0.1%
10 2.49729V 4.99580V -0.084% ±0.071%
15 2.49735V 7.49315V -0.0913% ±0.058%
20 2.49728V 9.99043V -0.096% ±0.05%
25 2.49578V 12.48621V -0.11% ±0.048%
Table 11 - Random examples of the LM4040A in series - Set #3
Sample Voltage Total voltage Error Predicted error
2 2.49777V 2.49777V -0.0892% ±0.1%
4 2.49840V 4.99617V -0.0766% ±0.071%
6 2.49666V 7.49283V -0.0956% ±0.058%
8 2.49712V 9.98995V -0.1005% ±0.05%
10 2.49729V 12.48724V -0.1021% ±0.048%

Compared to the D grade references, these results are much less impressive. Certainly, we can get close to our target 0.1% specification, but in most cases we don't reach the statistical prediction. Before we get too downhearted, however, note how many of the references are out of spec in our randomly chosen selections. The selections were the same as we used above - just for ease - but how about another selection, where we deliberately choose samples that do meet the ±0.1% specification?

Table 12 - Random examples of the LM4040A in series - Set #4 (in-spec)
Sample Voltage Total voltage Error Predicted error
26 2.49925V 2.49925V -0.03% ±0.1%
27 2.49784V 4.99709V -0.0582% ±0.071%
28 2.50005V 7.49714V -0.038% ±0.058%
29 2.49821V 9.99535V -0.0465% ±0.05%
30 2.50043V 12.49578V -0.0338% ±0.048%

And that's more like it!

Just for luck, let's have one more random selection of devices that are in spec:

Table 13 - Random examples of the LM4040A in series - Set #5 (in-spec)
Sample Voltage Total voltage Error Predicted error
16 2.50021V 2.50021V 0.0084% ±0.1%
19 2.49903V 4.99924V -0.015% ±0.071%
21 2.49953V 7.49877V -0.016% ±0.058%
22 2.49826V 9.99703V -0.03% ±0.05%
24 2.49827V 12.4953V -0.038% ±0.048%

Pretty good. So if you're able to measure them with 0.1% accuracy, and perhaps don't mind buying more than you need (they are useful for so many things anyway), then once you've rejected the bad ones, you're guaranteed to get between 0.1% and 0.048% across the range. Naturally, if you can measure with more precision, then you should be able to do much better.

Designing the Statistical Reference

Impressed with the results of these experiments, I decided that it was well worth building a DVM reference based on the statistical principle.

In terms of controls, a 6 position rotary switch is used, giving 0, 2.5, 5.0, 7.5, 10.0 and 12.5 volts. Naturally, the 0V position turns off the unit.

It makes sense to include a ÷10 switch, as seen in this similar project. However, I'm not sure I like the way it's implemented there - when in x1 mode, the switch shorts out the upper resistor, leaving the 2k resistor across the output. Looking at the datasheet of the LT1236 that Frank used, the load regulation is typically 10ppm/mA, which means the output will be brought down by 50ppm (0.5mV) - OK, not a big deal perhaps, but as this is easily avoided, the design cannot be considered "blameless". Also, it relies on the switch contacts being genuinely 0 ohms - any contact resistance will cause small errors (10Ω causes roughly -0.5%). Finally, the loading might cause errors if the rotary switch I'm using develops high contact resistance in the future. So instead, I'll use a double-pole toggle switch to switch the potential divider into and out of circuit. With the range of voltages available (0.25V, 0.50V, 0.75V, 1.0V, 1.25V) I'll be able to test the lower ranges of most DVMs.

Overview of the reference

Be aware that this potential divider has an output impedance of 1.8kΩ, so loading effects might become a problem with analogue meters (perhaps reading ~3% low when on the 3V range on an AVO 8). For a typical DMM with a 10MΩ input impedance, the error is ~0.018%. Later, I decided to use lower value resistors to help with this.

Based on the earlier experiments, it makes sense to use sockets for the reference ICs. This will allow me to select them, and ease replacement in the future. It also avoids thermal hysteresis.

The current source

Earlier we said that a simple resistor is all we need to supply operating current to the references. But having taken the time to measure and select them, it seems senseless to cut corners - so let's use a current source to supply the references. The terminal voltage will change with applied current, and with a simple resistor the applied current will depend on the battery voltage. First, I prototyped the standard 2-transistor current source:

Simple current source

This circuit uses one of the better types of transistor current sources, but it's not perfect. Varying the input voltage over a range of 13.5V to 20V causes the current to change from 2.027 to 1.964mA - that's 3.1%. Not a big deal perhaps, but when built up and used to feed the selected grade-D references from Table 3, this variation in operating current caused the output voltage to vary from 12.4883V to 12.4944V - a range of 0.049%. While this perhaps isn't a large variation on the face of it, it's about half of our target specification of 0.1%. But it can be reduced to zero if we build a better current source - and clearly it makes good engineering sense to avoid easily-avoidable imperfections wherever possible.

I looked at a wide range of possibilities, but wanted to keep away from excessively complex solutions. I also didn't want to increase the current consumption if possible - this is a battery operated instrument, and batteries aren't cheap. So the final KISS solution - using a completely "jellybean" part - was based around the humble LM317:

LM317 current source

The "L" version of the LM317 is all we need, along with a resistor to set the current. With this, the current doesn't change at all as the input voltage is varied. However, it does have a serious problem compared to the 2-transistor current souce above: the minimum input voltage.

The transistor-based current source held a reasonably constant current until the input voltage was only 13.5V; just a volt above the 12.5V reference string. But the LM317 solution requires a minimum input voltage of around 16V. Reducing the input voltage to 15V resulted in the current falling to 1.697mA, which is clearly undesirable.

The conclusion here is that we need some form of "low battery" indicator. This could be omitted if desired, but there was space in the box, so in it went. I suppose that an alternative might be another socket that you could connect to an external meter, with a notice like "At least 16V required", or words to that effect...

At this stage, I double-checked the LM317L datasheet, and found that the recommended minimum current is actually 2.5mA. My prototype seemed OK with the 2.160mA mentioned above, but to be on the safe side, I changed the sense resistance from 620Ω to 510Ω (as shown above) to bump the current up to 2.45mA.

An alternative topology

Although basically happy with LM317 as a simple and elegant solution, I was unhappy with the high drop-out voltage of the current source. I spent a bit of time studying the PP3 datasheet from Duracell, and could see that at 2mA, it takes around 125 hours to discharge down to 8V. We're taking slightly more (2.5mA plus whatever the power LED takes), but I'd guess that around 100 hours is feasible in practice. However, at 8V, the battery still has plenty to give - we're only about half way through its lifespan. So is there a way to make better use of the battery?

One solution would be to use a boost converter to step up to 16V. That means we could use any battery we liked - perhaps a couple of AAs would be nice, or a single PP3 at the least. Given the low current demand, a flying-capacitor topology might be feasible as well. However, I ruled this approach out almost immediately. Not only because of the increased complexity, but also noise...

After some lateral thinking, I realised that I might not need the 12.5V option all of the time. Blindingly obvious, really - most of the time, I'll perhaps be using the 5V or 10V options. With that in mind, do we have to apply operating current to all references in the chain?

Alternative topology

Simple yet effective. Just moving the point at which the current source connects means that the lower voltages can be supplied from partially depleted batteries with no trouble.

The main issue with this circuit that I can foresee concerns contact resistance. Unlike before, the 2.5mA reference current is carried by the rotary switch contacts, and it's possible that an error term could be introduced by this. To put my mind at rest, I did a simple calculation, and worked out a drop of 0.1% of the 10V output requires a contact resistance of 4Ω. OK, at 2.5V, a contact resistance of 1Ω causes a 0.1% drop, but even so, I think we're worrying needlessly - I did caution about the need to remain pragmatic in the opening paragraphs!

Another concern is the prospect of DC currents being switched that might shorten the life of the switch. This is certainly a problem for some amplifiers. We'll have to see how this goes - at least here we aren't following the switch with 30dB of gain, so perhaps it won't cause serious problems.

To minimise contact resistance (and increase reliability) I'll hard-wire the connections directly to the switch - plug-in connectors aren't really needed in such a simple project anyway. But additionally, as it's very easy to do, I'll provide the means to switch back to the original topology using a moveable link. Simple!

The low battery indicator

Optional, but highly recommended because of the poor drop-out voltage of the LM317 current source. Naturally, the main design objective was to minimise current consumption - if we're only able to make use of a small part of the PP3s as they discharge, let's not add to the current draw needlessly.

Before thinking about the alternative topology just outlined, I designed a simple circuit that measured the absolute battery voltage. As it's perhaps a useful building block, I'll include the details here, even though it didn't make the final edit:

Low battery detection circuit

This circuit uses 2 LEDs, which both need to be high efficiency types. The first is a pure green InGaN type, which is both a power indicator and a voltage reference for the low-battery detection. I used Farnell 171-6698, but any high efficiency white or blue type would probably work just as well. This LED is fed from the 18V rail via a 100k resistor (R1) - equating to around 150µA - and it's still too bright! The voltage across it is about 2.3V, and this is fed into the base of TR1.

The emitter of TR1 senses the supply voltage. It is fed from a potential divider (R5 and R6), with a pre-set resistor to fine-set the threshold voltage. When the battery voltage falls to the determined value, TR1 starts to conduct, turning on TR2 via R4.

As TR2 conducts, the red LED lights. This one - Farnell 171-6701 - lights up very brightly despite only being fed with approximately 0.4mA. Again, any modern blue or white type would work well here if you don't want to buy the exact type. High brightness LEDs are readily found on eBay and similar sources for no money at all. I was tempted to use the ones we'd saved from those illuminated balloons that you find at kid's parties - those come in a wide range of colours and all appear to be highly efficient InGaN types.

As the red LED begins to light, positive feedback via R7 causes TR1 to turn on more - the net effect being a reasonably positive transition from off to on. R2 provides some hysteresis, which translates to roughly half a volt or so.

When the battery is healthy, the only current draw is the power LED (150µA) and the potential divider R5, PR1 and R6 (approx 35µA) - comfortably less than 200µA in total. The circuit works well, though with one minor problem: when healthy, the red LED lights up a tiny amount. Believe it or not, that's caused by the absolutely tiny current coming via R2 and R7 - astonishing! It's because the red LED has a lower VF than the InGaN pure green type. A less efficient LED would cure this, or a resistor in parallel with the LED would have the same effect - alternatively, making the low-battery LED a white, blue or pure green type would also do, as it'll have a higher VF that matches the power LED.

The Relative battery indicator

Whie the circuit outlined above did a good job, I decided that a different approach was needed with my alternative topology. Rather than looking at the absolute battery voltage, let's look at the relative voltage across the LM317 current source. After all, the problem is caused by insufficient voltage across this...

As discussed about, we needed about 16V at the input of the LM317, and should we dip significantly below this, the current falls from the wanted constant current of 2.5mA, which in turn causes the output voltage to fall slightly. But if we are only energising the required number of references to achieve the desired voltage, we should be able to eek out a bit more life from the batteries. For example, if I wanted a 5V output, the total battery voltage only needs to be 8V (4V per PP3).

Differential battery detection circuit

I looked at many options, but this was by far and away the simplest. Of course, it's just a variation of the standard 2-transistor Schmitt trigger, using PNP transistors and hanging off the positive rail rather than ground. Operation is simple; when the voltage dropped across the current source is high enough, TR1 is biased on. As a result, TR2 is off, and so is the red LED.

But with TR1 conducting, a tiny current flows through R2 and the green LED. As above, this LED is a highly efficient InGaN type that glows brightly with the 150µA it gets here.

As the voltage across the current source falls, at some point TR1 starts to conduct less current. This allows TR2 to be turned on via R2, which causes current to flow in R3 and the red LED (also a high efficiency type). This current also flows through the green LED, causing it to glow more brightly. But that's beside the point - the important effect is the voltage across the green LED rising. This has the effect of reducing the VBE of TR1, causing it to turn off more - and in turn, this allows TR2 to conduct some more again. This positive feedback leads to a fast, clean switching, meaning the red LED comes on positively when required. Of course, you would normally find a resistor in place of the green LED, but here, the slope resistance of the LED neatly provides that function while also acting as the power indicator - as we need to be passing that current through something, the indication is effectively free.

As it stands, this circuit is not perfect. The detection threshold is determined by the sum of the voltages dropped across the green LED, TR1's VBE, plus the voltage dropped across R1. The latter bothered me most, as it's a function of TR1's base current, which is a function of both transistor HFE and absolute supply voltage. Of course, the variablility in HFE with device sample, temperature, and just about everything else is to be expected, but we could do without the supply voltage dependency. I did some experiments to see how much effect supply voltage had on the threshold and found that it was roughly 0.2V for every 3V change in supply voltage. Could do better...

To reduce TR1's base current, and hence reduce the (variable) voltage drop across R1, we simply need to use transistors with a higher HFE. However, I'm not about to start specifying special devices, or do any more selection on top of selecting the voltage references themselves. So instead of that, we could either place an emitter-follower between R1 and TR1, or make TR1 a Darlington. The latter is easiest, and only increases component-count by one.

However, there is a problem with Darlington pairs: when saturated, the collector-emitter voltage can be no less than 0.6V, and in practice, it'll be a little higher. When passing reasonable currents, the saturation voltage might be as high as a volt. Now, this might be an obvious thing to say, but it's surprising how many people forget this simple fact!

With TR1 converted to Darlington, TR2 can't turn off. So we need to add components to drop the voltage between the collector of TR1 and the base of TR2. A couple of resistors will do it, as will a resistor and a diode. Simple. However, this is moving away from the simple elegance of the solution, and while increasing the component count is no big deal in reality, it seems like the wrong way to tackle the problem.

Of course, the simple answer is to make TR2 a Darlington as well. Once upon a time - perhaps the '70s or earlier - many designers were still labouring under the "fewest active components possible" mantra that was necessary in the valve days. However, I'd much rather add one transistor than add 2 resistors!

If component count is really important, you could specify a PNP Darlington transistor, but personally, that's moving away from my preference for non-exotic "jellybean" components - I'd rather just fit more transistors. They're cheap enough!

Differential battery detection circuit

Having seen the simplified version above, this diagram should be easy to understand. TR1 has been replaced by TR1 and TR2, and the TR2 of the original has been replaced by TR3 and TR4. Now, the current in R1 has been reduced to next to nothing when close to the minimum dropout voltage - I've just measured 60mV across it, which translates to 27nA! Obviously, to make that measurement, you need a DMM with a high input impedance - the usual 10MΩ in parallel with R1 will cause errors. The input impedance of my Keithley 2015THD is measured in GΩ in the low voltage ranges.

Naturally, as the differential voltage increases, so does the voltage drop across R1. The current moves into the µA range at the greatest differential drops, but this doesn't cause any problems. R1 could be raised in value substantially if desired, but I'm not sure there's any real need.

So now, the detection threshold is determined by the VBE of TR1 and TR2, plus the voltage dropped across the green LED - it works out to be about 3.2V in practice, which is just inside the range of voltage where the LM317 is still holding regulation. The contribution from R1 is negligible, so now the threshold is much more consistent with supply voltage. That's a good result. Anyone can design a complex circuit using exotic components to do a job, but to use a small handful of "jellybean" parts is always more satisfying! And compared to the first circuit, this uses fewer components, consumes less current, and doesn't need trimming. Result :-)

The divide-by-10 option

Originally I'd planned to use the simple 18k-plus-2k divider that was seen in Frank's project mentioned above, albeit with the improved double-pole switching. But after an initial prototype, I decided to make a couple of changes.

I'd spent a bit of time selecting resistors, but found that once built, the results weren't as accurate as predicted. It didn't take long to discover that the resistors changed value slightly as they were soldered in place! We mentioned thermal hysteresis earlier - it also applies to resistors...

Also, I wasn't happy with the high output impedance (1.8kΩ). Of course, it will always be non-zero unless we get into the complexities of buffers, etc, but I wanted to minimise it as much as possible. After 5 minutes of quality time with the calculator, I decided to use 10k and 1.1k, with a 50Ω preset in series with the latter, which gives an adjustment range of ±2%.

You should always think really hard before fitting preset resistors to a design. Firstly, the resistance material in a preset might not be as good as the metal film in decent quality resistors - it might have a higher temperature coefficient, and poorer long-term stability. For that reason, you need to think about the range of adjustment that the preset is able to excert - if you keep this to an absolute minimum, then the better quality fixed resistors should dominate the overall performance. Also, doing this avoids the mistake that many designers make - providing too much adjustment range - which means that it's practically impossible to get the setting correct initially, and it will be prone to drifting because of physical knocks, etc.

With all that in mind, 2% is quite a good compromise. Easy to set, but just about enough range to cover the expected tolerances of the 1% resistors and other variables. And of course, a good quality Bourns preset was used - these are pretty dependable in my experience.

Improved divide by 10 switching

The output impedance is down to 1kΩ, give or take a few Ohms. This reduces errors caused by loading effects on analogue meters. Taking the 2.5V output and an AVO 8 on the 3V range, the error is now -1.64%, which is down from 3% with the 18k/2k version.

Naturally, the divider draws more current that before, and this will affect the voltage at the reference. And because the current taken by the divider depends on the voltage applied to it, this is an error that changes with output voltage. A quick test shows that the 10V reference voltage falls by 700µV when the ÷10 option is engaged, and when set to 2.5V, the fall is 70µV. The divider will be taking ~0.9mA and 0.22mA respectively, and clearly the former is significant in the context of the total 2.5mA fed to the reference. I did consider raising the reference current so that the current taken by the potential divider was less significant, but obviously this will affect battery life. Another option was to only raise it when the ÷10 mode is engaged - a 3-pole toggle switch could have been used for this. However, the 10V error amounts to -0.007%, which is well below our target specification of 0.1%, so let's draw the line there...

Another thing about loading effects; it's easy to assume that the 10MΩ of a typical DVM is essentially infinity. It is not. Run the numbers and it turns out that we're taking about -0.01%. Might not seem like much, but it's something else to conspire against us. Precision is neither easy nor cheap!

Output protection

As mentioned in the introduction, this always seems to be missing from the various DIY and eBay offerings you tend to find. But having taken the time to hand-select a number of LM4040A voltage reference ICs, it seems perverse to not include some sort of protection for the unit - accidents happen. As does static discharge, etc.

For the first line of defence, I chose a chunky Zener diode - looking through my stores, the 1N55353B seemed like a good choice. A slightly lower voltage would have been better, but that would involve placing orders - if you are building your own, then by all means select a 13V part if you wish. But do check that there is absolutely no reverse leakage at 12.5V.

This Zener is good for 5 watts in theory. Either way, it'll protect against the application of an external voltage of the wrong polarity, and it'll limit the maximum voltage that can be applied of the correct polarity, provided the source can't supply too much energy.

But the references themselves still need protection, so a resistance of some sort must be added between the Zener and the references.

Output protection

Note that the ÷10 option isn't shown on these simplified diagrams because when engaged, it (along with the zener) provides all the protection needed. But as you can see, when in the x1 mode, the references are cruelly exposed to the outside world.

How to select Rprotect? First, we learn from the datasheet that the absolute maximum current the LM4040 can see is 20mA. Of course, it's getting 2.5mA from the current source, so Rprotect must limit the external current to 17.5mA. As the externally applied voltage will (hopefully!) be clamped to 16V by the Zener, we can see that the highest voltage across Rprotect will occur when we are using the 2.5V option, and Rprotect comes out at 770Ω. The nearest preferred value above this is 820Ω, which is rather high, but increases the safety margin.

However, this resistance is in series with the output at all times, and will cause a small error. We looked at these in the previous section when considering the ÷10 option - applying the same thinking, we see that with a 10MΩ DMM, the reading will be 0.008% low. Perhaps not a big deal in isolation, but it's yet another systematic error. Can we reduce this?

We can't reduce the value of the resistor significantly without risking the reference ICs, so some lateral thinking is required here. My first thought was to use an "oldschool" light bulb.

To many, this will make complete sense, but for those who haven't met the idea before, remember that a light bulb is a non-linear resistance. When the filament is cold, the resistance is nice and low. But when glowing, the filament resistance is much higher. Exactly what we need here!

Output protection using a lamp

A quick look through my stocks turned up a lamp that isn't quite the optimum choice for this, but it proved the point. At 13.5V (16 minus 2.5), it passed something like 30mA - clearly too high - but when cold, the resistance is only 45Ω, so this is a big step forward compared to the notional 770Ω resistor we considered earlier. Now the error caused by the output protection is only -0.00045%, which is most pleasing.

However, if I did find a suitable lamp with a lower current at 13.5V - which would have a higher cold resistance, of course - then there is still a problem. The filament takes a period of time to warm up, so in the event of an over-voltage situation, the references will recieve a "spike" of current during the initial transient. Perhaps the reference ICs would survive this, but I'd rather not risk it. However, this method is a useful one to bear in mind - I've used it before, and have seen it used commercially.

Next to consider is a solid-state solution. By far and away the easiest solution is the classic JFET current source:

Output protection using a J-FET

I chose the J112 because it is cheap and plentiful, plus it is quite well suited to this, having a decently low channel resistance of 50Ω or less - most of my samples measured close to 35Ω. Naturally, this is added to the series resistance of 100Ω, so the source impedance is a little higher than the lamp solution, but definitely better than the 770Ω (or 820Ω) fixed resistance. Errors into a 10MΩ DVM are now -0.00135%. Remember that the simple resistor gave -0.008%. On balance, for the price of the JFET (about 20 pence from Farnell, I think it's worth including.

Complete schematic

The complete schematic is here - please click to enlarge:

Full schematic of the DVM
      calibrator

This shows how the second pole of the 6 way switch is used to switch the battery power to the unit. In practice, a simple length of tinned copper wire is used to join together the various tags of the switch. Switching the negative rather than the positive rail neatly saves running an extra length of wire.

You can also see how I incorporated the means to switch between the two topologies. With the jumper on the left of JP1, the current is applied to the top of the reference chain. But with the jumper moved to the right, the current is applied to the common connection of S1a, and hence only to the number of references required to give the selected output voltage.

I did think about placing the output protection FET between the two poles of the ÷10 switch, so that it's only in circuit when not in ÷10 mode - that way, the output impedance would be ~135Ω in normal mode, and ~1kΩ in ÷10 mode. As it is, it's ~1.135kΩ in ÷10 mode. However, it wasn't especially easy in practice because of the circuit layout, and I didn't think it was worth re-arranging everything to accommodate the FET and resistor on that part of the board. Mounting those components on the switch itself was an option, but it would have been a bit messy. Maybe next time...

Construction

A rummage through my stores turned up a nice die-cast aluminium enclosure. I liked the idea of a metal box, which will help to keep out RFI, and the thermal mass should smooth out fluctuations in temperature. This measures 120 by 65 by 40mm, and was still shrink-wrapped, complete with the original RS label. It is still available (part number 244-8612), for around £9+VAT - I wouldn't have paid anything like that for it originally, although that would have been some 15 years back! This box has a nice white nylon finish and PCB guides.

Positioning the 2 batteries and the rotary switch were the main challenges. These dictate the layout of the controls rather more than I would have liked, but I couldn't think of an obviously better solution. My first thought was to put the switch between the batteries, which would have allowed me to move the switch up the box, giving more space between it and the output terminals. It would also have allowed me to have positioned the ÷10 switch in a slightly rather better place with a bit more space around it. However, while it initially appeared to be feasible, the PCB guides inside the box took too much from the internal width. So the batteries are on top of each other at the top of the box, retained by an offcut of FR4 PCB material that sits in the PCB guides.

I built the circuit on a piece of Veroboard - no point spinning a PCB for such a simple circuit, and it's only a one-off. As usual, planning was done on some old 0.1" graph paper that I acquired years back - no idea how easy it is to find today, but suffice to say, I take good care of my pad! The board is held in place by the 4mm output terminals.

The ÷10 toggle switch is bolted to the lid of the box. Originally I planned to secure it to the Veroboard in the hope that the threaded bush would be long enough to reach the lid, but the 4mm terminals spaced the board too far away. Instead, I made a rectangular cutout in the Veroboard to accommodate the body of the switch. Fiddly, but worked well.

DVM Statistical Reference - internal layout

And here's a closer look at the Veroboard. Note the jumper that changes between the two topologies detailed above. As you can see, I used a mixture of resistor types - none are especially critical, apart from the 10k and 1k1 that form the ÷10 potential divider. The 1/8W types are very convenient for compact Veroboard layouts, of course.

DVM Statistical Reference - Veroboard detail

Here is the underside of the Veroboard. Note the LEDs, and how the solder tags are attached to the board. The chassis connection is made via the washer on the toggle switch. Should you wish to copy this design, there should be enough detail between these two image, plus the schematic. Take care when doing so, as moving anything will upset the whole layout.

Underside of the board, showing the LEDs, etc...

Note how the high-Z node (highlighted in red on the schematic) is floating above the Veroboard to eliminate the risk of leakage:

DVM Statistical Reference - detail of the low-leakage node

As this image highlights, I always take the time to neatly file Veroboard edges to a nice, smooth finish. Not only does this look better than the "raw" snapped edges, but it was very necessary here to allow the board to fit in the box. This also means that the board has to be properly centered when mounted on the lid. As you can see, every track is used, so making the board narrower was not an option.

DVM Statistical Reference - completed project

The completed unit was labelled using laminated labels (Brother TZ) - fine for a bit of test gear like this. I didn't bother to label the LEDs as the smaller font sizes look a bit blocky, and it would make it look more cluttered. Besides, green for "good" and red for "bad" are pretty obvious colours. Similar comments apply to the output terminals, of course.

Conclusion

Primarily, this was an experiment to prove the theory of the "Statistical Reference", and this worked as well as expected. The construction that resulted incorporates a number of interesting ideas and circuit configurations, and is a useful addition to the workshop. I recommend it to anyone who can make use of a simple DVM tester in their lab and wishes to try something that is a little bit different to the norm.

Upon assembling the project, the 12.5 output was higher than expected, so I swapped sample #30 with sample #5. In theory, the 12V output should have been slightly too high, but in practice it was very close to the wanted value.

Table 14 - Final measured results from selected LM4040A samples
Sample Voltage Total voltage Error Measured voltage Actual error Predicted error
28 2.50005V 2.50005V 0.002% 2.50051V 0.0204% ±0.1%
11 2.49981V 4.99986V -0.0028% 5.00072V 0.0144% ±0.071%
16 2.50021V 7.50007V 0.00093% 7.50113V 0.015% ±0.058%
12 2.49956V 9.99963V -0.0037% 10.00135V 0.0135% ±0.05%
5 2.49840V 12.49803V -0.01576% 12.5008V 0.0064% ±0.048%

The final results are very respectable - all considerably better than the 0.1% target. However, they're not as good as predicted, and that's because the references have changed slightly since initially being measured. Quite why this is needs investigation, but I'm planning to "burn in" all of the references and repeat the measurements.

It should be said that the 15ppm tempco is noticeable here. In the context of a 0.1% reference, 0.0015%/°C is reasonable, but better types are available for more money. The measurements above were taken some 5 or 6 hours after the workshop had been powered up, and the temperature had risen some 5-10°C in that time. When first powered up, the 12.5V output measured 12.4955V - a rise to 12.5008V indicates a change of 0.04%. Some of that, of course, would be because of the meter itself - the Keithley 2015THD specifies 1 hour to reach specification. More careful measurements are needed to eliminate that aspect.

How about the ÷10 mode?

Table 15 - Final measured results when in ÷10 mode
x1 Voltage ÷10 voltage Divider error Absolute error
2.50051V 0.250054V 0.0012% 0.0216%
5.00072V 0.500071V 0.0002% 0.0142%
7.50113V 0.750099V -0.0012% 0.0132%
10.00135V 1.00010V -0.0035% 0.01%
12.5008V 1.24998V -0.0080% -0.0016%

These measurements were taken from the Keithley 2015THD, which has a GΩ input impedance in these ranges (except for the range used to make the 12.5V reading), so the Fluke 287 (10MΩ) was also in parallel as both a useful double-check, and to present the more typical 10MΩ input impedance. In the x1 mode, adding and replacing the Fluke (i.e. changing the load impedance from 5MΩ to 10Ω) changes the 12.5V output by only 2 counts. That's 200µV or 0.0016% according to the meter, and the calculated change is 168µV (0.001344%), so that's a nice case of theory matching practice, even at microvolt levels.

I'm pleased with these results. As before, we've easily exceeded our 0.1% target. But more interestingly, look at the "divider error". This isn't really a divider error as such, as the resistors aren't changing value at these low voltages - rather, you're seeing the result of the reference voltage falling slightly as you go up in voltage because the potential divider is robbing current from the reference chain. Indeed, if you look closely at the numbers, you'll see that I set the preset for 5V operation! Below that, the voltage is slightly too high, and as you go above 5V, the voltage gradually falls. This was mentioned earlier, and here we can see it happening for real.

This is a nice picture - if we ignore the glare and reflections from the poor lighting - showing the voltage after a couple of hours of warm-up time. OK, we know that it'll rise to 12.5008V after a while, but we'll gloss over that :-)

DVM Statistical Reference and some nice meters

Overall, a nice little project using some interesting techniques and realised for an extremely low cost. As you can see, if you are able to ensure the A-grade 0.1% devices meet their specification, you can easily achieve 0.05% at 10 volts, and if you are able to accurately select the reference ICs, results far better than expected can be achieved.

However, be realistic about the long-term performance of this simple project - even if selected for accuracy, these low-cost references won't have the precision of their (much!) more expensive brethren, so will, in theory, drift with time and temperature. Already I can see that the 15ppm/°C tempco is as high as you'd want to go for something like this. However, once more data has been collected and more experience has been gained, I will report back here... In the meantime, just build one!

Postscript: Why I buy Flukes

OK, I can't resist doing the obligatory "Why I buy Flukes" photograph! I admit that I'm a bit of a fanboy, but here's why:

Why I buy Fluke

And we see that all meters read 10V, plus or minus one digit. That's astonishing when you look at the range of ages here.

From the left, an old 8021B that works well apart from a poorly LCD (can anyone help with a spare?). Next, an ex-MOD 25, which is a lot bigger than I expected - built like a tank, appropriately enough! These often appear in big batches on the second-hand market, so prices are pretty reasonable (£35 or less - bargain!). That's followed by a 79 Series II, which has cleaned up pretty well. A NOS holster from eBay helps spruce it up. The next meter took some finding, but I held out for a mint one - the 8060A made for IBM (talk to the original designer here). Absolutely lovely meters, especially if you do audio as the AC bandwidth gets out to 100kHz and they have a dBm mode.

Next, a recent example of the 87V, which is my day-to-day meter - mostly because it has excellent battery life and a good range of facilities - but you wouldn't want to buy one new given the price! Like the 8060A, the 189 is superb for audio engineers as it does dB and has 100kHz bandwidth, but it has appalling battery life (50 hours from 4 AAs) and it can be tricky to drive some of the subsidiary functions. Finally, the 287 is a worthy replacement for the 18x range, and it manages to have double the battery life, but it's still power-hungry compared to the 87V, and is a bit slower to drive via the menu system. The logging capabilities of the 189 and 287 are occasionally useful, but Fluke charge a fortune for the USB cable and software. I eventually found a package second-hand, but these should come with the meters IMHO.