Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IronOS
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Archive
IronOS
Commits
21e3bab8
Commit
21e3bab8
authored
Dec 30, 2020
by
Ben V. Brown
Browse files
Options
Downloads
Patches
Plain Diff
Recompute uV values for TS100 tips
parent
b1f89d74
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
workspace/TS100/Core/Drivers/TipThermoModel.cpp
+51
-65
51 additions, 65 deletions
workspace/TS100/Core/Drivers/TipThermoModel.cpp
workspace/TS100/configuration.h
+1
-1
1 addition, 1 deletion
workspace/TS100/configuration.h
with
52 additions
and
66 deletions
workspace/TS100/Core/Drivers/TipThermoModel.cpp
+
51
−
65
View file @
21e3bab8
...
...
@@ -48,21 +48,7 @@ uint32_t TipThermoModel::convertTipRawADCTouV(uint16_t rawADC) {
else
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
;
}
...
...
@@ -89,56 +75,56 @@ int32_t LinearInterpolate(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_
const
uint16_t
uVtoDegC
[]
=
{
//
//
0
,
0
,
//
175
,
10
,
//
381
,
20
,
//
587
,
30
,
//
804
,
40
,
//
1
005
,
50
,
//
1
007
,
60
,
//
1
10
7
,
70
,
//
1
310
,
80
,
//
1522
,
90
,
//
173
1
,
100
,
//
1939
,
110
,
//
2
079
,
120
,
//
2
265
,
130
,
//
2470
,
140
,
//
267
6
,
150
,
//
2899
,
160
,
//
3
081
,
170
,
//
3186
,
180
,
//
3422
,
190
,
//
3622
,
200
,
//
3830
,
210
,
//
404
4
,
220
,
//
4400
,
230
,
//
4691
,
240
,
//
4989
,
250
,
//
5289
,
260
,
//
5583
,
270
,
//
5879
,
280
,
//
6
075
,
290
,
//
6332
,
300
,
//
6521
,
310
,
//
6724
,
320
,
//
692
9
,
330
,
//
71
32
,
340
,
//
73
56
,
350
,
//
7561
,
360
,
//
7774
,
370
,
//
7992
,
380
,
//
8200
,
390
,
//
8410
,
400
,
//
8626
,
410
,
//
8849
,
420
,
//
906
0
,
430
,
//
9271
,
440
,
//
9531
,
450
,
//
9748
,
460
,
//
1
0210
,
470
,
//
1
0219
,
480
,
//
1
0429
,
490
,
//
1
0649
,
500
,
//
266
,
10
,
//
522
,
20
,
//
770
,
30
,
//
1010
,
40
,
//
1
244
,
50
,
//
1
473
,
60
,
//
1
69
7
,
70
,
//
1
917
,
80
,
//
2135
,
90
,
//
235
1
,
100
,
//
2566
,
110
,
//
2
780
,
120
,
//
2
994
,
130
,
//
3209
,
140
,
//
342
6
,
150
,
//
3644
,
160
,
//
3
865
,
170
,
//
4088
,
180
,
//
4314
,
190
,
//
4544
,
200
,
//
4777
,
210
,
//
501
4
,
220
,
//
5255
,
230
,
//
5500
,
240
,
//
5750
,
250
,
//
6003
,
260
,
//
6261
,
270
,
//
6523
,
280
,
//
6
789
,
290
,
//
7059
,
300
,
//
7332
,
310
,
//
7609
,
320
,
//
788
9
,
330
,
//
81
71
,
340
,
//
84
56
,
350
,
//
8742
,
360
,
//
9030
,
370
,
//
9319
,
380
,
//
9607
,
390
,
//
9896
,
400
,
//
10183
,
410
,
//
10468
,
420
,
//
1075
0
,
430
,
//
11029
,
440
,
//
11304
,
450
,
//
11573
,
460
,
//
1
1835
,
470
,
//
1
2091
,
480
,
//
1
2337
,
490
,
//
1
2575
,
500
,
//
};
#endif
...
...
This diff is collapsed.
Click to expand it.
workspace/TS100/configuration.h
+
1
−
1
View file @
21e3bab8
...
...
@@ -152,7 +152,7 @@
#endif
#ifdef MODEL_TS100
const
int32_t
tipMass
=
4
5
;
// X10 watts to raise 1 deg C in 1 second
const
int32_t
tipMass
=
6
5
;
// X10 watts to raise 1 deg C in 1 second
const
uint8_t
tipResistance
=
75
;
//x10 ohms, 7.5 typical for ts100 tips
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment