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

0 Members and 1 Guest are viewing this topic.

#### HendriXML

• Frequent Contributor
• Posts: 718
• Country:
##### Re: Using a AWG and a Scope -> exploring a different method: using stairs to measure
« Reply #275 on: June 03, 2019, 09:57:34 pm »
The next step will be to test whether a combination of offsets and a single value superimposed wave can indeed generate precise voltages, verified by the MM.
« Last Edit: June 03, 2019, 11:31:31 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”

#### HendriXML

• Frequent Contributor
• Posts: 718
• Country:
##### Re: Using a AWG and a Scope -> exploring a different method: using stairs to measure
« Reply #276 on: June 04, 2019, 08:55:31 pm »
The voltages in the following table where checked. These voltages are generate using offsets n x 40 mV and wave voltages from -20 mV to 20 mV.

All voltages below 660 mV had +/- 1 digit accuracy, thus maximal 0.1 mV off. I did not enter the true MM values, because that would take a lot of time, and going better than 1 digit off would not be worth the efford.

Voltages above 660 mV where measured in a different range, but I'm convinced that they'll be as accurate as well, because it seems that the wave and offset errors are independent of each other. So the error correction will continue in the same manner. (I could measure this with an channel 2 offset as well, but an accuracy that is in par with my Fluke is OK to me)

the EXP is again the voltage that "should" be outputted by the AWG using the requested parameters. Although the standard accuracy seems OK most of the time, the worse deviations are improved by more than 10x.
Code: [Select]
Voltage TARGET: 0,0 mV; EXP: -0,3 mV; MM: 0,0 mVVoltage TARGET: 5,0 mV; EXP: 4,6 mV; MM: 5,0 mVVoltage TARGET: 10,0 mV; EXP: 9,6 mV; MM: 10,0 mVVoltage TARGET: 15,0 mV; EXP: 14,6 mV; MM: 15,0 mVVoltage TARGET: 20,0 mV; EXP: 20,5 mV; MM: 20,0 mVVoltage TARGET: 25,0 mV; EXP: 25,5 mV; MM: 25,0 mVVoltage TARGET: 30,0 mV; EXP: 30,4 mV; MM: 30,0 mVVoltage TARGET: 35,0 mV; EXP: 35,4 mV; MM: 35,0 mVVoltage TARGET: 40,0 mV; EXP: 40,4 mV; MM: 40,0 mVVoltage TARGET: 45,0 mV; EXP: 45,3 mV; MM: 45,0 mVVoltage TARGET: 50,0 mV; EXP: 50,3 mV; MM: 50,0 mVVoltage TARGET: 55,0 mV; EXP: 55,3 mV; MM: 55,0 mVVoltage TARGET: 60,0 mV; EXP: 60,0 mV; MM: 60,0 mVVoltage TARGET: 65,0 mV; EXP: 65,0 mV; MM: 65,0 mVVoltage TARGET: 70,0 mV; EXP: 69,9 mV; MM: 70,0 mVVoltage TARGET: 75,0 mV; EXP: 74,9 mV; MM: 75,0 mVVoltage TARGET: 80,0 mV; EXP: 79,9 mV; MM: 80,0 mVVoltage TARGET: 85,0 mV; EXP: 84,8 mV; MM: 85,0 mVVoltage TARGET: 90,0 mV; EXP: 89,8 mV; MM: 90,0 mVVoltage TARGET: 95,0 mV; EXP: 94,8 mV; MM: 95,0 mVVoltage TARGET: 100,0 mV; EXP: 100,5 mV; MM: 100,0 mVVoltage TARGET: 105,0 mV; EXP: 105,5 mV; MM: 105,0 mVVoltage TARGET: 110,0 mV; EXP: 110,4 mV; MM: 110,0 mVVoltage TARGET: 115,0 mV; EXP: 115,4 mV; MM: 115,0 mVVoltage TARGET: 120,0 mV; EXP: 120,4 mV; MM: 120,0 mVVoltage TARGET: 125,0 mV; EXP: 125,3 mV; MM: 125,0 mVVoltage TARGET: 130,0 mV; EXP: 130,3 mV; MM: 130,0 mVVoltage TARGET: 135,0 mV; EXP: 135,3 mV; MM: 135,0 mVVoltage TARGET: 140,0 mV; EXP: 140,5 mV; MM: 140,0 mVVoltage TARGET: 145,0 mV; EXP: 145,5 mV; MM: 145,0 mVVoltage TARGET: 150,0 mV; EXP: 150,4 mV; MM: 150,0 mVVoltage TARGET: 155,0 mV; EXP: 155,4 mV; MM: 155,0 mVVoltage TARGET: 160,0 mV; EXP: 160,4 mV; MM: 160,0 mVVoltage TARGET: 165,0 mV; EXP: 165,3 mV; MM: 165,0 mVVoltage TARGET: 170,0 mV; EXP: 170,3 mV; MM: 170,0 mVVoltage TARGET: 175,0 mV; EXP: 175,3 mV; MM: 175,0 mVVoltage TARGET: 180,0 mV; EXP: 179,9 mV; MM: 180,0 mVVoltage TARGET: 185,0 mV; EXP: 184,9 mV; MM: 185,0 mVVoltage TARGET: 190,0 mV; EXP: 189,8 mV; MM: 190,0 mVVoltage TARGET: 195,0 mV; EXP: 194,8 mV; MM: 195,0 mVVoltage TARGET: 200,0 mV; EXP: 199,8 mV; MM: 200,0 mVVoltage TARGET: 205,0 mV; EXP: 204,7 mV; MM: 205,0 mVVoltage TARGET: 210,0 mV; EXP: 209,7 mV; MM: 210,0 mVVoltage TARGET: 215,0 mV; EXP: 214,7 mV; MM: 215,0 mVVoltage TARGET: 220,0 mV; EXP: 219,8 mV; MM: 220,0 mVVoltage TARGET: 225,0 mV; EXP: 224,8 mV; MM: 225,0 mVVoltage TARGET: 230,0 mV; EXP: 229,7 mV; MM: 230,0 mVVoltage TARGET: 235,0 mV; EXP: 234,7 mV; MM: 235,0 mVVoltage TARGET: 240,0 mV; EXP: 239,7 mV; MM: 240,0 mVVoltage TARGET: 245,0 mV; EXP: 244,6 mV; MM: 245,0 mVVoltage TARGET: 250,0 mV; EXP: 249,6 mV; MM: 250,0 mVVoltage TARGET: 255,0 mV; EXP: 254,6 mV; MM: 255,0 mVVoltage TARGET: 260,0 mV; EXP: 260,1 mV; MM: 260,0 mVVoltage TARGET: 265,0 mV; EXP: 265,1 mV; MM: 265,0 mVVoltage TARGET: 270,0 mV; EXP: 270,0 mV; MM: 270,0 mVVoltage TARGET: 275,0 mV; EXP: 275,0 mV; MM: 275,0 mVVoltage TARGET: 280,0 mV; EXP: 280,0 mV; MM: 280,0 mVVoltage TARGET: 285,0 mV; EXP: 284,9 mV; MM: 285,0 mVVoltage TARGET: 290,0 mV; EXP: 289,9 mV; MM: 290,0 mVVoltage TARGET: 295,0 mV; EXP: 294,9 mV; MM: 295,0 mVVoltage TARGET: 300,0 mV; EXP: 300,3 mV; MM: 300,0 mVVoltage TARGET: 305,0 mV; EXP: 305,3 mV; MM: 305,0 mVVoltage TARGET: 310,0 mV; EXP: 310,2 mV; MM: 310,0 mVVoltage TARGET: 315,0 mV; EXP: 315,2 mV; MM: 315,0 mVVoltage TARGET: 320,0 mV; EXP: 320,2 mV; MM: 320,0 mVVoltage TARGET: 325,0 mV; EXP: 325,1 mV; MM: 325,0 mVVoltage TARGET: 330,0 mV; EXP: 330,1 mV; MM: 330,0 mVVoltage TARGET: 335,0 mV; EXP: 335,1 mV; MM: 335,0 mVVoltage TARGET: 340,0 mV; EXP: 340,5 mV; MM: 340,0 mVVoltage TARGET: 345,0 mV; EXP: 345,5 mV; MM: 345,0 mVVoltage TARGET: 350,0 mV; EXP: 350,4 mV; MM: 350,0 mVVoltage TARGET: 355,0 mV; EXP: 355,4 mV; MM: 355,0 mVVoltage TARGET: 360,0 mV; EXP: 360,4 mV; MM: 360,0 mVVoltage TARGET: 365,0 mV; EXP: 365,3 mV; MM: 365,0 mVVoltage TARGET: 370,0 mV; EXP: 370,3 mV; MM: 370,0 mVVoltage TARGET: 375,0 mV; EXP: 375,3 mV; MM: 375,0 mVVoltage TARGET: 380,0 mV; EXP: 380,6 mV; MM: 380,0 mVVoltage TARGET: 385,0 mV; EXP: 385,6 mV; MM: 385,0 mVVoltage TARGET: 390,0 mV; EXP: 390,5 mV; MM: 390,0 mVVoltage TARGET: 395,0 mV; EXP: 395,5 mV; MM: 395,0 mVVoltage TARGET: 400,0 mV; EXP: 400,5 mV; MM: 400,0 mVVoltage TARGET: 405,0 mV; EXP: 405,4 mV; MM: 405,0 mVVoltage TARGET: 410,0 mV; EXP: 410,4 mV; MM: 410,0 mVVoltage TARGET: 415,0 mV; EXP: 415,4 mV; MM: 415,0 mVVoltage TARGET: 420,0 mV; EXP: 420,9 mV; MM: 420,0 mVVoltage TARGET: 425,0 mV; EXP: 425,9 mV; MM: 425,0 mVVoltage TARGET: 430,0 mV; EXP: 430,8 mV; MM: 430,0 mVVoltage TARGET: 435,0 mV; EXP: 435,8 mV; MM: 435,0 mVVoltage TARGET: 440,0 mV; EXP: 440,8 mV; MM: 440,0 mVVoltage TARGET: 445,0 mV; EXP: 445,7 mV; MM: 445,0 mVVoltage TARGET: 450,0 mV; EXP: 450,7 mV; MM: 450,0 mVVoltage TARGET: 455,0 mV; EXP: 455,7 mV; MM: 455,0 mVVoltage TARGET: 460,0 mV; EXP: 461,1 mV; MM: 460,0 mVVoltage TARGET: 465,0 mV; EXP: 466,1 mV; MM: 465,0 mVVoltage TARGET: 470,0 mV; EXP: 471,0 mV; MM: 470,0 mVVoltage TARGET: 475,0 mV; EXP: 476,0 mV; MM: 475,0 mVVoltage TARGET: 480,0 mV; EXP: 481,0 mV; MM: 480,0 mVVoltage TARGET: 485,0 mV; EXP: 485,9 mV; MM: 485,0 mVVoltage TARGET: 490,0 mV; EXP: 490,9 mV; MM: 490,0 mVVoltage TARGET: 495,0 mV; EXP: 495,9 mV; MM: 495,0 mVVoltage TARGET: 500,0 mV; EXP: 501,3 mV; MM: 500,0 mVVoltage TARGET: 505,0 mV; EXP: 506,3 mV; MM: 505,0 mVVoltage TARGET: 510,0 mV; EXP: 511,2 mV; MM: 510,0 mVVoltage TARGET: 515,0 mV; EXP: 516,2 mV; MM: 515,0 mVVoltage TARGET: 520,0 mV; EXP: 521,2 mV; MM: 520,0 mVVoltage TARGET: 525,0 mV; EXP: 526,1 mV; MM: 525,0 mVVoltage TARGET: 530,0 mV; EXP: 531,1 mV; MM: 530,0 mVVoltage TARGET: 535,0 mV; EXP: 536,1 mV; MM: 535,0 mVVoltage TARGET: 540,0 mV; EXP: 541,9 mV; MM: 540,0 mVVoltage TARGET: 545,0 mV; EXP: 546,9 mV; MM: 545,0 mVVoltage TARGET: 550,0 mV; EXP: 551,8 mV; MM: 550,0 mVVoltage TARGET: 555,0 mV; EXP: 556,8 mV; MM: 555,0 mVVoltage TARGET: 560,0 mV; EXP: 561,8 mV; MM: 560,0 mVVoltage TARGET: 565,0 mV; EXP: 566,7 mV; MM: 565,0 mVVoltage TARGET: 570,0 mV; EXP: 571,7 mV; MM: 570,0 mVVoltage TARGET: 575,0 mV; EXP: 576,7 mV; MM: 575,0 mVVoltage TARGET: 580,0 mV; EXP: 582,2 mV; MM: 580,0 mVVoltage TARGET: 585,0 mV; EXP: 587,2 mV; MM: 585,0 mVVoltage TARGET: 590,0 mV; EXP: 592,1 mV; MM: 590,0 mVVoltage TARGET: 595,0 mV; EXP: 597,1 mV; MM: 595,0 mVVoltage TARGET: 600,0 mV; EXP: 602,1 mV; MM: 600,0 mVVoltage TARGET: 605,0 mV; EXP: 607,0 mV; MM: 605,0 mVVoltage TARGET: 610,0 mV; EXP: 612,0 mV; MM: 610,0 mVVoltage TARGET: 615,0 mV; EXP: 617,0 mV; MM: 615,0 mVVoltage TARGET: 620,0 mV; EXP: 622,0 mV; MM: 620,0 mVVoltage TARGET: 625,0 mV; EXP: 627,0 mV; MM: 625,0 mVVoltage TARGET: 630,0 mV; EXP: 631,9 mV; MM: 630,0 mVVoltage TARGET: 635,0 mV; EXP: 636,9 mV; MM: 635,0 mVVoltage TARGET: 640,0 mV; EXP: 641,9 mV; MM: 640,0 mVVoltage TARGET: 645,0 mV; EXP: 646,8 mV; MM: 645,0 mVVoltage TARGET: 650,0 mV; EXP: 651,8 mV; MM: 650,0 mVVoltage TARGET: 655,0 mV; EXP: 656,8 mV; MM: 655,0 mVVoltage TARGET: 660,0 mV; EXP: 662,0 mV; MM: 660,0 mVVoltage TARGET: 665,0 mV; EXP: 667,0 mV; MM: 665,0 mVVoltage TARGET: 670,0 mV; EXP: 671,9 mV; MM: 670,0 mVVoltage TARGET: 675,0 mV; EXP: 676,9 mV; MM: 675,0 mVVoltage TARGET: 680,0 mV; EXP: 681,9 mV; MM: 680,0 mVVoltage TARGET: 685,0 mV; EXP: 686,8 mV; MM: 685,0 mVVoltage TARGET: 690,0 mV; EXP: 691,8 mV; MM: 690,0 mVVoltage TARGET: 695,0 mV; EXP: 696,8 mV; MM: 695,0 mVVoltage TARGET: 700,0 mV; EXP: 702,4 mV; MM: 700,0 mVVoltage TARGET: 705,0 mV; EXP: 707,4 mV; MM: 705,0 mVVoltage TARGET: 710,0 mV; EXP: 712,3 mV; MM: 710,0 mVVoltage TARGET: 715,0 mV; EXP: 717,3 mV; MM: 715,0 mVVoltage TARGET: 720,0 mV; EXP: 722,3 mV; MM: 720,0 mVVoltage TARGET: 725,0 mV; EXP: 727,2 mV; MM: 725,0 mVVoltage TARGET: 730,0 mV; EXP: 732,2 mV; MM: 730,0 mVVoltage TARGET: 735,0 mV; EXP: 737,2 mV; MM: 735,0 mVVoltage TARGET: 740,0 mV; EXP: 742,0 mV; MM: 740,0 mVVoltage TARGET: 745,0 mV; EXP: 747,0 mV; MM: 745,0 mVVoltage TARGET: 750,0 mV; EXP: 751,9 mV; MM: 750,0 mVVoltage TARGET: 755,0 mV; EXP: 756,9 mV; MM: 755,0 mVVoltage TARGET: 760,0 mV; EXP: 761,9 mV; MM: 760,0 mVVoltage TARGET: 765,0 mV; EXP: 766,8 mV; MM: 765,0 mVVoltage TARGET: 770,0 mV; EXP: 771,8 mV; MM: 770,0 mVVoltage TARGET: 775,0 mV; EXP: 776,8 mV; MM: 775,0 mVVoltage TARGET: 780,0 mV; EXP: 782,0 mV; MM: 780,0 mVVoltage TARGET: 785,0 mV; EXP: 787,0 mV; MM: 785,0 mVVoltage TARGET: 790,0 mV; EXP: 791,9 mV; MM: 790,0 mVVoltage TARGET: 795,0 mV; EXP: 796,9 mV; MM: 795,0 mVVoltage TARGET: 800,0 mV; EXP: 801,9 mV; MM: 800,0 mVVoltage TARGET: 805,0 mV; EXP: 806,8 mV; MM: 805,0 mVVoltage TARGET: 810,0 mV; EXP: 811,8 mV; MM: 810,0 mVVoltage TARGET: 815,0 mV; EXP: 816,8 mV; MM: 815,0 mVVoltage TARGET: 820,0 mV; EXP: 822,2 mV; MM: 820,0 mVVoltage TARGET: 825,0 mV; EXP: 827,2 mV; MM: 825,0 mVVoltage TARGET: 830,0 mV; EXP: 832,1 mV; MM: 830,0 mVVoltage TARGET: 835,0 mV; EXP: 837,1 mV; MM: 835,0 mVVoltage TARGET: 840,0 mV; EXP: 842,1 mV; MM: 840,0 mVVoltage TARGET: 845,0 mV; EXP: 847,0 mV; MM: 845,0 mVVoltage TARGET: 850,0 mV; EXP: 852,0 mV; MM: 850,0 mVVoltage TARGET: 855,0 mV; EXP: 857,0 mV; MM: 855,0 mVVoltage TARGET: 860,0 mV; EXP: 861,8 mV; MM: 860,0 mVVoltage TARGET: 865,0 mV; EXP: 866,8 mV; MM: 865,0 mVVoltage TARGET: 870,0 mV; EXP: 871,7 mV; MM: 870,0 mVVoltage TARGET: 875,0 mV; EXP: 876,7 mV; MM: 875,0 mVVoltage TARGET: 880,0 mV; EXP: 881,7 mV; MM: 880,0 mVVoltage TARGET: 885,0 mV; EXP: 886,6 mV; MM: 885,0 mVVoltage TARGET: 890,0 mV; EXP: 891,6 mV; MM: 890,0 mVVoltage TARGET: 895,0 mV; EXP: 896,6 mV; MM: 895,0 mVVoltage TARGET: 900,0 mV; EXP: 901,5 mV; MM: 900,0 mVVoltage TARGET: 905,0 mV; EXP: 906,5 mV; MM: 905,0 mVVoltage TARGET: 910,0 mV; EXP: 911,4 mV; MM: 910,0 mVVoltage TARGET: 915,0 mV; EXP: 916,4 mV; MM: 915,0 mVVoltage TARGET: 920,0 mV; EXP: 921,4 mV; MM: 920,0 mVVoltage TARGET: 925,0 mV; EXP: 926,3 mV; MM: 925,0 mVVoltage TARGET: 930,0 mV; EXP: 931,3 mV; MM: 930,0 mVVoltage TARGET: 935,0 mV; EXP: 936,3 mV; MM: 935,0 mVVoltage TARGET: 940,0 mV; EXP: 941,5 mV; MM: 940,0 mVVoltage TARGET: 945,0 mV; EXP: 946,5 mV; MM: 945,0 mVVoltage TARGET: 950,0 mV; EXP: 951,4 mV; MM: 950,0 mVVoltage TARGET: 955,0 mV; EXP: 956,4 mV; MM: 955,0 mVVoltage TARGET: 960,0 mV; EXP: 961,4 mV; MM: 960,0 mVVoltage TARGET: 965,0 mV; EXP: 966,3 mV; MM: 965,0 mVVoltage TARGET: 970,0 mV; EXP: 971,3 mV; MM: 970,0 mVVoltage TARGET: 975,0 mV; EXP: 976,3 mV; MM: 975,0 mVVoltage TARGET: 980,0 mV; EXP: 982,4 mV; MM: 980,0 mVVoltage TARGET: 985,0 mV; EXP: 987,4 mV; MM: 985,0 mVVoltage TARGET: 990,0 mV; EXP: 992,3 mV; MM: 990,0 mVVoltage TARGET: 995,0 mV; EXP: 997,3 mV; MM: 995,0 mVVoltage TARGET: 1000,0 mV; EXP: 1002,3 mV; MM: 1000,0 mV
« Last Edit: June 05, 2019, 10:20:04 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”

#### HendriXML

• Frequent Contributor
• Posts: 718
• Country:
##### Re: Using a AWG and a Scope -> exploring a different method: using stairs to measure
« Reply #277 on: June 06, 2019, 09:24:37 pm »
I'm now working towards the actual measurements on the diode/resistor divider. (I'm btw not really interested in the results anymore, but more in checking the method).

Formally I used 2 channels of the scope one to measure the applied voltage (minus the AWG impedance drop), and one measuring the voltage drop over the resistor.

Because in the new situation the voltage of the AWG is calibrated there is no need for measuring the applied voltage anymore. Only one probe will be fine. (Calibrated with the AWG)

During the multi window measurement it is important that the DSO measurements have a matching offset and range. It is possible to adjust doing batches when measurements get saturated, but I want to take another approach. (Also the scope is very sensitive to out of range (overdrive?) voltages ) The idea is to approximate the expected dso voltages for each test voltage, by using a coarse range. And using that approximation to iteratively do a finer measurement (smaller window) until the target range has been reached.

Then a final, multi segment measurement will be done.

But what range should be used and what voltage steps?

The calibrated way of generating voltages has a better accuracy than 0.5 mV that is certainly good enough to create steps of 4 mV. At the 10 mV/div this means 10 adc steps with a resolution of 0.4 mV. Creating smaller test steps will only enhance quantisation effects.
Using 4 mV test steps mean there will be a maximum of 20 measurements per "measurement window". However because we also have "voltage generation windows" (AWG offset and superimposed wave) and that those 2 won't always align it is possible that fewer measurements in a certain window take place.

Generating and measuring is done in batches. A batch will control only one measurement window and only one voltage generation window. The measurement points are divided over batches by the following logic:
Start with the lowest voltage test point and find the highest (calibrated) usable DSO offset for the expected voltage of that point. Find the highest (calibrated) usable AWG offset and wave value. The offsets (and corresponding range) are now bound to that batch. If succeeding test points go beyond that, a new batch will be defined (etc.).

So an (expected) out of range measurement and a out of range voltage generation can both trigger a new batch. If more probes would be added, a greater number of batches would be needed, depending on how well the different windows would align. But for now having only one probe makes life easy.

The expected voltage for each point will be determined by the same logic, except for the coarsest DSO range. That one needs to be chosen in a way that generated voltages cannot go out of range.

I'll need to implement this in a script and then test with a simple "awg out = dso in" test. That test will then also tell whether DSO offset / adc measurement errors are also independent of each other or not. Plotting a graph of the 250 measurements a near perfect straight line should be shown from (0, 0) to (1.0, 1.0).
« Last Edit: June 07, 2019, 09:15:36 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”

#### HendriXML

• Frequent Contributor
• Posts: 718
• Country:
##### Re: Using a AWG and a Scope -> exploring a different method: using stairs to measure
« Reply #278 on: June 10, 2019, 08:58:23 pm »
The script is finally complete.

It allows the definition of testvoltages, in this case 0 mV, 4 mV, 8 mV .. 1000 mV, thus 251 testsamples.

These voltages are generated using a AWG offset and WaveValues (max 12) in an arbitrary wave. The actual (calibrated) offset and wave values are determined by a lookup table (interpolated), which is created using a MM. (A bench one would be handy...)

The voltage response is measured by a DSO, using an offset and ADC values.

Which offset is needed to have each samples response in the scopes measurement window is determined by first measuring the voltage at the 200 mV/div range and a -200  mV offset, so we're certain no sample is out of view. However the response voltages will not be very precise. The next iteration uses the 50 mV/div range, with some extra margin. The response voltage for each sample is now more accurate. The next resolution will be the 10 mV/div range. This is the same range as the final measurement, but just as the prior measurements it uses only 2 sequences. Its purpose is to get accurate response voltages, so very little margin is needed for the final step which uses 202 sequences.

Each sequence (or frame) contains about 4600 adc samples, thus each final response voltage is an average of about 460000 adc samples. (The script discards 50% of the extremes)
The scopes offsets are set using a lookup table (which was determined automatically using calibrated awg values). The ADC values are also read using a lookup table (also automatically generated).

The following table is what we get when just measuring the AWG's output. This a good check whether the assumption on which the calibrations are based are true (the independencies between awg offset and wave value and scope offset and adc values). And whether measurements (and counterbalanced errors) are consistent.

(Keep in mind that at 10 mV/div the adc steps are 0.4 mV! Averaging can give a bit more precision, but also has its limits.)
Code: [Select]
0 -0,1194 3,9058 7,8412 11,83816 15,88220 19,92524 23,03728 27,25732 31,48136 35,57940 39,6944 43,56148 47,46852 51,43356 55,47860 59,52264 63,29968 67,48572 71,69376 75,75180 79,87984 83,84788 87,7292 91,60496 95,511100 99,529104 103,239108 107,439112 111,647116 115,725120 119,854124 123,781128 127,635132 131,509136 135,481140 139,522144 143,283148 147,465152 151,546156 155,571160 159,596164 163,543168 167,47172 171,488176 175,526180 179,535184 183,283188 187,471192 191,677196 195,742200 199,869204 203,812208 207,67212 211,541216 215,486220 219,522224 223,166228 227,377232 231,599236 235,693240 239,82244 243,71248 247,558252 251,452256 255,478260 259,522264 263,055268 267,273272 271,501276 275,604280 279,718284 283,577288 287,473292 291,433296 295,478300 299,522304 303,007308 307,226312 311,452316 315,547320 319,651324 323,544328 327,463332 331,433336 335,478340 339,522344 343,355348 347,543352 351,736356 355,77360 359,897364 363,907368 367,817372 371,789376 375,723380 379,659384 383,354388 387,539392 391,734396 395,769400 399,896404 403,902408 407,807412 411,765416 415,677420 419,62424 423,127428 427,341432 431,564436 435,667440 439,79444 443,659448 447,517452 451,44456 455,478460 459,522464 463,115468 467,331472 471,553476 475,652480 479,774484 483,635488 487,507492 491,435496 495,478500 499,522504 503,25508 507,457512 511,546516 515,571520 519,596524 523,54528 527,467532 531,462536 535,469540 539,5544 543,2548 547,404552 551,618556 555,708560 559,835564 563,745568 567,59572 571,469576 575,478580 579,522584 582,963588 587,176592 591,377596 595,443600 599,564604 603,531608 607,457612 611,433616 615,478620 619,522624 623,252628 627,441632 631,646636 635,726640 639,854644 643,78648 647,632652 651,493656 655,478660 659,522664 662,974668 667,19672 671,402676 675,477680 679,583684 683,532688 687,459692 691,433696 695,478700 699,522704 703,358708 707,561712 711,746716 715,779720 719,905724 723,916728 727,839732 731,834736 735,834740 739,784744 743,341748 747,513752 751,714756 755,76760 759,887764 763,879768 767,762772 771,676776 775,561780 779,557784 783,34788 787,514792 791,717796 795,762800 799,887804 803,871808 807,752812 811,64816 815,531820 819,541824 823,179828 827,383832 831,597836 835,689840 839,814844 843,714848 847,564852 851,462856 855,478860 859,522864 863,183868 867,392872 871,605876 875,691880 879,811884 883,702888 887,544892 891,45896 895,478900 899,522904 903,206908 907,409912 911,62916 915,707920 919,831924 923,735928 927,585932 931,468936 935,478940 939,522944 942,963948 947,176952 951,383956 955,452960 959,569964 963,531968 967,458972 971,433976 975,478980 979,522984 983,806988 987,795992 991,774996 995,7511000 999,776
« Last Edit: June 13, 2019, 10:32: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”

#### HendriXML

• Frequent Contributor
• Posts: 718
• Country:
##### Re: Using a AWG and a Scope -> using stairs to get to 1 mV accuracy
« Reply #279 on: June 10, 2019, 11:25:46 pm »
Here are all the testsamples in a graph. The reddish line shows the error voltage between what was measured and what was expected. Both the AWG and the DSO can contribute to that error voltage.

Having more calibration points might get the error voltage even lower, but I think around 1 mV accuracy (about 0.1% of full scale) is just fine!!
« Last Edit: June 13, 2019, 10:28:30 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”

#### HendriXML

• Frequent Contributor
• Posts: 718
• Country:
##### Re: Using a AWG and a Scope -> using stairs to get to 1 mV accuracy
« Reply #280 on: June 10, 2019, 11:55:48 pm »
Here’s the graph of the diode/resistor divider. I also added a slope curve.

As can be seen it gives better results than a previous method, which was using a single ramp and capture that with one dso window (but with averaging multiple cycles/frames). Also the older graphs data was not calibrated in the same way so the accuracy is not nearly as good.
« Last Edit: June 12, 2019, 01:01:34 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”

#### HendriXML

• Frequent Contributor
• Posts: 718
• Country:
##### Re: Using a AWG and a Scope -> using stairs to get to 1 mV accuracy
« Reply #281 on: June 28, 2019, 09:38:48 am »
After creating a temperature control apparatus. I did a second measurement on 60 deg Celcius.

With the found data I'll try to simulate the effects on the electronic fuse circuit. I already know it is too temperature depended, and the knee of the curve is not "sharp" enough to use it in a reliable way. But it is a nice exercise for me to see how to determine that for certain.

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

#### HendriXML

• Frequent Contributor
• Posts: 718
• Country:
##### Re: Using a AWG and a Scope -> using stairs to get to 1 mV accuracy
« Reply #282 on: June 28, 2019, 10:17:41 am »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”

Smf