Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Thermal drift compensation

Status
Not open for further replies.
This reference data sheet specifies 400ppm accuracy. Assume you can trim it with a very good benchtop volmeter such as Fluke 8846A to 30ppm and it's going to hold it (which is to be tested).

The combined error of the measurement is a square root((reference error)^2 + (input error)^2). If reference error is 30ppm, an input error of 20ppm will give you a combined error of 36ppm. Any further increase in input accuracy will not improve the combined error by much. Therefore, you have no reason to imrove input accuracy beyond 20ppm. This is 20uV for 1V measurement.

If you don't calibrate the reference and it stays at 400ppm, there's no reason to improve input accuracy beyond 250ppm, which is 0.25mV for 1V measurement.

24-bit ADC resolves about 0.06ppm. This does not mean that you get 0.06ppm accuracy. Your ADC data sheet specifies 14ppm max non-linearity error, 2mV (2000ppm!) offset error and 12ppm gain error. If you strip offset and gain errors (which will require to decrease already slow samplng rate 3 times), you still get stuck with 14ppm non-linearity, so your last 8 bits will never be accurate. This is another reason not to increase your input accuracy beyond 20ppm.

It is possible that you could get better accuracy by oversampling with a fast 16-bit ADC rather than by getting 24-bit from a slow ADC. Depends on the signal you measure I guess.
 
I must admit to having gone about the whole thing backwards, because I started from a position of a lot of enthusiasm and very limited knowledge, and though I've filled in a lot of holes there's still a great deal I have to learn. TBH it's a very long time since I actually looked at either datasheet. Anyway, I think that's the most useful thing anyone's told me on the subject of accuracy, it's going to take a while to digest :)

As to calibration, the general idea when it's finished is to find a friendly lab somewhere with an accurate voltage reference they'll let me connect it to if I ask very nicely...
 
Hi,

For what you are looking for i would recommend placing the circuit inside a small temperature controlled oven. At least that way you can control the temperature of all the parts, including voltage references. There would of course then be a warm up time before using the meter. An instrument like this would normally require calibration every 6 months too, if you really do need that accuracy for some reason. It would be interesting to find out why you need this extreme accuracy and resolution also. What i find is that for most work resolution is preferred over accuracy. If you have the resolution you can see the small changes in the measurements even if you dont have the extreme accuracy. Of course accuracy is very nice, but it's much harder to obtain without taking extreme measures because every aspect of nature comes into play where we can not ignore anything. It's like you have to build a little laboratory in a box.
 
Right, it's the weekend so I have a little more time now!

Again, since I am a complete amateur, high accuracy wasn't what I originally set out to do, it is a challenge I rather unwittingly set myself, when I only wanted something more accurate than what I already had.

This whole thing started when I realised how bad my 3.5 digit dmm is after I re-calibrated it using one of those Intersil references. I decided I could probably build a better meter and mistakenly got a high resolution ADC without really understanding what I was dealing with. So there is no specific need for great accuracy, other than making the most accurate instrument I can. So it is about resolution and about consistency from one range to the next (unlike my existing meter). I was originally going to go for building a 4.5 digit meter, just got carried away. I do look forward to being able to observe effects exactly like the ones I need to overcome though, such as temperature gradients across a series of thermocouples, or the differences between supposedly identical components. That would be really interesting.

So anyway, I now have a job where I spend a lot of time sat in front of a computer not doing any work, so (inspired by NorthGuy's last post, thanks) I started putting numbers into a spreadsheet to emulate the signal path from input voltage to display, including offsets and thermal drift of the reference, OA, ADC and resistors. The only thing I didn't include is thermocouple voltages since I know to balance those out anyway there would be no point including them in such a simple model. I also didn't include the positive and negative gain errors of the ADC because I don't understand them, but since it will get its input from a fully differential OA I assume they will mostly cancel out. I emulated 10 turn pots in my spreadsheet which let me trim to within 20uV - no substitute for real life I know but it gives an idea.

So it turns out from playing with this model all week that when adjusting the temperature for everything, the single biggest effect comes from this input amp and the second biggest effect is from the reference, but (assuming a ptc for everything) they cancel out to a certain extent - indeed it's possible to put in tc's which cancel out completely. (impossible in real life, I know, but something to use to improve things nonetheless).

The spreadsheet shows that even with a low tc amp I still need to control the temperature to better than 1 degree. I have no idea what the degree of difficulty is in doing this since I haven't looked into it yet.

Considering there are 6, 7 and even 8 digit dmm's around that have been made for years, I'd love to know how the pro's get over these problems. Far more clever circuits than my amateur brain can come with I'm sure!
 
Gain error is quite simple. You have an input x, and you get a measurement y.

You get y = a + bx + e(x)

Here a is an offset error, b is a gain error and e(x) is a nonlinearity error. We ignore noise for a moment.

You can do two measurements of known voltages, say 0.1V and 4.9V. Let's call them Vl and Vh. Assuming there's no nonlinearity error.

yl = a + bVl
yh = a + bVh

Subtract one from the other yh - yl = bVh - bVl = b(Vh-Vl), so

b = (yh - yl)/(Vh - Vl)

then a = yl - bVl

Therefore you can remove the offset and gain error completely. But you need y1 and yh and of course precise references for Vh and Vl.

If you supply Vh and Vl at the source you will also remove all the gain/offset error of your amplifier. This may let you use inexpensive 0.05% resistors and still get good accuracy.

You can remove amplifier noise by oversampling. Average of 100 samples will have 10 times less noise than individual samples. But this won't remove systematic errors such as offset, gain or nonlinearity.

Errors do not cancel each other unless they are correlated (e.g. noise in a twisted pair). In your application, they probably won't be correlated. To quickly account for combined error, you square all the errors that you have, sum them up and take a square root of the sum.

The number of digits doesn't automatically mean accuracy. For example I can measure pi and get 3.156498787668. I've got bunch of digits, but only 2 are accurate. In a reasonable price range, a freshly calibrated Fluke 8846A measures voltages to about 30ppm at 25C, which is 4.5 digits.

It is good to have more digits because you can do your math without worrying about rounding errors, however once you have enough digits to maintain your level of accuracy, there's no point in using more digits.
 
Wow. So, in terms of ADC gain error, I treat it's output count (or rather, the reading derived from it) as y? I couldn't get my head around it because I see the word "gain" and I think of an amplifier. It's probably just me, but in your explanation it looks like you've used the term b for both gain and gain error. However, am I correct in understanding that gain error appears as an offset, and that is why the datasheet gives it in ppm of vref? That's what I really couldn't make head or tail of.

Interesting how errors add up in the same way as noise does - I didn't know that, don't think I've seen it mentioned anywhere. I am not mathematical so I would never have worked it out either.

Good point about oversampling and noise though, I will do that. How do I work out how many samples I need to get any particular reduction? I'm guessing it's going to be another sum of roots kind of thing, but I have no idea.

It's more about being able to observe effects than absolute accuracy, though I hope it's better than your version of pi! For example, I've heard about the effect of light hitting a glass bodied diode, but I want to be able to observe it. I've heard about soldered joints acting as thermocouples, but I want to observe what they do. I don't need an accurate meter for this, but I do need one with good resolution, so beyond simply needing a better meter than my 3.5 digit Mastech, that is what this is about (although accuracy is nice). I can't afford to buy a replacement for my Mastech, but I do have most of the parts for this project. I don't have any particularly accurate equipment (actually very little equipment at all) because I can't afford it.

In your previous post you say that to strip offset and gain errors would require reducing the sampling rate 3 times. Why does reducing the sampling rate reduce these errors?

Anyway, thanks for the help :)
 
Hi,

Just a note here, if you want to measure small voltages you can also use low input offset amplifiers. These can amplify the voltage by 10 or 100 times for example, meaning 10uv turns into 100uv or 1mv.

You should be able to use a regular meter to measure the voltage of a glass body diode when light hits it. It should be greater than 0.1v for example.

You seem to have gathered enough knowledge now though to be able to build a high resolution meter, so maybe you can get that working soon too. The best meter i have has a built in 24 bit ADC and it works pretty well i guess, but i find i dont use it as much as i thought i would. I used it to measure low ohm resistors and low resistances such as we find in wires and connections like clip leads. I find quite a bit of voltage drop in clip leads even heavier gauge ones i built myself.

If you can get a hold of such an instrument without building one you can use it to calibrate an amplifier that will help with the low level measurements.
 
Sure hope you are right MrAl. I'm caught between itching to get building and working out these last bits of design. Driving me nuts!

I've come across some interesting other projects whilst researching this, so I'm going to have a go at building the Geller labs resistor noise amp, and a general purpose noise amp inspired by this one: https://www.amplifier.cd/Technische_Berichte/Rauschanzeiger/Rauschanzeige.htm (actually a quite inspiring site altogether).

Bedtime now. Goodnight good folks.
 
Last edited:
Wow. So, in terms of ADC gain error, I treat it's output count (or rather, the reading derived from it) as y? I couldn't get my head around it because I see the word "gain" and I think of an amplifier. It's probably just me, but in your explanation it looks like you've used the term b for both gain and gain error. However, am I correct in understanding that gain error appears as an offset, and that is why the datasheet gives it in ppm of vref? That's what I really couldn't make head or tail of.

I used b as a gain - that is the number that you need to multiply your voltages to get ADC reading. It can have an error, which is a gain error.

Interesting how errors add up in the same way as noise does - I didn't know that, don't think I've seen it mentioned anywhere. I am not mathematical so I would never have worked it out either.

You can regard the noise as an error to your signal.

Good point about oversampling and noise though, I will do that. How do I work out how many samples I need to get any particular reduction? I'm guessing it's going to be another sum of roots kind of thing, but I have no idea.

Just divide your error by the square root of the number of samples. This will help with noise, but not with systematic errors. It also assumes that the signal is stable during the entire sampling period.

It's more about being able to observe effects than absolute accuracy, though I hope it's better than your version of pi! For example, I've heard about the effect of light hitting a glass bodied diode, but I want to be able to observe it. I've heard about soldered joints acting as thermocouples, but I want to observe what they do.

Most errors we were talking about are relative, they're expressed in % or ppm. If you shrink your range, your errors will shrink too. For example, if your range is 5V then 100 ppm error is 0.5mV. But if you go to 1mV range then 100ppm error is 100nV. You can amplify your 1mV range to your 5V ADC and, at the ADC you will have 0.5mV error, but it will correspond to 100nV at the probe.

Of course, if you go to small ranges then absolute errors become more important. Say, 10uV noise at the input is nothing for 5V range, but it's quite significant for 1mV range. The good think is that this absolute error exists only at your probes and at the input of your first amplifier (because after that voltages get higher). For such small ranges, you need a real good op amp, with very little offset noise. And you need to be very careful with the probes. Even simple protective diode can introduce a lot of undesired errors.

In your previous post you say that to strip offset and gain errors would require reducing the sampling rate 3 times. Why does reducing the sampling rate reduce these errors?

You need to measure control voltages to calculate correct offset and gain, so you need two test samples and one actual sample. So, only every third of your samples is meaningful. Correction helps with gain and offset, but decreases the sample rate (which is a bad thing).
 
Sure hope you are right MrAl. I'm caught between itching to get building and working out these last bits of design. Driving me nuts!

I've come across some interesting other projects whilst researching this, so I'm going to have a go at building the Geller labs resistor noise amp, and a general purpose noise amp inspired by this one: https://www.amplifier.cd/Technische_Berichte/Rauschanzeiger/Rauschanzeige.htm (actually a quite inspiring site altogether).

Bedtime now. Goodnight good folks.

Hi,

Do you have all the parts now?

One important point is the layout. The analog ground should be separate from the digital ground. Not sure if you considered this yet or not.

Once you get it built up you can always modify it later if needed. You might build any circuit that is still questionable on another PC board so you can change the whole thing later if you need to. The software you can always work on later and get it better and better. When i started with my first digital voltmeter i did not use any oversampling or averaging for example just to get it up and running and basic testing. Later i improved the software for better measurement accuracy and stability. Later yet i added a Windows interface so it could be run through Windows, and that meant lots of software possibilities such as averaging the readings, storing and detecting highs and lows and triggering alarms, etc., for each channel. Once you get that far it becomes just a matter of Windows API programming rather than hardware modification or uC hard code reprogramming. You can get nice and carried away with the graphical interface that way too to make it appear very professional. At that point it's voltmeter heaven.

Here's a quick screen shot of one of the Windows graphical interfaces, just the basic type...
 

Attachments

  • MonitorScreenShot.gif
    MonitorScreenShot.gif
    24 KB · Views: 146
Last edited:
NorthGuy - Ok I think you have filled in the important gaps for me now - a very big thank you!
MrAl - You never cease to surprise me! I have most of the parts. Still going through choosing this input amp though, which is closely tied to whether I use a classical input divider (multiples of 9) or the style patented by Tandy with a permanent 10M resistor in series. Still feels like a 3 way catch 22, but at least with NorthGuy's input on the subject I can set up more informed parameters now :)

I'm going to do a "mostly" dead-bug style build with a little oven built over the analogue section. I have seen photos of the inside of an HP OCXO which uses a transistor as the heating element, which seems a sensible idea so I will do that instead of using a resistor as originally planned. There are even a couple of EDN articles on the subject. I know it will take a long time to stabilise but time isn't an issue when I do actually have any. When it's built I'll just plug it in and leave it for a month before I do anything with it so as to burn in the reference. Oh and separate grounds was one of the very first things I thought of ;)

I wrote the code for the micro a year ago but wasn't able to test anything because couldn't actually program it. Well I can now thanks to some kind folks here, but things have evolved quite a bit so I need to change the code and it's going to take a while to understand again what I've already written. Some of the switching requirements have changed too - I'm quite glad I didn't actually make the logic pcb yet, though I was all set and ready to go with it, because it would now need "editing".
 
Status
Not open for further replies.

Latest threads

Back
Top