From a3bd2c88b715e4b8c221c4e0debc7fdaa60b2f15 Mon Sep 17 00:00:00 2001 From: kliment Date: Mon, 28 Mar 2011 18:15:38 +0200 Subject: Added temp tables to configuration. Made dual temp tables optional. Re-enabled min-z endstop in default config. --- Tonokip_Firmware/BedThermistorTable.h | 33 ------------ Tonokip_Firmware/BedThermistorTable_100k.h | 85 ++++++++++++++++++++++++++++++ Tonokip_Firmware/BedThermistorTable_200k.h | 42 +++++++++++++++ Tonokip_Firmware/ThermistorTable.h | 42 --------------- Tonokip_Firmware/ThermistorTable_100k.h | 85 ++++++++++++++++++++++++++++++ Tonokip_Firmware/ThermistorTable_200k.h | 42 +++++++++++++++ Tonokip_Firmware/Tonokip_Firmware.pde | 7 ++- Tonokip_Firmware/configuration.h | 20 +++++++ Tonokip_Firmware/pins.h | 2 +- 9 files changed, 278 insertions(+), 80 deletions(-) delete mode 100644 Tonokip_Firmware/BedThermistorTable.h create mode 100644 Tonokip_Firmware/BedThermistorTable_100k.h create mode 100644 Tonokip_Firmware/BedThermistorTable_200k.h delete mode 100644 Tonokip_Firmware/ThermistorTable.h create mode 100644 Tonokip_Firmware/ThermistorTable_100k.h create mode 100644 Tonokip_Firmware/ThermistorTable_200k.h diff --git a/Tonokip_Firmware/BedThermistorTable.h b/Tonokip_Firmware/BedThermistorTable.h deleted file mode 100644 index 75ba458..0000000 --- a/Tonokip_Firmware/BedThermistorTable.h +++ /dev/null @@ -1,33 +0,0 @@ -// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts) -// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py) -// ./createTemperatureLookup.py --r0=10000 --t0=25 --r1=0 --r2=4700 --beta=3977 --max-adc=1023 -// r0: 10000 -// t0: 25 -// r1: 0 -// r2: 4700 -// beta: 3977 -// max adc: 1023 -#define NUMTEMPS 20 -short bedtemptable[NUMTEMPS][2] = { - {1, 430}, - {54, 137}, - {107, 107}, - {160, 91}, - {213, 80}, - {266, 71}, - {319, 64}, - {372, 57}, - {425, 51}, - {478, 46}, - {531, 41}, - {584, 35}, - {637, 30}, - {690, 25}, - {743, 20}, - {796, 14}, - {849, 7}, - {902, 0}, - {955, -11}, - {1008, -35} -}; - diff --git a/Tonokip_Firmware/BedThermistorTable_100k.h b/Tonokip_Firmware/BedThermistorTable_100k.h new file mode 100644 index 0000000..f607f4e --- /dev/null +++ b/Tonokip_Firmware/BedThermistorTable_100k.h @@ -0,0 +1,85 @@ +#ifndef THERMISTORTABLE_H_ +#define THERMISTORTABLE_H_ + +// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts) +// See this page: +// http://dev.www.reprap.org/bin/view/Main/Thermistor +// for details of what goes in this table. +// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py) +// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=4066 --max-adc=1023 +// r0: 100000 +// t0: 25 +// r1: 0 +// r2: 4700 +// beta: 4066 +// max adc: 1023 + +#define BNUMTEMPS 61 +short bedtemptable[BNUMTEMPS][2] = { +{ 23 , 300 }, +{ 25 , 295 }, +{ 27 , 290 }, +{ 28 , 285 }, +{ 31 , 280 }, +{ 33 , 275 }, +{ 35 , 270 }, +{ 38 , 265 }, +{ 41 , 260 }, +{ 44 , 255 }, +{ 48 , 250 }, +{ 52 , 245 }, +{ 56 , 240 }, +{ 61 , 235 }, +{ 66 , 230 }, +{ 71 , 225 }, +{ 78 , 220 }, +{ 84 , 215 }, +{ 92 , 210 }, +{ 100 , 205 }, +{ 109 , 200 }, +{ 120 , 195 }, +{ 131 , 190 }, +{ 143 , 185 }, +{ 156 , 180 }, +{ 171 , 175 }, +{ 187 , 170 }, +{ 205 , 165 }, +{ 224 , 160 }, +{ 245 , 155 }, +{ 268 , 150 }, +{ 293 , 145 }, +{ 320 , 140 }, +{ 348 , 135 }, +{ 379 , 130 }, +{ 411 , 125 }, +{ 445 , 120 }, +{ 480 , 115 }, +{ 516 , 110 }, +{ 553 , 105 }, +{ 591 , 100 }, +{ 628 , 95 }, +{ 665 , 90 }, +{ 702 , 85 }, +{ 737 , 80 }, +{ 770 , 75 }, +{ 801 , 70 }, +{ 830 , 65 }, +{ 857 , 60 }, +{ 881 , 55 }, +{ 903 , 50 }, +{ 922 , 45 }, +{ 939 , 40 }, +{ 954 , 35 }, +{ 966 , 30 }, +{ 977 , 25 }, +{ 985 , 20 }, +{ 993 , 15 }, +{ 999 , 10 }, +{ 1004 , 5 }, +{ 1008 , 0 }, + +}; + + +#endif + diff --git a/Tonokip_Firmware/BedThermistorTable_200k.h b/Tonokip_Firmware/BedThermistorTable_200k.h new file mode 100644 index 0000000..79c9ea4 --- /dev/null +++ b/Tonokip_Firmware/BedThermistorTable_200k.h @@ -0,0 +1,42 @@ +#ifndef THERMISTORTABLE_H_ +#define THERMISTORTABLE_H_ + +// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts) +// See this page: +// http://dev.www.reprap.org/bin/view/Main/Thermistor +// for details of what goes in this table. +// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py) +// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=4066 --max-adc=1023 +// r0: 100000 +// t0: 25 +// r1: 0 +// r2: 4700 +// beta: 4066 +// max adc: 1023 + +#define BNUMTEMPS 20 +short bedtemptable[BNUMTEMPS][2] = { + {1, 848}, + {54, 275}, + {107, 228}, + {160, 202}, + {213, 185}, + {266, 171}, + {319, 160}, + {372, 150}, + {425, 141}, + {478, 133}, + {531, 125}, + {584, 118}, + {637, 110}, + {690, 103}, + {743, 95}, + {796, 86}, + {849, 77}, + {902, 65}, + {955, 49}, + {1008, 17} +}; + + +#endif diff --git a/Tonokip_Firmware/ThermistorTable.h b/Tonokip_Firmware/ThermistorTable.h deleted file mode 100644 index ef68b5f..0000000 --- a/Tonokip_Firmware/ThermistorTable.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef THERMISTORTABLE_H_ -#define THERMISTORTABLE_H_ - -// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts) -// See this page: -// http://dev.www.reprap.org/bin/view/Main/Thermistor -// for details of what goes in this table. -// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py) -// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=4066 --max-adc=1023 -// r0: 100000 -// t0: 25 -// r1: 0 -// r2: 4700 -// beta: 4066 -// max adc: 1023 - -#define NUMTEMPS 20 -short temptable[NUMTEMPS][2] = { - {1, 848}, - {54, 275}, - {107, 228}, - {160, 202}, - {213, 185}, - {266, 171}, - {319, 160}, - {372, 150}, - {425, 141}, - {478, 133}, - {531, 125}, - {584, 118}, - {637, 110}, - {690, 103}, - {743, 95}, - {796, 86}, - {849, 77}, - {902, 65}, - {955, 49}, - {1008, 17} -}; - - -#endif diff --git a/Tonokip_Firmware/ThermistorTable_100k.h b/Tonokip_Firmware/ThermistorTable_100k.h new file mode 100644 index 0000000..3762b6a --- /dev/null +++ b/Tonokip_Firmware/ThermistorTable_100k.h @@ -0,0 +1,85 @@ +#ifndef THERMISTORTABLE_H_ +#define THERMISTORTABLE_H_ + +// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts) +// See this page: +// http://dev.www.reprap.org/bin/view/Main/Thermistor +// for details of what goes in this table. +// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py) +// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=4066 --max-adc=1023 +// r0: 100000 +// t0: 25 +// r1: 0 +// r2: 4700 +// beta: 4066 +// max adc: 1023 + +#define NUMTEMPS 61 +short temptable[NUMTEMPS][2] = { +{ 23 , 300 }, +{ 25 , 295 }, +{ 27 , 290 }, +{ 28 , 285 }, +{ 31 , 280 }, +{ 33 , 275 }, +{ 35 , 270 }, +{ 38 , 265 }, +{ 41 , 260 }, +{ 44 , 255 }, +{ 48 , 250 }, +{ 52 , 245 }, +{ 56 , 240 }, +{ 61 , 235 }, +{ 66 , 230 }, +{ 71 , 225 }, +{ 78 , 220 }, +{ 84 , 215 }, +{ 92 , 210 }, +{ 100 , 205 }, +{ 109 , 200 }, +{ 120 , 195 }, +{ 131 , 190 }, +{ 143 , 185 }, +{ 156 , 180 }, +{ 171 , 175 }, +{ 187 , 170 }, +{ 205 , 165 }, +{ 224 , 160 }, +{ 245 , 155 }, +{ 268 , 150 }, +{ 293 , 145 }, +{ 320 , 140 }, +{ 348 , 135 }, +{ 379 , 130 }, +{ 411 , 125 }, +{ 445 , 120 }, +{ 480 , 115 }, +{ 516 , 110 }, +{ 553 , 105 }, +{ 591 , 100 }, +{ 628 , 95 }, +{ 665 , 90 }, +{ 702 , 85 }, +{ 737 , 80 }, +{ 770 , 75 }, +{ 801 , 70 }, +{ 830 , 65 }, +{ 857 , 60 }, +{ 881 , 55 }, +{ 903 , 50 }, +{ 922 , 45 }, +{ 939 , 40 }, +{ 954 , 35 }, +{ 966 , 30 }, +{ 977 , 25 }, +{ 985 , 20 }, +{ 993 , 15 }, +{ 999 , 10 }, +{ 1004 , 5 }, +{ 1008 , 0 }, + +}; + + +#endif + diff --git a/Tonokip_Firmware/ThermistorTable_200k.h b/Tonokip_Firmware/ThermistorTable_200k.h new file mode 100644 index 0000000..ef68b5f --- /dev/null +++ b/Tonokip_Firmware/ThermistorTable_200k.h @@ -0,0 +1,42 @@ +#ifndef THERMISTORTABLE_H_ +#define THERMISTORTABLE_H_ + +// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts) +// See this page: +// http://dev.www.reprap.org/bin/view/Main/Thermistor +// for details of what goes in this table. +// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py) +// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=4066 --max-adc=1023 +// r0: 100000 +// t0: 25 +// r1: 0 +// r2: 4700 +// beta: 4066 +// max adc: 1023 + +#define NUMTEMPS 20 +short temptable[NUMTEMPS][2] = { + {1, 848}, + {54, 275}, + {107, 228}, + {160, 202}, + {213, 185}, + {266, 171}, + {319, 160}, + {372, 150}, + {425, 141}, + {478, 133}, + {531, 125}, + {584, 118}, + {637, 110}, + {690, 103}, + {743, 95}, + {796, 86}, + {849, 77}, + {902, 65}, + {955, 49}, + {1008, 17} +}; + + +#endif diff --git a/Tonokip_Firmware/Tonokip_Firmware.pde b/Tonokip_Firmware/Tonokip_Firmware.pde index 27e552f..d64a50e 100644 --- a/Tonokip_Firmware/Tonokip_Firmware.pde +++ b/Tonokip_Firmware/Tonokip_Firmware.pde @@ -3,8 +3,7 @@ #include "configuration.h" #include "pins.h" -#include "ThermistorTable.h" -#include "BedThermistorTable.h" + #ifdef SDSUPPORT #include "SdFat.h" #endif @@ -815,7 +814,7 @@ float temp2analogBed(int celsius) { int raw = 0; byte i; - for (i=1; i