Author Topic: Doing it RAW: Tapping Keithley 2001 ADC  (Read 475 times)

0 Members and 3 Guests are viewing this topic.

Offline openloop

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Doing it RAW: Tapping Keithley 2001 ADC
« on: Yesterday at 06:35:10 am »
If you ever wondered how a multimeter's microcontroller sees outside world, wonder no more.
I've tapped into "ADC -> Micro" communication line of K2001 and got about 4 hours worth of readings in 20V range, 10NPLC, 60Hz land measuring a 10V reference.

Behold:
[ Attachment Invalid Or Does Not Exist ] [ Attachment Invalid Or Does Not Exist ]

Simplified workflow: knowing exact value of LM399 reference and knowing where "zero" is, one can derive slope and offset of the ADC. Knowing value of 10.5V trace one can derive input divider's ratio, thus knowing payload reading and the ratio one can calculate voltage on the input terminals.

Additional comments:
- Warmup lasts much longer than 1 hour. I'm not sure if I ever reached that mythical, blissful state.
- Data comes in form of two 16bit signed integers (big-endian). One is for final slope count, another is for dual slope difference;
- Dual slope difference goes through integer overflow (at 10 NPLC). No doubt a design screw-up;  :palm:
- Voltages have inverted sign, for some reason.
- At least in A08 firmware, auto-cal is incomplete: apparently final slope to dual slope ratio is hardcoded in (8000, I think). That's just ugly.  :-- One needs a chopper like setup to catch the error (if using data coming out of the micro) >:(   Raw data can be processed around this nonsense.
- My setup was: old Arduino Uno connected to opto-isolators on the digital board, Arduino feeds real-time data to my (floating) laptop.
 

Offline openloop

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Doing it RAW: Tapping Keithley 2001 ADC
« Reply #1 on: Yesterday at 06:45:03 am »
 |O
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 7623
  • Country: de
Re: Doing it RAW: Tapping Keithley 2001 ADC
« Reply #2 on: Yesterday at 07:42:45 am »
....
- Data comes in form of two 16bit signed integers (big-endian). One is for final slope count, another is for dual slope difference;
- Dual slope difference goes through integer overflow (at 10 NPLC). No doubt a design screw-up;  :palm:
- Voltages have inverted sign, for some reason.
- At least in A08 firmware, auto-cal is incomplete: apparently final slope to dual slope ratio is hardcoded in (8000, I think). That's just ugly.  :-- One needs a chopper like setup to catch the error (if using data coming out of the micro) >:(   Raw data can be processed around this nonsense.

If there is an overflow in the signed integer representation, this indicates that the number may be unsigned, possibly with an offset. That is the natural way to get the result during the integration /  run-up ("dual slope") phase.

The coarse part of the final counts and the run-up part are naturally in a fixed integer ratio as they use the same clock and reference switches. Only the fine part of the final rundown has 2 separate reference sources and thus a separate scale factors for the fine slopes. This may be either a fixed value define by precision resistors or it could be a measured value, only close to a nominal number. Not sure how this is handled with the K2001. They give 0.1 % grade resistors, so it may be a hardware defined ratio. Even than there may be still some numerical correction - though possibly small.

Judging from the graph the K2001, a little like the old 19x series meters does measure the ADC gain frequently (for every reading ?). So there is more than just zero and the input signal, but also a reference for the scale factor. It is odd to have both a 6.9 V and 10.5 V values. Are there really so many reference readings, or are some readings more frequent than others ?
The sequence could give a hint on why the newer Keithley meters (K2000 ... DMM6500, DMM7510) have the ugly extra noise over the 1-30 seconds range.
 

Offline openloop

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Doing it RAW: Tapping Keithley 2001 ADC
« Reply #3 on: Yesterday at 08:12:45 am »
Quote
If there is an overflow in the signed integer representation, this indicates that the number may be unsigned, possibly with an offset. That is the natural way to get the result during the integration /  run-up ("dual slope") phase.

Does not matter signed or not - if there are two voltages mapping to the same value (e.g. 8v and -6V) then there's overflow. They use a software hack to distinguish the two. It is possible to fool it. [edit: no, it is not. Read below.]

Quote
They give 0.1 % grade resistors, so it may be a hardware defined ratio.
It is. The ratio of (R835 + R846) to R844  i.e. 20K to 4M.   It drifts.  So from time to time there's a step in output when final slope counter (blue) jumps (if the ratio is not exact, and it never is).

Quote
Judging from the graph the K2001, a little like the old 19x series meters does measure the ADC gain frequently (for every reading ?). So there is more than just zero and the input signal, but also a reference for the scale factor. It is odd to have both a 6.9 V and 10.5 V values. Are there really so many reference readings, or are some readings more frequent than others ?

The sequence is this:
7 auto-zero(auto-cal) measurements, interrupted after every two to do another "payload" measurement.
The 7 are : 10.5v, 8.6v, 6.9v, 0v, 0v, 0v. In endless loop.
Zeros measured in different configurations : one is simple analog ground, one effectively is voltage offset of the ADC buffer op-amp. Not sure where they use it, but respect.
10.5V is needed to determine exact ratio of the input. Range is +-20V, but ADC is (about) +-11V. So users input is divided by two. Exact ratio is determined by the 10.5V measurement.

« Last Edit: Today at 01:08:05 am by openloop »
 

Offline openloop

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Doing it RAW: Tapping Keithley 2001 ADC
« Reply #4 on: Yesterday at 08:26:20 am »
Quote
The sequence could give a hint on why the newer Keithley meters (K2000 ... DMM6500, DMM7510) have the ugly extra noise over the 1-30 seconds range.

In K2001 I was able to trace that kind of noise to the way they process the data: They average the auto-cal readings for a minute (or half?) then recalculate all the coefficients. Thus creating characteristic saw pattern.

No fancy Kalman filters...
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 7623
  • Country: de
Re: Doing it RAW: Tapping Keithley 2001 ADC
« Reply #5 on: Yesterday at 09:01:30 am »
With 4 M and 20 K the slope ratio for the smallest slope is 1/200.  Ideally the finest slope should only be used for 1 step of the coarse slope. There likely is some added constant part, but this would be there for the zero reading too, so it would be subtracted anyway.
So it would be only a small contribution and an accuracy better than 0.5 % for the slope ratio would be sufficient to get an error of less than 1 LSB. It is a little boarder-line, but the resistors may be just good enough.

One would normally not measure the slope ratio very often, as the stability of the resistors should be good enough even for a longer time. So one may not see the measurement by sniffing the communication.

Getting the same result for two inputs is really odd, so a real overflow  :palm:. There may be a hidden bit in the other result word.
 

Offline openloop

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Doing it RAW: Tapping Keithley 2001 ADC
« Reply #6 on: Yesterday at 09:23:42 am »
Quote
So it would be only a small contribution and an accuracy better than 0.5 % for the slope ratio would be sufficient to get an error of less than 1 LSB. It is a little boarder-line, but the resistors may be just good enough.
That's not just resistors. They (resistors) set the charge/discharge current. The problem is - they connect to different voltages (naturally). One positive, one negative. Those voltages drift too.  :palm:
Thus I wouldn't bet that this keeps stuff in spec... Plus seeing a sharp step in readings is very confusing to the user.

Quote
One would normally not measure the slope ratio very often, as the stability of the resistors should be good enough even for a longer time. So one may not see the measurement by sniffing the communication.
It's not good enough (one can see that, for example, ceiling of blues drifts too)
And these are all the communications after like 2 seconds of setup.
I did an experiment - changed the ratio a little bit. And those steps become horrible. Thus - they do not auto-calibrate those at all.

Quote
Getting the same result for two inputs is really odd, so a real overflow  :palm:. There may be a hidden bit in the other result word.
There is no hidden bit [edit: kinda is. see below]. In A08 at least. I was able to confuse the instrument by switching input very fast (in overflowed range).[edit: now I have doubts of what happened]
Although this result was not reproduced in newer hardware/firmware versions (I asked people to do the experiment few days ago).







« Last Edit: Today at 01:11:23 am by openloop »
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 7623
  • Country: de
Re: Doing it RAW: Tapping Keithley 2001 ADC
« Reply #7 on: Yesterday at 09:59:34 am »
They may very well trust the resistors enough and not do the numerical correction for a non ideal slope ratio.  Anyway it looks a little odd that there are 2 smaller slopes, but both from the negative side. So if looks a little like they use either the 4 M or 920 K resistor, but likely not both steps. It may be something like the 4 M only for slower conversions.

I know there is also the reference voltage that can drift. So the 0.1% resistors may not absolutely guarantee less than 1 LSB DNL error. They may sort out the rare cases where the resistors are all on the wrong side.  Using a measured slope ratio has a strange effect on the result: the steps are no longer all equal. And the result is no longer a simple integer with all values possible. This could be a little confusing and also add errors if the quantization error is large compared to the white noise background.

For the result there is the questing if the small slope part is already scaled or still the raw steps (1/200 or 1 /46). If still the raw numbers, the ground relative part could still apply the corrections if it has measured scale factors. The extra measurement may be only during calibration of so. The stability of the resistors and voltages may be good enough for years.

That the limiting values for the blue slopes are drifting is likely not a problem: it happens the same way to the zero reading and one will always use differences, not a single reading. This only reflects some drift in the point where (or haw fast) the fast slope comparator triggers and this way the constant part from the small slope part.
 

Offline openloop

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Doing it RAW: Tapping Keithley 2001 ADC
« Reply #8 on: Yesterday at 10:24:15 am »
Quote
It may be something like the 4 M only for slower conversions.
Yes, this is correct. 4M used in high precision, long integrations.

Quote
For the result there is the questing if the small slope part is already scaled or still the raw steps (1/200 or 1 /46). If still the raw numbers, the ground relative part could still apply the corrections if it has measured scale factors. The extra measurement may be only during calibration of so. The stability of the resistors and voltages may be good enough for years.

Those are clocks (you can see actual values in the graph). Although for dual slope it's like divided by something. So, raw. There are no brains on the ADC board. That makes it ideal for modding.  >:D

About setting it during calibration and years stuff: my first thought too, but after combing through actual calibration constants, and doing (non-factory) calibration - no luck.
And then I realized that the whole thing is referenced by a fairly regular zener (not LM) and there just waay too many resistors involved (with, like, 10ppm or worse) in references and stuff and the fact that I see steps when blue jumps (and red changed by 1). I had more experiments with better references and good dividing networks and I came to the conclusion that the ratio they use is exactly 8000 counts of blue = 1 count of red. That actually settles it - it is hardcoded.






 
« Last Edit: Yesterday at 10:28:20 am by openloop »
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 7623
  • Country: de
Re: Doing it RAW: Tapping Keithley 2001 ADC
« Reply #9 on: Yesterday at 11:50:05 am »
The regular zener as an additional local reference for the ADC is indeed odd, as this can add some noise and needs the measurement of the scale factor (e.g. the 10.5 Ref.) even for fast measurements. Chances are the zener is reasonable low noise, possibly better than the LM399. In theory the scale factor adjustment could be slow, effectively adding digital filtering to the LM399.
So if the extra zener is really low noise it can even help to reduce at least the shorter time scale noise.

However the extra ref. does not effect the slope ratio part. Here it is R843,R845, R847 and the offsets of U811 and U813 (at the integrator) for the reference voltages.  The other resistors are the 4 M and 19K+1 K at the normal reference. So it is mainly 2 resistor ratios (with some resistors as the sum of 2, which is more helping than bad). In addition there are leakage+bias currents that can have an effect. However even the slow slope is still some 10 V / 4 M = 2.5 µA. So it would take a lot of bias to have a significant effect. Still U813 can have some effect from the bias.

The ratio of 8000 for the "red" and "blue" steps is odd, as the slope ration would be 4M/20K = 200 
So some of the blue part should still be due to the fast slope. So there would have to be some math (like add in steps of 5). 16 +13 bits would be a rather high resolution so changes are the blue curve would not use all the bits, more like only steps as multiple of 8 or so.
It is still strange to have only a little more than 16 Bits from the fast slope: 200 ms (for PLC) divided by some 100000 counts would be 2 µs, so this would be rather coarse time steps, so the sloe slope would take quite some time and also have a larger effect than needed.
 

Offline TiN

  • Super Contributor
  • ***
  • Posts: 4190
  • Country: us
  • xDevs.com/live - 24/7 lab feed
    • xDevs.com
Re: Doing it RAW: Tapping Keithley 2001 ADC
« Reply #10 on: Yesterday at 04:26:38 pm »
Similar approach is also used in K2182A, where LM399 ref used only for autocal network, and actual ADC (K2000 type) works out of 6.2V zener.
YouTube | Metrology IRC Chat room | Live-cam | Share T&M documentation? Upload! No MB limit, firmwares, photos.
 

Offline openloop

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Doing it RAW: Tapping Keithley 2001 ADC
« Reply #11 on: Yesterday at 05:26:03 pm »
My guess they used local reference because it makes it completely independent.
The problem with it is that it adds more to ADC's drift and, as I see it, drift is the instrument's main source of noise (at least in 20V range).
Mostly because of the way they handle it (averaging for awhile, then dropping new constants in)

Quote
The regular zener as an additional local reference for the ADC is indeed odd, as this can add some noise and needs the measurement of the scale factor (e.g. the 10.5 Ref.) even for fast measurements.
They need to do scale measurement anyway because the compound ratio of R835+R846 to R840 to R841 is unknown.
Additionally, 6.9V measurement is the scale one (LM399's voltage is calibrated in). 10.5V is to determine  R327 to R334 ratio. I.e. the input divider.

Quote
However the extra ref. does not effect the slope ratio part.
OK, that's true. As "zener reference" I meant entire +-10V local reference voltages.
But already you see that the ratio of final slope to "zero crossing" slope is dependent on two not ratio locked dividers, which in turn made of not ratio locked resistors.
In an instrument that heats up to 40+ degrees under the shield.
It (the ratio) drifts. And even when it finally reaches a stable point it will never be 8000, that point is also room temperature dependent...
Back to my original point: not auto-calibrating this ratio makes K2001 not a fully autocalibrated instrument and it shows up in readings.What, they didn't want it to compete with 2002?  ::)

Quote
The ratio of 8000 for the "red" and "blue" steps is odd, as the slope ration would be 4M/20K = 200 
You're right.   :-+  I just crunched some numbers. Here's what I've got.
The granularity of that "fast" slope is 10 clocks (at 7.68MHz).
That got stretched by 200 times => i.e. it translates into 2000 clocks for the "slow" final slope.
But I get 8000...
Simply stuffing 2 bits on the right (i.e. multiply by 4) will result in even numbers, but I've looked into the data and it's not the case.
Looking closer I've found this: all measurements except payload indeed end with binary 00 (but they're all positive or close to zero)
All payload readings (for the final slope count) end with binary 01 for positive (on the panel, negative at ADC) voltages (left/first half of the graph) and 00 for negative (right half).
Thus they indeed shifted the count by two bits and used two lower bits for flags.
This explains why my overflow experiment didn't produce any results: they hide the polarity flag in there... Damn...
« Last Edit: Yesterday at 05:31:50 pm by openloop »
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 7623
  • Country: de
Re: Doing it RAW: Tapping Keithley 2001 ADC
« Reply #12 on: Yesterday at 08:24:43 pm »
From the design the K2001 is relatively old, more like the K19x series in some aspects, older than the K2000. The K2002 looks more modern and in many aspects like an improved version of the 2001 with the ADC as a slightly improved version of the 2000, and the input stage more from the 2001.

Doing the scale calibration in the background or even for every reading (like with the K19x series) is the old style. This can compensate for quite some drift (and even excess noise) of the resistors setting the ADC gain. With good resistors setting the ADC gain one can get away with much less frequent adjustment, like with a separate ACAL call. The extra gain measurement step takes up time and will add some noise to the reference for the long time scale (e.g. > 10s of seconds) for the short time scale one can use a second lower noise reference and this way reduce the shorter time scale noise. The 1N4579 zener is not just a simple one, but more like a good grade reference zener, a little like the more common 1N829. Chances are high it is considerably lower noise than the LM399. The added noise from the additional scale factor readings would be more like white noise with a low bandwidth. At long enough a time scale the added noise would be be less than the 1/f noise of the LM399 - so it can be worth it. The real time gain check to compensate resistor drift / TC is than more like an extra benefit.

There is however a more hidden downside: from dielectric absorption there is some delayed effect at the ADC. So it makes a small difference if the reading before (e.g. the payload measurement) was 10.5 V or 0 V. This can result in some extra LF background (e.g. every 14 readings or so) and also some INL error from the input reading effecting the reference scaling.

The separate reference could also help in avoiding a possible ground problem, as the extra ref. is on the ADC board.
At least with today's prices I would have preferred a 2nd LM399 to reduce the noise instead of the extra 1N4579. In the old days the zener may have been cheaper though.

The 10.5 V is using the same resistors (R334+R327) that normally set the attenuation to create some gain for the 7 V. So they need both readings, and especially the difference. So there can be quite some extra noise from including the r334/R327 ratio from the background readings.
Chances are the 2 V range would directly use the 1.75 V reference. So the 2 V range could be quite stable !.
 

Offline openloop

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Doing it RAW: Tapping Keithley 2001 ADC
« Reply #13 on: Yesterday at 11:21:06 pm »
The zener on the ADC board is a mistake. One can rationalize it's presence till kingdom come, but the simple mathematical truth is that if you add an additional independent noise source you shall add it's variance to whatever you already have. Thus invariably increasing your noise. Additionally, that zener has a really bad (comparing to LM399) temp co thus inducing even more drift.
Keithley guys realized the futility and in later designs they used a nice, onboard reference. The ground issue was solved by a brilliant move - bring in the outside reference differentially (plus it sidesteps the thermal EMF thing). This trick is used in 2002 and DMM7510 (maybe others too).

Quote
There is however a more hidden downside: from dielectric absorption there is some delayed effect at the ADC.
You found it too!  :-DD
Although I wouldn't subscribe necessarily to it being caused by "dielectric absorption", but there is indeed a "memory" or how I like to call it "non-Markovian shit" effect.
Surprisingly, the problem is not on the ADC board. I was able to trace it to U322 buffer acting a little bit like a flip-flop. With little hesitation I've replaced it with a modern chopper assuming (seems correctly) that any additional HF noise will be suppressed by ADC's integrator acting like a low pass filter. The chopper has made this "memory" phenomena pretty much  disappear.

Quote
The 10.5 V is using the same resistors (R334+R327) that normally set the attenuation to create some gain for the 7 V.
That is incorrect. The gain for 7V reference is explicitly set to one. (R334+R327) are excluded from feedback by the open U319 "//2" switch.
(R334+R327) divider is used exclusively to divide 20V range input by two. And because its ratio drifts (and not a part of the calibration) - hence 10.5V autocal.

Quote
Chances are the 2 V range would directly use the 1.75 V reference. So the 2 V range could be quite stable !
Maybe. The problem with 1.75V (a.k.a. 6.9/4) reference is that it's coming from a fairly noisy PWM. Thus, while being very accurate it is not very precise.
And considering how badly firmware handles drift I wouldn't be surprised if it has problems with a noisy reference too.
« Last Edit: Today at 01:05:31 am by openloop »
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 7623
  • Country: de
Re: Doing it RAW: Tapping Keithley 2001 ADC
« Reply #14 on: Today at 08:47:14 am »
The reference reading with the 10.5 V has some nice features. If am did not make a mistake in may short calculation the relevant size is the 10.5 V reading minus the 6.9 V reading. So they may not even need a zero reading if they get the ground right (same effective ground of the 6.9 V as for the 10.5 V, which should be possible as the 10.5 V ground is free to choose). From the sensitivity they could have as well directly read the 6.9 V reference in the 20 V range, getting around switching the gain.

Getting rid of the memory be changing U322 is a surprise to me. The main reason for memory inside U322 would be a thermal effect, tricky to estimate.  An AZ OP may still make sense here as it can offer good linearity - my best guess would be something like OPA189.
A memory from the last conversion can be quite annoying - I also see this in my ADC implementation and the main effect in mind is the DA. If linear one could compensate numerically, but it is of cause better to not have it from the start.

The K2002 and DMM7510 use a very low noise main reference to start with (LTZ and LTFLU) so no need for extra noise filtering. The K2002 uses separate current source for the ADC and this way can tolerate some common mode shift between the reference and input amplifier, possibly all the way to the low side of 4 wire ohms mode. I don't know how the DMM7510 does it, but from the pictures  it looks different from the K2002.

If the extra reference is really low noise it can help, at least in theory by a kind of digital filtering of the LM399: the noise of the LM399 could be digital filtered for some thing like the > 0.01 Hz range. In this range it would be replaced by the 2nd reference noise and some additional white noise from the gain measurement. If the cross over frequency is low enough (long averaging) the extra white noise would be small. I somewhat doubt they added the 2 nd ref for noise filtering, it is likely because of gain drift (the possibility to use cheaper resistors) and tradition. Possible noise filtering for the reference is more an additional benefit, they may not even use. With low grade resistors the averaging is limited, by excess noise of the resistors.

For noise filtering it would help if the ADC itself would be low noise. In the ADC of the K2001 there are a few extra noise sources. A resistor for the input (59 K) much larger than the other resistors  (20 K + 40K) results in a noise gain for the integrator OP (U813) of nearly 5.5. There is also quite some extra noise from these resistors. The attenuation by a factor of 2 for the 20 V range also adds to the noise. The LT1007 with some 20 K of source impedance is not really low noise anymore at some 2 Hz.
AFAIK the K2001 is also relatively noisy for reading a short. The effect of the extra reference would be mainly there if a 10 V or similar voltage is read. In this can one could have an interesting noise spectrum, depending on how good the reference filtering (averaging of the gain readings) is.
So I would not blame the relatively high noise to the extra reference.
The more modern K2010 and K2182 also use the extra reference and can get reasonably low noise.

The 1.75 V is not from a PWM divider, but a charge pump / switched capacitor type. This can be reasonable low noise - the trouble is more like producing EMI problems  via Rf crap on the supply that may or may not effect some circuit parts.
 

Offline MegaVolt

  • Frequent Contributor
  • **
  • Posts: 328
  • Country: by
Re: Doing it RAW: Tapping Keithley 2001 ADC
« Reply #15 on: Today at 10:04:26 am »
The ground issue was solved by a brilliant move - bring in the outside reference differentially (plus it sidesteps the thermal EMF thing). This trick is used in 2002 and DMM7510 (maybe others too).
What's the trick?
 

Offline Zucca

  • Supporter
  • ****
  • Posts: 2645
  • Country: it
  • EE meid in Itali
Re: Doing it RAW: Tapping Keithley 2001 ADC
« Reply #16 on: Today at 10:36:33 am »
Thanks openloop and Kleinstein for your immense input.

I have restored a K2001 (see here)
and I want to learn from it.

I still have to check some basics since I upgraded (probably with no real improvement) all the  analog switches (i.e. DG411/DG404/DG211) to Maxim devices. Of course I lost the calibration, but in such old devices I did not lost too much.

Anyway interesting readings:

https://www.eevblog.com/forum/testgear/do-i-have-exceptional-keithley-2000-or-poor-keithley-2001/

and I still did not forget this Kleinstein's idea.

but I need to set up a proper measurement system with some loggin data, and other projects kicked in... still work in progress...

PS: Metrology thread already?
« Last Edit: Today at 10:38:28 am by Zucca »
Can't know what you don't love. St. Augustine
Can't love what you don't know. Zucca
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf