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

0 Members and 1 Guest are viewing this topic.

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
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”
 

Offline HendriXMLTopic starter

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

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
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”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
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,119
4 3,905
8 7,84
12 11,838
16 15,882
20 19,925
24 23,037
28 27,257
32 31,481
36 35,579
40 39,69
44 43,561
48 47,468
52 51,433
56 55,478
60 59,522
64 63,299
68 67,485
72 71,693
76 75,751
80 79,879
84 83,847
88 87,72
92 91,604
96 95,511
100 99,529
104 103,239
108 107,439
112 111,647
116 115,725
120 119,854
124 123,781
128 127,635
132 131,509
136 135,481
140 139,522
144 143,283
148 147,465
152 151,546
156 155,571
160 159,596
164 163,543
168 167,47
172 171,488
176 175,526
180 179,535
184 183,283
188 187,471
192 191,677
196 195,742
200 199,869
204 203,812
208 207,67
212 211,541
216 215,486
220 219,522
224 223,166
228 227,377
232 231,599
236 235,693
240 239,82
244 243,71
248 247,558
252 251,452
256 255,478
260 259,522
264 263,055
268 267,273
272 271,501
276 275,604
280 279,718
284 283,577
288 287,473
292 291,433
296 295,478
300 299,522
304 303,007
308 307,226
312 311,452
316 315,547
320 319,651
324 323,544
328 327,463
332 331,433
336 335,478
340 339,522
344 343,355
348 347,543
352 351,736
356 355,77
360 359,897
364 363,907
368 367,817
372 371,789
376 375,723
380 379,659
384 383,354
388 387,539
392 391,734
396 395,769
400 399,896
404 403,902
408 407,807
412 411,765
416 415,677
420 419,62
424 423,127
428 427,341
432 431,564
436 435,667
440 439,79
444 443,659
448 447,517
452 451,44
456 455,478
460 459,522
464 463,115
468 467,331
472 471,553
476 475,652
480 479,774
484 483,635
488 487,507
492 491,435
496 495,478
500 499,522
504 503,25
508 507,457
512 511,546
516 515,571
520 519,596
524 523,54
528 527,467
532 531,462
536 535,469
540 539,5
544 543,2
548 547,404
552 551,618
556 555,708
560 559,835
564 563,745
568 567,59
572 571,469
576 575,478
580 579,522
584 582,963
588 587,176
592 591,377
596 595,443
600 599,564
604 603,531
608 607,457
612 611,433
616 615,478
620 619,522
624 623,252
628 627,441
632 631,646
636 635,726
640 639,854
644 643,78
648 647,632
652 651,493
656 655,478
660 659,522
664 662,974
668 667,19
672 671,402
676 675,477
680 679,583
684 683,532
688 687,459
692 691,433
696 695,478
700 699,522
704 703,358
708 707,561
712 711,746
716 715,779
720 719,905
724 723,916
728 727,839
732 731,834
736 735,834
740 739,784
744 743,341
748 747,513
752 751,714
756 755,76
760 759,887
764 763,879
768 767,762
772 771,676
776 775,561
780 779,557
784 783,34
788 787,514
792 791,717
796 795,762
800 799,887
804 803,871
808 807,752
812 811,64
816 815,531
820 819,541
824 823,179
828 827,383
832 831,597
836 835,689
840 839,814
844 843,714
848 847,564
852 851,462
856 855,478
860 859,522
864 863,183
868 867,392
872 871,605
876 875,691
880 879,811
884 883,702
888 887,544
892 891,45
896 895,478
900 899,522
904 903,206
908 907,409
912 911,62
916 915,707
920 919,831
924 923,735
928 927,585
932 931,468
936 935,478
940 939,522
944 942,963
948 947,176
952 951,383
956 955,452
960 959,569
964 963,531
968 967,458
972 971,433
976 975,478
980 979,522
984 983,806
988 987,795
992 991,774
996 995,751
1000 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”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
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”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
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”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
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”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
“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