@@ -107,6 +107,10 @@ double MAX31855Class::tempTomv(double temp) {
107
107
table = CoeffK;
108
108
tableEntries = sizeof (CoeffK) / sizeof (coefftable);
109
109
break ;
110
+ case PROBE_TC_T:
111
+ table = CoeffT;
112
+ tableEntries = sizeof (CoeffT) / sizeof (coefftable);
113
+ break ;
110
114
}
111
115
voltage = polynomial (temp, tableEntries, table);
112
116
// special case... for K probes in temperature range 0-1372 we need
@@ -130,6 +134,10 @@ double MAX31855Class::mvtoTemp(double voltage) {
130
134
table = InvCoeffK;
131
135
tableEntries = sizeof (InvCoeffJ) / sizeof (coefftable);
132
136
break ;
137
+ case PROBE_TC_T:
138
+ table = InvCoeffT;
139
+ tableEntries = sizeof (InvCoeffT) / sizeof (coefftable);
140
+ break ;
133
141
}
134
142
return polynomial (voltage, tableEntries, table);
135
143
}
@@ -151,7 +159,7 @@ double MAX31855Class::readTCVoltage() {
151
159
}
152
160
153
161
// The cold junction temperature is stored in the last 14 word's bits
154
- // whereas the ttermocouple temperature (non linearized) is in the topmost 18 bits
162
+ // whereas the thermocouple temperature (non linearized) is in the topmost 18 bits
155
163
// sent by the Thermocouple-to-Digital Converter
156
164
157
165
// sign extend thermocouple value
@@ -176,7 +184,7 @@ double MAX31855Class::readTCVoltage() {
176
184
// convert it to degrees
177
185
measuredCold = (measuredColdInt / 16 .0f );
178
186
// now the tricky part... since MAX31855K is considering a linear response
179
- // and is trimed for K thermocouples, we have to convert the reading back
187
+ // and is trimmed for K thermocouples, we have to convert the reading back
180
188
// to mV and then use NIST polynomial approximation to determine temperature
181
189
// we know that reading from chip is calculated as:
182
190
// temp = chip_temperature + thermocouple_voltage/0.041276f
0 commit comments