1
0
forked from me/IronOS

New TS80 Curve

This commit is contained in:
Ben V. Brown
2020-12-30 19:31:01 +11:00
parent 21e3bab8d9
commit f8d3aa1a09
2 changed files with 53 additions and 54 deletions

View File

@@ -67,7 +67,7 @@ uint32_t TipThermoModel::convertTipRawADCToDegF(uint16_t rawADC) {
// [x1, y1] = point 1 // [x1, y1] = point 1
// [x2, y2] = point 2 // [x2, y2] = point 2
// x = input value // x = input value
// output is x's extrapolated y value // output is x's interpolated y value
int32_t LinearInterpolate(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t x) { int32_t LinearInterpolate(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t x) {
return y1 + (((((x - x1) * 1000) / (x2 - x1)) * (y2 - y1))) / 1000; return y1 + (((((x - x1) * 1000) / (x2 - x1)) * (y2 - y1))) / 1000;
} }
@@ -133,58 +133,57 @@ const uint16_t uVtoDegC[] = { //
const uint16_t uVtoDegC[] = { // const uint16_t uVtoDegC[] = { //
// //
530 , 0, //
2337 , 0, // 1282 , 10, //
3008 , 10, // 2034 , 20, //
3693 , 20, // 2786 , 30, //
4390 , 30, // 3538 , 40, //
5101 , 40, // 4290 , 50, //
5825 , 50, // 5043 , 60, //
6562 , 60, // 5795 , 70, //
7312 , 70, // 6547 , 80, //
8076 , 80, // 7299 , 90, //
8852 , 90, // 8051 , 100, //
9642 , 100, // 8803 , 110, //
10445 , 110, // 9555 , 120, //
11261 , 120, // 10308 , 130, //
12090 , 130, // 11060 , 140, //
12932 , 140, // 11812 , 150, //
13787 , 150, // 12564 , 160, //
14656 , 160, // 13316 , 170, //
15537 , 170, // 14068 , 180, //
16432 , 180, // 14820 , 190, //
17340 , 190, // 15573 , 200, //
18261 , 200, // 16325 , 210, //
19195 , 210, // 17077 , 220, //
20143 , 220, // 17829 , 230, //
21103 , 230, // 18581 , 240, //
22077 , 240, // 19333 , 250, //
23063 , 250, // 20085 , 260, //
24063 , 260, // 20838 , 270, //
25076 , 270, // 21590 , 280, //
26102 , 280, // 22342 , 290, //
27142 , 290, // 23094 , 300, //
28194 , 300, // 23846 , 310, //
29260 , 310, // 24598 , 320, //
30339 , 320, // 25350 , 330, //
31430 , 330, // 26103 , 340, //
32535 , 340, // 26855 , 350, //
33654 , 350, // 27607 , 360, //
34785 , 360, // 28359 , 370, //
35929 , 370, // 29111 , 380, //
37087 , 380, // 29863 , 390, //
38258 , 390, // 30615 , 400, //
39441 , 400, // 31368 , 410, //
40638 , 410, // 32120 , 420, //
41849 , 420, // 32872 , 430, //
43072 , 430, // 33624 , 440, //
44308 , 440, // 34376 , 450, //
45558 , 450, // 35128 , 460, //
46820 , 460, // 35880 , 470, //
48096 , 470, // 36632 , 480, //
49385 , 480, // 37385 , 490, //
50687 , 490, // 38137 , 500, //
52003 , 500, //
}; };
#endif #endif
uint32_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { uint32_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) {

View File

@@ -143,7 +143,7 @@
#ifdef MODEL_TS80P #ifdef MODEL_TS80P
#define VOLTAGE_DIV 650 // Default for TS80P with slightly different resistors #define VOLTAGE_DIV 650 // Default for TS80P with slightly different resistors
#define PID_POWER_LIMIT 35 // Sets the max pwm power limit #define PID_POWER_LIMIT 35 // Sets the max pwm power limit
#define CALIBRATION_OFFSET 0 // the adc offset in uV #define CALIBRATION_OFFSET 1500 // the adc offset in uV
#define POWER_LIMIT 30 // 30 watts default power limit #define POWER_LIMIT 30 // 30 watts default power limit
#define MAX_POWER_LIMIT 35 // #define MAX_POWER_LIMIT 35 //
#define POWER_LIMIT_STEPS 2 #define POWER_LIMIT_STEPS 2