Overlord printer thermistor (#14815)

This commit is contained in:
Tim Moore
2019-08-03 18:57:56 -07:00
committed by Scott Lahteine
parent ab792d004c
commit e3660bca25
124 changed files with 466 additions and 312 deletions

View File

@ -57,6 +57,10 @@
#define THERMISTOR_NAME "Generic 10K"
#elif THERMISTOR_ID == 5
#define THERMISTOR_NAME "ATC 104GT-2"
#elif THERMISTOR_ID == 501
#define THERMISTOR_NAME "Zonestar (Tronxy X3A)"
#elif THERMISTOR_ID == 512
#define THERMISTOR_NAME "RPW-Ultra"
#elif THERMISTOR_ID == 6
#define THERMISTOR_NAME "EPCOS (alt)"
#elif THERMISTOR_ID == 7
@ -75,10 +79,14 @@
#define THERMISTOR_NAME "E3104FXT (alt)"
#elif THERMISTOR_ID == 13
#define THERMISTOR_NAME "Hisens 3950"
#elif THERMISTOR_ID == 15
#define THERMISTOR_NAME "100k JGAurora A5"
#elif THERMISTOR_ID == 18
#define THERMISTOR_NAME "ATC Semitec 204GT-2"
#elif THERMISTOR_ID == 20
#define THERMISTOR_NAME "PT100 UltiMB"
#define THERMISTOR_NAME "Pt100 UltiMB"
#elif THERMISTOR_ID == 201
#define THERMISTOR_NAME "Pt100 OverLord"
#elif THERMISTOR_ID == 60
#define THERMISTOR_NAME "Makers Tool"
#elif THERMISTOR_ID == 70
@ -98,13 +106,11 @@
#elif THERMISTOR_ID == 1010
#define THERMISTOR_NAME "PT1000 1K"
#elif THERMISTOR_ID == 147
#define THERMISTOR_NAME "PT100 4K7"
#define THERMISTOR_NAME "Pt100 4K7"
#elif THERMISTOR_ID == 110
#define THERMISTOR_NAME "PT100 1K"
#define THERMISTOR_NAME "Pt100 1K"
#elif THERMISTOR_ID == 666
#define THERMISTOR_NAME "Einstart S"
#elif THERMISTOR_ID == 501
#define THERMISTOR_NAME "Zonestar (Tronxy X3A)"
// High Temperature thermistors
#elif THERMISTOR_ID == 61

View File

@ -21,41 +21,9 @@
*/
#pragma once
// PT100 with INA826 amp on Ultimaker v2.0 electronics
// The PT100 in the Ultimaker v2.0 electronics has a high sample value for a high temperature.
// This does not match the normal thermistor behavior so we need to set the following defines
#if THERMISTOR_HEATER_0 == 20
#define HEATER_0_RAW_HI_TEMP 16383
#define HEATER_0_RAW_LO_TEMP 0
#endif
#if THERMISTOR_HEATER_1 == 20
#define HEATER_1_RAW_HI_TEMP 16383
#define HEATER_1_RAW_LO_TEMP 0
#endif
#if THERMISTOR_HEATER_2 == 20
#define HEATER_2_RAW_HI_TEMP 16383
#define HEATER_2_RAW_LO_TEMP 0
#endif
#if THERMISTOR_HEATER_3 == 20
#define HEATER_3_RAW_HI_TEMP 16383
#define HEATER_3_RAW_LO_TEMP 0
#endif
#if THERMISTOR_HEATER_4 == 20
#define HEATER_4_RAW_HI_TEMP 16383
#define HEATER_4_RAW_LO_TEMP 0
#endif
#if THERMISTOR_HEATER_5 == 20
#define HEATER_5_RAW_HI_TEMP 16383
#define HEATER_5_RAW_LO_TEMP 0
#endif
#if THERMISTORBED == 20
#define HEATER_BED_RAW_HI_TEMP 16383
#define HEATER_BED_RAW_LO_TEMP 0
#endif
#if THERMISTORCHAMBER == 20
#define HEATER_CHAMBER_RAW_HI_TEMP 16383
#define HEATER_CHAMBER_RAW_LO_TEMP 0
#endif
#define REVERSE_TEMP_SENSOR_RANGE
// Pt100 with INA826 amp on Ultimaker v2.0 electronics
const short temptable_20[][2] PROGMEM = {
{ OV( 0), 0 },
{ OV(227), 1 },

View File

@ -0,0 +1,57 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2016 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 LMV324 amp on Overlord v1.1 electronics
const short temptable_201[][2] PROGMEM = {
{ OV( 0), 0 },
{ OV( 8), 1 },
{ OV( 23), 6 },
{ OV( 41), 15 },
{ OV( 51), 20 },
{ OV( 68), 28 },
{ OV( 74), 30 },
{ OV( 88), 35 },
{ OV( 99), 40 },
{ OV( 123), 50 },
{ OV( 148), 60 },
{ OV( 173), 70 },
{ OV( 198), 80 },
{ OV( 221), 90 },
{ OV( 245), 100 },
{ OV( 269), 110 },
{ OV( 294), 120 },
{ OV( 316), 130 },
{ OV( 342), 140 },
{ OV( 364), 150 },
{ OV( 387), 160 },
{ OV( 412), 170 },
{ OV( 433), 180 },
{ OV( 456), 190 },
{ OV( 480), 200 },
{ OV( 500), 210 },
{ OV( 548), 224 },
{ OV( 572), 233 },
{ OV(1155), 490 }
};

View File

@ -89,7 +89,7 @@
#if ANY_THERMISTOR_IS(18) // ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327
#include "thermistor_18.h"
#endif
#if ANY_THERMISTOR_IS(20) // PT100 with INA826 amp on Ultimaker v2.0 electronics
#if ANY_THERMISTOR_IS(20) // Pt100 with INA826 amp on Ultimaker v2.0 electronics
#include "thermistor_20.h"
#endif
#if ANY_THERMISTOR_IS(51) // beta25 = 4092 K, R25 = 100 kOhm, Pull-up = 1 kOhm, "EPCOS"
@ -128,6 +128,9 @@
#if ANY_THERMISTOR_IS(147) // Pt100 with 4k7 pullup
#include "thermistor_147.h"
#endif
#if ANY_THERMISTOR_IS(201) // Pt100 with LMV324 Overlord
#include "thermistor_201.h"
#endif
#if ANY_THERMISTOR_IS(666) // beta25 = UNK, R25 = 200K, Pull-up = 10 kOhm, "Unidentified 200K NTC thermistor (Einstart S)"
#include "thermistor_666.h"
#endif
@ -241,74 +244,76 @@ static_assert(
// For thermistors the highest temperature results in the lowest ADC value
// For thermocouples the highest temperature results in the highest ADC value
#ifndef HEATER_0_RAW_HI_TEMP
#ifdef HEATER_0_USES_THERMISTOR
#define HEATER_0_RAW_HI_TEMP 0
#define HEATER_0_RAW_LO_TEMP 16383
#else
#if defined(REVERSE_TEMP_SENSOR_RANGE) || !defined(HEATER_0_USES_THERMISTOR)
#define HEATER_0_RAW_HI_TEMP 16383
#define HEATER_0_RAW_LO_TEMP 0
#else
#define HEATER_0_RAW_HI_TEMP 0
#define HEATER_0_RAW_LO_TEMP 16383
#endif
#endif
#ifndef HEATER_1_RAW_HI_TEMP
#ifdef HEATER_1_USES_THERMISTOR
#define HEATER_1_RAW_HI_TEMP 0
#define HEATER_1_RAW_LO_TEMP 16383
#else
#if defined(REVERSE_TEMP_SENSOR_RANGE) || !defined(HEATER_1_USES_THERMISTOR)
#define HEATER_1_RAW_HI_TEMP 16383
#define HEATER_1_RAW_LO_TEMP 0
#else
#define HEATER_1_RAW_HI_TEMP 0
#define HEATER_1_RAW_LO_TEMP 16383
#endif
#endif
#ifndef HEATER_2_RAW_HI_TEMP
#ifdef HEATER_2_USES_THERMISTOR
#define HEATER_2_RAW_HI_TEMP 0
#define HEATER_2_RAW_LO_TEMP 16383
#else
#if defined(REVERSE_TEMP_SENSOR_RANGE) || !defined(HEATER_2_USES_THERMISTOR)
#define HEATER_2_RAW_HI_TEMP 16383
#define HEATER_2_RAW_LO_TEMP 0
#else
#define HEATER_2_RAW_HI_TEMP 0
#define HEATER_2_RAW_LO_TEMP 16383
#endif
#endif
#ifndef HEATER_3_RAW_HI_TEMP
#ifdef HEATER_3_USES_THERMISTOR
#define HEATER_3_RAW_HI_TEMP 0
#define HEATER_3_RAW_LO_TEMP 16383
#else
#if defined(REVERSE_TEMP_SENSOR_RANGE) || !defined(HEATER_3_USES_THERMISTOR)
#define HEATER_3_RAW_HI_TEMP 16383
#define HEATER_3_RAW_LO_TEMP 0
#else
#define HEATER_3_RAW_HI_TEMP 0
#define HEATER_3_RAW_LO_TEMP 16383
#endif
#endif
#ifndef HEATER_4_RAW_HI_TEMP
#ifdef HEATER_4_USES_THERMISTOR
#define HEATER_4_RAW_HI_TEMP 0
#define HEATER_4_RAW_LO_TEMP 16383
#else
#if defined(REVERSE_TEMP_SENSOR_RANGE) || !defined(HEATER_4_USES_THERMISTOR)
#define HEATER_4_RAW_HI_TEMP 16383
#define HEATER_4_RAW_LO_TEMP 0
#else
#define HEATER_4_RAW_HI_TEMP 0
#define HEATER_4_RAW_LO_TEMP 16383
#endif
#endif
#ifndef HEATER_5_RAW_HI_TEMP
#ifdef HEATER_5_USES_THERMISTOR
#define HEATER_5_RAW_HI_TEMP 0
#define HEATER_5_RAW_LO_TEMP 16383
#else
#if defined(REVERSE_TEMP_SENSOR_RANGE) || !defined(HEATER_5_USES_THERMISTOR)
#define HEATER_5_RAW_HI_TEMP 16383
#define HEATER_5_RAW_LO_TEMP 0
#else
#define HEATER_5_RAW_HI_TEMP 0
#define HEATER_5_RAW_LO_TEMP 16383
#endif
#endif
#ifndef HEATER_BED_RAW_HI_TEMP
#ifdef HEATER_BED_USES_THERMISTOR
#define HEATER_BED_RAW_HI_TEMP 0
#define HEATER_BED_RAW_LO_TEMP 16383
#else
#if defined(REVERSE_TEMP_SENSOR_RANGE) || !defined(HEATER_BED_USES_THERMISTOR)
#define HEATER_BED_RAW_HI_TEMP 16383
#define HEATER_BED_RAW_LO_TEMP 0
#else
#define HEATER_BED_RAW_HI_TEMP 0
#define HEATER_BED_RAW_LO_TEMP 16383
#endif
#endif
#ifndef HEATER_CHAMBER_RAW_HI_TEMP
#ifdef HEATER_CHAMBER_USES_THERMISTOR
#define HEATER_CHAMBER_RAW_HI_TEMP 0
#define HEATER_CHAMBER_RAW_LO_TEMP 16383
#else
#if defined(REVERSE_TEMP_SENSOR_RANGE) || !defined(HEATER_CHAMBER_USES_THERMISTOR)
#define HEATER_CHAMBER_RAW_HI_TEMP 16383
#define HEATER_CHAMBER_RAW_LO_TEMP 0
#else
#define HEATER_CHAMBER_RAW_HI_TEMP 0
#define HEATER_CHAMBER_RAW_LO_TEMP 16383
#endif
#endif
#undef REVERSE_TEMP_SENSOR_RANGE

View File

@ -159,7 +159,7 @@ inline void report_pin_state_extended(pin_t pin, bool ignore, bool extended = fa
if (!GET_PINMODE(pin)) {
//pinMode(pin, INPUT_PULLUP); // make sure input isn't floating - stopped doing this
// because this could interfere with inductive/capacitive
// sensors (high impedance voltage divider) and with PT100 amplifier
// sensors (high impedance voltage divider) and with Pt100 amplifier
print_input_or_output(false);
SERIAL_ECHO(digitalRead_mod(pin));
}