Skip to content

Commit

Permalink
Add PT100 on 32 bit mcu temptable
Browse files Browse the repository at this point in the history
  • Loading branch information
petrzmax committed Jan 30, 2020
1 parent ebc6fec commit 8e64106
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
* 15 : 100k thermistor calibration for JGAurora A5 hotend
* 18 : ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327
* 20 : Pt100 with circuit in the Ultimainboard V2.x
* 21 : Pt100 with circuit on 32 bit mcu
* 201 : Pt100 with circuit in Overlord, similar to Ultimainboard V2.x
* 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
* 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup
Expand All @@ -406,7 +407,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*/
#define TEMP_SENSOR_0 147 // I'm using PT100. Set 1 for stock thermistor
#define TEMP_SENSOR_0 21 // I'm using PT100. Set 1 for stock thermistor
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_3 0
Expand Down Expand Up @@ -504,9 +505,9 @@
//#define DEFAULT_Kd 61

// Sapphire Pro stock hotend with PT100 AutoTuned
#define DEFAULT_Kp 16
#define DEFAULT_Ki 3
#define DEFAULT_Kd 22
#define DEFAULT_Kp 16.61
#define DEFAULT_Ki 2.41
#define DEFAULT_Kd 28.63

#endif // PIDTEMP

Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/lcd/thermistornames.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
#define THERMISTOR_NAME "ATC Semitec 204GT-2"
#elif THERMISTOR_ID == 20
#define THERMISTOR_NAME "Pt100 UltiMB"
#elif THERMISTOR_ID == 21
#define THERMISTOR_NAME "Pt100 32 bit"
#elif THERMISTOR_ID == 201
#define THERMISTOR_NAME "Pt100 OverLord"
#elif THERMISTOR_ID == 60
Expand Down
71 changes: 71 additions & 0 deletions Marlin/src/module/thermistor/thermistor_21.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once

#define REVERSE_TEMP_SENSOR_RANGE

// Pt100 with INA826 amp on 32 bit mcu based on "Pt100 with INA826 amp on Ultimaker v2.0 electronics"
const short temptable_21[][2] PROGMEM = {
{ OV( 0), 0 },
{ OV(344), 1 },
{ OV(358), 10 },
{ OV(371), 20 },
{ OV(383), 30 },
{ OV(397), 40 },
{ OV(409), 50 },
{ OV(423), 60 },
{ OV(435), 70 },
{ OV(447), 80 },
{ OV(461), 90 },
{ OV(473), 100 },
{ OV(485), 110 },
{ OV(498), 120 },
{ OV(511), 130 },
{ OV(523), 140 },
{ OV(535), 150 },
{ OV(547), 160 },
{ OV(559), 170 },
{ OV(571), 180 },
{ OV(583), 190 },
{ OV(595), 200 },
{ OV(608), 210 },
{ OV(620), 220 },
{ OV(632), 230 },
{ OV(642), 240 },
{ OV(655), 250 },
{ OV(667), 260 },
{ OV(677), 270 },
{ OV(689), 280 },
{ OV(702), 290 },
{ OV(712), 300 },
{ OV(724), 310 },
{ OV(735), 320 },
{ OV(747), 330 },
{ OV(758), 340 },
{ OV(768), 350 },
{ OV(780), 360 },
{ OV(791), 370 },
{ OV(802), 380 },
{ OV(814), 390 },
{ OV(824), 400 },
{ OV(930), 500 }
};
3 changes: 3 additions & 0 deletions Marlin/src/module/thermistor/thermistors.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@
#if ANY_THERMISTOR_IS(20) // Pt100 with INA826 amp on Ultimaker v2.0 electronics
#include "thermistor_20.h"
#endif
#if ANY_THERMISTOR_IS(21) // Pt100 with INA826 amp on 32 bit mcu based "Pt100 with INA826 amp on Ultimaker v2.0 electronics"
#include "thermistor_21.h"
#endif
#if ANY_THERMISTOR_IS(51) // beta25 = 4092 K, R25 = 100 kOhm, Pull-up = 1 kOhm, "EPCOS"
#include "thermistor_51.h"
#endif
Expand Down

0 comments on commit 8e64106

Please sign in to comment.