├── .gitignore ├── thermistor.h ├── src ├── thermistor.h ├── thermistortable_998.h ├── thermistortable_999.h ├── tables │ ├── thermistortable_998.h │ ├── thermistortable_999.h │ ├── thermistortable_110.h │ ├── thermistortable_147.h │ ├── thermistortable_1047.h │ ├── thermistortable_1010.h │ ├── thermistortable_4.h │ ├── thermistortable_8.h │ ├── thermistortable_13.h │ ├── thermistortable_80.h │ ├── thermistortable_3.h │ ├── thermistortable_66.h │ ├── thermistortable_10.h │ ├── thermistortable_9.h │ ├── thermistortable_12.h │ ├── thermistortable_2.h │ ├── thermistortable_6.h │ ├── thermistortable_5.h │ ├── thermistortable_55.h │ ├── thermistortable_52.h │ ├── thermistortable_11.h │ ├── thermistortable_7.h │ ├── thermistortable_70.h │ ├── thermistortable_148.h │ ├── thermistortable_1.h │ ├── thermistortable_51.h │ ├── Conditionals.h │ ├── thermistortable_60.h │ ├── thermistortable_20.h │ ├── thermistornames.h │ ├── thermistortable_75.h │ ├── thermistortable_71.h │ └── Thermistortables.h ├── thermistortable_110.h ├── thermistortable_147.h ├── thermistortable_1047.h ├── thermistortable_1010.h ├── thermistortable_4.h ├── thermistortable_8.h ├── thermistortable_13.h ├── thermistortable_3.h ├── thermistortable_66.h ├── thermistortable_10.h ├── thermistortable_9.h ├── thermistortable_12.h ├── thermistortable_2.h ├── thermistortable_6.h ├── thermistortable_5.h ├── thermistortable_52.h ├── thermistortable_55.h ├── thermistortable_80.h ├── thermistortable_11.h ├── thermistortable_7.h ├── thermistortable_70.h ├── thermistortable_1.h ├── thermistortable_51.h ├── Conditionals.h ├── thermistortable_60.h ├── thermistortable_20.h ├── thermistor.cpp ├── thermistornames.h ├── thermistortable_75.h ├── Configuration.h ├── thermistortable_71.h └── Thermistortables.h ├── library.properties ├── .gitattributes ├── examples ├── basicExample │ └── basicExample.ino ├── externalADC │ └── externalADC.ino └── advancedExample │ └── advancedExample.ino ├── LICENSE ├── CONTRIBUTING.md ├── thermistor.cpp ├── CODE_OF_CONDUCT.md └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/* 2 | !.vscode/settings.json 3 | !.vscode/tasks.json 4 | !.vscode/launch.json 5 | !.vscode/extensions.json 6 | 7 | .github/* 8 | -------------------------------------------------------------------------------- /thermistor.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef THERMISTOR_H 3 | #define THERMISTOR_H 4 | 5 | 6 | class thermistor 7 | { 8 | public: 9 | thermistor(int pin, int sensorNumber); 10 | float analog2temp(); 11 | private: 12 | int _pin; 13 | int _sensorNumber; 14 | }; 15 | 16 | 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/thermistor.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef THERMISTOR_H 3 | #define THERMISTOR_H 4 | 5 | 6 | class thermistor 7 | { 8 | public: 9 | thermistor(int pin, int sensorNumber); 10 | float analog2temp(); 11 | float analog2tempEADC(int adcValue); 12 | private: 13 | int _pin; 14 | int _sensorNumber; 15 | }; 16 | 17 | 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /library.properties: -------------------------------------------------------------------------------- 1 | name=ThermistorLibrary 2 | version=1.0.6 3 | author= Miguel Califa 4 | maintainer= Miguel Califa 5 | sentence= This library allows you to read the thermistors very easily. 6 | paragraph= This library allows an Arduino/Genuino board to read thermistors very easily. 7 | category= Sensors 8 | url=https://github.com/miguel5612/Arduino-ThermistorLibrary 9 | architectures=avr,stm32 10 | license=MIT 11 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Sources 2 | *.c text diff=c 3 | *.cc text diff=cpp 4 | *.cxx text diff=cpp 5 | *.cpp text diff=cpp 6 | *.c++ text diff=cpp 7 | *.hpp text diff=cpp 8 | *.h text diff=c 9 | *.h++ text diff=cpp 10 | *.hh text diff=cpp 11 | 12 | # Compiled Object files 13 | *.slo binary 14 | *.lo binary 15 | *.o binary 16 | *.obj binary 17 | 18 | # Precompiled Headers 19 | *.gch binary 20 | *.pch binary 21 | 22 | # Compiled Dynamic libraries 23 | *.so binary 24 | *.dylib binary 25 | *.dll binary 26 | 27 | # Compiled Static libraries 28 | *.lai binary 29 | *.la binary 30 | *.a binary 31 | *.lib binary 32 | 33 | # Executables 34 | *.exe binary 35 | *.out binary 36 | *.app binary 37 | 38 | 39 | #Linguistic exclusions 40 | Internal_design_documents/* linguist-generated=false -------------------------------------------------------------------------------- /examples/basicExample/basicExample.ino: -------------------------------------------------------------------------------- 1 | // 3950 THERMISTOR EXAMPLE. 2 | // Written by Miguel Angel Califa Urquiza 3 | // Released under an MIT license. 4 | 5 | // Depends on the following Arduino libraries: 6 | // - Arduino thermistor library: https://github.com/miguel5612/Arduino-ThermistorLibrary 7 | 8 | #include 9 | 10 | thermistor therm1(A0,0); // Analog Pin which is connected to the 3950 temperature sensor, and 0 represents TEMP_SENSOR_0 (see configuration.h for more information). 11 | 12 | 13 | void setup() { 14 | // put your setup code here, to run once: 15 | Serial.begin(9600); //initialize port serial at 9600 Bauds. 16 | } 17 | 18 | void loop() { 19 | double temp = therm1.analog2temp(); // read temperature 20 | //Print temperature in port serial 21 | Serial.print("Temperatura: "); 22 | Serial.println((String)temp); 23 | Serial.print("----------------------"); 24 | delay(2000); //wait 2000 mS for next measure 25 | } -------------------------------------------------------------------------------- /examples/externalADC/externalADC.ino: -------------------------------------------------------------------------------- 1 | // 3950 THERMISTOR EXAMPLE. 2 | // Written by Miguel Angel Califa Urquiza 3 | // Released under an MIT license. 4 | 5 | // Depends on the following Arduino libraries: 6 | // - Arduino thermistor library: https://github.com/miguel5612/Arduino-ThermistorLibrary 7 | 8 | #include 9 | 10 | thermistor therm1(A0,0); // Analog Pin which is connected to the 3950 temperature sensor, and 0 represents TEMP_SENSOR_0 (see configuration.h for more information). 11 | 12 | 13 | void setup() { 14 | // put your setup code here, to run once: 15 | Serial.begin(9600); //initialize port serial at 9600 Bauds. 16 | } 17 | 18 | void loop() { 19 | double temp = therm1.analog2tempEADC(1024); // read temperature based in external 1024 example value 20 | //Print temperature in port serial 21 | Serial.print("Temperatura: "); 22 | Serial.println((String)temp); 23 | Serial.print("----------------------"); 24 | delay(2000); //wait 2000 mS for next measure 25 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Miguel Angel Califa Urquiza 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | When contributing to this repository, please first discuss the change you wish to make via issue, 4 | email, or any other method with the owners of this repository before making a change. 5 | 6 | Please note we have a code of conduct, please follow it in all your interactions with the project. 7 | 8 | ## Pull Request Process 9 | 10 | 1. Ensure any install or build dependencies are removed before the end of the layer when doing a 11 | build. 12 | 2. Create a new branch with a keyword of your contribution or main issue. 13 | 3. Update the README.md with details of changes to the new features or fixed settings done. 14 | 4. Commit your additions and deletions, or new files to the branch created previously. 15 | 5. When the changes are stable and run effectively, make a pull request to master branch. 16 | 17 | ## Review of pull request 18 | 19 | Pull request will be check by three main authors who are linked in 20 | [REAMDE.md](https://github.com/miguel5612/MQSensorsLib/README.md) and they determine to merge to 21 | master branch. Later than assessment and debbuging procedures was completed, the contribution 22 | will be released. 23 | -------------------------------------------------------------------------------- /src/thermistortable_998.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // User-defined table 1 24 | // Dummy Thermistor table.. It will ALWAYS read a fixed value. 25 | #ifndef DUMMY_THERMISTOR_998_VALUE 26 | #define DUMMY_THERMISTOR_998_VALUE 25 27 | #endif 28 | 29 | const short temptable_998[][2] PROGMEM = { 30 | { OV( 1), DUMMY_THERMISTOR_998_VALUE }, 31 | { OV(1023), DUMMY_THERMISTOR_998_VALUE } 32 | }; 33 | -------------------------------------------------------------------------------- /src/thermistortable_999.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // User-defined table 2 24 | // Dummy Thermistor table.. It will ALWAYS read a fixed value. 25 | #ifndef DUMMY_THERMISTOR_999_VALUE 26 | #define DUMMY_THERMISTOR_999_VALUE 25 27 | #endif 28 | 29 | const short temptable_999[][2] PROGMEM = { 30 | { OV( 1), DUMMY_THERMISTOR_999_VALUE }, 31 | { OV(1023), DUMMY_THERMISTOR_999_VALUE } 32 | }; 33 | -------------------------------------------------------------------------------- /src/tables/thermistortable_998.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // User-defined table 1 24 | // Dummy Thermistor table.. It will ALWAYS read a fixed value. 25 | #ifndef DUMMY_THERMISTOR_998_VALUE 26 | #define DUMMY_THERMISTOR_998_VALUE 25 27 | #endif 28 | 29 | const short temptable_998[][2] PROGMEM = { 30 | { OV( 1), DUMMY_THERMISTOR_998_VALUE }, 31 | { OV(1023), DUMMY_THERMISTOR_998_VALUE } 32 | }; 33 | -------------------------------------------------------------------------------- /src/tables/thermistortable_999.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // User-defined table 2 24 | // Dummy Thermistor table.. It will ALWAYS read a fixed value. 25 | #ifndef DUMMY_THERMISTOR_999_VALUE 26 | #define DUMMY_THERMISTOR_999_VALUE 25 27 | #endif 28 | 29 | const short temptable_999[][2] PROGMEM = { 30 | { OV( 1), DUMMY_THERMISTOR_999_VALUE }, 31 | { OV(1023), DUMMY_THERMISTOR_999_VALUE } 32 | }; 33 | -------------------------------------------------------------------------------- /src/thermistortable_110.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // Pt100 with 1k0 pullup 24 | const short temptable_110[][2] PROGMEM = { 25 | // only a few values are needed as the curve is very flat 26 | PtLine( 0, 100, 1000) 27 | PtLine( 50, 100, 1000) 28 | PtLine(100, 100, 1000) 29 | PtLine(150, 100, 1000) 30 | PtLine(200, 100, 1000) 31 | PtLine(250, 100, 1000) 32 | PtLine(300, 100, 1000) 33 | }; 34 | -------------------------------------------------------------------------------- /src/thermistortable_147.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // Pt100 with 4k7 pullup 24 | const short temptable_147[][2] PROGMEM = { 25 | // only a few values are needed as the curve is very flat 26 | PtLine( 0, 100, 4700) 27 | PtLine( 50, 100, 4700) 28 | PtLine(100, 100, 4700) 29 | PtLine(150, 100, 4700) 30 | PtLine(200, 100, 4700) 31 | PtLine(250, 100, 4700) 32 | PtLine(300, 100, 4700) 33 | }; 34 | -------------------------------------------------------------------------------- /src/tables/thermistortable_110.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // Pt100 with 1k0 pullup 24 | const short temptable_110[][2] PROGMEM = { 25 | // only a few values are needed as the curve is very flat 26 | PtLine( 0, 100, 1000) 27 | PtLine( 50, 100, 1000) 28 | PtLine(100, 100, 1000) 29 | PtLine(150, 100, 1000) 30 | PtLine(200, 100, 1000) 31 | PtLine(250, 100, 1000) 32 | PtLine(300, 100, 1000) 33 | }; 34 | -------------------------------------------------------------------------------- /src/tables/thermistortable_147.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // Pt100 with 4k7 pullup 24 | const short temptable_147[][2] PROGMEM = { 25 | // only a few values are needed as the curve is very flat 26 | PtLine( 0, 100, 4700) 27 | PtLine( 50, 100, 4700) 28 | PtLine(100, 100, 4700) 29 | PtLine(150, 100, 4700) 30 | PtLine(200, 100, 4700) 31 | PtLine(250, 100, 4700) 32 | PtLine(300, 100, 4700) 33 | }; 34 | -------------------------------------------------------------------------------- /src/thermistortable_1047.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // Pt1000 with 4k7 pullup 24 | const short temptable_1047[][2] PROGMEM = { 25 | // only a few values are needed as the curve is very flat 26 | PtLine( 0, 1000, 4700) 27 | PtLine( 50, 1000, 4700) 28 | PtLine(100, 1000, 4700) 29 | PtLine(150, 1000, 4700) 30 | PtLine(200, 1000, 4700) 31 | PtLine(250, 1000, 4700) 32 | PtLine(300, 1000, 4700) 33 | }; 34 | -------------------------------------------------------------------------------- /src/tables/thermistortable_1047.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // Pt1000 with 4k7 pullup 24 | const short temptable_1047[][2] PROGMEM = { 25 | // only a few values are needed as the curve is very flat 26 | PtLine( 0, 1000, 4700) 27 | PtLine( 50, 1000, 4700) 28 | PtLine(100, 1000, 4700) 29 | PtLine(150, 1000, 4700) 30 | PtLine(200, 1000, 4700) 31 | PtLine(250, 1000, 4700) 32 | PtLine(300, 1000, 4700) 33 | }; 34 | -------------------------------------------------------------------------------- /src/thermistortable_1010.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // Pt1000 with 1k0 pullup 24 | const short temptable_1010[][2] PROGMEM = { 25 | PtLine( 0, 1000, 1000) 26 | PtLine( 25, 1000, 1000) 27 | PtLine( 50, 1000, 1000) 28 | PtLine( 75, 1000, 1000) 29 | PtLine(100, 1000, 1000) 30 | PtLine(125, 1000, 1000) 31 | PtLine(150, 1000, 1000) 32 | PtLine(175, 1000, 1000) 33 | PtLine(200, 1000, 1000) 34 | PtLine(225, 1000, 1000) 35 | PtLine(250, 1000, 1000) 36 | PtLine(275, 1000, 1000) 37 | PtLine(300, 1000, 1000) 38 | }; 39 | -------------------------------------------------------------------------------- /src/tables/thermistortable_1010.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // Pt1000 with 1k0 pullup 24 | const short temptable_1010[][2] PROGMEM = { 25 | PtLine( 0, 1000, 1000) 26 | PtLine( 25, 1000, 1000) 27 | PtLine( 50, 1000, 1000) 28 | PtLine( 75, 1000, 1000) 29 | PtLine(100, 1000, 1000) 30 | PtLine(125, 1000, 1000) 31 | PtLine(150, 1000, 1000) 32 | PtLine(175, 1000, 1000) 33 | PtLine(200, 1000, 1000) 34 | PtLine(225, 1000, 1000) 35 | PtLine(250, 1000, 1000) 36 | PtLine(275, 1000, 1000) 37 | PtLine(300, 1000, 1000) 38 | }; 39 | -------------------------------------------------------------------------------- /src/thermistortable_4.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 10k thermistor 24 | const short temptable_4[][2] PROGMEM = { 25 | { OV( 1), 430 }, 26 | { OV( 54), 137 }, 27 | { OV( 107), 107 }, 28 | { OV( 160), 91 }, 29 | { OV( 213), 80 }, 30 | { OV( 266), 71 }, 31 | { OV( 319), 64 }, 32 | { OV( 372), 57 }, 33 | { OV( 425), 51 }, 34 | { OV( 478), 46 }, 35 | { OV( 531), 41 }, 36 | { OV( 584), 35 }, 37 | { OV( 637), 30 }, 38 | { OV( 690), 25 }, 39 | { OV( 743), 20 }, 40 | { OV( 796), 14 }, 41 | { OV( 849), 7 }, 42 | { OV( 902), 0 }, 43 | { OV( 955), -11 }, 44 | { OV(1008), -35 } 45 | }; 46 | -------------------------------------------------------------------------------- /src/tables/thermistortable_4.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 10k thermistor 24 | const short temptable_4[][2] PROGMEM = { 25 | { OV( 1), 430 }, 26 | { OV( 54), 137 }, 27 | { OV( 107), 107 }, 28 | { OV( 160), 91 }, 29 | { OV( 213), 80 }, 30 | { OV( 266), 71 }, 31 | { OV( 319), 64 }, 32 | { OV( 372), 57 }, 33 | { OV( 425), 51 }, 34 | { OV( 478), 46 }, 35 | { OV( 531), 41 }, 36 | { OV( 584), 35 }, 37 | { OV( 637), 30 }, 38 | { OV( 690), 25 }, 39 | { OV( 743), 20 }, 40 | { OV( 796), 14 }, 41 | { OV( 849), 7 }, 42 | { OV( 902), 0 }, 43 | { OV( 955), -11 }, 44 | { OV(1008), -35 } 45 | }; 46 | -------------------------------------------------------------------------------- /src/thermistortable_8.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) 24 | const short temptable_8[][2] PROGMEM = { 25 | { OV( 1), 704 }, 26 | { OV( 54), 216 }, 27 | { OV( 107), 175 }, 28 | { OV( 160), 152 }, 29 | { OV( 213), 137 }, 30 | { OV( 266), 125 }, 31 | { OV( 319), 115 }, 32 | { OV( 372), 106 }, 33 | { OV( 425), 99 }, 34 | { OV( 478), 91 }, 35 | { OV( 531), 85 }, 36 | { OV( 584), 78 }, 37 | { OV( 637), 71 }, 38 | { OV( 690), 65 }, 39 | { OV( 743), 58 }, 40 | { OV( 796), 50 }, 41 | { OV( 849), 42 }, 42 | { OV( 902), 31 }, 43 | { OV( 955), 17 }, 44 | { OV(1008), 0 } 45 | }; 46 | -------------------------------------------------------------------------------- /src/tables/thermistortable_8.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) 24 | const short temptable_8[][2] PROGMEM = { 25 | { OV( 1), 704 }, 26 | { OV( 54), 216 }, 27 | { OV( 107), 175 }, 28 | { OV( 160), 152 }, 29 | { OV( 213), 137 }, 30 | { OV( 266), 125 }, 31 | { OV( 319), 115 }, 32 | { OV( 372), 106 }, 33 | { OV( 425), 99 }, 34 | { OV( 478), 91 }, 35 | { OV( 531), 85 }, 36 | { OV( 584), 78 }, 37 | { OV( 637), 71 }, 38 | { OV( 690), 65 }, 39 | { OV( 743), 58 }, 40 | { OV( 796), 50 }, 41 | { OV( 849), 42 }, 42 | { OV( 902), 31 }, 43 | { OV( 955), 17 }, 44 | { OV(1008), 0 } 45 | }; 46 | -------------------------------------------------------------------------------- /examples/advancedExample/advancedExample.ino: -------------------------------------------------------------------------------- 1 | // 3950 THERMISTOR EXAMPLE. 2 | // Written by Miguel Angel Califa Urquiza 3 | // Released under an MIT license. 4 | 5 | // Depends on the following Arduino libraries: 6 | // - Arduino thermistor library: https://github.com/miguel5612/Arduino-ThermistorLibrary 7 | 8 | // At this example we use two diferent thermistor, one is 3950 thermistor and two is unknown thermistor. 9 | // you can configurate this thermistor in Configuration.h in Documents/arduino/libraries/Arduino-ThermistorLibrary/src/Configuration.h and select TEMP_SENSOR_1 value. 10 | #include 11 | 12 | thermistor therm1(A0,0); // Analog Pin which is connected to the 3950 temperature sensor, and 0 represents TEMP_SENSOR_0 (see configuration.h for more information). 13 | thermistor therm2(A1,1); // Analog Pin which is connected temperature sensor, and 0 represents TEMP_SENSOR_1 (see configuration.h for more information). 14 | 15 | 16 | void setup() { 17 | // put your setup code here, to run once: 18 | Serial.begin(9600); //initialize port serial at 9600 Bauds. 19 | } 20 | 21 | void loop() { 22 | // All thermistor temperature is in degrade. 23 | double temp1 = therm1.analog2temp(); // read temperature 24 | double temp2 = therm2.analog2temp(); // read temperature 25 | //Print temperature in port serial 26 | Serial.print("Temperatura del termistor 1: "); 27 | Serial.println((String)temp1); 28 | Serial.print("----------------------"); 29 | 30 | Serial.print("Temperatura del termistor 2: "); 31 | Serial.println((String)temp2); 32 | Serial.print("----------------------"); 33 | delay(2000); //wait 2000 mS for next measure 34 | } 35 | -------------------------------------------------------------------------------- /src/thermistortable_13.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // Hisens thermistor B25/50 =3950 +/-1% 24 | const short temptable_13[][2] PROGMEM = { 25 | { OV( 20.04), 300 }, 26 | { OV( 23.19), 290 }, 27 | { OV( 26.71), 280 }, 28 | { OV( 31.23), 270 }, 29 | { OV( 36.52), 260 }, 30 | { OV( 42.75), 250 }, 31 | { OV( 50.68), 240 }, 32 | { OV( 60.22), 230 }, 33 | { OV( 72.03), 220 }, 34 | { OV( 86.84), 210 }, 35 | { OV(102.79), 200 }, 36 | { OV(124.46), 190 }, 37 | { OV(151.02), 180 }, 38 | { OV(182.86), 170 }, 39 | { OV(220.72), 160 }, 40 | { OV(316.96), 140 }, 41 | { OV(447.17), 120 }, 42 | { OV(590.61), 100 }, 43 | { OV(737.31), 80 }, 44 | { OV(857.77), 60 }, 45 | { OV(939.52), 40 }, 46 | { OV(986.03), 20 }, 47 | { OV(1008.7), 0 } 48 | }; 49 | -------------------------------------------------------------------------------- /src/tables/thermistortable_13.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // Hisens thermistor B25/50 =3950 +/-1% 24 | const short temptable_13[][2] PROGMEM = { 25 | { OV( 20.04), 300 }, 26 | { OV( 23.19), 290 }, 27 | { OV( 26.71), 280 }, 28 | { OV( 31.23), 270 }, 29 | { OV( 36.52), 260 }, 30 | { OV( 42.75), 250 }, 31 | { OV( 50.68), 240 }, 32 | { OV( 60.22), 230 }, 33 | { OV( 72.03), 220 }, 34 | { OV( 86.84), 210 }, 35 | { OV(102.79), 200 }, 36 | { OV(124.46), 190 }, 37 | { OV(151.02), 180 }, 38 | { OV(182.86), 170 }, 39 | { OV(220.72), 160 }, 40 | { OV(316.96), 140 }, 41 | { OV(447.17), 120 }, 42 | { OV(590.61), 100 }, 43 | { OV(737.31), 80 }, 44 | { OV(857.77), 60 }, 45 | { OV(939.52), 40 }, 46 | { OV(986.03), 20 }, 47 | { OV(1008.7), 0 } 48 | }; 49 | -------------------------------------------------------------------------------- /src/tables/thermistortable_80.h: -------------------------------------------------------------------------------- 1 | const short temptable_80[][2] PROGMEM = { 2 | { OV(21.5), 300 }, 3 | { OV(23.0625), 295 }, 4 | { OV(24.8125), 290 }, 5 | { OV(26.75), 285 }, 6 | { OV(28.8125), 280 }, 7 | { OV(31.125), 275 }, 8 | { OV(33.625), 270 }, 9 | { OV(36.375), 265 }, 10 | { OV(39.375), 260 }, 11 | { OV(42.6875), 255 }, 12 | { OV(46.3125), 250 }, 13 | { OV(50.3125), 245 }, 14 | { OV(54.6875), 240 }, 15 | { OV(59.5625), 235 }, 16 | { OV(64.875), 230 }, 17 | { OV(70.75), 225 }, 18 | { OV(77.25), 220 }, 19 | { OV(84.4375), 215 }, 20 | { OV(92.3125), 210 }, 21 | { OV(101.0625), 205 }, 22 | { OV(110.6875), 200 }, 23 | { OV(121.3125), 195 }, 24 | { OV(133), 190 }, 25 | { OV(145.9375), 185 }, 26 | { OV(160.125), 180 }, 27 | { OV(175.6875), 175 }, 28 | { OV(192.8125), 170 }, 29 | { OV(211.5), 165 }, 30 | { OV(231.9375), 160 }, 31 | { OV(254.125), 155 }, 32 | { OV(278.1875), 150 }, 33 | { OV(304.125), 145 }, 34 | { OV(332), 140 }, 35 | { OV(361.6875), 135 }, 36 | { OV(393.125), 130 }, 37 | { OV(426.25), 125 }, 38 | { OV(460.8125), 120 }, 39 | { OV(496.5625), 115 }, 40 | { OV(533.1875), 110 }, 41 | { OV(570.3125), 105 }, 42 | { OV(607.625), 100 }, 43 | { OV(644.625), 95 }, 44 | { OV(680.9375), 90 }, 45 | { OV(716.125), 85 }, 46 | { OV(749.875), 80 }, 47 | { OV(781.8125), 75 }, 48 | { OV(811.6875), 70 }, 49 | { OV(839.25), 65 }, 50 | { OV(864.5), 60 }, 51 | { OV(887.3125), 55 }, 52 | { OV(907.6875), 50 }, 53 | { OV(925.6875), 45 }, 54 | { OV(941.5), 40 }, 55 | { OV(955.25), 35 }, 56 | { OV(967), 30 }, 57 | { OV(977.0625), 25 }, 58 | { OV(985.5625), 20 }, 59 | { OV(992.6875), 15 }, 60 | { OV(998.625), 10 }, 61 | { OV(1003.5625), 5 }, 62 | { OV(1007.5625), 0 } 63 | }; 64 | -------------------------------------------------------------------------------- /src/thermistortable_3.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // mendel-parts 24 | const short temptable_3[][2] PROGMEM = { 25 | { OV( 1), 864 }, 26 | { OV( 21), 300 }, 27 | { OV( 25), 290 }, 28 | { OV( 29), 280 }, 29 | { OV( 33), 270 }, 30 | { OV( 39), 260 }, 31 | { OV( 46), 250 }, 32 | { OV( 54), 240 }, 33 | { OV( 64), 230 }, 34 | { OV( 75), 220 }, 35 | { OV( 90), 210 }, 36 | { OV( 107), 200 }, 37 | { OV( 128), 190 }, 38 | { OV( 154), 180 }, 39 | { OV( 184), 170 }, 40 | { OV( 221), 160 }, 41 | { OV( 265), 150 }, 42 | { OV( 316), 140 }, 43 | { OV( 375), 130 }, 44 | { OV( 441), 120 }, 45 | { OV( 513), 110 }, 46 | { OV( 588), 100 }, 47 | { OV( 734), 80 }, 48 | { OV( 856), 60 }, 49 | { OV( 938), 40 }, 50 | { OV( 986), 20 }, 51 | { OV(1008), 0 }, 52 | { OV(1018), -20 } 53 | }; 54 | -------------------------------------------------------------------------------- /src/tables/thermistortable_3.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // mendel-parts 24 | const short temptable_3[][2] PROGMEM = { 25 | { OV( 1), 864 }, 26 | { OV( 21), 300 }, 27 | { OV( 25), 290 }, 28 | { OV( 29), 280 }, 29 | { OV( 33), 270 }, 30 | { OV( 39), 260 }, 31 | { OV( 46), 250 }, 32 | { OV( 54), 240 }, 33 | { OV( 64), 230 }, 34 | { OV( 75), 220 }, 35 | { OV( 90), 210 }, 36 | { OV( 107), 200 }, 37 | { OV( 128), 190 }, 38 | { OV( 154), 180 }, 39 | { OV( 184), 170 }, 40 | { OV( 221), 160 }, 41 | { OV( 265), 150 }, 42 | { OV( 316), 140 }, 43 | { OV( 375), 130 }, 44 | { OV( 441), 120 }, 45 | { OV( 513), 110 }, 46 | { OV( 588), 100 }, 47 | { OV( 734), 80 }, 48 | { OV( 856), 60 }, 49 | { OV( 938), 40 }, 50 | { OV( 986), 20 }, 51 | { OV(1008), 0 }, 52 | { OV(1018), -20 } 53 | }; 54 | -------------------------------------------------------------------------------- /src/thermistortable_66.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // DyzeDesign 500°C Thermistor 24 | const short temptable_66[][2] PROGMEM = { 25 | { OV( 17.5), 850 }, 26 | { OV( 17.9), 500 }, 27 | { OV( 21.7), 480 }, 28 | { OV( 26.6), 460 }, 29 | { OV( 33.1), 440 }, 30 | { OV( 41.0), 420 }, 31 | { OV( 52.3), 400 }, 32 | { OV( 67.7), 380 }, 33 | { OV( 86.5), 360 }, 34 | { OV( 112.0), 340 }, 35 | { OV( 147.2), 320 }, 36 | { OV( 194.0), 300 }, 37 | { OV( 254.3), 280 }, 38 | { OV( 330.2), 260 }, 39 | { OV( 427.9), 240 }, 40 | { OV( 533.4), 220 }, 41 | { OV( 646.5), 200 }, 42 | { OV( 754.4), 180 }, 43 | { OV( 844.3), 160 }, 44 | { OV( 911.7), 140 }, 45 | { OV( 958.6), 120 }, 46 | { OV( 988.8), 100 }, 47 | { OV(1006.6), 80 }, 48 | { OV(1015.8), 60 }, 49 | { OV(1021.3), 30 }, 50 | { OV(1023) - 1, 25}, 51 | { OV( 1023), 20} 52 | }; 53 | -------------------------------------------------------------------------------- /src/tables/thermistortable_66.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // DyzeDesign 500°C Thermistor 24 | const short temptable_66[][2] PROGMEM = { 25 | { OV( 17.5), 850 }, 26 | { OV( 17.9), 500 }, 27 | { OV( 21.7), 480 }, 28 | { OV( 26.6), 460 }, 29 | { OV( 33.1), 440 }, 30 | { OV( 41.0), 420 }, 31 | { OV( 52.3), 400 }, 32 | { OV( 67.7), 380 }, 33 | { OV( 86.5), 360 }, 34 | { OV( 112.0), 340 }, 35 | { OV( 147.2), 320 }, 36 | { OV( 194.0), 300 }, 37 | { OV( 254.3), 280 }, 38 | { OV( 330.2), 260 }, 39 | { OV( 427.9), 240 }, 40 | { OV( 533.4), 220 }, 41 | { OV( 646.5), 200 }, 42 | { OV( 754.4), 180 }, 43 | { OV( 844.3), 160 }, 44 | { OV( 911.7), 140 }, 45 | { OV( 958.6), 120 }, 46 | { OV( 988.8), 100 }, 47 | { OV(1006.6), 80 }, 48 | { OV(1015.8), 60 }, 49 | { OV(1021.3), 30 }, 50 | { OV(1023) - 1, 25}, 51 | { OV( 1023), 20} 52 | }; 53 | -------------------------------------------------------------------------------- /src/thermistortable_10.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k RS thermistor 198-961 (4.7k pullup) 24 | const short temptable_10[][2] PROGMEM = { 25 | { OV( 1), 929 }, 26 | { OV( 36), 299 }, 27 | { OV( 71), 246 }, 28 | { OV( 106), 217 }, 29 | { OV( 141), 198 }, 30 | { OV( 176), 184 }, 31 | { OV( 211), 173 }, 32 | { OV( 246), 163 }, 33 | { OV( 281), 154 }, 34 | { OV( 316), 147 }, 35 | { OV( 351), 140 }, 36 | { OV( 386), 134 }, 37 | { OV( 421), 128 }, 38 | { OV( 456), 122 }, 39 | { OV( 491), 117 }, 40 | { OV( 526), 112 }, 41 | { OV( 561), 107 }, 42 | { OV( 596), 102 }, 43 | { OV( 631), 97 }, 44 | { OV( 666), 91 }, 45 | { OV( 701), 86 }, 46 | { OV( 736), 81 }, 47 | { OV( 771), 76 }, 48 | { OV( 806), 70 }, 49 | { OV( 841), 63 }, 50 | { OV( 876), 56 }, 51 | { OV( 911), 48 }, 52 | { OV( 946), 38 }, 53 | { OV( 981), 23 }, 54 | { OV(1005), 5 }, 55 | { OV(1016), 0 } 56 | }; 57 | -------------------------------------------------------------------------------- /src/tables/thermistortable_10.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k RS thermistor 198-961 (4.7k pullup) 24 | const short temptable_10[][2] PROGMEM = { 25 | { OV( 1), 929 }, 26 | { OV( 36), 299 }, 27 | { OV( 71), 246 }, 28 | { OV( 106), 217 }, 29 | { OV( 141), 198 }, 30 | { OV( 176), 184 }, 31 | { OV( 211), 173 }, 32 | { OV( 246), 163 }, 33 | { OV( 281), 154 }, 34 | { OV( 316), 147 }, 35 | { OV( 351), 140 }, 36 | { OV( 386), 134 }, 37 | { OV( 421), 128 }, 38 | { OV( 456), 122 }, 39 | { OV( 491), 117 }, 40 | { OV( 526), 112 }, 41 | { OV( 561), 107 }, 42 | { OV( 596), 102 }, 43 | { OV( 631), 97 }, 44 | { OV( 666), 91 }, 45 | { OV( 701), 86 }, 46 | { OV( 736), 81 }, 47 | { OV( 771), 76 }, 48 | { OV( 806), 70 }, 49 | { OV( 841), 63 }, 50 | { OV( 876), 56 }, 51 | { OV( 911), 48 }, 52 | { OV( 946), 38 }, 53 | { OV( 981), 23 }, 54 | { OV(1005), 5 }, 55 | { OV(1016), 0 } 56 | }; 57 | -------------------------------------------------------------------------------- /src/thermistortable_9.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) 24 | const short temptable_9[][2] PROGMEM = { 25 | { OV( 1), 936 }, 26 | { OV( 36), 300 }, 27 | { OV( 71), 246 }, 28 | { OV( 106), 218 }, 29 | { OV( 141), 199 }, 30 | { OV( 176), 185 }, 31 | { OV( 211), 173 }, 32 | { OV( 246), 163 }, 33 | { OV( 281), 155 }, 34 | { OV( 316), 147 }, 35 | { OV( 351), 140 }, 36 | { OV( 386), 134 }, 37 | { OV( 421), 128 }, 38 | { OV( 456), 122 }, 39 | { OV( 491), 117 }, 40 | { OV( 526), 112 }, 41 | { OV( 561), 107 }, 42 | { OV( 596), 102 }, 43 | { OV( 631), 97 }, 44 | { OV( 666), 92 }, 45 | { OV( 701), 87 }, 46 | { OV( 736), 81 }, 47 | { OV( 771), 76 }, 48 | { OV( 806), 70 }, 49 | { OV( 841), 63 }, 50 | { OV( 876), 56 }, 51 | { OV( 911), 48 }, 52 | { OV( 946), 38 }, 53 | { OV( 981), 23 }, 54 | { OV(1005), 5 }, 55 | { OV(1016), 0 } 56 | }; 57 | -------------------------------------------------------------------------------- /src/tables/thermistortable_9.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) 24 | const short temptable_9[][2] PROGMEM = { 25 | { OV( 1), 936 }, 26 | { OV( 36), 300 }, 27 | { OV( 71), 246 }, 28 | { OV( 106), 218 }, 29 | { OV( 141), 199 }, 30 | { OV( 176), 185 }, 31 | { OV( 211), 173 }, 32 | { OV( 246), 163 }, 33 | { OV( 281), 155 }, 34 | { OV( 316), 147 }, 35 | { OV( 351), 140 }, 36 | { OV( 386), 134 }, 37 | { OV( 421), 128 }, 38 | { OV( 456), 122 }, 39 | { OV( 491), 117 }, 40 | { OV( 526), 112 }, 41 | { OV( 561), 107 }, 42 | { OV( 596), 102 }, 43 | { OV( 631), 97 }, 44 | { OV( 666), 92 }, 45 | { OV( 701), 87 }, 46 | { OV( 736), 81 }, 47 | { OV( 771), 76 }, 48 | { OV( 806), 70 }, 49 | { OV( 841), 63 }, 50 | { OV( 876), 56 }, 51 | { OV( 911), 48 }, 52 | { OV( 946), 38 }, 53 | { OV( 981), 23 }, 54 | { OV(1005), 5 }, 55 | { OV(1016), 0 } 56 | }; 57 | -------------------------------------------------------------------------------- /src/thermistortable_12.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) 24 | const short temptable_12[][2] PROGMEM = { 25 | { OV( 35), 180 }, // top rating 180C 26 | { OV( 211), 140 }, 27 | { OV( 233), 135 }, 28 | { OV( 261), 130 }, 29 | { OV( 290), 125 }, 30 | { OV( 328), 120 }, 31 | { OV( 362), 115 }, 32 | { OV( 406), 110 }, 33 | { OV( 446), 105 }, 34 | { OV( 496), 100 }, 35 | { OV( 539), 95 }, 36 | { OV( 585), 90 }, 37 | { OV( 629), 85 }, 38 | { OV( 675), 80 }, 39 | { OV( 718), 75 }, 40 | { OV( 758), 70 }, 41 | { OV( 793), 65 }, 42 | { OV( 822), 60 }, 43 | { OV( 841), 55 }, 44 | { OV( 875), 50 }, 45 | { OV( 899), 45 }, 46 | { OV( 926), 40 }, 47 | { OV( 946), 35 }, 48 | { OV( 962), 30 }, 49 | { OV( 977), 25 }, 50 | { OV( 987), 20 }, 51 | { OV( 995), 15 }, 52 | { OV(1001), 10 }, 53 | { OV(1010), 0 }, 54 | { OV(1023), -40 } 55 | }; 56 | -------------------------------------------------------------------------------- /src/tables/thermistortable_12.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) 24 | const short temptable_12[][2] PROGMEM = { 25 | { OV( 35), 180 }, // top rating 180C 26 | { OV( 211), 140 }, 27 | { OV( 233), 135 }, 28 | { OV( 261), 130 }, 29 | { OV( 290), 125 }, 30 | { OV( 328), 120 }, 31 | { OV( 362), 115 }, 32 | { OV( 406), 110 }, 33 | { OV( 446), 105 }, 34 | { OV( 496), 100 }, 35 | { OV( 539), 95 }, 36 | { OV( 585), 90 }, 37 | { OV( 629), 85 }, 38 | { OV( 675), 80 }, 39 | { OV( 718), 75 }, 40 | { OV( 758), 70 }, 41 | { OV( 793), 65 }, 42 | { OV( 822), 60 }, 43 | { OV( 841), 55 }, 44 | { OV( 875), 50 }, 45 | { OV( 899), 45 }, 46 | { OV( 926), 40 }, 47 | { OV( 946), 35 }, 48 | { OV( 962), 30 }, 49 | { OV( 977), 25 }, 50 | { OV( 987), 20 }, 51 | { OV( 995), 15 }, 52 | { OV(1001), 10 }, 53 | { OV(1010), 0 }, 54 | { OV(1023), -40 } 55 | }; 56 | -------------------------------------------------------------------------------- /src/thermistortable_2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 24 | // 200k ATC Semitec 204GT-2 25 | // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf 26 | // Calculated using 4.7kohm pullup, voltage divider math, and manufacturer provided temp/resistance 27 | // 28 | const short temptable_2[][2] PROGMEM = { 29 | { OV( 1), 848 }, 30 | { OV( 30), 300 }, // top rating 300C 31 | { OV( 34), 290 }, 32 | { OV( 39), 280 }, 33 | { OV( 46), 270 }, 34 | { OV( 53), 260 }, 35 | { OV( 63), 250 }, 36 | { OV( 74), 240 }, 37 | { OV( 87), 230 }, 38 | { OV( 104), 220 }, 39 | { OV( 124), 210 }, 40 | { OV( 148), 200 }, 41 | { OV( 176), 190 }, 42 | { OV( 211), 180 }, 43 | { OV( 252), 170 }, 44 | { OV( 301), 160 }, 45 | { OV( 357), 150 }, 46 | { OV( 420), 140 }, 47 | { OV( 489), 130 }, 48 | { OV( 562), 120 }, 49 | { OV( 636), 110 }, 50 | { OV( 708), 100 }, 51 | { OV( 775), 90 }, 52 | { OV( 835), 80 }, 53 | { OV( 884), 70 }, 54 | { OV( 924), 60 }, 55 | { OV( 955), 50 }, 56 | { OV( 977), 40 }, 57 | { OV( 993), 30 }, 58 | { OV(1004), 20 }, 59 | { OV(1012), 10 }, 60 | { OV(1016), 0 } 61 | }; 62 | -------------------------------------------------------------------------------- /src/tables/thermistortable_2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 24 | // 200k ATC Semitec 204GT-2 25 | // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf 26 | // Calculated using 4.7kohm pullup, voltage divider math, and manufacturer provided temp/resistance 27 | // 28 | const short temptable_2[][2] PROGMEM = { 29 | { OV( 1), 848 }, 30 | { OV( 30), 300 }, // top rating 300C 31 | { OV( 34), 290 }, 32 | { OV( 39), 280 }, 33 | { OV( 46), 270 }, 34 | { OV( 53), 260 }, 35 | { OV( 63), 250 }, 36 | { OV( 74), 240 }, 37 | { OV( 87), 230 }, 38 | { OV( 104), 220 }, 39 | { OV( 124), 210 }, 40 | { OV( 148), 200 }, 41 | { OV( 176), 190 }, 42 | { OV( 211), 180 }, 43 | { OV( 252), 170 }, 44 | { OV( 301), 160 }, 45 | { OV( 357), 150 }, 46 | { OV( 420), 140 }, 47 | { OV( 489), 130 }, 48 | { OV( 562), 120 }, 49 | { OV( 636), 110 }, 50 | { OV( 708), 100 }, 51 | { OV( 775), 90 }, 52 | { OV( 835), 80 }, 53 | { OV( 884), 70 }, 54 | { OV( 924), 60 }, 55 | { OV( 955), 50 }, 56 | { OV( 977), 40 }, 57 | { OV( 993), 30 }, 58 | { OV(1004), 20 }, 59 | { OV(1012), 10 }, 60 | { OV(1016), 0 } 61 | }; 62 | -------------------------------------------------------------------------------- /src/thermistortable_6.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k Epcos thermistor 24 | const short temptable_6[][2] PROGMEM = { 25 | { OV( 1), 350 }, 26 | { OV( 28), 250 }, // top rating 250C 27 | { OV( 31), 245 }, 28 | { OV( 35), 240 }, 29 | { OV( 39), 235 }, 30 | { OV( 42), 230 }, 31 | { OV( 44), 225 }, 32 | { OV( 49), 220 }, 33 | { OV( 53), 215 }, 34 | { OV( 62), 210 }, 35 | { OV( 71), 205 }, // fitted graphically 36 | { OV( 78), 200 }, // fitted graphically 37 | { OV( 94), 190 }, 38 | { OV( 102), 185 }, 39 | { OV( 116), 170 }, 40 | { OV( 143), 160 }, 41 | { OV( 183), 150 }, 42 | { OV( 223), 140 }, 43 | { OV( 270), 130 }, 44 | { OV( 318), 120 }, 45 | { OV( 383), 110 }, 46 | { OV( 413), 105 }, 47 | { OV( 439), 100 }, 48 | { OV( 484), 95 }, 49 | { OV( 513), 90 }, 50 | { OV( 607), 80 }, 51 | { OV( 664), 70 }, 52 | { OV( 781), 60 }, 53 | { OV( 810), 55 }, 54 | { OV( 849), 50 }, 55 | { OV( 914), 45 }, 56 | { OV( 914), 40 }, 57 | { OV( 935), 35 }, 58 | { OV( 954), 30 }, 59 | { OV( 970), 25 }, 60 | { OV( 978), 22 }, 61 | { OV(1008), 3 }, 62 | { OV(1023), 0 } // to allow internal 0 degrees C 63 | }; 64 | -------------------------------------------------------------------------------- /src/tables/thermistortable_6.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k Epcos thermistor 24 | const short temptable_6[][2] PROGMEM = { 25 | { OV( 1), 350 }, 26 | { OV( 28), 250 }, // top rating 250C 27 | { OV( 31), 245 }, 28 | { OV( 35), 240 }, 29 | { OV( 39), 235 }, 30 | { OV( 42), 230 }, 31 | { OV( 44), 225 }, 32 | { OV( 49), 220 }, 33 | { OV( 53), 215 }, 34 | { OV( 62), 210 }, 35 | { OV( 71), 205 }, // fitted graphically 36 | { OV( 78), 200 }, // fitted graphically 37 | { OV( 94), 190 }, 38 | { OV( 102), 185 }, 39 | { OV( 116), 170 }, 40 | { OV( 143), 160 }, 41 | { OV( 183), 150 }, 42 | { OV( 223), 140 }, 43 | { OV( 270), 130 }, 44 | { OV( 318), 120 }, 45 | { OV( 383), 110 }, 46 | { OV( 413), 105 }, 47 | { OV( 439), 100 }, 48 | { OV( 484), 95 }, 49 | { OV( 513), 90 }, 50 | { OV( 607), 80 }, 51 | { OV( 664), 70 }, 52 | { OV( 781), 60 }, 53 | { OV( 810), 55 }, 54 | { OV( 849), 50 }, 55 | { OV( 914), 45 }, 56 | { OV( 914), 40 }, 57 | { OV( 935), 35 }, 58 | { OV( 954), 30 }, 59 | { OV( 970), 25 }, 60 | { OV( 978), 22 }, 61 | { OV(1008), 3 }, 62 | { OV(1023), 0 } // to allow internal 0 degrees C 63 | }; 64 | -------------------------------------------------------------------------------- /src/thermistortable_5.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k ParCan thermistor (104GT-2) 24 | // ATC Semitec 104GT-2 (Used in ParCan) 25 | // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf 26 | // Calculated using 4.7kohm pullup, voltage divider math, and manufacturer provided temp/resistance 27 | const short temptable_5[][2] PROGMEM = { 28 | { OV( 1), 713 }, 29 | { OV( 17), 300 }, // top rating 300C 30 | { OV( 20), 290 }, 31 | { OV( 23), 280 }, 32 | { OV( 27), 270 }, 33 | { OV( 31), 260 }, 34 | { OV( 37), 250 }, 35 | { OV( 43), 240 }, 36 | { OV( 51), 230 }, 37 | { OV( 61), 220 }, 38 | { OV( 73), 210 }, 39 | { OV( 87), 200 }, 40 | { OV( 106), 190 }, 41 | { OV( 128), 180 }, 42 | { OV( 155), 170 }, 43 | { OV( 189), 160 }, 44 | { OV( 230), 150 }, 45 | { OV( 278), 140 }, 46 | { OV( 336), 130 }, 47 | { OV( 402), 120 }, 48 | { OV( 476), 110 }, 49 | { OV( 554), 100 }, 50 | { OV( 635), 90 }, 51 | { OV( 713), 80 }, 52 | { OV( 784), 70 }, 53 | { OV( 846), 60 }, 54 | { OV( 897), 50 }, 55 | { OV( 937), 40 }, 56 | { OV( 966), 30 }, 57 | { OV( 986), 20 }, 58 | { OV(1000), 10 }, 59 | { OV(1010), 0 } 60 | }; 61 | -------------------------------------------------------------------------------- /src/tables/thermistortable_5.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k ParCan thermistor (104GT-2) 24 | // ATC Semitec 104GT-2 (Used in ParCan) 25 | // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf 26 | // Calculated using 4.7kohm pullup, voltage divider math, and manufacturer provided temp/resistance 27 | const short temptable_5[][2] PROGMEM = { 28 | { OV( 1), 713 }, 29 | { OV( 17), 300 }, // top rating 300C 30 | { OV( 20), 290 }, 31 | { OV( 23), 280 }, 32 | { OV( 27), 270 }, 33 | { OV( 31), 260 }, 34 | { OV( 37), 250 }, 35 | { OV( 43), 240 }, 36 | { OV( 51), 230 }, 37 | { OV( 61), 220 }, 38 | { OV( 73), 210 }, 39 | { OV( 87), 200 }, 40 | { OV( 106), 190 }, 41 | { OV( 128), 180 }, 42 | { OV( 155), 170 }, 43 | { OV( 189), 160 }, 44 | { OV( 230), 150 }, 45 | { OV( 278), 140 }, 46 | { OV( 336), 130 }, 47 | { OV( 402), 120 }, 48 | { OV( 476), 110 }, 49 | { OV( 554), 100 }, 50 | { OV( 635), 90 }, 51 | { OV( 713), 80 }, 52 | { OV( 784), 70 }, 53 | { OV( 846), 60 }, 54 | { OV( 897), 50 }, 55 | { OV( 937), 40 }, 56 | { OV( 966), 30 }, 57 | { OV( 986), 20 }, 58 | { OV(1000), 10 }, 59 | { OV(1010), 0 } 60 | }; 61 | -------------------------------------------------------------------------------- /src/thermistortable_52.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 200k ATC Semitec 204GT-2 (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!) 24 | // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf 25 | // Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance 26 | // Advantage: More resolution and better linearity from 150C to 200C 27 | const short temptable_52[][2] PROGMEM = { 28 | { OV( 1), 500 }, 29 | { OV( 125), 300 }, // top rating 300C 30 | { OV( 142), 290 }, 31 | { OV( 162), 280 }, 32 | { OV( 185), 270 }, 33 | { OV( 211), 260 }, 34 | { OV( 240), 250 }, 35 | { OV( 274), 240 }, 36 | { OV( 312), 230 }, 37 | { OV( 355), 220 }, 38 | { OV( 401), 210 }, 39 | { OV( 452), 200 }, 40 | { OV( 506), 190 }, 41 | { OV( 563), 180 }, 42 | { OV( 620), 170 }, 43 | { OV( 677), 160 }, 44 | { OV( 732), 150 }, 45 | { OV( 783), 140 }, 46 | { OV( 830), 130 }, 47 | { OV( 871), 120 }, 48 | { OV( 906), 110 }, 49 | { OV( 935), 100 }, 50 | { OV( 958), 90 }, 51 | { OV( 976), 80 }, 52 | { OV( 990), 70 }, 53 | { OV(1000), 60 }, 54 | { OV(1008), 50 }, 55 | { OV(1013), 40 }, 56 | { OV(1017), 30 }, 57 | { OV(1019), 20 }, 58 | { OV(1021), 10 }, 59 | { OV(1022), 0 } 60 | }; 61 | -------------------------------------------------------------------------------- /src/thermistortable_55.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k ATC Semitec 104GT-2 (Used on ParCan) (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!) 24 | // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf 25 | // Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance 26 | // Advantage: More resolution and better linearity from 150C to 200C 27 | const short temptable_55[][2] PROGMEM = { 28 | { OV( 1), 500 }, 29 | { OV( 76), 300 }, 30 | { OV( 87), 290 }, 31 | { OV( 100), 280 }, 32 | { OV( 114), 270 }, 33 | { OV( 131), 260 }, 34 | { OV( 152), 250 }, 35 | { OV( 175), 240 }, 36 | { OV( 202), 230 }, 37 | { OV( 234), 220 }, 38 | { OV( 271), 210 }, 39 | { OV( 312), 200 }, 40 | { OV( 359), 190 }, 41 | { OV( 411), 180 }, 42 | { OV( 467), 170 }, 43 | { OV( 527), 160 }, 44 | { OV( 590), 150 }, 45 | { OV( 652), 140 }, 46 | { OV( 713), 130 }, 47 | { OV( 770), 120 }, 48 | { OV( 822), 110 }, 49 | { OV( 867), 100 }, 50 | { OV( 905), 90 }, 51 | { OV( 936), 80 }, 52 | { OV( 961), 70 }, 53 | { OV( 979), 60 }, 54 | { OV( 993), 50 }, 55 | { OV(1003), 40 }, 56 | { OV(1010), 30 }, 57 | { OV(1015), 20 }, 58 | { OV(1018), 10 }, 59 | { OV(1020), 0 } 60 | }; 61 | -------------------------------------------------------------------------------- /src/tables/thermistortable_55.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k ATC Semitec 104GT-2 (Used on ParCan) (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!) 24 | // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf 25 | // Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance 26 | // Advantage: More resolution and better linearity from 150C to 200C 27 | const short temptable_55[][2] PROGMEM = { 28 | { OV( 1), 500 }, 29 | { OV( 76), 300 }, 30 | { OV( 87), 290 }, 31 | { OV( 100), 280 }, 32 | { OV( 114), 270 }, 33 | { OV( 131), 260 }, 34 | { OV( 152), 250 }, 35 | { OV( 175), 240 }, 36 | { OV( 202), 230 }, 37 | { OV( 234), 220 }, 38 | { OV( 271), 210 }, 39 | { OV( 312), 200 }, 40 | { OV( 359), 190 }, 41 | { OV( 411), 180 }, 42 | { OV( 467), 170 }, 43 | { OV( 527), 160 }, 44 | { OV( 590), 150 }, 45 | { OV( 652), 140 }, 46 | { OV( 713), 130 }, 47 | { OV( 770), 120 }, 48 | { OV( 822), 110 }, 49 | { OV( 867), 100 }, 50 | { OV( 905), 90 }, 51 | { OV( 936), 80 }, 52 | { OV( 961), 70 }, 53 | { OV( 979), 60 }, 54 | { OV( 993), 50 }, 55 | { OV(1003), 40 }, 56 | { OV(1010), 30 }, 57 | { OV(1015), 20 }, 58 | { OV(1018), 10 }, 59 | { OV(1020), 0 } 60 | }; 61 | -------------------------------------------------------------------------------- /src/tables/thermistortable_52.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 200k ATC Semitec 204GT-2 (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!) 24 | // Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf 25 | // Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance 26 | // Advantage: More resolution and better linearity from 150C to 200C 27 | const short temptable_52[][2] PROGMEM = { 28 | { OV( 1), 500 }, 29 | { OV( 125), 300 }, // top rating 300C 30 | { OV( 142), 290 }, 31 | { OV( 162), 280 }, 32 | { OV( 185), 270 }, 33 | { OV( 211), 260 }, 34 | { OV( 240), 250 }, 35 | { OV( 274), 240 }, 36 | { OV( 312), 230 }, 37 | { OV( 355), 220 }, 38 | { OV( 401), 210 }, 39 | { OV( 452), 200 }, 40 | { OV( 506), 190 }, 41 | { OV( 563), 180 }, 42 | { OV( 620), 170 }, 43 | { OV( 677), 160 }, 44 | { OV( 732), 150 }, 45 | { OV( 783), 140 }, 46 | { OV( 830), 130 }, 47 | { OV( 871), 120 }, 48 | { OV( 906), 110 }, 49 | { OV( 935), 100 }, 50 | { OV( 958), 90 }, 51 | { OV( 976), 80 }, 52 | { OV( 990), 70 }, 53 | { OV(1000), 60 }, 54 | { OV(1008), 50 }, 55 | { OV(1013), 40 }, 56 | { OV(1017), 30 }, 57 | { OV(1019), 20 }, 58 | { OV(1021), 10 }, 59 | { OV(1022), 0 } 60 | }; 61 | -------------------------------------------------------------------------------- /src/thermistortable_80.h: -------------------------------------------------------------------------------- 1 | const short temptable_80[][2] PROGMEM = { 2 | { 21.5 *OVERSAMPLENR, 300 }, 3 | { 23.0625 *OVERSAMPLENR, 295 }, 4 | { 24.8125 *OVERSAMPLENR, 290 }, 5 | { 26.75 *OVERSAMPLENR, 285 }, 6 | { 28.8125 *OVERSAMPLENR, 280 }, 7 | { 31.125 *OVERSAMPLENR, 275 }, 8 | { 33.625 *OVERSAMPLENR, 270 }, 9 | { 36.375 *OVERSAMPLENR, 265 }, 10 | { 39.375 *OVERSAMPLENR, 260 }, 11 | { 42.6875 *OVERSAMPLENR, 255 }, 12 | { 46.3125 *OVERSAMPLENR, 250 }, 13 | { 50.3125 *OVERSAMPLENR, 245 }, 14 | { 54.6875 *OVERSAMPLENR, 240 }, 15 | { 59.5625 *OVERSAMPLENR, 235 }, 16 | { 64.875 *OVERSAMPLENR, 230 }, 17 | { 70.75 *OVERSAMPLENR, 225 }, 18 | { 77.25 *OVERSAMPLENR, 220 }, 19 | { 84.4375 *OVERSAMPLENR, 215 }, 20 | { 92.3125 *OVERSAMPLENR, 210 }, 21 | { 101.0625*OVERSAMPLENR, 205 }, 22 | { 110.6875*OVERSAMPLENR, 200 }, 23 | { 121.3125*OVERSAMPLENR, 195 }, 24 | { 133 *OVERSAMPLENR, 190 }, 25 | { 145.9375*OVERSAMPLENR, 185 }, 26 | { 160.125 *OVERSAMPLENR, 180 }, 27 | { 175.6875*OVERSAMPLENR, 175 }, 28 | { 192.8125*OVERSAMPLENR, 170 }, 29 | { 211.5 *OVERSAMPLENR, 165 }, 30 | { 231.9375*OVERSAMPLENR, 160 }, 31 | { 254.125 *OVERSAMPLENR, 155 }, 32 | { 278.1875*OVERSAMPLENR, 150 }, 33 | { 304.125 *OVERSAMPLENR, 145 }, 34 | { 332 *OVERSAMPLENR, 140 }, 35 | { 361.6875*OVERSAMPLENR, 135 }, 36 | { 393.125 *OVERSAMPLENR, 130 }, 37 | { 426.25 *OVERSAMPLENR, 125 }, 38 | { 460.8125*OVERSAMPLENR, 120 }, 39 | { 496.5625*OVERSAMPLENR, 115 }, 40 | { 533.1875*OVERSAMPLENR, 110 }, 41 | { 570.3125*OVERSAMPLENR, 105 }, 42 | { 607.625 *OVERSAMPLENR, 100 }, 43 | { 644.625 *OVERSAMPLENR, 95 }, 44 | { 680.9375*OVERSAMPLENR, 90 }, 45 | { 716.125 *OVERSAMPLENR, 85 }, 46 | { 749.875 *OVERSAMPLENR, 80 }, 47 | { 781.8125*OVERSAMPLENR, 75 }, 48 | { 811.6875*OVERSAMPLENR, 70 }, 49 | { 839.25 *OVERSAMPLENR, 65 }, 50 | { 864.5 *OVERSAMPLENR, 60 }, 51 | { 887.3125*OVERSAMPLENR, 55 }, 52 | { 907.6875*OVERSAMPLENR, 50 }, 53 | { 925.6875*OVERSAMPLENR, 45 }, 54 | { 941.5 *OVERSAMPLENR, 40 }, 55 | { 955.25 *OVERSAMPLENR, 35 }, 56 | { 967 *OVERSAMPLENR, 30 }, 57 | { 977.0625*OVERSAMPLENR, 25 }, 58 | { 985.5625*OVERSAMPLENR, 20 }, 59 | { 992.6875*OVERSAMPLENR, 15 }, 60 | { 998.625 *OVERSAMPLENR, 10 }, 61 | { 1003.5625*OVERSAMPLENR, 5 }, 62 | { 1007.5625*OVERSAMPLENR, 0 } 63 | }; 64 | -------------------------------------------------------------------------------- /src/thermistortable_11.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // QU-BD silicone bed QWG-104F-3950 thermistor 24 | const short temptable_11[][2] PROGMEM = { 25 | { OV( 1), 938 }, 26 | { OV( 31), 314 }, 27 | { OV( 41), 290 }, 28 | { OV( 51), 272 }, 29 | { OV( 61), 258 }, 30 | { OV( 71), 247 }, 31 | { OV( 81), 237 }, 32 | { OV( 91), 229 }, 33 | { OV( 101), 221 }, 34 | { OV( 111), 215 }, 35 | { OV( 121), 209 }, 36 | { OV( 131), 204 }, 37 | { OV( 141), 199 }, 38 | { OV( 151), 195 }, 39 | { OV( 161), 190 }, 40 | { OV( 171), 187 }, 41 | { OV( 181), 183 }, 42 | { OV( 191), 179 }, 43 | { OV( 201), 176 }, 44 | { OV( 221), 170 }, 45 | { OV( 241), 165 }, 46 | { OV( 261), 160 }, 47 | { OV( 281), 155 }, 48 | { OV( 301), 150 }, 49 | { OV( 331), 144 }, 50 | { OV( 361), 139 }, 51 | { OV( 391), 133 }, 52 | { OV( 421), 128 }, 53 | { OV( 451), 123 }, 54 | { OV( 491), 117 }, 55 | { OV( 531), 111 }, 56 | { OV( 571), 105 }, 57 | { OV( 611), 100 }, 58 | { OV( 641), 95 }, 59 | { OV( 681), 90 }, 60 | { OV( 711), 85 }, 61 | { OV( 751), 79 }, 62 | { OV( 791), 72 }, 63 | { OV( 811), 69 }, 64 | { OV( 831), 65 }, 65 | { OV( 871), 57 }, 66 | { OV( 881), 55 }, 67 | { OV( 901), 51 }, 68 | { OV( 921), 45 }, 69 | { OV( 941), 39 }, 70 | { OV( 971), 28 }, 71 | { OV( 981), 23 }, 72 | { OV( 991), 17 }, 73 | { OV(1001), 9 }, 74 | { OV(1021), -27 } 75 | }; 76 | -------------------------------------------------------------------------------- /src/tables/thermistortable_11.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // QU-BD silicone bed QWG-104F-3950 thermistor 24 | const short temptable_11[][2] PROGMEM = { 25 | { OV( 1), 938 }, 26 | { OV( 31), 314 }, 27 | { OV( 41), 290 }, 28 | { OV( 51), 272 }, 29 | { OV( 61), 258 }, 30 | { OV( 71), 247 }, 31 | { OV( 81), 237 }, 32 | { OV( 91), 229 }, 33 | { OV( 101), 221 }, 34 | { OV( 111), 215 }, 35 | { OV( 121), 209 }, 36 | { OV( 131), 204 }, 37 | { OV( 141), 199 }, 38 | { OV( 151), 195 }, 39 | { OV( 161), 190 }, 40 | { OV( 171), 187 }, 41 | { OV( 181), 183 }, 42 | { OV( 191), 179 }, 43 | { OV( 201), 176 }, 44 | { OV( 221), 170 }, 45 | { OV( 241), 165 }, 46 | { OV( 261), 160 }, 47 | { OV( 281), 155 }, 48 | { OV( 301), 150 }, 49 | { OV( 331), 144 }, 50 | { OV( 361), 139 }, 51 | { OV( 391), 133 }, 52 | { OV( 421), 128 }, 53 | { OV( 451), 123 }, 54 | { OV( 491), 117 }, 55 | { OV( 531), 111 }, 56 | { OV( 571), 105 }, 57 | { OV( 611), 100 }, 58 | { OV( 641), 95 }, 59 | { OV( 681), 90 }, 60 | { OV( 711), 85 }, 61 | { OV( 751), 79 }, 62 | { OV( 791), 72 }, 63 | { OV( 811), 69 }, 64 | { OV( 831), 65 }, 65 | { OV( 871), 57 }, 66 | { OV( 881), 55 }, 67 | { OV( 901), 51 }, 68 | { OV( 921), 45 }, 69 | { OV( 941), 39 }, 70 | { OV( 971), 28 }, 71 | { OV( 981), 23 }, 72 | { OV( 991), 17 }, 73 | { OV(1001), 9 }, 74 | { OV(1021), -27 } 75 | }; 76 | -------------------------------------------------------------------------------- /thermistor.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #define HOTENDS 1 10 | #define ARRAY_6(v1, v2, v3, v4, v5, v6, ...) { v1, v2, v3, v4, v5, v6 } 11 | #define ARRAY_5(v1, v2, v3, v4, v5, ...) { v1, v2, v3, v4, v5 } 12 | #define ARRAY_4(v1, v2, v3, v4, ...) { v1, v2, v3, v4 } 13 | #define ARRAY_3(v1, v2, v3, ...) { v1, v2, v3 } 14 | #define ARRAY_2(v1, v2, ...) { v1, v2 } 15 | #define ARRAY_1(v1, ...) { v1 } 16 | #define _ARRAY_N(N, ...) ARRAY_ ##N(__VA_ARGS__) 17 | #define ARRAY_N(N, ...) _ARRAY_N(N, __VA_ARGS__) 18 | #define ARRAY_BY_HOTENDS(...) ARRAY_N(HOTENDS, __VA_ARGS__) 19 | #define ARRAY_BY_HOTENDS1(v1) ARRAY_BY_HOTENDS(v1, v1, v1, v1, v1, v1) 20 | #define PGM_RD_W(x) (short)pgm_read_word(&x) 21 | 22 | static void* heater_ttbl_map[] = ARRAY_BY_HOTENDS((void*)HEATER_0_TEMPTABLE, (void*)HEATER_1_TEMPTABLE, (void*)HEATER_2_TEMPTABLE, (void*)HEATER_3_TEMPTABLE, (void*)HEATER_4_TEMPTABLE); 23 | static uint8_t heater_ttbllen_map[] = ARRAY_BY_HOTENDS(HEATER_0_TEMPTABLE_LEN, HEATER_1_TEMPTABLE_LEN, HEATER_2_TEMPTABLE_LEN, HEATER_3_TEMPTABLE_LEN, HEATER_4_TEMPTABLE_LEN); 24 | 25 | thermistor::thermistor(int pin, int sensorNumber) 26 | { 27 | pinMode(pin, INPUT); 28 | _pin = pin; 29 | _sensorNumber = sensorNumber; 30 | } 31 | float thermistor::analog2temp() { 32 | uint8_t e = _sensorNumber; 33 | int raw = 0; 34 | for(int j=1;j<=OVERSAMPLENR;j++){ 35 | raw += analogRead(_pin); 36 | } 37 | if (heater_ttbl_map[e] != NULL) { 38 | float celsius = 0; 39 | uint8_t i; 40 | short(*tt)[][2] = (short(*)[][2])(heater_ttbl_map[e]); 41 | for (i = 1; i < heater_ttbl_map[e]; i++) { 42 | if (PGM_RD_W((*tt)[i][0]) > raw) { 43 | celsius = PGM_RD_W((*tt)[i - 1][1]) + 44 | (raw - PGM_RD_W((*tt)[i - 1][0])) * 45 | (float)(PGM_RD_W((*tt)[i][1]) - PGM_RD_W((*tt)[i - 1][1])) / 46 | (float)(PGM_RD_W((*tt)[i][0]) - PGM_RD_W((*tt)[i - 1][0])); 47 | break; 48 | } 49 | } 50 | 51 | // Overflow: Set to last value in the table 52 | if (i == heater_ttbllen_map[e]){ celsius = PGM_RD_W((*tt)[i - 1][1]);} 53 | 54 | return celsius; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/thermistortable_7.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k Honeywell 135-104LAG-J01 24 | const short temptable_7[][2] PROGMEM = { 25 | { OV( 1), 941 }, 26 | { OV( 19), 362 }, 27 | { OV( 37), 299 }, // top rating 300C 28 | { OV( 55), 266 }, 29 | { OV( 73), 245 }, 30 | { OV( 91), 229 }, 31 | { OV( 109), 216 }, 32 | { OV( 127), 206 }, 33 | { OV( 145), 197 }, 34 | { OV( 163), 190 }, 35 | { OV( 181), 183 }, 36 | { OV( 199), 177 }, 37 | { OV( 217), 171 }, 38 | { OV( 235), 166 }, 39 | { OV( 253), 162 }, 40 | { OV( 271), 157 }, 41 | { OV( 289), 153 }, 42 | { OV( 307), 149 }, 43 | { OV( 325), 146 }, 44 | { OV( 343), 142 }, 45 | { OV( 361), 139 }, 46 | { OV( 379), 135 }, 47 | { OV( 397), 132 }, 48 | { OV( 415), 129 }, 49 | { OV( 433), 126 }, 50 | { OV( 451), 123 }, 51 | { OV( 469), 121 }, 52 | { OV( 487), 118 }, 53 | { OV( 505), 115 }, 54 | { OV( 523), 112 }, 55 | { OV( 541), 110 }, 56 | { OV( 559), 107 }, 57 | { OV( 577), 105 }, 58 | { OV( 595), 102 }, 59 | { OV( 613), 99 }, 60 | { OV( 631), 97 }, 61 | { OV( 649), 94 }, 62 | { OV( 667), 92 }, 63 | { OV( 685), 89 }, 64 | { OV( 703), 86 }, 65 | { OV( 721), 84 }, 66 | { OV( 739), 81 }, 67 | { OV( 757), 78 }, 68 | { OV( 775), 75 }, 69 | { OV( 793), 72 }, 70 | { OV( 811), 69 }, 71 | { OV( 829), 66 }, 72 | { OV( 847), 62 }, 73 | { OV( 865), 59 }, 74 | { OV( 883), 55 }, 75 | { OV( 901), 51 }, 76 | { OV( 919), 46 }, 77 | { OV( 937), 41 }, 78 | { OV( 955), 35 }, 79 | { OV( 973), 27 }, 80 | { OV( 991), 17 }, 81 | { OV(1009), 1 }, 82 | { OV(1023), 0 } // to allow internal 0 degrees C 83 | }; 84 | -------------------------------------------------------------------------------- /src/tables/thermistortable_7.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k Honeywell 135-104LAG-J01 24 | const short temptable_7[][2] PROGMEM = { 25 | { OV( 1), 941 }, 26 | { OV( 19), 362 }, 27 | { OV( 37), 299 }, // top rating 300C 28 | { OV( 55), 266 }, 29 | { OV( 73), 245 }, 30 | { OV( 91), 229 }, 31 | { OV( 109), 216 }, 32 | { OV( 127), 206 }, 33 | { OV( 145), 197 }, 34 | { OV( 163), 190 }, 35 | { OV( 181), 183 }, 36 | { OV( 199), 177 }, 37 | { OV( 217), 171 }, 38 | { OV( 235), 166 }, 39 | { OV( 253), 162 }, 40 | { OV( 271), 157 }, 41 | { OV( 289), 153 }, 42 | { OV( 307), 149 }, 43 | { OV( 325), 146 }, 44 | { OV( 343), 142 }, 45 | { OV( 361), 139 }, 46 | { OV( 379), 135 }, 47 | { OV( 397), 132 }, 48 | { OV( 415), 129 }, 49 | { OV( 433), 126 }, 50 | { OV( 451), 123 }, 51 | { OV( 469), 121 }, 52 | { OV( 487), 118 }, 53 | { OV( 505), 115 }, 54 | { OV( 523), 112 }, 55 | { OV( 541), 110 }, 56 | { OV( 559), 107 }, 57 | { OV( 577), 105 }, 58 | { OV( 595), 102 }, 59 | { OV( 613), 99 }, 60 | { OV( 631), 97 }, 61 | { OV( 649), 94 }, 62 | { OV( 667), 92 }, 63 | { OV( 685), 89 }, 64 | { OV( 703), 86 }, 65 | { OV( 721), 84 }, 66 | { OV( 739), 81 }, 67 | { OV( 757), 78 }, 68 | { OV( 775), 75 }, 69 | { OV( 793), 72 }, 70 | { OV( 811), 69 }, 71 | { OV( 829), 66 }, 72 | { OV( 847), 62 }, 73 | { OV( 865), 59 }, 74 | { OV( 883), 55 }, 75 | { OV( 901), 51 }, 76 | { OV( 919), 46 }, 77 | { OV( 937), 41 }, 78 | { OV( 955), 35 }, 79 | { OV( 973), 27 }, 80 | { OV( 991), 17 }, 81 | { OV(1009), 1 }, 82 | { OV(1023), 0 } // to allow internal 0 degrees C 83 | }; 84 | -------------------------------------------------------------------------------- /src/thermistortable_70.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // bqh2 stock thermistor 24 | const short temptable_70[][2] PROGMEM = { 25 | { OV( 22), 300 }, 26 | { OV( 24), 295 }, 27 | { OV( 25), 290 }, 28 | { OV( 27), 285 }, 29 | { OV( 29), 280 }, 30 | { OV( 32), 275 }, 31 | { OV( 34), 270 }, 32 | { OV( 37), 265 }, 33 | { OV( 40), 260 }, 34 | { OV( 43), 255 }, 35 | { OV( 46), 250 }, 36 | { OV( 50), 245 }, 37 | { OV( 54), 240 }, 38 | { OV( 59), 235 }, 39 | { OV( 64), 230 }, 40 | { OV( 70), 225 }, 41 | { OV( 76), 220 }, 42 | { OV( 83), 215 }, 43 | { OV( 90), 210 }, 44 | { OV( 99), 205 }, 45 | { OV( 108), 200 }, 46 | { OV( 118), 195 }, 47 | { OV( 129), 190 }, 48 | { OV( 141), 185 }, 49 | { OV( 154), 180 }, 50 | { OV( 169), 175 }, 51 | { OV( 185), 170 }, 52 | { OV( 203), 165 }, 53 | { OV( 222), 160 }, 54 | { OV( 243), 155 }, 55 | { OV( 266), 150 }, 56 | { OV( 290), 145 }, 57 | { OV( 317), 140 }, 58 | { OV( 346), 135 }, 59 | { OV( 376), 130 }, 60 | { OV( 408), 125 }, 61 | { OV( 442), 120 }, 62 | { OV( 477), 115 }, 63 | { OV( 513), 110 }, 64 | { OV( 551), 105 }, 65 | { OV( 588), 100 }, 66 | { OV( 626), 95 }, 67 | { OV( 663), 90 }, 68 | { OV( 699), 85 }, 69 | { OV( 735), 80 }, 70 | { OV( 768), 75 }, 71 | { OV( 800), 70 }, 72 | { OV( 829), 65 }, 73 | { OV( 856), 60 }, 74 | { OV( 881), 55 }, 75 | { OV( 903), 50 }, 76 | { OV( 922), 45 }, 77 | { OV( 939), 40 }, 78 | { OV( 954), 35 }, 79 | { OV( 966), 30 }, 80 | { OV( 977), 25 }, 81 | { OV( 986), 20 }, 82 | { OV( 994), 15 }, 83 | { OV(1000), 10 }, 84 | { OV(1005), 5 }, 85 | { OV(1009), 0 } // safety 86 | }; 87 | -------------------------------------------------------------------------------- /src/tables/thermistortable_70.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // bqh2 stock thermistor 24 | const short temptable_70[][2] PROGMEM = { 25 | { OV( 22), 300 }, 26 | { OV( 24), 295 }, 27 | { OV( 25), 290 }, 28 | { OV( 27), 285 }, 29 | { OV( 29), 280 }, 30 | { OV( 32), 275 }, 31 | { OV( 34), 270 }, 32 | { OV( 37), 265 }, 33 | { OV( 40), 260 }, 34 | { OV( 43), 255 }, 35 | { OV( 46), 250 }, 36 | { OV( 50), 245 }, 37 | { OV( 54), 240 }, 38 | { OV( 59), 235 }, 39 | { OV( 64), 230 }, 40 | { OV( 70), 225 }, 41 | { OV( 76), 220 }, 42 | { OV( 83), 215 }, 43 | { OV( 90), 210 }, 44 | { OV( 99), 205 }, 45 | { OV( 108), 200 }, 46 | { OV( 118), 195 }, 47 | { OV( 129), 190 }, 48 | { OV( 141), 185 }, 49 | { OV( 154), 180 }, 50 | { OV( 169), 175 }, 51 | { OV( 185), 170 }, 52 | { OV( 203), 165 }, 53 | { OV( 222), 160 }, 54 | { OV( 243), 155 }, 55 | { OV( 266), 150 }, 56 | { OV( 290), 145 }, 57 | { OV( 317), 140 }, 58 | { OV( 346), 135 }, 59 | { OV( 376), 130 }, 60 | { OV( 408), 125 }, 61 | { OV( 442), 120 }, 62 | { OV( 477), 115 }, 63 | { OV( 513), 110 }, 64 | { OV( 551), 105 }, 65 | { OV( 588), 100 }, 66 | { OV( 626), 95 }, 67 | { OV( 663), 90 }, 68 | { OV( 699), 85 }, 69 | { OV( 735), 80 }, 70 | { OV( 768), 75 }, 71 | { OV( 800), 70 }, 72 | { OV( 829), 65 }, 73 | { OV( 856), 60 }, 74 | { OV( 881), 55 }, 75 | { OV( 903), 50 }, 76 | { OV( 922), 45 }, 77 | { OV( 939), 40 }, 78 | { OV( 954), 35 }, 79 | { OV( 966), 30 }, 80 | { OV( 977), 25 }, 81 | { OV( 986), 20 }, 82 | { OV( 994), 15 }, 83 | { OV(1000), 10 }, 84 | { OV(1005), 5 }, 85 | { OV(1009), 0 } // safety 86 | }; 87 | -------------------------------------------------------------------------------- /src/tables/thermistortable_148.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | const short temptable_148[][2] PROGMEM = { 24 | // These values have been calculated and tested over many days. See https://docs.google.com/spreadsheets/d/1MJXa6feEe0mGVCT2TrBwLxVOMoLDkJlvfQ4JXhAdV_E 25 | // Values that are missing from the 5C gap are missing due to resolution limits. 26 | {OV(19.00000), 0}, 27 | {OV(19.25000), 5}, 28 | {OV(19.50000), 10}, 29 | {OV(19.87500), 15}, 30 | {OV(20.25000), 20}, 31 | {OV(21.00000), 25}, 32 | {OV(21.75000), 35}, 33 | {OV(22.00000), 40}, 34 | {OV(23.00000), 50}, // 55C is more commonly used. 35 | {OV(23.75000), 60}, 36 | {OV(24.00000), 65}, 37 | {OV(24.06250), 70}, 38 | {OV(25.00000), 75}, 39 | {OV(25.50000), 85}, 40 | {OV(26.00000), 90}, 41 | {OV(26.93750),100}, 42 | {OV(27.00000),105}, 43 | {OV(27.37500),110}, 44 | {OV(28.00000),115}, 45 | {OV(29.00000),125}, 46 | {OV(29.25000),135}, 47 | {OV(30.00000),140}, 48 | {OV(35.50000),150}, 49 | {OV(31.00000),155}, 50 | {OV(32.00000),165}, 51 | {OV(32.18750),175}, 52 | {OV(33.00000),180}, 53 | {OV(33.62500),190}, 54 | {OV(34.00000),195}, 55 | {OV(35.00000),205}, 56 | {OV(35.50000),215}, 57 | {OV(36.00000),220}, 58 | {OV(36.75000),230}, 59 | {OV(37.00000),235}, 60 | {OV(37.75000),245}, 61 | {OV(38.00000),250}, 62 | {OV(38.12500),255}, 63 | {OV(39.00000),260}, 64 | {OV(40.00000),275}, 65 | {OV(40.25000),285}, 66 | {OV(41.00000),290}, 67 | {OV(41.25000),300}, 68 | {OV(42.00000),305}, 69 | {OV(43.00000),315}, 70 | {OV(43.25000),325}, 71 | {OV(44.00000),330}, 72 | {OV(44.18750),340}, 73 | {OV(45.00000),345}, 74 | {OV(45.25000),355}, 75 | {OV(46.00000),360}, 76 | {OV(46.62500),370}, 77 | {OV(47.00000),375}, 78 | {OV(47.25000),385}, 79 | {OV(48.00000),390}, 80 | {OV(48.75000),400}, 81 | {OV(49.00000),405}, 82 | }; -------------------------------------------------------------------------------- /src/thermistortable_1.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k bed thermistor 24 | const short temptable_1[][2] PROGMEM = { 25 | { OV( 23), 300 }, 26 | { OV( 25), 295 }, 27 | { OV( 27), 290 }, 28 | { OV( 28), 285 }, 29 | { OV( 31), 280 }, 30 | { OV( 33), 275 }, 31 | { OV( 35), 270 }, 32 | { OV( 38), 265 }, 33 | { OV( 41), 260 }, 34 | { OV( 44), 255 }, 35 | { OV( 48), 250 }, 36 | { OV( 52), 245 }, 37 | { OV( 56), 240 }, 38 | { OV( 61), 235 }, 39 | { OV( 66), 230 }, 40 | { OV( 71), 225 }, 41 | { OV( 78), 220 }, 42 | { OV( 84), 215 }, 43 | { OV( 92), 210 }, 44 | { OV( 100), 205 }, 45 | { OV( 109), 200 }, 46 | { OV( 120), 195 }, 47 | { OV( 131), 190 }, 48 | { OV( 143), 185 }, 49 | { OV( 156), 180 }, 50 | { OV( 171), 175 }, 51 | { OV( 187), 170 }, 52 | { OV( 205), 165 }, 53 | { OV( 224), 160 }, 54 | { OV( 245), 155 }, 55 | { OV( 268), 150 }, 56 | { OV( 293), 145 }, 57 | { OV( 320), 140 }, 58 | { OV( 348), 135 }, 59 | { OV( 379), 130 }, 60 | { OV( 411), 125 }, 61 | { OV( 445), 120 }, 62 | { OV( 480), 115 }, 63 | { OV( 516), 110 }, 64 | { OV( 553), 105 }, 65 | { OV( 591), 100 }, 66 | { OV( 628), 95 }, 67 | { OV( 665), 90 }, 68 | { OV( 702), 85 }, 69 | { OV( 737), 80 }, 70 | { OV( 770), 75 }, 71 | { OV( 801), 70 }, 72 | { OV( 830), 65 }, 73 | { OV( 857), 60 }, 74 | { OV( 881), 55 }, 75 | { OV( 903), 50 }, 76 | { OV( 922), 45 }, 77 | { OV( 939), 40 }, 78 | { OV( 954), 35 }, 79 | { OV( 966), 30 }, 80 | { OV( 977), 25 }, 81 | { OV( 985), 20 }, 82 | { OV( 993), 15 }, 83 | { OV( 999), 10 }, 84 | { OV(1004), 5 }, 85 | { OV(1008), 0 }, 86 | { OV(1012), -5 }, 87 | { OV(1016), -10 }, 88 | { OV(1020), -15 } 89 | }; 90 | -------------------------------------------------------------------------------- /src/tables/thermistortable_1.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k bed thermistor 24 | const short temptable_1[][2] PROGMEM = { 25 | { OV( 23), 300 }, 26 | { OV( 25), 295 }, 27 | { OV( 27), 290 }, 28 | { OV( 28), 285 }, 29 | { OV( 31), 280 }, 30 | { OV( 33), 275 }, 31 | { OV( 35), 270 }, 32 | { OV( 38), 265 }, 33 | { OV( 41), 260 }, 34 | { OV( 44), 255 }, 35 | { OV( 48), 250 }, 36 | { OV( 52), 245 }, 37 | { OV( 56), 240 }, 38 | { OV( 61), 235 }, 39 | { OV( 66), 230 }, 40 | { OV( 71), 225 }, 41 | { OV( 78), 220 }, 42 | { OV( 84), 215 }, 43 | { OV( 92), 210 }, 44 | { OV( 100), 205 }, 45 | { OV( 109), 200 }, 46 | { OV( 120), 195 }, 47 | { OV( 131), 190 }, 48 | { OV( 143), 185 }, 49 | { OV( 156), 180 }, 50 | { OV( 171), 175 }, 51 | { OV( 187), 170 }, 52 | { OV( 205), 165 }, 53 | { OV( 224), 160 }, 54 | { OV( 245), 155 }, 55 | { OV( 268), 150 }, 56 | { OV( 293), 145 }, 57 | { OV( 320), 140 }, 58 | { OV( 348), 135 }, 59 | { OV( 379), 130 }, 60 | { OV( 411), 125 }, 61 | { OV( 445), 120 }, 62 | { OV( 480), 115 }, 63 | { OV( 516), 110 }, 64 | { OV( 553), 105 }, 65 | { OV( 591), 100 }, 66 | { OV( 628), 95 }, 67 | { OV( 665), 90 }, 68 | { OV( 702), 85 }, 69 | { OV( 737), 80 }, 70 | { OV( 770), 75 }, 71 | { OV( 801), 70 }, 72 | { OV( 830), 65 }, 73 | { OV( 857), 60 }, 74 | { OV( 881), 55 }, 75 | { OV( 903), 50 }, 76 | { OV( 922), 45 }, 77 | { OV( 939), 40 }, 78 | { OV( 954), 35 }, 79 | { OV( 966), 30 }, 80 | { OV( 977), 25 }, 81 | { OV( 985), 20 }, 82 | { OV( 993), 15 }, 83 | { OV( 999), 10 }, 84 | { OV(1004), 5 }, 85 | { OV(1008), 0 }, 86 | { OV(1012), -5 }, 87 | { OV(1016), -10 }, 88 | { OV(1020), -15 } 89 | }; 90 | -------------------------------------------------------------------------------- /src/thermistortable_51.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k EPCOS (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!) 24 | // Verified by linagee. 25 | // Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance 26 | // Advantage: Twice the resolution and better linearity from 150C to 200C 27 | const short temptable_51[][2] PROGMEM = { 28 | { OV( 1), 350 }, 29 | { OV( 190), 250 }, // top rating 250C 30 | { OV( 203), 245 }, 31 | { OV( 217), 240 }, 32 | { OV( 232), 235 }, 33 | { OV( 248), 230 }, 34 | { OV( 265), 225 }, 35 | { OV( 283), 220 }, 36 | { OV( 302), 215 }, 37 | { OV( 322), 210 }, 38 | { OV( 344), 205 }, 39 | { OV( 366), 200 }, 40 | { OV( 390), 195 }, 41 | { OV( 415), 190 }, 42 | { OV( 440), 185 }, 43 | { OV( 467), 180 }, 44 | { OV( 494), 175 }, 45 | { OV( 522), 170 }, 46 | { OV( 551), 165 }, 47 | { OV( 580), 160 }, 48 | { OV( 609), 155 }, 49 | { OV( 638), 150 }, 50 | { OV( 666), 145 }, 51 | { OV( 695), 140 }, 52 | { OV( 722), 135 }, 53 | { OV( 749), 130 }, 54 | { OV( 775), 125 }, 55 | { OV( 800), 120 }, 56 | { OV( 823), 115 }, 57 | { OV( 845), 110 }, 58 | { OV( 865), 105 }, 59 | { OV( 884), 100 }, 60 | { OV( 901), 95 }, 61 | { OV( 917), 90 }, 62 | { OV( 932), 85 }, 63 | { OV( 944), 80 }, 64 | { OV( 956), 75 }, 65 | { OV( 966), 70 }, 66 | { OV( 975), 65 }, 67 | { OV( 982), 60 }, 68 | { OV( 989), 55 }, 69 | { OV( 995), 50 }, 70 | { OV(1000), 45 }, 71 | { OV(1004), 40 }, 72 | { OV(1007), 35 }, 73 | { OV(1010), 30 }, 74 | { OV(1013), 25 }, 75 | { OV(1015), 20 }, 76 | { OV(1017), 15 }, 77 | { OV(1018), 10 }, 78 | { OV(1019), 5 }, 79 | { OV(1020), 0 }, 80 | { OV(1021), -5 } 81 | }; 82 | -------------------------------------------------------------------------------- /src/tables/thermistortable_51.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k EPCOS (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!) 24 | // Verified by linagee. 25 | // Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance 26 | // Advantage: Twice the resolution and better linearity from 150C to 200C 27 | const short temptable_51[][2] PROGMEM = { 28 | { OV( 1), 350 }, 29 | { OV( 190), 250 }, // top rating 250C 30 | { OV( 203), 245 }, 31 | { OV( 217), 240 }, 32 | { OV( 232), 235 }, 33 | { OV( 248), 230 }, 34 | { OV( 265), 225 }, 35 | { OV( 283), 220 }, 36 | { OV( 302), 215 }, 37 | { OV( 322), 210 }, 38 | { OV( 344), 205 }, 39 | { OV( 366), 200 }, 40 | { OV( 390), 195 }, 41 | { OV( 415), 190 }, 42 | { OV( 440), 185 }, 43 | { OV( 467), 180 }, 44 | { OV( 494), 175 }, 45 | { OV( 522), 170 }, 46 | { OV( 551), 165 }, 47 | { OV( 580), 160 }, 48 | { OV( 609), 155 }, 49 | { OV( 638), 150 }, 50 | { OV( 666), 145 }, 51 | { OV( 695), 140 }, 52 | { OV( 722), 135 }, 53 | { OV( 749), 130 }, 54 | { OV( 775), 125 }, 55 | { OV( 800), 120 }, 56 | { OV( 823), 115 }, 57 | { OV( 845), 110 }, 58 | { OV( 865), 105 }, 59 | { OV( 884), 100 }, 60 | { OV( 901), 95 }, 61 | { OV( 917), 90 }, 62 | { OV( 932), 85 }, 63 | { OV( 944), 80 }, 64 | { OV( 956), 75 }, 65 | { OV( 966), 70 }, 66 | { OV( 975), 65 }, 67 | { OV( 982), 60 }, 68 | { OV( 989), 55 }, 69 | { OV( 995), 50 }, 70 | { OV(1000), 45 }, 71 | { OV(1004), 40 }, 72 | { OV(1007), 35 }, 73 | { OV(1010), 30 }, 74 | { OV(1013), 25 }, 75 | { OV(1015), 20 }, 76 | { OV(1017), 15 }, 77 | { OV(1018), 10 }, 78 | { OV(1019), 5 }, 79 | { OV(1020), 0 }, 80 | { OV(1021), -5 } 81 | }; 82 | -------------------------------------------------------------------------------- /src/Conditionals.h: -------------------------------------------------------------------------------- 1 | 2 | //Condicionales 3 | /** 4 | * Temp Sensor defines 5 | */ 6 | #if TEMP_SENSOR_0 == -3 7 | #define HEATER_0_USES_MAX6675 8 | #define MAX6675_IS_MAX31855 9 | #define MAX6675_TMIN -270 10 | #define MAX6675_TMAX 1800 11 | #elif TEMP_SENSOR_0 == -2 12 | #define HEATER_0_USES_MAX6675 13 | #define MAX6675_TMIN 0 14 | #define MAX6675_TMAX 1024 15 | #elif TEMP_SENSOR_0 == -1 16 | #define HEATER_0_USES_AD595 17 | #elif TEMP_SENSOR_0 == 0 18 | #undef HEATER_0_MINTEMP 19 | #undef HEATER_0_MAXTEMP 20 | #elif TEMP_SENSOR_0 > 0 21 | #define THERMISTORHEATER_0 TEMP_SENSOR_0 22 | #define HEATER_0_USES_THERMISTOR 23 | #endif 24 | 25 | #if TEMP_SENSOR_1 <= -2 26 | #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_1" 27 | #elif TEMP_SENSOR_1 == -1 28 | #define HEATER_1_USES_AD595 29 | #elif TEMP_SENSOR_1 == 0 30 | #undef HEATER_1_MINTEMP 31 | #undef HEATER_1_MAXTEMP 32 | #elif TEMP_SENSOR_1 > 0 33 | #define THERMISTORHEATER_1 TEMP_SENSOR_1 34 | #define HEATER_1_USES_THERMISTOR 35 | #endif 36 | 37 | #if TEMP_SENSOR_2 <= -2 38 | #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_2" 39 | #elif TEMP_SENSOR_2 == -1 40 | #define HEATER_2_USES_AD595 41 | #elif TEMP_SENSOR_2 == 0 42 | #undef HEATER_2_MINTEMP 43 | #undef HEATER_2_MAXTEMP 44 | #elif TEMP_SENSOR_2 > 0 45 | #define THERMISTORHEATER_2 TEMP_SENSOR_2 46 | #define HEATER_2_USES_THERMISTOR 47 | #endif 48 | 49 | #if TEMP_SENSOR_3 <= -2 50 | #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_3" 51 | #elif TEMP_SENSOR_3 == -1 52 | #define HEATER_3_USES_AD595 53 | #elif TEMP_SENSOR_3 == 0 54 | #undef HEATER_3_MINTEMP 55 | #undef HEATER_3_MAXTEMP 56 | #elif TEMP_SENSOR_3 > 0 57 | #define THERMISTORHEATER_3 TEMP_SENSOR_3 58 | #define HEATER_3_USES_THERMISTOR 59 | #endif 60 | 61 | #if TEMP_SENSOR_4 <= -2 62 | #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_4" 63 | #elif TEMP_SENSOR_4 == -1 64 | #define HEATER_4_USES_AD595 65 | #elif TEMP_SENSOR_4 == 0 66 | #undef HEATER_4_MINTEMP 67 | #undef HEATER_4_MAXTEMP 68 | #elif TEMP_SENSOR_4 > 0 69 | #define THERMISTORHEATER_4 TEMP_SENSOR_4 70 | #define HEATER_4_USES_THERMISTOR 71 | #endif 72 | 73 | #if TEMP_SENSOR_BED <= -2 74 | #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_BED" 75 | #elif TEMP_SENSOR_BED == -1 76 | #define BED_USES_AD595 77 | #elif TEMP_SENSOR_BED == 0 78 | #undef BED_MINTEMP 79 | #undef BED_MAXTEMP 80 | #elif TEMP_SENSOR_BED > 0 81 | #define THERMISTORBED TEMP_SENSOR_BED 82 | #define BED_USES_THERMISTOR 83 | #endif 84 | -------------------------------------------------------------------------------- /src/tables/Conditionals.h: -------------------------------------------------------------------------------- 1 | 2 | //Condicionales 3 | /** 4 | * Temp Sensor defines 5 | */ 6 | #if TEMP_SENSOR_0 == -3 7 | #define HEATER_0_USES_MAX6675 8 | #define MAX6675_IS_MAX31855 9 | #define MAX6675_TMIN -270 10 | #define MAX6675_TMAX 1800 11 | #elif TEMP_SENSOR_0 == -2 12 | #define HEATER_0_USES_MAX6675 13 | #define MAX6675_TMIN 0 14 | #define MAX6675_TMAX 1024 15 | #elif TEMP_SENSOR_0 == -1 16 | #define HEATER_0_USES_AD595 17 | #elif TEMP_SENSOR_0 == 0 18 | #undef HEATER_0_MINTEMP 19 | #undef HEATER_0_MAXTEMP 20 | #elif TEMP_SENSOR_0 > 0 21 | #define THERMISTORHEATER_0 TEMP_SENSOR_0 22 | #define HEATER_0_USES_THERMISTOR 23 | #endif 24 | 25 | #if TEMP_SENSOR_1 <= -2 26 | #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_1" 27 | #elif TEMP_SENSOR_1 == -1 28 | #define HEATER_1_USES_AD595 29 | #elif TEMP_SENSOR_1 == 0 30 | #undef HEATER_1_MINTEMP 31 | #undef HEATER_1_MAXTEMP 32 | #elif TEMP_SENSOR_1 > 0 33 | #define THERMISTORHEATER_1 TEMP_SENSOR_1 34 | #define HEATER_1_USES_THERMISTOR 35 | #endif 36 | 37 | #if TEMP_SENSOR_2 <= -2 38 | #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_2" 39 | #elif TEMP_SENSOR_2 == -1 40 | #define HEATER_2_USES_AD595 41 | #elif TEMP_SENSOR_2 == 0 42 | #undef HEATER_2_MINTEMP 43 | #undef HEATER_2_MAXTEMP 44 | #elif TEMP_SENSOR_2 > 0 45 | #define THERMISTORHEATER_2 TEMP_SENSOR_2 46 | #define HEATER_2_USES_THERMISTOR 47 | #endif 48 | 49 | #if TEMP_SENSOR_3 <= -2 50 | #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_3" 51 | #elif TEMP_SENSOR_3 == -1 52 | #define HEATER_3_USES_AD595 53 | #elif TEMP_SENSOR_3 == 0 54 | #undef HEATER_3_MINTEMP 55 | #undef HEATER_3_MAXTEMP 56 | #elif TEMP_SENSOR_3 > 0 57 | #define THERMISTORHEATER_3 TEMP_SENSOR_3 58 | #define HEATER_3_USES_THERMISTOR 59 | #endif 60 | 61 | #if TEMP_SENSOR_4 <= -2 62 | #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_4" 63 | #elif TEMP_SENSOR_4 == -1 64 | #define HEATER_4_USES_AD595 65 | #elif TEMP_SENSOR_4 == 0 66 | #undef HEATER_4_MINTEMP 67 | #undef HEATER_4_MAXTEMP 68 | #elif TEMP_SENSOR_4 > 0 69 | #define THERMISTORHEATER_4 TEMP_SENSOR_4 70 | #define HEATER_4_USES_THERMISTOR 71 | #endif 72 | 73 | #if TEMP_SENSOR_BED <= -2 74 | #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_BED" 75 | #elif TEMP_SENSOR_BED == -1 76 | #define BED_USES_AD595 77 | #elif TEMP_SENSOR_BED == 0 78 | #undef BED_MINTEMP 79 | #undef BED_MAXTEMP 80 | #elif TEMP_SENSOR_BED > 0 81 | #define THERMISTORBED TEMP_SENSOR_BED 82 | #define BED_USES_THERMISTOR 83 | #endif 84 | -------------------------------------------------------------------------------- /src/thermistortable_60.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // Maker's Tool Works Kapton Bed Thermistor 24 | // ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=3950 25 | // r0: 100000 26 | // t0: 25 27 | // r1: 0 (parallel with rTherm) 28 | // r2: 4700 (series with rTherm) 29 | // beta: 3950 30 | // min adc: 1 at 0.0048828125 V 31 | // max adc: 1023 at 4.9951171875 V 32 | const short temptable_60[][2] PROGMEM = { 33 | { OV( 51), 272 }, 34 | { OV( 61), 258 }, 35 | { OV( 71), 247 }, 36 | { OV( 81), 237 }, 37 | { OV( 91), 229 }, 38 | { OV( 101), 221 }, 39 | { OV( 131), 204 }, 40 | { OV( 161), 190 }, 41 | { OV( 191), 179 }, 42 | { OV( 231), 167 }, 43 | { OV( 271), 157 }, 44 | { OV( 311), 148 }, 45 | { OV( 351), 140 }, 46 | { OV( 381), 135 }, 47 | { OV( 411), 130 }, 48 | { OV( 441), 125 }, 49 | { OV( 451), 123 }, 50 | { OV( 461), 122 }, 51 | { OV( 471), 120 }, 52 | { OV( 481), 119 }, 53 | { OV( 491), 117 }, 54 | { OV( 501), 116 }, 55 | { OV( 511), 114 }, 56 | { OV( 521), 113 }, 57 | { OV( 531), 111 }, 58 | { OV( 541), 110 }, 59 | { OV( 551), 108 }, 60 | { OV( 561), 107 }, 61 | { OV( 571), 105 }, 62 | { OV( 581), 104 }, 63 | { OV( 591), 102 }, 64 | { OV( 601), 101 }, 65 | { OV( 611), 100 }, 66 | { OV( 621), 98 }, 67 | { OV( 631), 97 }, 68 | { OV( 641), 95 }, 69 | { OV( 651), 94 }, 70 | { OV( 661), 92 }, 71 | { OV( 671), 91 }, 72 | { OV( 681), 90 }, 73 | { OV( 691), 88 }, 74 | { OV( 701), 87 }, 75 | { OV( 711), 85 }, 76 | { OV( 721), 84 }, 77 | { OV( 731), 82 }, 78 | { OV( 741), 81 }, 79 | { OV( 751), 79 }, 80 | { OV( 761), 77 }, 81 | { OV( 771), 76 }, 82 | { OV( 781), 74 }, 83 | { OV( 791), 72 }, 84 | { OV( 801), 71 }, 85 | { OV( 811), 69 }, 86 | { OV( 821), 67 }, 87 | { OV( 831), 65 }, 88 | { OV( 841), 63 }, 89 | { OV( 851), 62 }, 90 | { OV( 861), 60 }, 91 | { OV( 871), 57 }, 92 | { OV( 881), 55 }, 93 | { OV( 891), 53 }, 94 | { OV( 901), 51 }, 95 | { OV( 911), 48 }, 96 | { OV( 921), 45 }, 97 | { OV( 931), 42 }, 98 | { OV( 941), 39 }, 99 | { OV( 951), 36 }, 100 | { OV( 961), 32 }, 101 | { OV( 981), 23 }, 102 | { OV( 991), 17 }, 103 | { OV(1001), 9 }, 104 | { OV(1008), 0 } 105 | }; 106 | -------------------------------------------------------------------------------- /src/tables/thermistortable_60.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // Maker's Tool Works Kapton Bed Thermistor 24 | // ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=3950 25 | // r0: 100000 26 | // t0: 25 27 | // r1: 0 (parallel with rTherm) 28 | // r2: 4700 (series with rTherm) 29 | // beta: 3950 30 | // min adc: 1 at 0.0048828125 V 31 | // max adc: 1023 at 4.9951171875 V 32 | const short temptable_60[][2] PROGMEM = { 33 | { OV( 51), 272 }, 34 | { OV( 61), 258 }, 35 | { OV( 71), 247 }, 36 | { OV( 81), 237 }, 37 | { OV( 91), 229 }, 38 | { OV( 101), 221 }, 39 | { OV( 131), 204 }, 40 | { OV( 161), 190 }, 41 | { OV( 191), 179 }, 42 | { OV( 231), 167 }, 43 | { OV( 271), 157 }, 44 | { OV( 311), 148 }, 45 | { OV( 351), 140 }, 46 | { OV( 381), 135 }, 47 | { OV( 411), 130 }, 48 | { OV( 441), 125 }, 49 | { OV( 451), 123 }, 50 | { OV( 461), 122 }, 51 | { OV( 471), 120 }, 52 | { OV( 481), 119 }, 53 | { OV( 491), 117 }, 54 | { OV( 501), 116 }, 55 | { OV( 511), 114 }, 56 | { OV( 521), 113 }, 57 | { OV( 531), 111 }, 58 | { OV( 541), 110 }, 59 | { OV( 551), 108 }, 60 | { OV( 561), 107 }, 61 | { OV( 571), 105 }, 62 | { OV( 581), 104 }, 63 | { OV( 591), 102 }, 64 | { OV( 601), 101 }, 65 | { OV( 611), 100 }, 66 | { OV( 621), 98 }, 67 | { OV( 631), 97 }, 68 | { OV( 641), 95 }, 69 | { OV( 651), 94 }, 70 | { OV( 661), 92 }, 71 | { OV( 671), 91 }, 72 | { OV( 681), 90 }, 73 | { OV( 691), 88 }, 74 | { OV( 701), 87 }, 75 | { OV( 711), 85 }, 76 | { OV( 721), 84 }, 77 | { OV( 731), 82 }, 78 | { OV( 741), 81 }, 79 | { OV( 751), 79 }, 80 | { OV( 761), 77 }, 81 | { OV( 771), 76 }, 82 | { OV( 781), 74 }, 83 | { OV( 791), 72 }, 84 | { OV( 801), 71 }, 85 | { OV( 811), 69 }, 86 | { OV( 821), 67 }, 87 | { OV( 831), 65 }, 88 | { OV( 841), 63 }, 89 | { OV( 851), 62 }, 90 | { OV( 861), 60 }, 91 | { OV( 871), 57 }, 92 | { OV( 881), 55 }, 93 | { OV( 891), 53 }, 94 | { OV( 901), 51 }, 95 | { OV( 911), 48 }, 96 | { OV( 921), 45 }, 97 | { OV( 931), 42 }, 98 | { OV( 941), 39 }, 99 | { OV( 951), 36 }, 100 | { OV( 961), 32 }, 101 | { OV( 981), 23 }, 102 | { OV( 991), 17 }, 103 | { OV(1001), 9 }, 104 | { OV(1008), 0 } 105 | }; 106 | -------------------------------------------------------------------------------- /src/thermistortable_20.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // PT100 with INA826 amp on Ultimaker v2.0 electronics 24 | // The PT100 in the Ultimaker v2.0 electronics has a high sample value for a high temperature. 25 | // This does not match the normal thermistor behaviour so we need to set the following defines 26 | #if THERMISTORHEATER_0 == 20 27 | #define HEATER_0_RAW_HI_TEMP 16383 28 | #define HEATER_0_RAW_LO_TEMP 0 29 | #endif 30 | #if THERMISTORHEATER_1 == 20 31 | #define HEATER_1_RAW_HI_TEMP 16383 32 | #define HEATER_1_RAW_LO_TEMP 0 33 | #endif 34 | #if THERMISTORHEATER_2 == 20 35 | #define HEATER_2_RAW_HI_TEMP 16383 36 | #define HEATER_2_RAW_LO_TEMP 0 37 | #endif 38 | #if THERMISTORHEATER_3 == 20 39 | #define HEATER_3_RAW_HI_TEMP 16383 40 | #define HEATER_3_RAW_LO_TEMP 0 41 | #endif 42 | #if THERMISTORHEATER_4 == 20 43 | #define HEATER_4_RAW_HI_TEMP 16383 44 | #define HEATER_4_RAW_LO_TEMP 0 45 | #endif 46 | #if THERMISTORBED == 20 47 | #define HEATER_BED_RAW_HI_TEMP 16383 48 | #define HEATER_BED_RAW_LO_TEMP 0 49 | #endif 50 | const short temptable_20[][2] PROGMEM = { 51 | { OV( 0), 0 }, 52 | { OV(227), 1 }, 53 | { OV(236), 10 }, 54 | { OV(245), 20 }, 55 | { OV(253), 30 }, 56 | { OV(262), 40 }, 57 | { OV(270), 50 }, 58 | { OV(279), 60 }, 59 | { OV(287), 70 }, 60 | { OV(295), 80 }, 61 | { OV(304), 90 }, 62 | { OV(312), 100 }, 63 | { OV(320), 110 }, 64 | { OV(329), 120 }, 65 | { OV(337), 130 }, 66 | { OV(345), 140 }, 67 | { OV(353), 150 }, 68 | { OV(361), 160 }, 69 | { OV(369), 170 }, 70 | { OV(377), 180 }, 71 | { OV(385), 190 }, 72 | { OV(393), 200 }, 73 | { OV(401), 210 }, 74 | { OV(409), 220 }, 75 | { OV(417), 230 }, 76 | { OV(424), 240 }, 77 | { OV(432), 250 }, 78 | { OV(440), 260 }, 79 | { OV(447), 270 }, 80 | { OV(455), 280 }, 81 | { OV(463), 290 }, 82 | { OV(470), 300 }, 83 | { OV(478), 310 }, 84 | { OV(485), 320 }, 85 | { OV(493), 330 }, 86 | { OV(500), 340 }, 87 | { OV(507), 350 }, 88 | { OV(515), 360 }, 89 | { OV(522), 370 }, 90 | { OV(529), 380 }, 91 | { OV(537), 390 }, 92 | { OV(544), 400 }, 93 | { OV(614), 500 }, 94 | { OV(681), 600 }, 95 | { OV(744), 700 }, 96 | { OV(805), 800 }, 97 | { OV(862), 900 }, 98 | { OV(917), 1000 }, 99 | { OV(968), 1100 } 100 | }; 101 | -------------------------------------------------------------------------------- /src/tables/thermistortable_20.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // PT100 with INA826 amp on Ultimaker v2.0 electronics 24 | // The PT100 in the Ultimaker v2.0 electronics has a high sample value for a high temperature. 25 | // This does not match the normal thermistor behaviour so we need to set the following defines 26 | #if THERMISTORHEATER_0 == 20 27 | #define HEATER_0_RAW_HI_TEMP 16383 28 | #define HEATER_0_RAW_LO_TEMP 0 29 | #endif 30 | #if THERMISTORHEATER_1 == 20 31 | #define HEATER_1_RAW_HI_TEMP 16383 32 | #define HEATER_1_RAW_LO_TEMP 0 33 | #endif 34 | #if THERMISTORHEATER_2 == 20 35 | #define HEATER_2_RAW_HI_TEMP 16383 36 | #define HEATER_2_RAW_LO_TEMP 0 37 | #endif 38 | #if THERMISTORHEATER_3 == 20 39 | #define HEATER_3_RAW_HI_TEMP 16383 40 | #define HEATER_3_RAW_LO_TEMP 0 41 | #endif 42 | #if THERMISTORHEATER_4 == 20 43 | #define HEATER_4_RAW_HI_TEMP 16383 44 | #define HEATER_4_RAW_LO_TEMP 0 45 | #endif 46 | #if THERMISTORBED == 20 47 | #define HEATER_BED_RAW_HI_TEMP 16383 48 | #define HEATER_BED_RAW_LO_TEMP 0 49 | #endif 50 | const short temptable_20[][2] PROGMEM = { 51 | { OV( 0), 0 }, 52 | { OV(227), 1 }, 53 | { OV(236), 10 }, 54 | { OV(245), 20 }, 55 | { OV(253), 30 }, 56 | { OV(262), 40 }, 57 | { OV(270), 50 }, 58 | { OV(279), 60 }, 59 | { OV(287), 70 }, 60 | { OV(295), 80 }, 61 | { OV(304), 90 }, 62 | { OV(312), 100 }, 63 | { OV(320), 110 }, 64 | { OV(329), 120 }, 65 | { OV(337), 130 }, 66 | { OV(345), 140 }, 67 | { OV(353), 150 }, 68 | { OV(361), 160 }, 69 | { OV(369), 170 }, 70 | { OV(377), 180 }, 71 | { OV(385), 190 }, 72 | { OV(393), 200 }, 73 | { OV(401), 210 }, 74 | { OV(409), 220 }, 75 | { OV(417), 230 }, 76 | { OV(424), 240 }, 77 | { OV(432), 250 }, 78 | { OV(440), 260 }, 79 | { OV(447), 270 }, 80 | { OV(455), 280 }, 81 | { OV(463), 290 }, 82 | { OV(470), 300 }, 83 | { OV(478), 310 }, 84 | { OV(485), 320 }, 85 | { OV(493), 330 }, 86 | { OV(500), 340 }, 87 | { OV(507), 350 }, 88 | { OV(515), 360 }, 89 | { OV(522), 370 }, 90 | { OV(529), 380 }, 91 | { OV(537), 390 }, 92 | { OV(544), 400 }, 93 | { OV(614), 500 }, 94 | { OV(681), 600 }, 95 | { OV(744), 700 }, 96 | { OV(805), 800 }, 97 | { OV(862), 900 }, 98 | { OV(917), 1000 }, 99 | { OV(968), 1100 } 100 | }; 101 | -------------------------------------------------------------------------------- /src/thermistor.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #define HOTENDS 1 10 | #define ARRAY_6(v1, v2, v3, v4, v5, v6, ...) { v1, v2, v3, v4, v5, v6 } 11 | #define ARRAY_5(v1, v2, v3, v4, v5, ...) { v1, v2, v3, v4, v5 } 12 | #define ARRAY_4(v1, v2, v3, v4, ...) { v1, v2, v3, v4 } 13 | #define ARRAY_3(v1, v2, v3, ...) { v1, v2, v3 } 14 | #define ARRAY_2(v1, v2, ...) { v1, v2 } 15 | #define ARRAY_1(v1, ...) { v1 } 16 | #define _ARRAY_N(N, ...) ARRAY_ ##N(__VA_ARGS__) 17 | #define ARRAY_N(N, ...) _ARRAY_N(N, __VA_ARGS__) 18 | #define ARRAY_BY_HOTENDS(...) ARRAY_N(HOTENDS, __VA_ARGS__) 19 | #define ARRAY_BY_HOTENDS1(v1) ARRAY_BY_HOTENDS(v1, v1, v1, v1, v1, v1) 20 | #define PGM_RD_W(x) (short)pgm_read_word(&x) 21 | 22 | static void* heater_ttbl_map[] = ARRAY_BY_HOTENDS((void*)HEATER_0_TEMPTABLE, (void*)HEATER_1_TEMPTABLE, (void*)HEATER_2_TEMPTABLE, (void*)HEATER_3_TEMPTABLE, (void*)HEATER_4_TEMPTABLE); 23 | static uint8_t heater_ttbllen_map[] = ARRAY_BY_HOTENDS(HEATER_0_TEMPTABLE_LEN, HEATER_1_TEMPTABLE_LEN, HEATER_2_TEMPTABLE_LEN, HEATER_3_TEMPTABLE_LEN, HEATER_4_TEMPTABLE_LEN); 24 | 25 | thermistor::thermistor(int pin, int sensorNumber) 26 | { 27 | pinMode(pin, INPUT); 28 | _pin = pin; 29 | _sensorNumber = sensorNumber; 30 | } 31 | float thermistor::analog2temp() { 32 | uint8_t e = _sensorNumber; 33 | int raw = 0; 34 | float celsius = 0; 35 | 36 | for(int j=1;j<=OVERSAMPLENR;j++){ 37 | raw += analogRead(_pin); 38 | } 39 | if (heater_ttbl_map[e] != NULL) { 40 | float celsius = 0; 41 | uint8_t i; 42 | short(*tt)[][2] = (short(*)[][2])(heater_ttbl_map[e]); 43 | int value = (int)heater_ttbllen_map[e]; 44 | for (i = 1; i < value; i++) { 45 | if (PGM_RD_W((*tt)[i][0]) > raw) { 46 | celsius = PGM_RD_W((*tt)[i - 1][1]) + 47 | (raw - PGM_RD_W((*tt)[i - 1][0])) * 48 | (float)(PGM_RD_W((*tt)[i][1]) - PGM_RD_W((*tt)[i - 1][1])) / 49 | (float)(PGM_RD_W((*tt)[i][0]) - PGM_RD_W((*tt)[i - 1][0])); 50 | return celsius; 51 | } 52 | } 53 | 54 | // Overflow: Set to last value in the table 55 | if (i == heater_ttbllen_map[e]) 56 | { 57 | celsius = PGM_RD_W((*tt)[i - 1][1]); 58 | } 59 | } 60 | else { 61 | celsius = NAN; 62 | } 63 | 64 | return celsius; 65 | } 66 | 67 | float thermistor::analog2tempEADC(int adcValue) { 68 | uint8_t e = _sensorNumber; 69 | int raw = adcValue; 70 | float celsius = 0; 71 | if (heater_ttbl_map[e] != NULL) { 72 | uint8_t i; 73 | short(*tt)[][2] = (short(*)[][2])(heater_ttbl_map[e]); 74 | int value = (int)heater_ttbl_map[e]; 75 | for (i = 1; i < value; i++) { 76 | if (PGM_RD_W((*tt)[i][0]) > raw) { 77 | celsius = PGM_RD_W((*tt)[i - 1][1]) + 78 | (raw - PGM_RD_W((*tt)[i - 1][0])) * 79 | (float)(PGM_RD_W((*tt)[i][1]) - PGM_RD_W((*tt)[i - 1][1])) / 80 | (float)(PGM_RD_W((*tt)[i][0]) - PGM_RD_W((*tt)[i - 1][0])); 81 | break; 82 | } 83 | } 84 | 85 | // Overflow: Set to last value in the table 86 | if (i == heater_ttbllen_map[e]){ celsius = PGM_RD_W((*tt)[i - 1][1]);} 87 | } else { 88 | celsius = NAN; 89 | } 90 | 91 | return celsius; 92 | } 93 | -------------------------------------------------------------------------------- /src/tables/thermistornames.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #undef THERMISTOR_NAME 24 | 25 | // Thermcouples 26 | #if THERMISTOR_ID == -3 27 | #define THERMISTOR_NAME "MAX31855" 28 | #elif THERMISTOR_ID == -2 29 | #define THERMISTOR_NAME "MAX6675" 30 | #elif THERMISTOR_ID == -1 31 | #define THERMISTOR_NAME "AD595" 32 | 33 | // Standard thermistors 34 | #elif THERMISTOR_ID == 1 35 | #define THERMISTOR_NAME "EPCOS 100K" 36 | #elif THERMISTOR_ID == 2 37 | #define THERMISTOR_NAME "ATC 204GT-2" 38 | #elif THERMISTOR_ID == 3 39 | #define THERMISTOR_NAME "Mendel-parts" 40 | #elif THERMISTOR_ID == 4 41 | #define THERMISTOR_NAME "Generic 10K" 42 | #elif THERMISTOR_ID == 5 43 | #define THERMISTOR_NAME "ATC 104GT-2" 44 | #elif THERMISTOR_ID == 6 45 | #define THERMISTOR_NAME "EPCOS (alt)" 46 | #elif THERMISTOR_ID == 7 47 | #define THERMISTOR_NAME "HW 104LAG" 48 | #elif THERMISTOR_ID == 71 49 | #define THERMISTOR_NAME "HW 104LAF" 50 | #elif THERMISTOR_ID == 8 51 | #define THERMISTOR_NAME "E3104FXT" 52 | #elif THERMISTOR_ID == 9 53 | #define THERMISTOR_NAME "GE AL03006" 54 | #elif THERMISTOR_ID == 10 55 | #define THERMISTOR_NAME "RS 198-961" 56 | #elif THERMISTOR_ID == 11 57 | #define THERMISTOR_NAME "1% beta 3950" 58 | #elif THERMISTOR_ID == 12 59 | #define THERMISTOR_NAME "E3104FXT (alt)" 60 | #elif THERMISTOR_ID == 13 61 | #define THERMISTOR_NAME "Hisens 3950" 62 | #elif THERMISTOR_ID == 20 63 | #define THERMISTOR_NAME "PT100 UltiMB" 64 | #elif THERMISTOR_ID == 60 65 | #define THERMISTOR_NAME "Makers Tool" 66 | #elif THERMISTOR_ID == 70 67 | #define THERMISTOR_NAME "Hephestos 2" 68 | #elif THERMISTOR_ID == 75 69 | #define THERMISTOR_NAME "MGB18" 70 | 71 | // Modified thermistors 72 | #elif THERMISTOR_ID == 51 73 | #define THERMISTOR_NAME "EPCOS 1K" 74 | #elif THERMISTOR_ID == 52 75 | #define THERMISTOR_NAME "ATC204GT-2 1K" 76 | #elif THERMISTOR_ID == 55 77 | #define THERMISTOR_NAME "ATC104GT-2 1K" 78 | #elif THERMISTOR_ID == 1047 79 | #define THERMISTOR_NAME "PT1000 4K7" 80 | #elif THERMISTOR_ID == 1010 81 | #define THERMISTOR_NAME "PT1000 1K" 82 | #elif THERMISTOR_ID == 147 83 | #define THERMISTOR_NAME "PT100 4K7" 84 | #elif THERMISTOR_ID == 110 85 | #define THERMISTOR_NAME "PT100 1K" 86 | 87 | // High Temperature thermistors 88 | #elif THERMISTOR_ID == 66 89 | #define THERMISTOR_NAME "Dyze 4.7M" 90 | 91 | // Dummies for dev testing 92 | #elif THERMISTOR_ID == 998 93 | #define THERMISTOR_NAME "Dummy 1" 94 | #elif THERMISTOR_ID == 999 95 | #define THERMISTOR_NAME "Dummy 2" 96 | #elif THERMISTOR_ID == 80 97 | #define THERMISTOR_NAME "NTC 3950" 98 | 99 | #endif // THERMISTOR_ID 100 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at miguelangel5612@gmail.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /src/thermistornames.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #undef THERMISTOR_NAME 24 | 25 | // Thermcouples 26 | #if THERMISTOR_ID == -3 27 | #define THERMISTOR_NAME "MAX31855" 28 | #elif THERMISTOR_ID == -2 29 | #define THERMISTOR_NAME "MAX6675" 30 | #elif THERMISTOR_ID == -1 31 | #define THERMISTOR_NAME "AD595" 32 | 33 | // Standard thermistors 34 | #elif THERMISTOR_ID == 1 35 | #define THERMISTOR_NAME "EPCOS 100K" 36 | #elif THERMISTOR_ID == 2 37 | #define THERMISTOR_NAME "ATC 204GT-2" 38 | #elif THERMISTOR_ID == 3 39 | #define THERMISTOR_NAME "Mendel-parts" 40 | #elif THERMISTOR_ID == 4 41 | #define THERMISTOR_NAME "Generic 10K" 42 | #elif THERMISTOR_ID == 5 43 | #define THERMISTOR_NAME "ATC 104GT-2" 44 | #elif THERMISTOR_ID == 6 45 | #define THERMISTOR_NAME "EPCOS (alt)" 46 | #elif THERMISTOR_ID == 7 47 | #define THERMISTOR_NAME "HW 104LAG" 48 | #elif THERMISTOR_ID == 71 49 | #define THERMISTOR_NAME "HW 104LAF" 50 | #elif THERMISTOR_ID == 8 51 | #define THERMISTOR_NAME "E3104FXT" 52 | #elif THERMISTOR_ID == 9 53 | #define THERMISTOR_NAME "GE AL03006" 54 | #elif THERMISTOR_ID == 10 55 | #define THERMISTOR_NAME "RS 198-961" 56 | #elif THERMISTOR_ID == 11 57 | #define THERMISTOR_NAME "1% beta 3950" 58 | #elif THERMISTOR_ID == 12 59 | #define THERMISTOR_NAME "E3104FXT (alt)" 60 | #elif THERMISTOR_ID == 13 61 | #define THERMISTOR_NAME "Hisens 3950" 62 | #elif THERMISTOR_ID == 20 63 | #define THERMISTOR_NAME "PT100 UltiMB" 64 | #elif THERMISTOR_ID == 60 65 | #define THERMISTOR_NAME "Makers Tool" 66 | #elif THERMISTOR_ID == 70 67 | #define THERMISTOR_NAME "Hephestos 2" 68 | #elif THERMISTOR_ID == 75 69 | #define THERMISTOR_NAME "MGB18" 70 | 71 | // Modified thermistors 72 | #elif THERMISTOR_ID == 51 73 | #define THERMISTOR_NAME "EPCOS 1K" 74 | #elif THERMISTOR_ID == 52 75 | #define THERMISTOR_NAME "ATC204GT-2 1K" 76 | #elif THERMISTOR_ID == 55 77 | #define THERMISTOR_NAME "ATC104GT-2 1K" 78 | #elif THERMISTOR_ID == 1047 79 | #define THERMISTOR_NAME "PT1000 4K7" 80 | #elif THERMISTOR_ID == 1010 81 | #define THERMISTOR_NAME "PT1000 1K" 82 | #elif THERMISTOR_ID == 147 83 | #define THERMISTOR_NAME "PT100 4K7" 84 | #elif THERMISTOR_ID == 148 85 | #define THERMISTOR_NAME "E3D PT100 4K7" 86 | #elif THERMISTOR_ID == 110 87 | #define THERMISTOR_NAME "PT100 1K" 88 | 89 | // High Temperature thermistors 90 | #elif THERMISTOR_ID == 66 91 | #define THERMISTOR_NAME "Dyze 4.7M" 92 | 93 | // Dummies for dev testing 94 | #elif THERMISTOR_ID == 998 95 | #define THERMISTOR_NAME "Dummy 1" 96 | #elif THERMISTOR_ID == 999 97 | #define THERMISTOR_NAME "Dummy 2" 98 | #elif THERMISTOR_ID == 80 99 | #define THERMISTOR_NAME "NTC 3950" 100 | 101 | #endif // THERMISTOR_ID 102 | -------------------------------------------------------------------------------- /src/thermistortable_75.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // Generic Silicon Heat Pad with NTC 100K thermistor ( Beta 25/50 3950K) 24 | // 25 | // Many of the generic silicon heat pads use the MGB18-104F39050L32 Thermistor It is used for various 26 | // wattage and voltage heat pads. This table is correct if this part is used. It has been 27 | // optimized to provide good granularity around the 60 C. and 110 C. which corrisponds to bed temperatures 28 | // for PLA and ABS. If you are printing higher temperature filament such as nylon you can uncomment 29 | // the higher earlier entries in the table to give better accuracy. But for speed reasons, if these 30 | // temperatures are not going to be used, it is better to leave them commented out. 31 | 32 | const short temptable_75[][2] PROGMEM = { // Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor 33 | { OV( 111.06), 200 }, // v=0.542 r=571.747 res=0.501 degC/count 34 | // { OV( 174.87), 175 }, // v=0.854 r=967.950 res=0.311 degC/count These values are valid. But they serve no 35 | // { OV( 191.64), 170 }, // v=0.936 r=1082.139 res=0.284 degC/count purpose. It is better to delete them so 36 | // { OV( 209.99), 165 }, // v=1.025 r=1212.472 res=0.260 degC/count the search is quicker and get to the meaningful 37 | // { OV( 230.02), 160 }, // v=1.123 r=1361.590 res=0.239 degC/count part of the table sooner. 38 | // { OV( 251.80), 155 }, // v=1.230 r=1532.621 res=0.220 degC/count 39 | { OV( 275.43), 150 }, // v=1.345 r=1729.283 res=0.203 degC/count 40 | // { OV( 300.92), 145 }, // v=1.469 r=1956.004 res=0.189 degC/coun 41 | { OV( 328.32), 140 }, // v=1.603 r=2218.081 res=0.176 degC/count 42 | { OV( 388.65), 130 }, // v=1.898 r=2874.980 res=0.156 degC/count 43 | { OV( 421.39), 125 }, // v=2.058 r=3286.644 res=0.149 degC/count 44 | { OV( 455.65), 120 }, // v=2.225 r=3768.002 res=0.143 degC/count 45 | { OV( 491.17), 115 }, // v=2.398 r=4332.590 res=0.139 degC/count 46 | { OV( 527.68), 110 }, // v=2.577 r=4996.905 res=0.136 degC/count 47 | { OV( 564.81), 105 }, // v=2.758 r=5781.120 res=0.134 degC/count 48 | { OV( 602.19), 100 }, // v=2.940 r=6710.000 res=0.134 degC/count 49 | { OV( 676.03), 90 }, // v=3.301 r=9131.018 res=0.138 degC/count 50 | { OV( 745.85), 80 }, // v=3.642 r=12602.693 res=0.150 degC/count 51 | { OV( 778.31), 75 }, // v=3.800 r=14889.001 res=0.159 degC/count 52 | { OV( 808.75), 70 }, // v=3.949 r=17658.700 res=0.171 degC/count 53 | { OV( 836.94), 65 }, // v=4.087 r=21028.040 res=0.185 degC/count 54 | { OV( 862.74), 60 }, // v=4.213 r=25144.568 res=0.204 degC/count 55 | { OV( 886.08), 55 }, // v=4.327 r=30196.449 res=0.227 degC/count 56 | { OV( 906.97), 50 }, // v=4.429 r=36424.838 res=0.255 degC/count 57 | { OV( 941.65), 40 }, // v=4.598 r=53745.337 res=0.333 degC/count 58 | { OV( 967.76), 30 }, // v=4.725 r=80880.630 res=0.452 degC/count 59 | { OV( 978.03), 25 }, // v=4.776 r=100000.000 res=0.535 degC/count 60 | { OV( 981.68), 23 }, // v=4.793 r=109024.395 res=0.573 degC/count 61 | { OV( 983.41), 22 }, // v=4.802 r=113875.430 res=0.594 degC/count 62 | { OV( 985.08), 21 }, // v=4.810 r=118968.955 res=0.616 degC/count 63 | { OV( 986.70), 20 }, // v=4.818 r=124318.354 res=0.638 degC/count 64 | { OV( 993.94), 15 }, // v=4.853 r=155431.302 res=0.768 degC/count 65 | { OV( 999.96), 10 }, // v=4.883 r=195480.023 res=0.934 degC/count 66 | { OV(1008.95), 0 } // v=4.926 r=314997.575 res=1.418 degC/count 67 | }; 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/tables/thermistortable_75.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // Generic Silicon Heat Pad with NTC 100K thermistor ( Beta 25/50 3950K) 24 | // 25 | // Many of the generic silicon heat pads use the MGB18-104F39050L32 Thermistor It is used for various 26 | // wattage and voltage heat pads. This table is correct if this part is used. It has been 27 | // optimized to provide good granularity around the 60 C. and 110 C. which corrisponds to bed temperatures 28 | // for PLA and ABS. If you are printing higher temperature filament such as nylon you can uncomment 29 | // the higher earlier entries in the table to give better accuracy. But for speed reasons, if these 30 | // temperatures are not going to be used, it is better to leave them commented out. 31 | 32 | const short temptable_75[][2] PROGMEM = { // Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor 33 | { OV( 111.06), 200 }, // v=0.542 r=571.747 res=0.501 degC/count 34 | // { OV( 174.87), 175 }, // v=0.854 r=967.950 res=0.311 degC/count These values are valid. But they serve no 35 | // { OV( 191.64), 170 }, // v=0.936 r=1082.139 res=0.284 degC/count purpose. It is better to delete them so 36 | // { OV( 209.99), 165 }, // v=1.025 r=1212.472 res=0.260 degC/count the search is quicker and get to the meaningful 37 | // { OV( 230.02), 160 }, // v=1.123 r=1361.590 res=0.239 degC/count part of the table sooner. 38 | // { OV( 251.80), 155 }, // v=1.230 r=1532.621 res=0.220 degC/count 39 | { OV( 275.43), 150 }, // v=1.345 r=1729.283 res=0.203 degC/count 40 | // { OV( 300.92), 145 }, // v=1.469 r=1956.004 res=0.189 degC/coun 41 | { OV( 328.32), 140 }, // v=1.603 r=2218.081 res=0.176 degC/count 42 | { OV( 388.65), 130 }, // v=1.898 r=2874.980 res=0.156 degC/count 43 | { OV( 421.39), 125 }, // v=2.058 r=3286.644 res=0.149 degC/count 44 | { OV( 455.65), 120 }, // v=2.225 r=3768.002 res=0.143 degC/count 45 | { OV( 491.17), 115 }, // v=2.398 r=4332.590 res=0.139 degC/count 46 | { OV( 527.68), 110 }, // v=2.577 r=4996.905 res=0.136 degC/count 47 | { OV( 564.81), 105 }, // v=2.758 r=5781.120 res=0.134 degC/count 48 | { OV( 602.19), 100 }, // v=2.940 r=6710.000 res=0.134 degC/count 49 | { OV( 676.03), 90 }, // v=3.301 r=9131.018 res=0.138 degC/count 50 | { OV( 745.85), 80 }, // v=3.642 r=12602.693 res=0.150 degC/count 51 | { OV( 778.31), 75 }, // v=3.800 r=14889.001 res=0.159 degC/count 52 | { OV( 808.75), 70 }, // v=3.949 r=17658.700 res=0.171 degC/count 53 | { OV( 836.94), 65 }, // v=4.087 r=21028.040 res=0.185 degC/count 54 | { OV( 862.74), 60 }, // v=4.213 r=25144.568 res=0.204 degC/count 55 | { OV( 886.08), 55 }, // v=4.327 r=30196.449 res=0.227 degC/count 56 | { OV( 906.97), 50 }, // v=4.429 r=36424.838 res=0.255 degC/count 57 | { OV( 941.65), 40 }, // v=4.598 r=53745.337 res=0.333 degC/count 58 | { OV( 967.76), 30 }, // v=4.725 r=80880.630 res=0.452 degC/count 59 | { OV( 978.03), 25 }, // v=4.776 r=100000.000 res=0.535 degC/count 60 | { OV( 981.68), 23 }, // v=4.793 r=109024.395 res=0.573 degC/count 61 | { OV( 983.41), 22 }, // v=4.802 r=113875.430 res=0.594 degC/count 62 | { OV( 985.08), 21 }, // v=4.810 r=118968.955 res=0.616 degC/count 63 | { OV( 986.70), 20 }, // v=4.818 r=124318.354 res=0.638 degC/count 64 | { OV( 993.94), 15 }, // v=4.853 r=155431.302 res=0.768 degC/count 65 | { OV( 999.96), 10 }, // v=4.883 r=195480.023 res=0.934 degC/count 66 | { OV(1008.95), 0 } // v=4.926 r=314997.575 res=1.418 degC/count 67 | }; 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/Configuration.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #ifndef CONFIGURATION_H 5 | #define CONFIGURATION_H 6 | 7 | // @section temperature 8 | 9 | //=========================================================================== 10 | //============================= Thermal Settings ============================ 11 | //=========================================================================== 12 | 13 | /** 14 | * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table 15 | * 16 | * Temperature sensors available: 17 | * 18 | * -3 : thermocouple with MAX31855 (only for sensor 0) 19 | * -2 : thermocouple with MAX6675 (only for sensor 0) 20 | * -1 : thermocouple with AD595 21 | * 0 : not used 22 | * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) 23 | * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) 24 | * 3 : Mendel-parts thermistor (4.7k pullup) 25 | * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! 26 | * 5 : 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) 27 | * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) 28 | * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) 29 | * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) 30 | * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) 31 | * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) 32 | * 10 : 100k RS thermistor 198-961 (4.7k pullup) 33 | * 11 : 100k beta 3950 1% thermistor (4.7k pullup) 34 | * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) 35 | * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" 36 | * 20 : the PT100 circuit found in the Ultimainboard V2.x 37 | * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 38 | * 66 : 4.7M High Temperature thermistor from Dyze Design 39 | * 70 : the 100K thermistor found in the bq Hephestos 2 40 | * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor 41 | * 42 | * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k. 43 | * (but gives greater accuracy and more stable PID) 44 | * 51 : 100k thermistor - EPCOS (1k pullup) 45 | * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup) 46 | * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) 47 | * 48 | * 1047 : Pt1000 with 4k7 pullup 49 | * 1010 : Pt1000 with 1k pullup (non standard) 50 | * 147 : Pt100 with 4k7 pullup 51 | * 148 : E3D Pt100 with 4k7 pullup 52 | * 110 : Pt100 with 1k pullup (non standard) 53 | * 54 | * Use these for Testing or Development purposes. NEVER for production machine. 55 | * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. 56 | * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. 57 | * 58 | * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '148':"E3D Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } 59 | */ 60 | #define TEMP_SENSOR_0 80 // This is thermistor 0 61 | #define TEMP_SENSOR_1 0 // This is thermistor 1 62 | #define TEMP_SENSOR_2 0 // This is thermistor 2 63 | #define TEMP_SENSOR_3 0 // This is thermistor 3 64 | #define TEMP_SENSOR_4 0 // This is thermistor 4 65 | #define TEMP_SENSOR_BED 80 // This is not used thermistor 66 | 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /src/thermistortable_71.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k Honeywell 135-104LAF-J01 24 | // R0 = 100000 Ohm 25 | // T0 = 25 °C 26 | // Beta = 3974 27 | // R1 = 0 Ohm 28 | // R2 = 4700 Ohm 29 | const short temptable_71[][2] PROGMEM = { 30 | { OV( 35), 300 }, 31 | { OV( 51), 270 }, 32 | { OV( 54), 265 }, 33 | { OV( 58), 260 }, 34 | { OV( 59), 258 }, 35 | { OV( 61), 256 }, 36 | { OV( 63), 254 }, 37 | { OV( 64), 252 }, 38 | { OV( 66), 250 }, 39 | { OV( 67), 249 }, 40 | { OV( 68), 248 }, 41 | { OV( 69), 247 }, 42 | { OV( 70), 246 }, 43 | { OV( 71), 245 }, 44 | { OV( 72), 244 }, 45 | { OV( 73), 243 }, 46 | { OV( 74), 242 }, 47 | { OV( 75), 241 }, 48 | { OV( 76), 240 }, 49 | { OV( 77), 239 }, 50 | { OV( 78), 238 }, 51 | { OV( 79), 237 }, 52 | { OV( 80), 236 }, 53 | { OV( 81), 235 }, 54 | { OV( 82), 234 }, 55 | { OV( 84), 233 }, 56 | { OV( 85), 232 }, 57 | { OV( 86), 231 }, 58 | { OV( 87), 230 }, 59 | { OV( 89), 229 }, 60 | { OV( 90), 228 }, 61 | { OV( 91), 227 }, 62 | { OV( 92), 226 }, 63 | { OV( 94), 225 }, 64 | { OV( 95), 224 }, 65 | { OV( 97), 223 }, 66 | { OV( 98), 222 }, 67 | { OV( 99), 221 }, 68 | { OV( 101), 220 }, 69 | { OV( 102), 219 }, 70 | { OV( 104), 218 }, 71 | { OV( 106), 217 }, 72 | { OV( 107), 216 }, 73 | { OV( 109), 215 }, 74 | { OV( 110), 214 }, 75 | { OV( 112), 213 }, 76 | { OV( 114), 212 }, 77 | { OV( 115), 211 }, 78 | { OV( 117), 210 }, 79 | { OV( 119), 209 }, 80 | { OV( 121), 208 }, 81 | { OV( 123), 207 }, 82 | { OV( 125), 206 }, 83 | { OV( 126), 205 }, 84 | { OV( 128), 204 }, 85 | { OV( 130), 203 }, 86 | { OV( 132), 202 }, 87 | { OV( 134), 201 }, 88 | { OV( 136), 200 }, 89 | { OV( 139), 199 }, 90 | { OV( 141), 198 }, 91 | { OV( 143), 197 }, 92 | { OV( 145), 196 }, 93 | { OV( 147), 195 }, 94 | { OV( 150), 194 }, 95 | { OV( 152), 193 }, 96 | { OV( 154), 192 }, 97 | { OV( 157), 191 }, 98 | { OV( 159), 190 }, 99 | { OV( 162), 189 }, 100 | { OV( 164), 188 }, 101 | { OV( 167), 187 }, 102 | { OV( 170), 186 }, 103 | { OV( 172), 185 }, 104 | { OV( 175), 184 }, 105 | { OV( 178), 183 }, 106 | { OV( 181), 182 }, 107 | { OV( 184), 181 }, 108 | { OV( 187), 180 }, 109 | { OV( 190), 179 }, 110 | { OV( 193), 178 }, 111 | { OV( 196), 177 }, 112 | { OV( 199), 176 }, 113 | { OV( 202), 175 }, 114 | { OV( 205), 174 }, 115 | { OV( 208), 173 }, 116 | { OV( 212), 172 }, 117 | { OV( 215), 171 }, 118 | { OV( 219), 170 }, 119 | { OV( 237), 165 }, 120 | { OV( 256), 160 }, 121 | { OV( 300), 150 }, 122 | { OV( 351), 140 }, 123 | { OV( 470), 120 }, 124 | { OV( 504), 115 }, 125 | { OV( 538), 110 }, 126 | { OV( 552), 108 }, 127 | { OV( 566), 106 }, 128 | { OV( 580), 104 }, 129 | { OV( 594), 102 }, 130 | { OV( 608), 100 }, 131 | { OV( 622), 98 }, 132 | { OV( 636), 96 }, 133 | { OV( 650), 94 }, 134 | { OV( 664), 92 }, 135 | { OV( 678), 90 }, 136 | { OV( 712), 85 }, 137 | { OV( 745), 80 }, 138 | { OV( 758), 78 }, 139 | { OV( 770), 76 }, 140 | { OV( 783), 74 }, 141 | { OV( 795), 72 }, 142 | { OV( 806), 70 }, 143 | { OV( 818), 68 }, 144 | { OV( 829), 66 }, 145 | { OV( 840), 64 }, 146 | { OV( 850), 62 }, 147 | { OV( 860), 60 }, 148 | { OV( 870), 58 }, 149 | { OV( 879), 56 }, 150 | { OV( 888), 54 }, 151 | { OV( 897), 52 }, 152 | { OV( 905), 50 }, 153 | { OV( 924), 45 }, 154 | { OV( 940), 40 }, 155 | { OV( 955), 35 }, 156 | { OV( 967), 30 }, 157 | { OV( 970), 29 }, 158 | { OV( 972), 28 }, 159 | { OV( 974), 27 }, 160 | { OV( 976), 26 }, 161 | { OV( 978), 25 }, 162 | { OV( 980), 24 }, 163 | { OV( 982), 23 }, 164 | { OV( 984), 22 }, 165 | { OV( 985), 21 }, 166 | { OV( 987), 20 }, 167 | { OV( 995), 15 }, 168 | { OV(1001), 10 }, 169 | { OV(1006), 5 }, 170 | { OV(1010), 0 } 171 | }; 172 | -------------------------------------------------------------------------------- /src/tables/thermistortable_71.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // 100k Honeywell 135-104LAF-J01 24 | // R0 = 100000 Ohm 25 | // T0 = 25 °C 26 | // Beta = 3974 27 | // R1 = 0 Ohm 28 | // R2 = 4700 Ohm 29 | const short temptable_71[][2] PROGMEM = { 30 | { OV( 35), 300 }, 31 | { OV( 51), 270 }, 32 | { OV( 54), 265 }, 33 | { OV( 58), 260 }, 34 | { OV( 59), 258 }, 35 | { OV( 61), 256 }, 36 | { OV( 63), 254 }, 37 | { OV( 64), 252 }, 38 | { OV( 66), 250 }, 39 | { OV( 67), 249 }, 40 | { OV( 68), 248 }, 41 | { OV( 69), 247 }, 42 | { OV( 70), 246 }, 43 | { OV( 71), 245 }, 44 | { OV( 72), 244 }, 45 | { OV( 73), 243 }, 46 | { OV( 74), 242 }, 47 | { OV( 75), 241 }, 48 | { OV( 76), 240 }, 49 | { OV( 77), 239 }, 50 | { OV( 78), 238 }, 51 | { OV( 79), 237 }, 52 | { OV( 80), 236 }, 53 | { OV( 81), 235 }, 54 | { OV( 82), 234 }, 55 | { OV( 84), 233 }, 56 | { OV( 85), 232 }, 57 | { OV( 86), 231 }, 58 | { OV( 87), 230 }, 59 | { OV( 89), 229 }, 60 | { OV( 90), 228 }, 61 | { OV( 91), 227 }, 62 | { OV( 92), 226 }, 63 | { OV( 94), 225 }, 64 | { OV( 95), 224 }, 65 | { OV( 97), 223 }, 66 | { OV( 98), 222 }, 67 | { OV( 99), 221 }, 68 | { OV( 101), 220 }, 69 | { OV( 102), 219 }, 70 | { OV( 104), 218 }, 71 | { OV( 106), 217 }, 72 | { OV( 107), 216 }, 73 | { OV( 109), 215 }, 74 | { OV( 110), 214 }, 75 | { OV( 112), 213 }, 76 | { OV( 114), 212 }, 77 | { OV( 115), 211 }, 78 | { OV( 117), 210 }, 79 | { OV( 119), 209 }, 80 | { OV( 121), 208 }, 81 | { OV( 123), 207 }, 82 | { OV( 125), 206 }, 83 | { OV( 126), 205 }, 84 | { OV( 128), 204 }, 85 | { OV( 130), 203 }, 86 | { OV( 132), 202 }, 87 | { OV( 134), 201 }, 88 | { OV( 136), 200 }, 89 | { OV( 139), 199 }, 90 | { OV( 141), 198 }, 91 | { OV( 143), 197 }, 92 | { OV( 145), 196 }, 93 | { OV( 147), 195 }, 94 | { OV( 150), 194 }, 95 | { OV( 152), 193 }, 96 | { OV( 154), 192 }, 97 | { OV( 157), 191 }, 98 | { OV( 159), 190 }, 99 | { OV( 162), 189 }, 100 | { OV( 164), 188 }, 101 | { OV( 167), 187 }, 102 | { OV( 170), 186 }, 103 | { OV( 172), 185 }, 104 | { OV( 175), 184 }, 105 | { OV( 178), 183 }, 106 | { OV( 181), 182 }, 107 | { OV( 184), 181 }, 108 | { OV( 187), 180 }, 109 | { OV( 190), 179 }, 110 | { OV( 193), 178 }, 111 | { OV( 196), 177 }, 112 | { OV( 199), 176 }, 113 | { OV( 202), 175 }, 114 | { OV( 205), 174 }, 115 | { OV( 208), 173 }, 116 | { OV( 212), 172 }, 117 | { OV( 215), 171 }, 118 | { OV( 219), 170 }, 119 | { OV( 237), 165 }, 120 | { OV( 256), 160 }, 121 | { OV( 300), 150 }, 122 | { OV( 351), 140 }, 123 | { OV( 470), 120 }, 124 | { OV( 504), 115 }, 125 | { OV( 538), 110 }, 126 | { OV( 552), 108 }, 127 | { OV( 566), 106 }, 128 | { OV( 580), 104 }, 129 | { OV( 594), 102 }, 130 | { OV( 608), 100 }, 131 | { OV( 622), 98 }, 132 | { OV( 636), 96 }, 133 | { OV( 650), 94 }, 134 | { OV( 664), 92 }, 135 | { OV( 678), 90 }, 136 | { OV( 712), 85 }, 137 | { OV( 745), 80 }, 138 | { OV( 758), 78 }, 139 | { OV( 770), 76 }, 140 | { OV( 783), 74 }, 141 | { OV( 795), 72 }, 142 | { OV( 806), 70 }, 143 | { OV( 818), 68 }, 144 | { OV( 829), 66 }, 145 | { OV( 840), 64 }, 146 | { OV( 850), 62 }, 147 | { OV( 860), 60 }, 148 | { OV( 870), 58 }, 149 | { OV( 879), 56 }, 150 | { OV( 888), 54 }, 151 | { OV( 897), 52 }, 152 | { OV( 905), 50 }, 153 | { OV( 924), 45 }, 154 | { OV( 940), 40 }, 155 | { OV( 955), 35 }, 156 | { OV( 967), 30 }, 157 | { OV( 970), 29 }, 158 | { OV( 972), 28 }, 159 | { OV( 974), 27 }, 160 | { OV( 976), 26 }, 161 | { OV( 978), 25 }, 162 | { OV( 980), 24 }, 163 | { OV( 982), 23 }, 164 | { OV( 984), 22 }, 165 | { OV( 985), 21 }, 166 | { OV( 987), 20 }, 167 | { OV( 995), 15 }, 168 | { OV(1001), 10 }, 169 | { OV(1006), 5 }, 170 | { OV(1010), 0 } 171 | }; 172 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 9 | [![DOI](https://zenodo.org/badge/170540207.svg)](https://zenodo.org/badge/latestdoi/170540207) 10 | ![Build Status][build-url] 11 | [![Contributors][contributors-shield]][contributors-url] 12 | [![Forks][forks-shield]][forks-url] 13 | [![Stargazers][stars-shield]][stars-url] 14 | [![Issues][issues-shield]][issues-url] 15 | [![MIT License][license-shield]][license-url] 16 | [![LinkedIn][linkedin-shield]][linkedin-url] 17 | 18 | # Arduino thermistor library 19 | 20 | ### Need help or have a question? Send me an [email](mailto:miguelangelcu@ufps.edu.co), [email2](mailto:miguelangel5612@gmail.com) 21 | 22 | ## Contents 23 | - [Development Status](#development-status) 24 | - [Installation Instructions](#installation-instructions) 25 | - [Issue/Bug report template](#issuebug-report-template) 26 | - [Supported devices](#supported-thermistors) 27 | - [Temperature sensors available](#temperature-sensors-available) 28 | - [Acknowledgements](#acknowledgements) 29 | - [More information](#more-information) 30 | ## Development Status 31 | Most marlin is applied to calculate the temperature accurately. 32 | - Supports any number of thermistors, the only thing that limits you is the number of analog inputs your arduino card has 33 | - The temperature output is in degrees centigrade. 34 | 35 | ## Installation Instructions 36 | 37 | - Using Arduino IDE 38 | + Clic in green Clone or download button. 39 | + Select download as zip. 40 | + Follow this instruccions: [Instructions for Windows or mac](https://www.arduino.cc/en/Guide/Libraries) 41 | 42 | #### Issue/Bug report template 43 | 44 | Before reporting an issue, make sure you've searched for similar one that was already created. 45 | 46 | ## Example with ramps schematic 47 | 48 | ![Pin Functions](http://chrisbarrbuilds.com/wp-content/uploads/2015/07/thermistorDiagram.png) 49 | 50 | ## Supported thermistors 51 | 52 | All definitions in src/Configuration.h file. 53 | 54 | Example configuration 55 | 56 | * #define TEMP_SENSOR_0 80 // This is thermistor 0 57 | * #define TEMP_SENSOR_1 0 // This is thermistor 1 58 | * #define TEMP_SENSOR_2 0 // This is thermistor 2 59 | * #define TEMP_SENSOR_3 0 // This is thermistor 3 60 | * #define TEMP_SENSOR_4 0 // This is thermistor 4 61 | * #define TEMP_SENSOR_BED 80 // This is not used thermistor 62 | 63 | At this example we asigned to therm0 80 ( 3950 thermistor 100K - 4k7 Pull up and 10Uf Capacitor )(RAMPS STYLE). 64 | In basic example selected thermistor is PIN A0 and therm0 (thermistor therm1(A0,0)). 65 | therm 1 is an 3950 thermistor connected in A0 pin with 4k7 pullup and 10Uf capacitor to GND. 66 | 67 | 68 | 69 | ## Temperature sensors available 70 | 71 | * 0 : not used 72 | * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) 73 | * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) 74 | * 3 : Mendel-parts thermistor (4.7k pullup) 75 | * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! 76 | * 5 : 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) 77 | * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) 78 | * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) 79 | * 71: 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) 80 | * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) 81 | * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) 82 | * 10 : 100k RS thermistor 198-961 (4.7k pullup) 83 | * 11 : 100k beta 3950 1% thermistor (4.7k pullup) 84 | * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) 85 | * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" 86 | * 20 : the PT100 circuit found in the Ultimainboard V2.x 87 | * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 88 | * 66 : 4.7M High Temperature thermistor from Dyze Design 89 | * 70 : the 100K thermistor found in the bq Hephestos 2 90 | * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor 91 | * 80 : 3950 thermistor 100K - 4k7 Pull up and 10Uf Capacitor 92 | 93 | 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k. 94 | (but gives greater accuracy and more stable PID) 95 | 96 | * 51 : 100k thermistor - EPCOS (1k pullup) 97 | * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup) 98 | * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) 99 | 100 | Use these for Testing or Development purposes. NEVER for production machine. 101 | 102 | * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. 103 | * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. 104 | 105 | ## Acknowledgements 106 | 107 | * [Marlin Firmware](http://marlinfw.org/) 108 | 109 | ## More information 110 | 111 | * [Marlin usage](http://marlinfw.org/docs/configuration/configuration.html) 112 | 113 | ## Authors 114 | 115 | * **Miguel A. Califa U.** - [*GitHub*](https://github.com/miguel5612) - [CV](https://scienti.colciencias.gov.co/cvlac/visualizador/generarCurriculoCv.do?cod_rh=0000050477) 116 | * **Carlos M. Pallares C.** - [*GitHub*]() - [CV]() 117 | 118 | 119 | 120 | 121 | 122 | 123 | [contributors-shield]: https://img.shields.io/github/contributors/miguel5612/ThermistorLibrary.svg?style=flat-square 124 | [contributors-url]: https://github.com/miguel5612/ThermistorLibrary/graphs/contributors 125 | [forks-shield]: https://img.shields.io/github/forks/miguel5612/ThermistorLibrary.svg?style=flat-square 126 | [forks-url]: https://github.com/miguel5612/ThermistorLibrary/network/members 127 | [stars-shield]: https://img.shields.io/github/stars/miguel5612/ThermistorLibrary.svg?style=flat-square 128 | [stars-url]: https://github.com/miguel5612/ThermistorLibrary/stargazers 129 | [issues-shield]: https://img.shields.io/github/issues/miguel5612/ThermistorLibrary.svg?style=flat-square 130 | [issues-url]: https://github.com/miguel5612/ThermistorLibrary/issues 131 | [license-shield]: https://img.shields.io/github/license/miguel5612/ThermistorLibrary.svg?style=flat-square 132 | [license-url]: https://github.com/miguel5612/ThermistorLibrary/blob/master/LICENSE.txt 133 | [linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square&logo=linkedin&colorB=555 134 | [build-url]: https://travis-ci.org/dwyl/esta.svg?branch=master 135 | [linkedin-url]: https://www.linkedin.com/in/miguel5612 136 | [product-screenshot]: images/screenshot.png 137 | -------------------------------------------------------------------------------- /src/Thermistortables.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef THERMISTORTABLES_H_ 24 | #define THERMISTORTABLES_H_ 25 | 26 | #define COUNT(a) (sizeof(a)/sizeof(*a)) //POR MIGUEL PARA QUE FUNCIONE EL MACRO 27 | 28 | #define OVERSAMPLENR 16 29 | #define OV(N) int16_t((N)*(OVERSAMPLENR)) 30 | 31 | #define ANY_THERMISTOR_IS(n) (THERMISTORHEATER_0 == n || THERMISTORHEATER_1 == n || THERMISTORHEATER_2 == n || THERMISTORHEATER_3 == n || THERMISTORHEATER_4 == n || THERMISTORBED == n) 32 | 33 | // Pt1000 and Pt100 handling 34 | // 35 | // Rt=R0*(1+a*T+b*T*T) [for T>0] 36 | // a=3.9083E-3, b=-5.775E-7 37 | #define PtA 3.9083E-3 38 | #define PtB -5.775E-7 39 | #define PtRt(T,R0) ((R0)*(1.0+(PtA)*(T)+(PtB)*(T)*(T))) 40 | #define PtAdVal(T,R0,Rup) (short)(1024/(Rup/PtRt(T,R0)+1)) 41 | #define PtLine(T,R0,Rup) { OV(PtAdVal(T,R0,Rup)), T }, 42 | 43 | #if ANY_THERMISTOR_IS(1) // 100k bed thermistor 44 | #include "thermistortable_1.h" 45 | #endif 46 | #if ANY_THERMISTOR_IS(2) // 200k bed thermistor 47 | #include "thermistortable_2.h" 48 | #endif 49 | #if ANY_THERMISTOR_IS(3) // mendel-parts 50 | #include "thermistortable_3.h" 51 | #endif 52 | #if ANY_THERMISTOR_IS(4) // 10k thermistor 53 | #include "thermistortable_4.h" 54 | #endif 55 | #if ANY_THERMISTOR_IS(5) // 100k ParCan thermistor (104GT-2) 56 | #include "thermistortable_5.h" 57 | #endif 58 | #if ANY_THERMISTOR_IS(6) // 100k Epcos thermistor 59 | #include "thermistortable_6.h" 60 | #endif 61 | #if ANY_THERMISTOR_IS(7) // 100k Honeywell 135-104LAG-J01 62 | #include "thermistortable_7.h" 63 | #endif 64 | #if ANY_THERMISTOR_IS(71) // 100k Honeywell 135-104LAF-J01 65 | #include "thermistortable_71.h" 66 | #endif 67 | #if ANY_THERMISTOR_IS(8) // 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) 68 | #include "thermistortable_8.h" 69 | #endif 70 | #if ANY_THERMISTOR_IS(9) // 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) 71 | #include "thermistortable_9.h" 72 | #endif 73 | #if ANY_THERMISTOR_IS(10) // 100k RS thermistor 198-961 (4.7k pullup) 74 | #include "thermistortable_10.h" 75 | #endif 76 | #if ANY_THERMISTOR_IS(11) // QU-BD silicone bed QWG-104F-3950 thermistor 77 | #include "thermistortable_11.h" 78 | #endif 79 | #if ANY_THERMISTOR_IS(13) // Hisens thermistor B25/50 =3950 +/-1% 80 | #include "thermistortable_13.h" 81 | #endif 82 | #if ANY_THERMISTOR_IS(20) // PT100 with INA826 amp on Ultimaker v2.0 electronics 83 | #include "thermistortable_20.h" 84 | #endif 85 | #if ANY_THERMISTOR_IS(51) // 100k EPCOS (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!) 86 | #include "thermistortable_51.h" 87 | #endif 88 | #if ANY_THERMISTOR_IS(52) // 200k ATC Semitec 204GT-2 (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!) 89 | #include "thermistortable_52.h" 90 | #endif 91 | #if ANY_THERMISTOR_IS(55) // 100k ATC Semitec 104GT-2 (Used on ParCan) (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!) 92 | #include "thermistortable_55.h" 93 | #endif 94 | #if ANY_THERMISTOR_IS(60) // Maker's Tool Works Kapton Bed Thermistor 95 | #include "thermistortable_60.h" 96 | #endif 97 | #if ANY_THERMISTOR_IS(66) // DyzeDesign 500°C Thermistor 98 | #include "thermistortable_66.h" 99 | #endif 100 | #if ANY_THERMISTOR_IS(12) // 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) 101 | #include "thermistortable_12.h" 102 | #endif 103 | #if ANY_THERMISTOR_IS(70) // bqh2 stock thermistor 104 | #include "thermistortable_70.h" 105 | #endif 106 | #if ANY_THERMISTOR_IS(75) // Many of the generic silicon heat pads use the MGB18-104F39050L32 Thermistor 107 | #include "thermistortable_75.h" 108 | #endif 109 | #if ANY_THERMISTOR_IS(110) // Pt100 with 1k0 pullup 110 | #include "thermistortable_110.h" 111 | #endif 112 | #if ANY_THERMISTOR_IS(147) // Pt100 with 4k7 pullup 113 | #include "thermistortable_147.h" 114 | #endif 115 | #if ANY_THERMISTOR_IS(1010) // Pt1000 with 1k0 pullup 116 | #include "thermistortable_1010.h" 117 | #endif 118 | #if ANY_THERMISTOR_IS(1047) // Pt1000 with 4k7 pullup 119 | #include "thermistortable_1047.h" 120 | #endif 121 | #if ANY_THERMISTOR_IS(998) // User-defined table 1 122 | #include "thermistortable_998.h" 123 | #endif 124 | #if ANY_THERMISTOR_IS(999) // User-defined table 2 125 | #include "thermistortable_999.h" 126 | #endif 127 | #if ANY_THERMISTOR_IS(80) // 3950 thermistor 128 | #include "thermistortable_80.h" 129 | #endif 130 | 131 | 132 | #define _TT_NAME(_N) temptable_ ## _N 133 | #define TT_NAME(_N) _TT_NAME(_N) 134 | 135 | #ifdef THERMISTORHEATER_0 136 | #define HEATER_0_TEMPTABLE TT_NAME(THERMISTORHEATER_0) 137 | #define HEATER_0_TEMPTABLE_LEN COUNT(HEATER_0_TEMPTABLE) 138 | #elif defined(HEATER_0_USES_THERMISTOR) 139 | #error "No heater 0 thermistor table specified" 140 | #else 141 | #define HEATER_0_TEMPTABLE NULL 142 | #define HEATER_0_TEMPTABLE_LEN 0 143 | #endif 144 | 145 | #ifdef THERMISTORHEATER_1 146 | #define HEATER_1_TEMPTABLE TT_NAME(THERMISTORHEATER_1) 147 | #define HEATER_1_TEMPTABLE_LEN COUNT(HEATER_1_TEMPTABLE) 148 | #elif defined(HEATER_1_USES_THERMISTOR) 149 | #error "No heater 1 thermistor table specified" 150 | #else 151 | #define HEATER_1_TEMPTABLE NULL 152 | #define HEATER_1_TEMPTABLE_LEN 0 153 | #endif 154 | 155 | #ifdef THERMISTORHEATER_2 156 | #define HEATER_2_TEMPTABLE TT_NAME(THERMISTORHEATER_2) 157 | #define HEATER_2_TEMPTABLE_LEN COUNT(HEATER_2_TEMPTABLE) 158 | #elif defined(HEATER_2_USES_THERMISTOR) 159 | #error "No heater 2 thermistor table specified" 160 | #else 161 | #define HEATER_2_TEMPTABLE NULL 162 | #define HEATER_2_TEMPTABLE_LEN 0 163 | #endif 164 | 165 | #ifdef THERMISTORHEATER_3 166 | #define HEATER_3_TEMPTABLE TT_NAME(THERMISTORHEATER_3) 167 | #define HEATER_3_TEMPTABLE_LEN COUNT(HEATER_3_TEMPTABLE) 168 | #elif defined(HEATER_3_USES_THERMISTOR) 169 | #error "No heater 3 thermistor table specified" 170 | #else 171 | #define HEATER_3_TEMPTABLE NULL 172 | #define HEATER_3_TEMPTABLE_LEN 0 173 | #endif 174 | 175 | #ifdef THERMISTORHEATER_4 176 | #define HEATER_4_TEMPTABLE TT_NAME(THERMISTORHEATER_4) 177 | #define HEATER_4_TEMPTABLE_LEN COUNT(HEATER_4_TEMPTABLE) 178 | #elif defined(HEATER_4_USES_THERMISTOR) 179 | #error "No heater 4 thermistor table specified" 180 | #else 181 | #define HEATER_4_TEMPTABLE NULL 182 | #define HEATER_4_TEMPTABLE_LEN 0 183 | #endif 184 | 185 | #ifdef THERMISTORBED 186 | #define BEDTEMPTABLE TT_NAME(THERMISTORBED) 187 | #define BEDTEMPTABLE_LEN COUNT(BEDTEMPTABLE) 188 | #else 189 | #ifdef BED_USES_THERMISTOR 190 | #error "No bed thermistor table specified" 191 | #endif 192 | #endif 193 | 194 | // Set the high and low raw values for the heaters 195 | // For thermistors the highest temperature results in the lowest ADC value 196 | // For thermocouples the highest temperature results in the highest ADC value 197 | #ifndef HEATER_0_RAW_HI_TEMP 198 | #ifdef HEATER_0_USES_THERMISTOR 199 | #define HEATER_0_RAW_HI_TEMP 0 200 | #define HEATER_0_RAW_LO_TEMP 16383 201 | #else 202 | #define HEATER_0_RAW_HI_TEMP 16383 203 | #define HEATER_0_RAW_LO_TEMP 0 204 | #endif 205 | #endif 206 | #ifndef HEATER_1_RAW_HI_TEMP 207 | #ifdef HEATER_1_USES_THERMISTOR 208 | #define HEATER_1_RAW_HI_TEMP 0 209 | #define HEATER_1_RAW_LO_TEMP 16383 210 | #else 211 | #define HEATER_1_RAW_HI_TEMP 16383 212 | #define HEATER_1_RAW_LO_TEMP 0 213 | #endif 214 | #endif 215 | #ifndef HEATER_2_RAW_HI_TEMP 216 | #ifdef HEATER_2_USES_THERMISTOR 217 | #define HEATER_2_RAW_HI_TEMP 0 218 | #define HEATER_2_RAW_LO_TEMP 16383 219 | #else 220 | #define HEATER_2_RAW_HI_TEMP 16383 221 | #define HEATER_2_RAW_LO_TEMP 0 222 | #endif 223 | #endif 224 | #ifndef HEATER_3_RAW_HI_TEMP 225 | #ifdef HEATER_3_USES_THERMISTOR 226 | #define HEATER_3_RAW_HI_TEMP 0 227 | #define HEATER_3_RAW_LO_TEMP 16383 228 | #else 229 | #define HEATER_3_RAW_HI_TEMP 16383 230 | #define HEATER_3_RAW_LO_TEMP 0 231 | #endif 232 | #endif 233 | #ifndef HEATER_4_RAW_HI_TEMP 234 | #ifdef HEATER_4_USES_THERMISTOR 235 | #define HEATER_4_RAW_HI_TEMP 0 236 | #define HEATER_4_RAW_LO_TEMP 16383 237 | #else 238 | #define HEATER_4_RAW_HI_TEMP 16383 239 | #define HEATER_4_RAW_LO_TEMP 0 240 | #endif 241 | #endif 242 | #ifndef HEATER_BED_RAW_HI_TEMP 243 | #ifdef BED_USES_THERMISTOR 244 | #define HEATER_BED_RAW_HI_TEMP 0 245 | #define HEATER_BED_RAW_LO_TEMP 16383 246 | #else 247 | #define HEATER_BED_RAW_HI_TEMP 16383 248 | #define HEATER_BED_RAW_LO_TEMP 0 249 | #endif 250 | #endif 251 | #endif // THERMISTORTABLES_H_ 252 | 253 | 254 | 255 | -------------------------------------------------------------------------------- /src/tables/Thermistortables.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #ifndef THERMISTORTABLES_H_ 24 | #define THERMISTORTABLES_H_ 25 | 26 | #define COUNT(a) (sizeof(a)/sizeof(*a)) //POR MIGUEL PARA QUE FUNCIONE EL MACRO 27 | 28 | #define OVERSAMPLENR 16 29 | #define OV(N) int16_t((N)*(OVERSAMPLENR)) 30 | 31 | #define ANY_THERMISTOR_IS(n) (THERMISTORHEATER_0 == n || THERMISTORHEATER_1 == n || THERMISTORHEATER_2 == n || THERMISTORHEATER_3 == n || THERMISTORHEATER_4 == n || THERMISTORBED == n) 32 | 33 | // Pt1000 and Pt100 handling 34 | // 35 | // Rt=R0*(1+a*T+b*T*T) [for T>0] 36 | // a=3.9083E-3, b=-5.775E-7 37 | #define PtA 3.9083E-3 38 | #define PtB -5.775E-7 39 | #define PtRt(T,R0) ((R0)*(1.0+(PtA)*(T)+(PtB)*(T)*(T))) 40 | #define PtAdVal(T,R0,Rup) (short)(1024/(Rup/PtRt(T,R0)+1)) 41 | #define PtLine(T,R0,Rup) { OV(PtAdVal(T,R0,Rup)), T }, 42 | 43 | #if ANY_THERMISTOR_IS(1) // 100k bed thermistor 44 | #include "thermistortable_1.h" 45 | #endif 46 | #if ANY_THERMISTOR_IS(2) // 200k bed thermistor 47 | #include "thermistortable_2.h" 48 | #endif 49 | #if ANY_THERMISTOR_IS(3) // mendel-parts 50 | #include "thermistortable_3.h" 51 | #endif 52 | #if ANY_THERMISTOR_IS(4) // 10k thermistor 53 | #include "thermistortable_4.h" 54 | #endif 55 | #if ANY_THERMISTOR_IS(5) // 100k ParCan thermistor (104GT-2) 56 | #include "thermistortable_5.h" 57 | #endif 58 | #if ANY_THERMISTOR_IS(6) // 100k Epcos thermistor 59 | #include "thermistortable_6.h" 60 | #endif 61 | #if ANY_THERMISTOR_IS(7) // 100k Honeywell 135-104LAG-J01 62 | #include "thermistortable_7.h" 63 | #endif 64 | #if ANY_THERMISTOR_IS(71) // 100k Honeywell 135-104LAF-J01 65 | #include "thermistortable_71.h" 66 | #endif 67 | #if ANY_THERMISTOR_IS(8) // 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) 68 | #include "thermistortable_8.h" 69 | #endif 70 | #if ANY_THERMISTOR_IS(9) // 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) 71 | #include "thermistortable_9.h" 72 | #endif 73 | #if ANY_THERMISTOR_IS(10) // 100k RS thermistor 198-961 (4.7k pullup) 74 | #include "thermistortable_10.h" 75 | #endif 76 | #if ANY_THERMISTOR_IS(11) // QU-BD silicone bed QWG-104F-3950 thermistor 77 | #include "thermistortable_11.h" 78 | #endif 79 | #if ANY_THERMISTOR_IS(13) // Hisens thermistor B25/50 =3950 +/-1% 80 | #include "thermistortable_13.h" 81 | #endif 82 | #if ANY_THERMISTOR_IS(20) // PT100 with INA826 amp on Ultimaker v2.0 electronics 83 | #include "thermistortable_20.h" 84 | #endif 85 | #if ANY_THERMISTOR_IS(51) // 100k EPCOS (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!) 86 | #include "thermistortable_51.h" 87 | #endif 88 | #if ANY_THERMISTOR_IS(52) // 200k ATC Semitec 204GT-2 (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!) 89 | #include "thermistortable_52.h" 90 | #endif 91 | #if ANY_THERMISTOR_IS(55) // 100k ATC Semitec 104GT-2 (Used on ParCan) (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!) 92 | #include "thermistortable_55.h" 93 | #endif 94 | #if ANY_THERMISTOR_IS(60) // Maker's Tool Works Kapton Bed Thermistor 95 | #include "thermistortable_60.h" 96 | #endif 97 | #if ANY_THERMISTOR_IS(66) // DyzeDesign 500°C Thermistor 98 | #include "thermistortable_66.h" 99 | #endif 100 | #if ANY_THERMISTOR_IS(12) // 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) 101 | #include "thermistortable_12.h" 102 | #endif 103 | #if ANY_THERMISTOR_IS(70) // bqh2 stock thermistor 104 | #include "thermistortable_70.h" 105 | #endif 106 | #if ANY_THERMISTOR_IS(75) // Many of the generic silicon heat pads use the MGB18-104F39050L32 Thermistor 107 | #include "thermistortable_75.h" 108 | #endif 109 | #if ANY_THERMISTOR_IS(110) // Pt100 with 1k0 pullup 110 | #include "thermistortable_110.h" 111 | #endif 112 | #if ANY_THERMISTOR_IS(147) // Pt100 with 4k7 pullup 113 | #include "thermistortable_147.h" 114 | #endif 115 | #if ANY_THERMISTOR_IS(148) // E3D Pt100 with 4k7 pullup 116 | #include "thermistortable_148.h" 117 | #endif 118 | #if ANY_THERMISTOR_IS(1010) // Pt1000 with 1k0 pullup 119 | #include "thermistortable_1010.h" 120 | #endif 121 | #if ANY_THERMISTOR_IS(1047) // Pt1000 with 4k7 pullup 122 | #include "thermistortable_1047.h" 123 | #endif 124 | #if ANY_THERMISTOR_IS(998) // User-defined table 1 125 | #include "thermistortable_998.h" 126 | #endif 127 | #if ANY_THERMISTOR_IS(999) // User-defined table 2 128 | #include "thermistortable_999.h" 129 | #endif 130 | #if ANY_THERMISTOR_IS(80) // 3950 thermistor 131 | #include "thermistortable_80.h" 132 | #endif 133 | 134 | 135 | #define _TT_NAME(_N) temptable_ ## _N 136 | #define TT_NAME(_N) _TT_NAME(_N) 137 | 138 | #ifdef THERMISTORHEATER_0 139 | #define HEATER_0_TEMPTABLE TT_NAME(THERMISTORHEATER_0) 140 | #define HEATER_0_TEMPTABLE_LEN COUNT(HEATER_0_TEMPTABLE) 141 | #elif defined(HEATER_0_USES_THERMISTOR) 142 | #error "No heater 0 thermistor table specified" 143 | #else 144 | #define HEATER_0_TEMPTABLE NULL 145 | #define HEATER_0_TEMPTABLE_LEN 0 146 | #endif 147 | 148 | #ifdef THERMISTORHEATER_1 149 | #define HEATER_1_TEMPTABLE TT_NAME(THERMISTORHEATER_1) 150 | #define HEATER_1_TEMPTABLE_LEN COUNT(HEATER_1_TEMPTABLE) 151 | #elif defined(HEATER_1_USES_THERMISTOR) 152 | #error "No heater 1 thermistor table specified" 153 | #else 154 | #define HEATER_1_TEMPTABLE NULL 155 | #define HEATER_1_TEMPTABLE_LEN 0 156 | #endif 157 | 158 | #ifdef THERMISTORHEATER_2 159 | #define HEATER_2_TEMPTABLE TT_NAME(THERMISTORHEATER_2) 160 | #define HEATER_2_TEMPTABLE_LEN COUNT(HEATER_2_TEMPTABLE) 161 | #elif defined(HEATER_2_USES_THERMISTOR) 162 | #error "No heater 2 thermistor table specified" 163 | #else 164 | #define HEATER_2_TEMPTABLE NULL 165 | #define HEATER_2_TEMPTABLE_LEN 0 166 | #endif 167 | 168 | #ifdef THERMISTORHEATER_3 169 | #define HEATER_3_TEMPTABLE TT_NAME(THERMISTORHEATER_3) 170 | #define HEATER_3_TEMPTABLE_LEN COUNT(HEATER_3_TEMPTABLE) 171 | #elif defined(HEATER_3_USES_THERMISTOR) 172 | #error "No heater 3 thermistor table specified" 173 | #else 174 | #define HEATER_3_TEMPTABLE NULL 175 | #define HEATER_3_TEMPTABLE_LEN 0 176 | #endif 177 | 178 | #ifdef THERMISTORHEATER_4 179 | #define HEATER_4_TEMPTABLE TT_NAME(THERMISTORHEATER_4) 180 | #define HEATER_4_TEMPTABLE_LEN COUNT(HEATER_4_TEMPTABLE) 181 | #elif defined(HEATER_4_USES_THERMISTOR) 182 | #error "No heater 4 thermistor table specified" 183 | #else 184 | #define HEATER_4_TEMPTABLE NULL 185 | #define HEATER_4_TEMPTABLE_LEN 0 186 | #endif 187 | 188 | #ifdef THERMISTORBED 189 | #define BEDTEMPTABLE TT_NAME(THERMISTORBED) 190 | #define BEDTEMPTABLE_LEN COUNT(BEDTEMPTABLE) 191 | #else 192 | #ifdef BED_USES_THERMISTOR 193 | #error "No bed thermistor table specified" 194 | #endif 195 | #endif 196 | 197 | // Set the high and low raw values for the heaters 198 | // For thermistors the highest temperature results in the lowest ADC value 199 | // For thermocouples the highest temperature results in the highest ADC value 200 | #ifndef HEATER_0_RAW_HI_TEMP 201 | #ifdef HEATER_0_USES_THERMISTOR 202 | #define HEATER_0_RAW_HI_TEMP 0 203 | #define HEATER_0_RAW_LO_TEMP 16383 204 | #else 205 | #define HEATER_0_RAW_HI_TEMP 16383 206 | #define HEATER_0_RAW_LO_TEMP 0 207 | #endif 208 | #endif 209 | #ifndef HEATER_1_RAW_HI_TEMP 210 | #ifdef HEATER_1_USES_THERMISTOR 211 | #define HEATER_1_RAW_HI_TEMP 0 212 | #define HEATER_1_RAW_LO_TEMP 16383 213 | #else 214 | #define HEATER_1_RAW_HI_TEMP 16383 215 | #define HEATER_1_RAW_LO_TEMP 0 216 | #endif 217 | #endif 218 | #ifndef HEATER_2_RAW_HI_TEMP 219 | #ifdef HEATER_2_USES_THERMISTOR 220 | #define HEATER_2_RAW_HI_TEMP 0 221 | #define HEATER_2_RAW_LO_TEMP 16383 222 | #else 223 | #define HEATER_2_RAW_HI_TEMP 16383 224 | #define HEATER_2_RAW_LO_TEMP 0 225 | #endif 226 | #endif 227 | #ifndef HEATER_3_RAW_HI_TEMP 228 | #ifdef HEATER_3_USES_THERMISTOR 229 | #define HEATER_3_RAW_HI_TEMP 0 230 | #define HEATER_3_RAW_LO_TEMP 16383 231 | #else 232 | #define HEATER_3_RAW_HI_TEMP 16383 233 | #define HEATER_3_RAW_LO_TEMP 0 234 | #endif 235 | #endif 236 | #ifndef HEATER_4_RAW_HI_TEMP 237 | #ifdef HEATER_4_USES_THERMISTOR 238 | #define HEATER_4_RAW_HI_TEMP 0 239 | #define HEATER_4_RAW_LO_TEMP 16383 240 | #else 241 | #define HEATER_4_RAW_HI_TEMP 16383 242 | #define HEATER_4_RAW_LO_TEMP 0 243 | #endif 244 | #endif 245 | #ifndef HEATER_BED_RAW_HI_TEMP 246 | #ifdef BED_USES_THERMISTOR 247 | #define HEATER_BED_RAW_HI_TEMP 0 248 | #define HEATER_BED_RAW_LO_TEMP 16383 249 | #else 250 | #define HEATER_BED_RAW_HI_TEMP 16383 251 | #define HEATER_BED_RAW_LO_TEMP 0 252 | #endif 253 | #endif 254 | #endif // THERMISTORTABLES_H_ 255 | 256 | 257 | 258 | --------------------------------------------------------------------------------