Skip to content

Commit

Permalink
🚸 Thermistor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Feb 8, 2024
1 parent 20ee8dd commit 244c257
Show file tree
Hide file tree
Showing 4 changed files with 269 additions and 142 deletions.
147 changes: 79 additions & 68 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -443,78 +443,70 @@
// @section temperature

/**
* --NORMAL IS 4.7kΩ PULLUP!-- 1kΩ pullup can be used on hotend sensor, using correct resistor and table
* Temperature Sensors:
*
* Temperature sensors available:
*
* SPI RTD/Thermocouple Boards - IMPORTANT: Read the NOTE below!
* -------
* -5 : MAX31865 with Pt100/Pt1000, 2, 3, or 4-wire (only for sensors 0-1)
* NOTE: You must uncomment/set the MAX31865_*_OHMS_n defines below.
* -3 : MAX31855 with Thermocouple, -200°C to +700°C (only for sensors 0-1)
* -2 : MAX6675 with Thermocouple, 0°C to +700°C (only for sensors 0-1)
*
* NOTE: Ensure TEMP_n_CS_PIN is set in your pins file for each TEMP_SENSOR_n using an SPI Thermocouple. By default,
* Hardware SPI on the default serial bus is used. If you have also set TEMP_n_SCK_PIN and TEMP_n_MISO_PIN,
* Software SPI will be used on those ports instead. You can force Hardware SPI on the default bus in the
* Configuration_adv.h file. At this time, separate Hardware SPI buses for sensors are not supported.
*
* Analog Themocouple Boards
* -------
* -4 : AD8495 with Thermocouple
* -1 : AD595 with Thermocouple
* NORMAL IS 4.7kΩ PULLUP! Hotend sensors can use 1kΩ pullup with correct resistor and table.
*
* ================================================================
* Analog Thermistors - 4.7kΩ pullup - Normal
* -------
* 1 : 100kΩ EPCOS - Best choice for EPCOS thermistors
* 331 : 100kΩ Same as #1, but 3.3V scaled for MEGA
* 332 : 100kΩ Same as #1, but 3.3V scaled for DUE
* 2 : 200kΩ ATC Semitec 204GT-2
* 202 : 200kΩ Copymaster 3D
* 3 : ???Ω Mendel-parts thermistor
* 4 : 10kΩ Generic Thermistor !! DO NOT use for a hotend - it gives bad resolution at high temp. !!
* 5 : 100kΩ ATC Semitec 104GT-2/104NT-4-R025H42G - Used in ParCan, J-Head, and E3D, SliceEngineering 300°C
* 501 : 100kΩ Zonestar - Tronxy X3A
* 502 : 100kΩ Zonestar - used by hot bed in Zonestar Průša P802M
* 503 : 100kΩ Zonestar (Z8XM2) Heated Bed thermistor
* 504 : 100kΩ Zonestar P802QR2 (Part# QWG-104F-B3950) Hotend Thermistor
* 505 : 100kΩ Zonestar P802QR2 (Part# QWG-104F-3950) Bed Thermistor
* 512 : 100kΩ RPW-Ultra hotend
* 6 : 100kΩ EPCOS - Not as accurate as table #1 (created using a fluke thermocouple)
* 7 : 100kΩ Honeywell 135-104LAG-J01
* 71 : 100kΩ Honeywell 135-104LAF-J01
* 8 : 100kΩ Vishay 0603 SMD NTCS0603E3104FXT
* 9 : 100kΩ GE Sensing AL03006-58.2K-97-G1
* 10 : 100kΩ RS PRO 198-961
* 11 : 100kΩ Keenovo AC silicone mats, most Wanhao i3 machines - beta 3950, 1%
* 12 : 100kΩ Vishay 0603 SMD NTCS0603E3104FXT (#8) - calibrated for Makibox hot bed
* 13 : 100kΩ Hisens up to 300°C - for "Simple ONE" & "All In ONE" hotend - beta 3950, 1%
* 15 : 100kΩ Calibrated for JGAurora A5 hotend
* 18 : 200kΩ ATC Semitec 204GT-2 Dagoma.Fr - MKS_Base_DKU001327
* 22 : 100kΩ GTM32 Pro vB - hotend - 4.7kΩ pullup to 3.3V and 220Ω to analog input
* 23 : 100kΩ GTM32 Pro vB - bed - 4.7kΩ pullup to 3.3v and 220Ω to analog input
* 30 : 100kΩ Kis3d Silicone heating mat 200W/300W with 6mm precision cast plate (EN AW 5083) NTC100K - beta 3950
* 60 : 100kΩ Maker's Tool Works Kapton Bed Thermistor - beta 3950
* 61 : 100kΩ Formbot/Vivedino 350°C Thermistor - beta 3950
* 66 : 4.7MΩ Dyze Design / Trianglelab T-D500 500°C High Temperature Thermistor
* 67 : 500kΩ SliceEngineering 450°C Thermistor
* 68 : PT100 amplifier board from Dyze Design
* 70 : 100kΩ bq Hephestos 2
* 75 : 100kΩ Generic Silicon Heat Pad with NTC100K MGB18-104F39050L32
* 2000 : 100kΩ Ultimachine Rambo TDK NTCG104LH104KT1 NTC100K motherboard Thermistor
*
* Analog Thermistors - 1kΩ pullup - Atypical, and requires changing out the 4.7kΩ pullup for 1kΩ.
* ------- (but gives greater accuracy and more stable PID)
* 51 : 100kΩ EPCOS (1kΩ pullup)
* 52 : 200kΩ ATC Semitec 204GT-2 (1kΩ pullup)
* 55 : 100kΩ ATC Semitec 104GT-2 - Used in ParCan & J-Head (1kΩ pullup)
*
* ================================================================
* 1 : 100kΩ EPCOS - Best choice for EPCOS thermistors
* 331 : 100kΩ Same as #1, but 3.3V scaled for MEGA
* 332 : 100kΩ Same as #1, but 3.3V scaled for DUE
* 2 : 200kΩ ATC Semitec 204GT-2
* 202 : 200kΩ Copymaster 3D
* 3 : ???Ω Mendel-parts thermistor
* 4 : 10kΩ Generic Thermistor !! DO NOT use for a hotend - it gives bad resolution at high temp. !!
* 5 : 100kΩ ATC Semitec 104GT-2/104NT-4-R025H42G - Used in ParCan, J-Head, and E3D, SliceEngineering 300°C
* 501 : 100kΩ Zonestar - Tronxy X3A
* 502 : 100kΩ Zonestar - used by hot bed in Zonestar Průša P802M
* 503 : 100kΩ Zonestar (Z8XM2) Heated Bed thermistor
* 504 : 100kΩ Zonestar P802QR2 (Part# QWG-104F-B3950) Hotend Thermistor
* 505 : 100kΩ Zonestar P802QR2 (Part# QWG-104F-3950) Bed Thermistor
* 512 : 100kΩ RPW-Ultra hotend
* 6 : 100kΩ EPCOS - Not as accurate as table #1 (created using a fluke thermocouple)
* 7 : 100kΩ Honeywell 135-104LAG-J01
* 71 : 100kΩ Honeywell 135-104LAF-J01
* 8 : 100kΩ Vishay 0603 SMD NTCS0603E3104FXT
* 9 : 100kΩ GE Sensing AL03006-58.2K-97-G1
* 10 : 100kΩ RS PRO 198-961
* 11 : 100kΩ Keenovo AC silicone mats, most Wanhao i3 machines - beta 3950, 1%
* 12 : 100kΩ Vishay 0603 SMD NTCS0603E3104FXT (#8) - calibrated for Makibox hot bed
* 13 : 100kΩ Hisens up to 300°C - for "Simple ONE" & "All In ONE" hotend - beta 3950, 1%
* 14 : 100kΩ (R25), 4092K (beta25), 4.7kΩ pull-up, bed thermistor as used in Ender-5 S1
* 15 : 100kΩ Calibrated for JGAurora A5 hotend
* 17 : 100kΩ Dagoma NTC white thermistor
* 18 : 200kΩ ATC Semitec 204GT-2 Dagoma.Fr - MKS_Base_DKU001327
* 22 : 100kΩ GTM32 Pro vB - hotend - 4.7kΩ pullup to 3.3V and 220Ω to analog input
* 23 : 100kΩ GTM32 Pro vB - bed - 4.7kΩ pullup to 3.3v and 220Ω to analog input
* 30 : 100kΩ Kis3d Silicone heating mat 200W/300W with 6mm precision cast plate (EN AW 5083) NTC100K - beta 3950
* 60 : 100kΩ Maker's Tool Works Kapton Bed Thermistor - beta 3950
* 61 : 100kΩ Formbot/Vivedino 350°C Thermistor - beta 3950
* 66 : 4.7MΩ Dyze Design / Trianglelab T-D500 500°C High Temperature Thermistor
* 67 : 500kΩ SliceEngineering 450°C Thermistor
* 68 : PT100 Smplifier board from Dyze Design
* 70 : 100kΩ bq Hephestos 2
* 75 : 100kΩ Generic Silicon Heat Pad with NTC100K MGB18-104F39050L32
* 666 : 200kΩ Einstart S custom thermistor with 10k pullup.
* 2000 : 100kΩ Ultimachine Rambo TDK NTCG104LH104KT1 NTC100K motherboard Thermistor
*
* ================================================================
* Analog Thermistors - 1kΩ pullup
* Atypical, and requires changing out the 4.7kΩ pullup for 1kΩ.
* (but gives greater accuracy and more stable PID)
* ================================================================
* 51 : 100kΩ EPCOS (1kΩ pullup)
* 52 : 200kΩ ATC Semitec 204GT-2 (1kΩ pullup)
* 55 : 100kΩ ATC Semitec 104GT-2 - Used in ParCan & J-Head (1kΩ pullup)
*
* ================================================================
* Analog Thermistors - 10kΩ pullup - Atypical
* -------
* 99 : 100kΩ Found on some Wanhao i3 machines with a 10kΩ pull-up resistor
* ================================================================
* 99 : 100kΩ Found on some Wanhao i3 machines with a 10kΩ pull-up resistor
*
* ================================================================
* Analog RTDs (Pt100/Pt1000)
* -------
* ================================================================
* 110 : Pt100 with 1kΩ pullup (atypical)
* 147 : Pt100 with 4.7kΩ pullup
* 1010 : Pt1000 with 1kΩ pullup (atypical)
Expand All @@ -526,15 +518,34 @@
* NOTE: ADC pins are not 5V tolerant. Not recommended because it's possible to damage the CPU by going over 500°C.
* 201 : Pt100 with circuit in Overlord, similar to Ultimainboard V2.x
*
* ================================================================
* SPI RTD/Thermocouple Boards
* ================================================================
* -5 : MAX31865 with Pt100/Pt1000, 2, 3, or 4-wire (only for sensors 0-2 and bed)
* NOTE: You must uncomment/set the MAX31865_*_OHMS_n defines below.
* -3 : MAX31855 with Thermocouple, -200°C to +700°C (only for sensors 0-2 and bed)
* -2 : MAX6675 with Thermocouple, 0°C to +700°C (only for sensors 0-2 and bed)
*
* NOTE: Ensure TEMP_n_CS_PIN is set in your pins file for each TEMP_SENSOR_n using an SPI Thermocouple. By default,
* Hardware SPI on the default serial bus is used. If you have also set TEMP_n_SCK_PIN and TEMP_n_MISO_PIN,
* Software SPI will be used on those ports instead. You can force Hardware SPI on the default bus in the
* Configuration_adv.h file. At this time, separate Hardware SPI buses for sensors are not supported.
*
* ================================================================
* Analog Thermocouple Boards
* ================================================================
* -4 : AD8495 with Thermocouple
* -1 : AD595 with Thermocouple
*
* ================================================================
* Custom/Dummy/Other Thermal Sensors
* ------
* ================================================================
* 0 : not used
* 1000 : Custom - Specify parameters in Configuration_adv.h
*
* !!! Use these for Testing or Development purposes. NEVER for production machine. !!!
* 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 1
#define TEMP_SENSOR_1 0
Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/module/thermistor/thermistor_1.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@

// R25 = 100 kOhm, beta25 = 4092 K, 4.7 kOhm pull-up, bed thermistor
constexpr temp_entry_t temptable_1[] PROGMEM = {
{ OV( 18), 320 },
{ OV( 19), 315 },
{ OV( 20), 310 },
{ OV( 22), 305 },
{ OV( 23), 300 },
{ OV( 25), 295 },
{ OV( 27), 290 },
Expand Down
85 changes: 85 additions & 0 deletions Marlin/src/module/thermistor/thermistor_14.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2023 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 <https://www.gnu.org/licenses/>.
*
*/
#pragma once

// R25 = 100 kOhm, beta25 = 4092 K, 4.7 kOhm pull-up, bed thermistor
constexpr temp_entry_t temptable_14[] PROGMEM = {
{ OV( 23), 275 },
{ OV( 25), 270 },
{ OV( 27), 265 },
{ OV( 28), 260 },
{ OV( 31), 255 },
{ OV( 33), 250 },
{ OV( 35), 245 },
{ OV( 38), 240 },
{ OV( 41), 235 },
{ OV( 44), 230 },
{ OV( 47), 225 },
{ OV( 52), 220 },
{ OV( 56), 215 },
{ OV( 62), 210 },
{ OV( 68), 205 },
{ OV( 74), 200 },
{ OV( 81), 195 },
{ OV( 90), 190 },
{ OV( 99), 185 },
{ OV( 108), 180 },
{ OV( 121), 175 },
{ OV( 133), 170 },
{ OV( 147), 165 },
{ OV( 162), 160 },
{ OV( 180), 155 },
{ OV( 199), 150 },
{ OV( 219), 145 },
{ OV( 243), 140 },
{ OV( 268), 135 },
{ OV( 296), 130 },
{ OV( 326), 125 },
{ OV( 358), 120 },
{ OV( 398), 115 },
{ OV( 435), 110 },
{ OV( 476), 105 },
{ OV( 519), 100 },
{ OV( 566), 95 },
{ OV( 610), 90 },
{ OV( 658), 85 },
{ OV( 703), 80 },
{ OV( 742), 75 },
{ OV( 773), 70 },
{ OV( 807), 65 },
{ OV( 841), 60 },
{ OV( 871), 55 },
{ OV( 895), 50 },
{ OV( 918), 45 },
{ OV( 937), 40 },
{ OV( 954), 35 },
{ OV( 968), 30 },
{ OV( 978), 25 },
{ OV( 985), 20 },
{ OV( 993), 15 },
{ OV( 999), 10 },
{ OV(1004), 5 },
{ OV(1008), 0 },
{ OV(1012), -5 },
{ OV(1016), -10 },
{ OV(1020), -15 }
};
Loading

0 comments on commit 244c257

Please sign in to comment.