1
0
forked from me/IronOS

Recompute uV values for TS100 tips

This commit is contained in:
Ben V. Brown
2020-12-30 13:55:43 +11:00
parent b1f89d74b2
commit 21e3bab8d9
2 changed files with 52 additions and 66 deletions

View File

@@ -48,21 +48,7 @@ uint32_t TipThermoModel::convertTipRawADCTouV(uint16_t rawADC) {
else else
valueuV = 0; valueuV = 0;
} }
#ifndef TEMP_uV_LOOKUP_TS80
// Bias removal (Compensating for a temperature related non-linearity
// This uses the target temperature for the tip to calculate a compensation value for temperature related bias
// This is not entirely ideal as this means we will be wrong on heat up, but will settle to the correct value
// This will cause us to underread on the heatup until we reach the target temp
// Compensation (uV)== ((((80+150*(target_temp_c_x10-1000)/3000)*vddRailmVX10)/4096)*100)/GAIN
// Reordered with Wolframalpha
if (currentTempTargetDegC > 0) {
uint32_t compensation = (20625 * ((currentTempTargetDegC * 10) + 600)) / 512;
compensation /= OP_AMP_GAIN_STAGE;
if (valueuV > compensation) {
valueuV -= compensation;
}
}
#endif
return valueuV; return valueuV;
} }
@@ -89,56 +75,56 @@ int32_t LinearInterpolate(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_
const uint16_t uVtoDegC[] = { // const uint16_t uVtoDegC[] = { //
// //
0, 0, // 0, 0, //
175, 10, // 266, 10, //
381, 20, // 522, 20, //
587, 30, // 770, 30, //
804, 40, // 1010, 40, //
1005, 50, // 1244, 50, //
1007, 60, // 1473, 60, //
1107, 70, // 1697, 70, //
1310, 80, // 1917, 80, //
1522, 90, // 2135, 90, //
1731, 100, // 2351, 100, //
1939, 110, // 2566, 110, //
2079, 120, // 2780, 120, //
2265, 130, // 2994, 130, //
2470, 140, // 3209, 140, //
2676, 150, // 3426, 150, //
2899, 160, // 3644, 160, //
3081, 170, // 3865, 170, //
3186, 180, // 4088, 180, //
3422, 190, // 4314, 190, //
3622, 200, // 4544, 200, //
3830, 210, // 4777, 210, //
4044, 220, // 5014, 220, //
4400, 230, // 5255, 230, //
4691, 240, // 5500, 240, //
4989, 250, // 5750, 250, //
5289, 260, // 6003, 260, //
5583, 270, // 6261, 270, //
5879, 280, // 6523, 280, //
6075, 290, // 6789, 290, //
6332, 300, // 7059, 300, //
6521, 310, // 7332, 310, //
6724, 320, // 7609, 320, //
6929, 330, // 7889, 330, //
7132, 340, // 8171, 340, //
7356, 350, // 8456, 350, //
7561, 360, // 8742, 360, //
7774, 370, // 9030, 370, //
7992, 380, // 9319, 380, //
8200, 390, // 9607, 390, //
8410, 400, // 9896, 400, //
8626, 410, // 10183, 410, //
8849, 420, // 10468, 420, //
9060, 430, // 10750, 430, //
9271, 440, // 11029, 440, //
9531, 450, // 11304, 450, //
9748, 460, // 11573, 460, //
10210, 470, // 11835, 470, //
10219, 480, // 12091, 480, //
10429, 490, // 12337, 490, //
10649, 500, // 12575, 500, //
}; };
#endif #endif

View File

@@ -152,7 +152,7 @@
#endif #endif
#ifdef MODEL_TS100 #ifdef MODEL_TS100
const int32_t tipMass = 45; // X10 watts to raise 1 deg C in 1 second const int32_t tipMass = 65; // X10 watts to raise 1 deg C in 1 second
const uint8_t tipResistance = 75; //x10 ohms, 7.5 typical for ts100 tips const uint8_t tipResistance = 75; //x10 ohms, 7.5 typical for ts100 tips
#endif #endif