annotate vbat-adc/crude-cal-test @ 163:5f9dd4056420

vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 04 Jun 2021 03:02:18 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
163
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 The data table that follows captures the results of this experiment:
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * An FCDEV3B modem board was powered from a bench PSU whose output voltage
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 is controlled by an analog rotary knob;
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * The PSU voltage knob was turned up and down to produce 0.1 V steps
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 from 3.2 V to 4.2 V;
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 * At each PSU voltage step, VBAT MADC reading was captured with an
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 mpr 30 command in fc-tmsh, and the actual voltage was measured with a
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 digital multimeter.
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 PSU voltage MADC reading Voltmeter reading
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 -------------------------------------------------
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 3.2 V 473 3207 mV
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 3.3 V 488 3306 mV
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 3.4 V 502 3403 mV
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 3.5 V 517 3500 mV
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 3.6 V 532 3597 mV
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 3.7 V 546 3696 mV
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 3.8 V 562 3804 mV
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 3.9 V 576 3897 mV
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 4.0 V 592-593 [1] 4003 mV
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 4.1 V 606 4.08-4.09 V [2]
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 4.2 V 621 4.18-4.19 V [2]
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 [1] on the cusp of MADC step, got alternating readings
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 [2] My cheap multimeter's 4 V range was exceeded at this point, and I had
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 to switch to the next higher range in which only two digits after the
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 decimal point were displayed.
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 If we apply the firmware's default VBAT calibration values of A=7000 B=0,
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 we see that VBAT numbers computed from MADC readings are higher than the
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 true VBAT by 24 mV at the low 3.2 V end and by 45 mV at the high 4.2 V end.
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 Calibration math attempt from 3207 to 4003 mV, using MADC=592 at high end
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 =========================================================================
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 A=(4003-3207)/(592-473)*1024 = 6849
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 B parameter computed from each calibration point:
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 MADC reading Voltmeter reading Computed VBAT w/o B B parameter
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 ---------------------------------------------------------------------------
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 473 3207 mV 3163 44
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 488 3306 mV 3263 43
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 502 3403 mV 3357 46
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 517 3500 mV 3457 43
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 532 3597 mV 3558 39
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 546 3696 mV 3651 45
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 562 3804 mV 3758 46
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 576 3897 mV 3852 45
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 592 4003 mV 3959 44
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 B values range from 39 to 46, a very small variation - thus the behaviour of
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 VBAT MADC really does fit the linear model, and linear calibration really does
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 work well.
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 Calibration math attempt from 3207 to 4003 mV, using MADC=593 at high end
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 =========================================================================
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 A=(4003-3207)/(593-473)*1024 = 6792
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 B parameter computed from each calibration point:
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 MADC reading Voltmeter reading Computed VBAT w/o B B parameter
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 ---------------------------------------------------------------------------
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 473 3207 mV 3137 70
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 488 3306 mV 3236 70
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 502 3403 mV 3329 74
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 517 3500 mV 3429 71
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 532 3597 mV 3528 69
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 546 3696 mV 3621 75
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 562 3804 mV 3727 77
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 576 3897 mV 3820 77
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 593 4003 mV 3933 70
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 B values range from 69 to 77, still a very small variation - thus we are not
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 too terribly sensitive to errors in the A parameter resulting from MADC values
5f9dd4056420 vbat-adc/crude-cal-test: an experiment to prove VBAT MADC linearity
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 being on the cusp.