Author Topic: Using a AWG and a Scope -> using stairs to get to 1 mV accuracy  (Read 32681 times)

0 Members and 1 Guest are viewing this topic.

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
The last batch started at 6539, so that might explain why the error graph dips over there. Maybe the scope/AWG was not at the right temperature yet. Using these long test gives some idea on the stability/repeatability of the measurements.
« Last Edit: May 16, 2019, 06:41:02 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
so at this point, thinking a truncation issue, If so that should not be a hard fix, do the math on 16 bit, truncate 1 bit, save the other and truncate that bit, then just sum the number with the saved bit, If its a 1, the number rounds up anyway, if its a 0, it doesn't change anything, and you get free rounding with just a summation. 

00
01
10
11

Any time that saved bit is 1, the number should round up,

Tautech, would we be able to get any developer insight into what approach they use, and where the scaling is stored?

With negative numbers we have to be cautious.

What gets really nice results, which also works with negative dividers is:
(It is like adding (or substracting) a 0.5 to let the value flip to the nearest when truncating.)
Code: [Select]
if (Value >= 0) = (Divider >= 0) then
  Result:= (Value + Divider div 2) div Divider
else
  Result:= (Value - Divider div 2) div Divider
I think the problem has its origin in that there's some code like this
Code: [Select]
Result:= Value div Divider
if (Value mod Divider) >= (Divider div 2) then
  Result:= Result + 1
Forgetting the rounding down of negative values.
I've tried all kinds of programming errors, but only for 2 divisions max. I'm guessing this kind of error is repeated several times in the steps to get to a DAC value.
 
« Last Edit: May 18, 2019, 12:45:48 am by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
so at this point, thinking a truncation issue, If so that should not be a hard fix, do the math on 16 bit, truncate 1 bit, save the other and truncate that bit, then just sum the number with the saved bit, If its a 1, the number rounds up anyway, if its a 0, it doesn't change anything, and you get free rounding with just a summation. 

00
01
10
11

Any time that saved bit is 1, the number should round up,

Tautech, would we be able to get any developer insight into what approach they use, and where the scaling is stored?

With negative numbers we have to be cautious.

What gets really nice results, which also works with negative dividers is:
(It is like adding (or substracting) a 0.5 to let the value flip to the nearest when truncating.)
Code: [Select]
if (Value >= 0) = (Divider >= 0) then
  Result:= (Value + Divider div 2) div Divider
else
  Result:= (Value - Divider div 2) div Divider
I think the problem has its origin in that there's some code like this
Code: [Select]
Result:= Value div Divider
if (Value mod Divider) >= (Divider div 2) then
  Result:= Result + 1
Forgetting the rounding down of negative values.
I've tried all kinds of programming errors, but only for 2 divisions max. I'm guessing this kind of error is repeated several times in the steps to get to a DAC value.
 
Maybe I should clarify, I mean not the problem of the glitches, but of the discontinuity.

How do I know there's a discontinuity?

At certain wave values there're glitches. It is 99.9% sure that those glitches are related with special DAC values using a simple transformation DACcode = WaveValue * Factor / Divider - Offset.

However the resulting DAC values don't exactly match up the bit patterns which would cause a glitch. The DACcodes are off by a 1..2 (on a scale of 16K). Especially on the negative side.

So using the nearest DACcodes that should glitch and the WaveValues that belong to them one can try out different calculations (with errors) to get matching logic in all cases. This matching logic would then be the same as the logic applied in the AWG (for at least the 206 glitching values).
I can get close to 72% match, but not 100% using a combination of rounding error's.

The problem is, this matching should not be hard at all. There're should be a 100% match without simulating rounding errors.

Can this problem of discontinuity be seen in the output?

I thinks so, at some WaveValue value transitions (value -> value + 1), the DAC value will be off, thus the wrong "digital step" (dacvalue -> dacvalue - 2) will be taken. Thus it will be (only) one or two glitch on it self.

What would lead to a better solution?
* Calculate with as many bits as is possible through all the steps (32 bit, if that's possible).
* Do only one division as late as possible and with proper rounding.

There's also the slight possibility that there's something done on purpose, for example using 2 offsets: one for the most significant bit on and one for the most significant bit off. This trick could mitigate a DAC step error.
I already know different devices have different offsets, so it could be...
But the glitch at the 0 dac value should then not be the strongest in my device A.
« Last Edit: May 18, 2019, 10:02:47 am by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
I wanted to see how useful the method of doing multi window measurements would be using the SAG1021.

From -2.0 to 2.0 V, I did 20 partial and overlapping measurements (batches). Each batch climbing in voltage (DSO offset and AGW offset).

The AWG was loaded with a stairway ramp of 50 different value blocks evenly spread with an amplitude of 400 mV and thus a difference of 8 mV between them.  These value blocks where mapped to (multi segment) DSO acquisitions and then averaged. (Multiple frames and the block itself). For each batch a data file was written, containing the set/expected wave voltage, the measured one (DSO), and the difference between them.

These are shown in the graph against each other. Ideally it should be a straight line.

On a secondary axis the difference between the values are shown. This shows whether there's an offset, amplitude error etc for each batch.

The VDiv on the scope was 100 mV/div resulting in a 4 mV resolution.
« Last Edit: May 20, 2019, 10:36:06 am by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
What can be seen clearly in the graphs is that the offset error is much lower when the offset is in the -0.6 to 0.6 range. Outside this range it is quite high, which also happens when the wave amplitude is set higher than 0.6 V. (Why does it seem that these are linked to the same offset issue?)
I thought I could use this to do higher resolution measurements with the DSO. But is would take quite some effort to "calibrate" the measurements.. Also I'm not sure whether the offsets are stable/predictable.

It should also be said that also the DSO measurements imperfections may take part in the discontinuities. Also a perfect graph would not ensure that the devices are perfect (errors could cancel each other out). However in the graphs, the visible faults do give insight into things that might ruin the party.

« Last Edit: May 23, 2019, 08:32:11 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Looking at the offset stuff, it is clear that the DC mode of the devices should be checked around -600 mV and 600 mV.

Having done that it turned out around -700 mV and 700 mV there's a change in range. (Relay clicks)

So it is nice to know what the offset voltage jump is before and after, so here're the results measured with a Fluke MM:
Device A (mV)
Code: [Select]
-696 -> -696
relay click
-695 -> -704

704 -> 701
relay click
705 -> 704

Device B (mV)
Code: [Select]
-700 -> -698
relay click
-699 -> -700

699 -> 699
relay click
700 -> 702

So no drops or rises of about 30 mV. This thus only seems to happen if there's a superimposed wave.

More reliable, but using only the DC mode of generating test voltages would be a lot slower. 1 value per "batch" instead of 50 (or many more).

Also the transition of +1 of device A from -696 to -695 results in an output transition of -696 to -704, which is -8. That's still an transition error of 9. That's 9x the step of what was requested.
« Last Edit: May 20, 2019, 03:51:06 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
I just realized that putting 2 of these AWG’s in series. One doing a DC offset, one doing only the wave, with the offset zero-ed would give much better results than using only one device.

That alone is some indication that a better design could lead to better results. But I don’t know how these SAG1021 perform in relation to others in the market.

One could say, yeh there’re not expensive, so what do you expect?

But the price difference could also justified by other things:
* extruded 3 piece alu case
* no screen/buttons/knobs
* no power supply
* depends on control through dso, which needs to be bought
* only one channel
* limited bandwidth

In my opinion there should be budget enough left over to have it perform well.

So my question would be, what should be expected from this device? I’d like to hear some opinions.
« Last Edit: May 20, 2019, 03:49:09 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
There are a few memories in these devices that the scaling factors could be stored,

right next to the FPGA we have a 25P40 SPI flash memory, 4 mb in size, probably for the fpga image, but it leaves a decent amount of free room.
https://www.micron.com/-/media/documents/products/data-sheet/nor-flash/serial-nor/m25p/m25p40.pdf

Underneath the USB controller we have a I2C memory, It is used for the memory controllers boot up settings such as VID PID etc, but there is room left over. 
https://www.promelec.ru/pdf/AT24C512C.pdf

If it exists, it will be in one of them, I would suspect the I2C memory more than the SPI one, as the free space of that adds up mostly to the size of all the default baked in waveforms

My suspicion is the device is fully self contained, and can work without the scope, more that we just don't know how to initialise it yet. would probably involve fun like forcing it into USB1.0 speed and hooking it up to a logic analyser. It does have the drivers in the scope files. But I am not yet able to interprit them.
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
What I’m curious about is why different units have different “tuning values”. The wave offset, and the values of switching to another range in the dc-mode. Is that done on factory and/or is it a calibration thing.
And if so, why does it not do a better job  :-//
Would be nice if there was some kind of calibration process that users could run to optimize things a lot more.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
I’ve been offered to switch to a another AWG by paying the difference:
https://www.eevblog.com/forum/testgear/sag1021-vs-sdg1032-what-to-expect/

But before doing so I’d like to know whether to expect a more precise performance.

Normally I would prefer to hack some issue away, but some of them are beyond my control.

So some advice would be nice!
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
In regard to doing precise measurements I think having two outputs in parallel and have a load (preferably known and static) on them should give the possibility to have different / special generated arbitrary waves correct the DAC issues of each other. In the other waves the issues are then somewhat averaged. For this one does not even need the know the underlying calculations to DAC values :phew:
Having the 2 outputs in series might also give some extra possibilities to have more continuous values.
« Last Edit: May 22, 2019, 09:31:51 am by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 28383
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Firmware updates that may or may not help with your results:
https://www.eevblog.com/forum/testgear/siglent-sds1204x-e-released-for-domestic-markets-in-china/msg2431869/#msg2431869
Always nice that things get improved!

However the scope performed to my opinion very well, and I don’t think the fixes are related to my measurements done here.

I can mention a few things that I still miss:
* a way to acquire a certain single segment/frame using the (SCPI) wave setup command and a SN parameter.
* a fix that the number of points/samples can be limited by the using wave setup command, now it returns repeating values and is not usable when trying a limit
* a fix in the documentation: how to calculate a negative value in the wave data. It says doing minus 255, but I think it needs to be minus 256. But a lot of programming languages also can read it as a Int8. So no conversion is needed.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 28383
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Note, there is an updated programming guide too.  ;)
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Note, there is an updated programming guide too.  ;)
Yeh, I checked the calculation error right away. ;) and it is still there.
For those using the wrong calculation the results are 1% off (at best) when using negative values. So this easy fix improves much with almost no effort!
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 
The following users thanked this post: tautech

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Firmware updates that may or may not help with your results:
https://www.eevblog.com/forum/testgear/siglent-sds1204x-e-released-for-domestic-markets-in-china/msg2431869/#msg2431869
Always nice that things get improved!

However the scope performed to my opinion very well, and I don’t think the fixes are related to my measurements done here.

I can mention a few things that I still miss:
* a way to acquire a certain single segment/frame using the (SCPI) wave setup command and a SN parameter.
* a fix that the number of points/samples can be limited by the using wave setup command, now it returns repeating values and is not usable when trying a limit
* a fix in the documentation: how to calculate a negative value in the wave data. It says doing minus 255, but I think it needs to be minus 256. But a lot of programming languages also can read it as a Int8. So no conversion is needed.

* a fix that the number of points/samples can be limited by the using wave setup command, now it returns repeating values and is not usable when trying a limit
It seems this problem is solved  :-+
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
In another thread I’ve posted a comparison between the SAG1021 and a SDG1032X.
https://www.eevblog.com/forum/testgear/sag1021-vs-sdg1032-what-to-expect/

I’ll try to take the measurement method to a next level. Now using a SDG1032X.

The scope and the awg’s are decent devices for measuring relative voltages, especially when using more sensitive ranges. I’ll now try to use these strong points of those devices to get accurate absolute voltage measurements.

When doing so I’ll put all my trust in my Fluke MM, and take that as a reference. Because it is not programmable, a good first step would be to check whether the accuracy of the MM can be “transferred” to using the awg. In other words can we create reference voltages, that are spot on! If so these reference voltages can be used to automatically check the scope (offset dac and signal adc).

The range we’ll try to measure in is 0 to 1.0 volt. (The method could be used for other ranges as well off course). In that range we want to achieve a certain sensitivity / number of measure points.

0.5 mV resolution, will be fine I guess. This can be achieved by the 10 mV/div. (thus 0.4 mV reso).

This will give a window of 80 mV,. In such a window I would like to have 3 reference voltages, at low, mid and high. Thus we need reference voltages with a 40 mV step. It may that that at the edges the scope’s adc becomes less accurate but that is something I would like to investigate as well.

So we need to be able to generate 25 reference voltages of 40 mV to reach 1.0V.

These will be verified before doing scope tests and after. But I’ll find out how difficult getting accurate voltages will be and how stable they are.
« Last Edit: May 28, 2019, 01:04:19 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
So I did some measurements. I went from coarse to fine in 3 steps. In each step the values from the other step where used to interpolate, so there was already a close approximation.

That makes is easy to turn the value knop to get an spot on readout on the MM.

I used the -600 mV to 600mV range of the MM to get a 0.1 mV resolution. So I needed to offset channel 1 of the AWG, with channel 2 (-500). Because the readout of the multimeter should be different then the OUT voltage, that one is showed as well.

Each value was set via SCPI by a script, which pauses to add the mapping into the code. So the mapping didn't take very long to create.

Code: [Select]
Coarse 0
Voltage OUT:0,00 MM: mV: -500,00 mV SET: 0,00 mV
Voltage OUT:1000,00 MM: mV: 500,00 mV SET: 1001,59 mV
Coarse 1
Voltage OUT:200,00 MM: mV: -300,00 mV SET: 200,30 mV
Voltage OUT:400,00 MM: mV: -100,00 mV SET: 399,80 mV
Voltage OUT:600,00 MM: mV: 100,00 mV SET: 600,10 mV
Voltage OUT:800,00 MM: mV: 300,00 mV SET: 800,30 mV
Coarse 2
Voltage OUT:40,00 MM: mV: -460,00 mV SET: 40,30 mV
Voltage OUT:80,00 MM: mV: -420,00 mV SET: 80,40 mV
Voltage OUT:120,00 MM: mV: -380,00 mV SET: 119,90 mV
Voltage OUT:160,00 MM: mV: -340,00 mV SET: 159,80 mV
Voltage OUT:240,00 MM: mV: -260,00 mV SET: 240,60 mV
Voltage OUT:280,00 MM: mV: -220,00 mV SET: 280,70 mV
Voltage OUT:320,00 MM: mV: -180,00 mV SET: 320,40 mV
Voltage OUT:360,00 MM: mV: -140,00 mV SET: 360,10 mV
Voltage OUT:440,00 MM: mV: -60,00 mV SET: 439,90 mV
Voltage OUT:480,00 MM: mV: -20,00 mV SET: 479,90 mV
Voltage OUT:520,00 MM: mV: 20,00 mV SET: 520,00 mV
Voltage OUT:560,00 MM: mV: 60,00 mV SET: 560,10 mV
Voltage OUT:640,00 MM: mV: 140,00 mV SET: 640,40 mV
Voltage OUT:680,00 MM: mV: 180,00 mV SET: 680,40 mV
Voltage OUT:720,00 MM: mV: 220,00 mV SET: 719,00 mV
Voltage OUT:760,00 MM: mV: 260,00 mV SET: 760,00 mV
Voltage OUT:840,00 MM: mV: 340,00 mV SET: 840,20 mV
Voltage OUT:880,00 MM: mV: 380,00 mV SET: 880,60 mV
Voltage OUT:920,00 MM: mV: 420,00 mV SET: 920,90 mV
Voltage OUT:960,00 MM: mV: 460,00 mV SET: 961,00 mV

As can be seen the AWG is accurate to +/- 2 mV (but most of the time the values are much closer) by itself. This mapping will make it accurate to about +/- 0.2mV.

I know my MM will also its own measurement errors, but in my lab it is the best reference for now.
« Last Edit: May 28, 2019, 09:43:14 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
I changed the way I measure. First I check and map the values until 640 mV, then I do combine of a negative offset to get the last value from 640 mV to 0 (looking at the MM). When I check the output at channel 2 with the MM, then it is -643.0 mV and not -640 mV. So there's 3 mV lost...


In this case that is a bit much, also I'd like to know what is happening. And what the mechanics of this combining are. (Does it do a polarity change digitally? Is the output impedance doubled?)
« Last Edit: May 29, 2019, 12:05:27 am by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
The combining function works digitally, stuff before the dacs. So there is no analog offset.
https://www.siglentamerica.com/operating-tip/generating-complex-waveforms-using-siglents-combine-function-x-series-dual-channel-generators/

Not hearing relays was somewhat a clue in this conclusion.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
I made a new mapping, now not using the combine functionality. But using 2 channels and measure between the non-ground BNC wires. Starting with a zero offset on channel 2, until 640 mV. Then dialing until zero (thus about 640 mV at channel 2). And then continue measuring.

Roughly the max difference between the MM and the AWG values are about 0.25%

Siglent specifies the DC  Characteristics  as:
Accuracy ±(1%+3 mV) HiZ load

So its better than the specs (at the range 0-1.0V). By using the mapping I can get voltages close to the accuracy of my MM. (0.09%).
But because the MM is taken as the reference, the deviation to that reference is as close as 1 digit (0,01%).

Code: [Select]
Voltage OUT:0,0 mV; MM: 0,0 mV; SET: -0,3 mV
Voltage OUT:40,0 mV; MM: 40,1 mV; SET: 40,4 mV
Voltage OUT:80,0 mV; MM: 80,0 mV; SET: 79,9 mV
Voltage OUT:120,0 mV; MM: 120,0 mV; SET: 120,5 mV
Voltage OUT:160,0 mV; MM: 160,0 mV; SET: 160,4 mV
Voltage OUT:200,0 mV; MM: 200,0 mV; SET: 199,8 mV
Voltage OUT:240,0 mV; MM: 240,0 mV; SET: 239,7 mV
Voltage OUT:280,0 mV; MM: 280,0 mV; SET: 280,0 mV
Voltage OUT:320,0 mV; MM: 320,0 mV; SET: 320,2 mV
Voltage OUT:360,0 mV; MM: 360,0 mV; SET: 360,4 mV
Voltage OUT:400,0 mV; MM: 400,0 mV; SET: 400,5 mV
Voltage OUT:440,0 mV; MM: 440,0 mV; SET: 440,8 mV
Voltage OUT:480,0 mV; MM: 480,0 mV; SET: 481,0 mV
Voltage OUT:520,0 mV; MM: 520,0 mV; SET: 521,3 mV
Voltage OUT:560,0 mV; MM: 560,0 mV; SET: 561,9 mV
Voltage OUT:600,0 mV; MM: 600,0 mV; SET: 602,1 mV
Voltage OUT:640,0 mV; MM: 640,0 mV; SET: 641,9 mV
Voltage OUT:680,0 mV; MM: 40,0 mV; SET: 681,8 mV
Voltage OUT:720,0 mV; MM: 80,0 mV; SET: 722,3 mV
Voltage OUT:760,0 mV; MM: 120,0 mV; SET: 761,9 mV
Voltage OUT:800,0 mV; MM: 160,0 mV; SET: 801,8 mV
Voltage OUT:840,0 mV; MM: 200,0 mV; SET: 842,1 mV
Voltage OUT:880,0 mV; MM: 240,0 mV; SET: 881,7 mV
Voltage OUT:920,0 mV; MM: 280,0 mV; SET: 921,4 mV
Voltage OUT:960,0 mV; MM: 320,0 mV; SET: 961,4 mV
Voltage OUT:1000,0 mV; MM: 360,5 mV; SET: 1002,3 mV
« Last Edit: May 30, 2019, 09:55:23 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
For each of the reference voltages, I let a script center that voltage, thus tuning the DSO offset so the DSO adc would measure less than 0.1 mV.

So in the upcoming measurements the offset will be set to a more calibrated value.

As can be seen the offset dac (channel 1) is very close to the MM value. From the 4 channels 2 are even significantly closer.

The next step will be to measure high/low (+40mV / -40mV) reference voltages at about + 4 div and -4 div, to get an idea of how much the adc of the scope deviates.
Code: [Select]
Voltage OUT:0,0 mV; DSO: 0,0 mV
Voltage OUT:40,0 mV; DSO: 40,2 mV
Voltage OUT:80,0 mV; DSO: 80,1 mV
Voltage OUT:120,0 mV; DSO: 120,2 mV
Voltage OUT:160,0 mV; DSO: 160,2 mV
Voltage OUT:200,0 mV; DSO: 200,3 mV
Voltage OUT:240,0 mV; DSO: 240,4 mV
Voltage OUT:280,0 mV; DSO: 280,4 mV
Voltage OUT:320,0 mV; DSO: 320,5 mV
Voltage OUT:360,0 mV; DSO: 360,5 mV
Voltage OUT:400,0 mV; DSO: 400,6 mV
Voltage OUT:440,0 mV; DSO: 440,6 mV
Voltage OUT:480,0 mV; DSO: 480,7 mV
Voltage OUT:520,0 mV; DSO: 520,7 mV
Voltage OUT:560,0 mV; DSO: 560,8 mV
Voltage OUT:600,0 mV; DSO: 600,8 mV
Voltage OUT:640,0 mV; DSO: 640,8 mV
Voltage OUT:680,0 mV; DSO: 680,9 mV
Voltage OUT:720,0 mV; DSO: 721,0 mV
Voltage OUT:760,0 mV; DSO: 761,1 mV
Voltage OUT:800,0 mV; DSO: 801,1 mV
Voltage OUT:840,0 mV; DSO: 841,2 mV
Voltage OUT:880,0 mV; DSO: 881,3 mV
Voltage OUT:920,0 mV; DSO: 921,4 mV
Voltage OUT:960,0 mV; DSO: 961,4 mV
Voltage OUT:1000,0 mV; DSO: 1001,9 mV
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
It was quite hotter than normal at the lab so I ran the auto calibration of the scope. And the manual determination of AWG offset mapping.

I added the values -45, -40, -30, -20, -20, -10, 0, 10, 20, 30, 40, 45 so that they also can be set very precisely. I used those voltages to measure the DSO adc response.

This makes it possible to translate/map DSO wave values to precise voltages.


The combination of setting a precise DSO offset combined with precise adc measurement and measurement window shifting will hopefully give the possibility to use the scope as a high precision tool. (At least for some duration). I'll continue under the assumption that the offset and adc measurement are independent of each other regarding errors.


The next and final step is to ensure we can superimpose precise voltages on the offset using arbitrary wave data.

If that is done, we should be able to create and measure a very accurate staircase ramp (lineair/continuous in voltage generation and measurement) from 0 to 1.0 V using 25 shifting windows.
Code: [Select]
Voltage OUT:0,0 mV; DSO: -0,4 mV
Voltage OUT:40,0 mV; DSO: 39,7 mV
Voltage OUT:80,0 mV; DSO: 79,6 mV
Voltage OUT:120,0 mV; DSO: 119,6 mV
Voltage OUT:160,0 mV; DSO: 159,7 mV
Voltage OUT:200,0 mV; DSO: 195,4 mV
Voltage OUT:240,0 mV; DSO: 240,0 mV
Voltage OUT:280,0 mV; DSO: 280,0 mV
Voltage OUT:320,0 mV; DSO: 320,0 mV
Voltage OUT:360,0 mV; DSO: 360,1 mV
Voltage OUT:400,0 mV; DSO: 400,1 mV
Voltage OUT:440,0 mV; DSO: 440,3 mV
Voltage OUT:480,0 mV; DSO: 480,3 mV
Voltage OUT:520,0 mV; DSO: 520,4 mV
Voltage OUT:560,0 mV; DSO: 560,4 mV
Voltage OUT:600,0 mV; DSO: 600,5 mV
Voltage OUT:640,0 mV; DSO: 640,6 mV
Voltage OUT:680,0 mV; DSO: 680,5 mV
Voltage OUT:720,0 mV; DSO: 720,7 mV
Voltage OUT:760,0 mV; DSO: 760,6 mV
Voltage OUT:800,0 mV; DSO: 800,7 mV
Voltage OUT:840,0 mV; DSO: 840,8 mV
Voltage OUT:880,0 mV; DSO: 880,9 mV
Voltage OUT:920,0 mV; DSO: 921,0 mV
Voltage OUT:960,0 mV; DSO: 961,1 mV
Voltage OUT:1000,0 mV; DSO: 1001,7 mV

Voltage OUT:-45,0 mV; DAC: -44,0 mV
Voltage OUT:-40,0 mV; DAC: -40,0 mV
Voltage OUT:-30,0 mV; DAC: -30,3 mV
Voltage OUT:-20,0 mV; DAC: -20,1 mV
Voltage OUT:-10,0 mV; DAC: -10,0 mV
Voltage OUT:0,0 mV; DAC: 0,0 mV
Voltage OUT:10,0 mV; DAC: 10,2 mV
Voltage OUT:20,0 mV; DAC: 20,4 mV
Voltage OUT:30,0 mV; DAC: 30,6 mV
Voltage OUT:40,0 mV; DAC: 40,4 mV
Voltage OUT:45,0 mV; DAC: 44,4 mV

“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
I think the measurement part will be around 1 mV accurate in the range of 0-1.0 V. Thus some 0.1% error (+MM errors).  In that range a thousand precise voltages can be generated and measured in a few minutes. A second scope channel will be “calibrated” as well to do the divider measurements.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
For the wave voltages I did some iterative measurements, each time updating the interpolator values. This way we know wat 16 bit dac value (WVE) is needed to create a certain voltage (TARGET).

I took a 50 mV amplitude with a enough margin for errors, to be certain that a -20 mV to 20 mV range can be generated within the dac range.

The EXP (expected) voltage is the voltage that should be outputted at a certain dac value (WVE) (repeated in a single value wave).

As can be seen there is some offset, and amplification that needs correcting. But if that is consistent at different offset voltages, then superimposing precise voltages (accurate to 0.1 mV) would not be any problem.
Code: [Select]
Voltage TARGET: -23,0 mV; WVE: -30827; EXP: -23,5 mV; MM: -23,0 mV
Voltage TARGET: -20,0 mV; WVE: -26868; EXP: -20,5 mV; MM: -20,0 mV
Voltage TARGET: -10,0 mV; WVE: -13850; EXP: -10,6 mV; MM: -10,0 mV
Voltage TARGET: 0,0 mV; WVE: -861; EXP: -0,7 mV; MM: 0,0 mV
Voltage TARGET: 10,0 mV; WVE: 12068; EXP: 9,2 mV; MM: 10,0 mV
Voltage TARGET: 20,0 mV; WVE: 25057; EXP: 19,1 mV; MM: 20,0 mV
Voltage TARGET: 23,0 mV; WVE: 29028; EXP: 22,1 mV; MM: 23,0 mV
« Last Edit: June 03, 2019, 09:58:20 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf