diff options
-rw-r--r-- | Tonokip_Firmware/BedThermistorTable.h | 33 | ||||
-rw-r--r-- | Tonokip_Firmware/BedThermistorTable_100k.h | 85 | ||||
-rw-r--r-- | Tonokip_Firmware/BedThermistorTable_200k.h | 42 | ||||
-rw-r--r-- | Tonokip_Firmware/ThermistorTable_100k.h | 85 | ||||
-rw-r--r-- | Tonokip_Firmware/ThermistorTable_200k.h (renamed from Tonokip_Firmware/ThermistorTable.h) | 0 | ||||
-rw-r--r-- | Tonokip_Firmware/Tonokip_Firmware.pde | 7 | ||||
-rw-r--r-- | Tonokip_Firmware/configuration.h | 20 | ||||
-rw-r--r-- | Tonokip_Firmware/pins.h | 2 |
8 files changed, 236 insertions, 38 deletions
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_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.h b/Tonokip_Firmware/ThermistorTable_200k.h index ef68b5f..ef68b5f 100644 --- a/Tonokip_Firmware/ThermistorTable.h +++ b/Tonokip_Firmware/ThermistorTable_200k.h 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<NUMTEMPS; i++) + for (i=1; i<BNUMTEMPS; i++) { if (bedtemptable[i][1] < celsius) { @@ -829,7 +828,7 @@ float temp2analogBed(int celsius) { } // Overflow: Set to last value in the table - if (i == NUMTEMPS) raw = bedtemptable[i-1][0]; + if (i == BNUMTEMPS) raw = bedtemptable[i-1][0]; return 1023 - raw; } else { diff --git a/Tonokip_Firmware/configuration.h b/Tonokip_Firmware/configuration.h index b7981e4..50c61dc 100644 --- a/Tonokip_Firmware/configuration.h +++ b/Tonokip_Firmware/configuration.h @@ -4,6 +4,8 @@ // NO RS485/EXTRUDER CONTROLLER SUPPORT // PLEASE VERIFY PIN ASSIGNMENTS FOR YOUR CONFIGURATION!!!!!!! #define MOTHERBOARD 3 // ATMEGA168 0, SANGUINO 1, MOTHERBOARD = 2, MEGA 3, ATMEGA328 4 + +//Comment out to disable SD support #define SDSUPPORT 1 // THERMOCOUPLE SUPPORT UNTESTED... USE WITH CAUTION!!!! @@ -44,6 +46,22 @@ const bool INVERT_Y_DIR = false; const bool INVERT_Z_DIR = true; const bool INVERT_E_DIR = false; +//Thermistor settings: + +//Uncomment for 100k thermistor +//#include "ThermistorTable_100k.h" +//#include "BedThermistorTable_100k.h" + +//Uncomment for 200k thermistor +//#include "ThermistorTable_200k.h" +//#include "BedThermistorTable_200k.h" + +//Identical thermistors on heater and bed: +#include "ThermistorTable_200k.h" +//#include "ThermistorTable_100k.h" +#define BNUMTEMPS NUMTEMPS +#define bedtemptable temptable + //Endstop Settings #define ENDSTOPPULLUPS 1 const bool ENDSTOPS_INVERTING = false; @@ -55,4 +73,6 @@ const int Z_MAX_LENGTH = 100; #define BAUDRATE 115200 + + #endif diff --git a/Tonokip_Firmware/pins.h b/Tonokip_Firmware/pins.h index 7f9ab6b..816fd96 100644 --- a/Tonokip_Firmware/pins.h +++ b/Tonokip_Firmware/pins.h @@ -215,7 +215,7 @@ #define Z_STEP_PIN 44 #define Z_DIR_PIN 46 #define Z_ENABLE_PIN 42 -#define Z_MIN_PIN -1 //18 +#define Z_MIN_PIN 18 #define Z_MAX_PIN -1 //19 #define E_STEP_PIN 32 |