calibration

This commit is contained in:
interfisch 2024-04-23 23:39:55 +02:00
parent f0678485be
commit e1fa527369
6 changed files with 336 additions and 0 deletions

BIN
messung/20240423_A.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
messung/20240423_B.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

View File

@ -0,0 +1,61 @@
time,tempReservoir,ECadcCalib,ECadc_A,ECadcAdjusted_A,ECadc_B,ECadcAdjusted_B,solutionAdded
4198570,24.05,6021.19,736.05,735.52,736.82,736.30,0.0
4296735,24.28,6021.19,741.08,740.55,743.13,742.60,0.1
4347858,24.37,6022.41,756.32,755.63,761.81,761.11,0.2
4393976,24.44,6022.34,769.87,769.17,779.88,779.17,0.3
4441095,24.51,6021.16,787.24,786.68,804.25,803.68,0.4
4481207,24.56,6021.78,807.27,806.62,836.09,835.41,0.5
4525323,24.62,6020.94,832.99,832.43,890.25,889.65,0.6
4567437,24.65,6021.25,867.22,866.59,980.75,980.04,0.7
4615552,24.69,6021.44,928.14,927.44,1076.18,1075.36,0.8
4654663,24.69,6022.38,1015.45,1014.52,1176.16,1175.09,0.9
4729805,24.75,6022.47,1108.50,1107.47,1280.05,1278.87,1.0
4768916,24.75,6022.19,1180.36,1179.32,1358.77,1357.58,1.1
4800019,24.75,6022.63,1245.61,1244.42,1431.78,1430.41,1.2
4832123,24.75,6022.34,1314.57,1313.38,1507.76,1506.39,1.3
4865228,24.78,6022.13,1380.22,1379.02,1577.54,1576.17,1.4
4899334,24.79,6022.41,1437.05,1435.73,1639.54,1638.03,1.5
4938445,24.81,6022.66,1488.52,1487.10,1695.89,1694.27,1.6
4984563,24.79,6022.13,1539.55,1538.21,1750.91,1749.39,1.7
5024670,24.80,6021.88,1585.69,1584.37,1802.22,1800.73,1.8
5065778,24.79,6022.00,1615.91,1614.54,1839.94,1838.38,1.9
5098883,24.76,6022.16,1642.89,1641.46,1867.62,1865.98,2.0
5204060,24.75,6022.28,1759.43,1757.86,1994.89,1993.10,2.5
5243166,24.75,6021.84,1892.17,1890.61,2136.23,2134.47,3.0
5283273,24.75,6021.16,2019.71,2018.27,2272.46,2270.84,3.5
5331393,24.69,6022.75,2117.66,2115.60,2378.03,2375.71,4.0
5378115,24.69,6023.34,2240.07,2237.67,2507.23,2504.54,4.5
5420229,24.69,6022.56,2347.43,2345.22,2621.71,2619.24,5.0
5482363,24.69,6022.81,2451.96,2449.55,2730.02,2727.33,5.5
5537490,24.63,6021.94,2581.04,2578.87,2865.74,2863.33,6.1
5683703,24.62,6021.72,2754.81,2752.59,3045.83,3043.38,7.0
5731823,24.62,6023.03,2963.67,2960.64,3264.57,3261.24,8.0
5819983,24.75,6021.56,3148.24,3145.79,3461.06,3458.37,9.0
5860095,24.81,6021.47,3340.23,3337.69,3656.93,3654.15,10.0
5907214,24.81,6022.00,3531.55,3528.54,3854.92,3851.64,11
5938317,24.81,6021.56,3706.43,3703.55,4031.33,4028.19,12
5968419,24.82,6021.97,3872.51,3869.24,4199.72,4196.17,13
6068591,24.87,6021.47,4027.79,4024.72,4352.64,4349.32,14
6113708,24.87,6021.94,4156.05,4152.56,4540.04,4536.23,15
6151818,24.87,6021.00,4305.14,4302.19,4698.46,4695.25,16
6227961,24.92,6021.72,4451.08,4447.51,4835.06,4831.18,17
6282087,24.94,6021.19,4579.90,4576.63,4965.65,4962.10,18
6332209,24.94,6022.09,4716.77,4712.69,5108.17,5103.75,19
6380324,24.94,6021.75,4856.32,4852.39,5241.48,5237.24,20
6465481,24.87,6021.75,5461.44,5457.02,5854.96,5850.23,25
6528616,24.81,6021.94,5972.65,5967.63,6362.16,6356.81,30
6654814,24.73,6021.22,6429.49,6424.86,6808.07,6803.16,35
6743975,24.69,6020.84,6836.34,6831.84,7210.02,7205.27,40
6837140,24.61,6021.56,7199.32,7193.73,7570.69,7564.80,45
6886256,24.67,6022.13,7523.59,7517.03,7883.69,7876.82,50
6952394,24.73,6021.84,8102.05,8095.37,8436.61,8429.66,60
6999513,24.70,6021.25,8563.79,8557.57,8887.04,8880.58,70
7051637,24.71,6022.16,8969.54,8961.68,9269.24,9261.12,80
7098756,24.78,6022.19,9320.85,9312.63,9606.04,9597.58,90
7138863,24.82,6021.66,9614.32,9606.70,9888.67,9880.82,100
7270066,24.91,6021.84,10148.45,10140.08,10395.20,10386.63,120
7328196,24.80,6021.75,10538.89,10530.37,10766.18,10757.47,140
7392327,24.69,6020.97,10848.27,10840.90,11058.58,11051.07,160
7449451,24.56,6023.06,11121.81,11110.40,11312.32,11300.70,180
7505579,24.44,6021.81,11314.32,11305.06,11513.90,11504.47,200
1 time tempReservoir ECadcCalib ECadc_A ECadcAdjusted_A ECadc_B ECadcAdjusted_B solutionAdded
2 4198570 24.05 6021.19 736.05 735.52 736.82 736.30 0.0
3 4296735 24.28 6021.19 741.08 740.55 743.13 742.60 0.1
4 4347858 24.37 6022.41 756.32 755.63 761.81 761.11 0.2
5 4393976 24.44 6022.34 769.87 769.17 779.88 779.17 0.3
6 4441095 24.51 6021.16 787.24 786.68 804.25 803.68 0.4
7 4481207 24.56 6021.78 807.27 806.62 836.09 835.41 0.5
8 4525323 24.62 6020.94 832.99 832.43 890.25 889.65 0.6
9 4567437 24.65 6021.25 867.22 866.59 980.75 980.04 0.7
10 4615552 24.69 6021.44 928.14 927.44 1076.18 1075.36 0.8
11 4654663 24.69 6022.38 1015.45 1014.52 1176.16 1175.09 0.9
12 4729805 24.75 6022.47 1108.50 1107.47 1280.05 1278.87 1.0
13 4768916 24.75 6022.19 1180.36 1179.32 1358.77 1357.58 1.1
14 4800019 24.75 6022.63 1245.61 1244.42 1431.78 1430.41 1.2
15 4832123 24.75 6022.34 1314.57 1313.38 1507.76 1506.39 1.3
16 4865228 24.78 6022.13 1380.22 1379.02 1577.54 1576.17 1.4
17 4899334 24.79 6022.41 1437.05 1435.73 1639.54 1638.03 1.5
18 4938445 24.81 6022.66 1488.52 1487.10 1695.89 1694.27 1.6
19 4984563 24.79 6022.13 1539.55 1538.21 1750.91 1749.39 1.7
20 5024670 24.80 6021.88 1585.69 1584.37 1802.22 1800.73 1.8
21 5065778 24.79 6022.00 1615.91 1614.54 1839.94 1838.38 1.9
22 5098883 24.76 6022.16 1642.89 1641.46 1867.62 1865.98 2.0
23 5204060 24.75 6022.28 1759.43 1757.86 1994.89 1993.10 2.5
24 5243166 24.75 6021.84 1892.17 1890.61 2136.23 2134.47 3.0
25 5283273 24.75 6021.16 2019.71 2018.27 2272.46 2270.84 3.5
26 5331393 24.69 6022.75 2117.66 2115.60 2378.03 2375.71 4.0
27 5378115 24.69 6023.34 2240.07 2237.67 2507.23 2504.54 4.5
28 5420229 24.69 6022.56 2347.43 2345.22 2621.71 2619.24 5.0
29 5482363 24.69 6022.81 2451.96 2449.55 2730.02 2727.33 5.5
30 5537490 24.63 6021.94 2581.04 2578.87 2865.74 2863.33 6.1
31 5683703 24.62 6021.72 2754.81 2752.59 3045.83 3043.38 7.0
32 5731823 24.62 6023.03 2963.67 2960.64 3264.57 3261.24 8.0
33 5819983 24.75 6021.56 3148.24 3145.79 3461.06 3458.37 9.0
34 5860095 24.81 6021.47 3340.23 3337.69 3656.93 3654.15 10.0
35 5907214 24.81 6022.00 3531.55 3528.54 3854.92 3851.64 11
36 5938317 24.81 6021.56 3706.43 3703.55 4031.33 4028.19 12
37 5968419 24.82 6021.97 3872.51 3869.24 4199.72 4196.17 13
38 6068591 24.87 6021.47 4027.79 4024.72 4352.64 4349.32 14
39 6113708 24.87 6021.94 4156.05 4152.56 4540.04 4536.23 15
40 6151818 24.87 6021.00 4305.14 4302.19 4698.46 4695.25 16
41 6227961 24.92 6021.72 4451.08 4447.51 4835.06 4831.18 17
42 6282087 24.94 6021.19 4579.90 4576.63 4965.65 4962.10 18
43 6332209 24.94 6022.09 4716.77 4712.69 5108.17 5103.75 19
44 6380324 24.94 6021.75 4856.32 4852.39 5241.48 5237.24 20
45 6465481 24.87 6021.75 5461.44 5457.02 5854.96 5850.23 25
46 6528616 24.81 6021.94 5972.65 5967.63 6362.16 6356.81 30
47 6654814 24.73 6021.22 6429.49 6424.86 6808.07 6803.16 35
48 6743975 24.69 6020.84 6836.34 6831.84 7210.02 7205.27 40
49 6837140 24.61 6021.56 7199.32 7193.73 7570.69 7564.80 45
50 6886256 24.67 6022.13 7523.59 7517.03 7883.69 7876.82 50
51 6952394 24.73 6021.84 8102.05 8095.37 8436.61 8429.66 60
52 6999513 24.70 6021.25 8563.79 8557.57 8887.04 8880.58 70
53 7051637 24.71 6022.16 8969.54 8961.68 9269.24 9261.12 80
54 7098756 24.78 6022.19 9320.85 9312.63 9606.04 9597.58 90
55 7138863 24.82 6021.66 9614.32 9606.70 9888.67 9880.82 100
56 7270066 24.91 6021.84 10148.45 10140.08 10395.20 10386.63 120
57 7328196 24.80 6021.75 10538.89 10530.37 10766.18 10757.47 140
58 7392327 24.69 6020.97 10848.27 10840.90 11058.58 11051.07 160
59 7449451 24.56 6023.06 11121.81 11110.40 11312.32 11300.70 180
60 7505579 24.44 6021.81 11314.32 11305.06 11513.90 11504.47 200

View File

@ -0,0 +1,118 @@
4198570,24.05,6021.19,736.05,735.52,736.82,736.30
4296735,24.28,6021.19,741.08,740.55,743.13,742.60
4347858,24.37,6022.41,756.32,755.63,761.81,761.11
4393976,24.44,6022.34,769.87,769.17,779.88,779.17
4441095,24.51,6021.16,787.24,786.68,804.25,803.68
4481207,24.56,6021.78,807.27,806.62,836.09,835.41
4525323,24.62,6020.94,832.99,832.43,890.25,889.65
4567437,24.65,6021.25,867.22,866.59,980.75,980.04
4615552,24.69,6021.44,928.14,927.44,1076.18,1075.36
4654663,24.69,6022.38,1015.45,1014.52,1176.16,1175.09
4729805,24.75,6022.47,1108.50,1107.47,1280.05,1278.87
4768916,24.75,6022.19,1180.36,1179.32,1358.77,1357.58
4800019,24.75,6022.63,1245.61,1244.42,1431.78,1430.41
4832123,24.75,6022.34,1314.57,1313.38,1507.76,1506.39
4865228,24.78,6022.13,1380.22,1379.02,1577.54,1576.17
4899334,24.79,6022.41,1437.05,1435.73,1639.54,1638.03
4938445,24.81,6022.66,1488.52,1487.10,1695.89,1694.27
4984563,24.79,6022.13,1539.55,1538.21,1750.91,1749.39
5024670,24.80,6021.88,1585.69,1584.37,1802.22,1800.73
5065778,24.79,6022.00,1615.91,1614.54,1839.94,1838.38
5098883,24.76,6022.16,1642.89,1641.46,1867.62,1865.98
5204060,24.75,6022.28,1759.43,1757.86,1994.89,1993.10
5243166,24.75,6021.84,1892.17,1890.61,2136.23,2134.47
5283273,24.75,6021.16,2019.71,2018.27,2272.46,2270.84
5331393,24.69,6022.75,2117.66,2115.60,2378.03,2375.71
5378115,24.69,6023.34,2240.07,2237.67,2507.23,2504.54
5420229,24.69,6022.56,2347.43,2345.22,2621.71,2619.24
5482363,24.69,6022.81,2451.96,2449.55,2730.02,2727.33
5537490,24.63,6021.94,2581.04,2578.87,2865.74,2863.33
5683703,24.62,6021.72,2754.81,2752.59,3045.83,3043.38
5731823,24.62,6023.03,2963.67,2960.64,3264.57,3261.24
5819983,24.75,6021.56,3148.24,3145.79,3461.06,3458.37
5860095,24.81,6021.47,3340.23,3337.69,3656.93,3654.15
5907214,24.81,6022.00,3531.55,3528.54,3854.92,3851.64
5938317,24.81,6021.56,3706.43,3703.55,4031.33,4028.19
5968419,24.82,6021.97,3872.51,3869.24,4199.72,4196.17
6068591,24.87,6021.47,4027.79,4024.72,4352.64,4349.32
6113708,24.87,6021.94,4156.05,4152.56,4540.04,4536.23
6151818,24.87,6021.00,4305.14,4302.19,4698.46,4695.25
6227961,24.92,6021.72,4451.08,4447.51,4835.06,4831.18
6282087,24.94,6021.19,4579.90,4576.63,4965.65,4962.10
6332209,24.94,6022.09,4716.77,4712.69,5108.17,5103.75
6380324,24.94,6021.75,4856.32,4852.39,5241.48,5237.24
6465481,24.87,6021.75,5461.44,5457.02,5854.96,5850.23
6528616,24.81,6021.94,5972.65,5967.63,6362.16,6356.81
6654814,24.73,6021.22,6429.49,6424.86,6808.07,6803.16
6743975,24.69,6020.84,6836.34,6831.84,7210.02,7205.27
6837140,24.61,6021.56,7199.32,7193.73,7570.69,7564.80
6886256,24.67,6022.13,7523.59,7517.03,7883.69,7876.82
6952394,24.73,6021.84,8102.05,8095.37,8436.61,8429.66
6999513,24.70,6021.25,8563.79,8557.57,8887.04,8880.58
7051637,24.71,6022.16,8969.54,8961.68,9269.24,9261.12
7098756,24.78,6022.19,9320.85,9312.63,9606.04,9597.58
7138863,24.82,6021.66,9614.32,9606.70,9888.67,9880.82
7270066,24.91,6021.84,10148.45,10140.08,10395.20,10386.63
7328196,24.80,6021.75,10538.89,10530.37,10766.18,10757.47
7392327,24.69,6020.97,10848.27,10840.90,11058.58,11051.07
7449451,24.56,6023.06,11121.81,11110.40,11312.32,11300.70
7505579,24.44,6021.81,11314.32,11305.06,11513.90,11504.47

View File

@ -0,0 +1,157 @@
Kalibrierung der zwei neuen EC Probes für NFT und Dutch Bucket 2024.
Probe A: Die Längere
Probe B: Die etwas kürzere
Lösung laut https://www.researchgate.net/profile/Sameer-Sayyad-2/post/How-is-it-possible-to-convert-conductivity-of-NaCl-solution-in-uS-to-its-salinity-NaCl-concentration-in-ppm/attachment/5abdeaedb53d2f63c3c2e08c/AS%3A609786693443585%401522395885345/download/conductivity+vs+concentration+NaCl+25+degress.pdf
3g NaCl auf 1L H2O sind 5690 uS/cm @ 25°C
Also 7,5g auf 0,25L H2O
Dann 50mL davon mit 450mL H2O auf 1L auffüllen.
Einige Messwerte genommen, ohne dass die EC Sensoren in Flüssigkeit sind.
time,tempReservoir,ECadcCalib,ECadc_A,ECadcAdjusted_A,ECadc_B,ECadcAdjusted_B
1524060,14.73,6021.09,729.21,728.70,729.16,728.65
1555158,14.69,6021.75,729.20,728.61,729.05,728.46
1577247,14.63,6021.88,728.94,728.33,728.96,728.35
1620362,14.56,6021.88,728.95,728.34,728.87,728.27
minimum adc rawA= 728.87
ca. 300mL dest. Wasser in 500mL Becherglas auf Magnetrührer
Wasser temperiert auf 25°C und durchgehend temperatur gehalten
Temperatursensor und DIY EC-Probe in Flüssigkeit platziert
Magnetrührer auf langsamer Stufe (keine Strudelbildung)
Messwert per Tastendruck erfasst (time,tempReservoir,ECadcCalib,ECadc,ECadcAdjusted)
zeit
temperatur d. flüssigkeit
referenz adc wert (geschalteter fester widerstand statt probe)
Roher ADC Messwert (Probe A)
angepasster ADC Messwert (linear gemappt nach abweichung vom referenz adc wert, referenz adc wert vorher ermittelt und eingegeben in code) (Probe A)
Roher ADC Messwert (Probe B)
angepasster ADC Messwert (Probe B)
manuell notiert und später der csv angefügt: "solutionAdded"
Erster Messwert nur dest. Wasser.
Weitere Messwerte jew. nach hinzufügen erst wenigen tropfen NaCl Lösung. Später mehr bis zu 10mL pro Messung.
time,mL added
4198000,0
4296000,0.1
4347000,0.2
4393000,0.3
4441000,0.4
4481000,0.5
4525000,0.6
4567000,0.7
4615000,0.8
4654000,0.9
4729000,1.0
4768000,1.1
4800000,1.2
4832000,1.3
4865000,1.4
4899000,1.5
4938000,1.6
4984000,1.7
5024000,1.8
5065000,1.9
5098000,2.0
5204000,2.5
5243000,3.0
5283000,3.5
5331000,4.0
5378000,4.5
5420000,5.0
5482000,5.5
5537000,6.1
5683000,7.0
5731000,8.0
5819000,9.0
5860000,10.0
5907000,11
5938000,12
5968000,13
6068000,14
6113000,15
6151000,16
6227000,17
6282000,18
6332000,19
6380000,20
6465000,25
6528000,30
6654000,35
6743000,40
6837000,45
6886000,50
6952000,60
6999000,70
7051000,80
7098000,90
7138000,100
7270000,120
7328000,140
7392000,160
7449000,180
7505000,200
Werte in 20240423_EC_Calibration_Raw.txt
Zusammengeführt in 20240423_EC_Calibration.csv
Auswertung in 20240423_EC_Calibration_with_graph.ods
Polynom x. Grades erstellt mit python approximate.py
für approximate.py numpy==1.22 notwendig. venv benutzen.
Probe A:
model order=4
+5.388914121653647e-13*x^4 -8.847448650204697e-09*x^3 +7.44612274805891e-05*x^2 -0.057529180570340156*x^1 +18.953002079376887*x^0
Excel:
5.388914121653647e-13
-8.847448650204697e-09
7.44612274805891e-05
-0.057529180570340156
18.953002079376887
Array:
{18.953002079376887,-0.057529180570340156,7.44612274805891e-05,-8.847448650204697e-09,5.388914121653647e-13}
Probe B:
model order=4
+5.529701600660142e-13*x^4 -9.161423581523883e-09*x^3 +7.671298605466989e-05*x^2 -0.08846039894456156*x^1 +40.838922264426685*x^0
Excel:
5.529701600660142e-13
-9.161423581523883e-09
7.671298605466989e-05
-0.08846039894456156
40.838922264426685
Array:
{40.838922264426685,-0.08846039894456156,7.671298605466989e-05,-9.161423581523883e-09,5.529701600660142e-13}
polynom in c++ code übernommen und punktuelle ergebnisse aus adc zu ec funktion ausgegeben und geplottet zur kontrolle, ob rechnung funktioniert.
bei lowADC den niedrigsten adc wert genommen in luft (siehe erste messungen).
float ec_calibration_polynom_A[]={18.953002079376887,-0.057529180570340156,7.44612274805891e-05,-8.847448650204697e-09,5.388914121653647e-13}; //20240423, graphite electrodes
float ec_calibration_linearize_below_adc_A=2000; //use linear approximation below this adc value. 0=disable
float ec_calibration_linear_lowADC_A=728; //x0
float ec_calibration_linear_lowEC_A=0; //y0
float ec_calibration_polynom_B[]={40.838922264426685,-0.08846039894456156,7.671298605466989e-05,-9.161423581523883e-09,5.529701600660142e-13}; //20240423, graphite electrodes
float ec_calibration_linearize_below_adc_B=2000; //use linear approximation below this adc value. 0=disable
float ec_calibration_linear_lowADC_B=728; //x0
float ec_calibration_linear_lowEC_B=0; //y0

Binary file not shown.