summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKliment Yanev <kliment.yanev@gmail.com>2011-09-08 23:03:57 +0200
committerKliment Yanev <kliment.yanev@gmail.com>2011-09-08 23:03:57 +0200
commit78be8881ce2eb537724a47bf9cfd6e27316306b1 (patch)
treeb02fb45498d36224cdcb3c4c9d72bcfb6d6ee30e
parent7dd34fc5e8d00dbe57a9e820c508f3671e25298b (diff)
parent0e91bea8f1b223703248f801733738b39f3d5fd8 (diff)
Merge branch 'master' of github.com:kliment/Sprinter into experimental
-rw-r--r--Sprinter/Configuration.h1
-rw-r--r--Sprinter/Sprinter.pde18
-rw-r--r--Sprinter/thermistortables.h68
3 files changed, 81 insertions, 6 deletions
diff --git a/Sprinter/Configuration.h b/Sprinter/Configuration.h
index 6e643ff..bc00ce1 100644
--- a/Sprinter/Configuration.h
+++ b/Sprinter/Configuration.h
@@ -20,6 +20,7 @@
// 4 is 10k thermistor
// 5 is ParCan supplied 104GT-2 100K
// 6 is EPCOS 100k
+// 7 is 100k Honeywell thermistor 135-104LAG-J01
#define THERMISTORHEATER 1
#define THERMISTORBED 1
diff --git a/Sprinter/Sprinter.pde b/Sprinter/Sprinter.pde
index 95fcd47..5daee2f 100644
--- a/Sprinter/Sprinter.pde
+++ b/Sprinter/Sprinter.pde
@@ -297,6 +297,11 @@ void setup()
SET_OUTPUT(HEATER_1_PIN);
#endif
+ //Initialize Fan Pin
+ #if (FAN_PIN > -1)
+ SET_OUTPUT(FAN_PIN);
+ #endif
+
//Initialize Step Pins
#if (X_STEP_PIN > -1)
SET_OUTPUT(X_STEP_PIN);
@@ -851,13 +856,14 @@ inline void process_commands()
WRITE(FAN_PIN, HIGH);
analogWrite(FAN_PIN, constrain(code_value(),0,255) );
}
- else
+ else {
WRITE(FAN_PIN, HIGH);
+ analogWrite(FAN_PIN, 255 );
+ }
break;
case 107: //M107 Fan Off
- analogWrite(FAN_PIN, 0);
-
- WRITE(FAN_PIN, LOW);
+ analogWrite(FAN_PIN, 0);
+ WRITE(FAN_PIN, LOW);
break;
#endif
#if (PS_ON_PIN > -1)
@@ -1260,8 +1266,8 @@ inline void linear_move(unsigned long axis_steps_remaining[]) // make linear mov
accelerating = true;
decelerating = true;
}
- long current_speed = (long) ((long) max_speed_steps_per_second - ((((long) steps_per_sqr_second) / 10000)
- * ((micros() - start_move_micros) / 100)));
+ long current_speed = (long) ((long) max_speed_steps_per_second - ((((long) steps_per_sqr_second) / 100)
+ * ((micros() - start_move_micros) / 100)/100));
interval = 100000000 / current_speed;
if (interval > max_interval)
interval = max_interval;
diff --git a/Sprinter/thermistortables.h b/Sprinter/thermistortables.h
index 67fb666..e69f367 100644
--- a/Sprinter/thermistortables.h
+++ b/Sprinter/thermistortables.h
@@ -267,6 +267,68 @@ const short temptable_6[NUMTEMPS_6][2] = {
};
#endif
+#if (THERMISTORHEATER == 7) || (THERMISTORBED == 7) // 100k Honeywell 135-104LAG-J01
+#define NUMTEMPS_7 54
+const short temptable_7[NUMTEMPS_7][2] = {
+ {46, 270},
+ {50, 265},
+ {54, 260},
+ {58, 255},
+ {62, 250},
+ {67, 245},
+ {72, 240},
+ {79, 235},
+ {85, 230},
+ {91, 225},
+ {99, 220},
+ {107, 215},
+ {116, 210},
+ {126, 205},
+ {136, 200},
+ {149, 195},
+ {160, 190},
+ {175, 185},
+ {191, 180},
+ {209, 175},
+ {224, 170},
+ {246, 165},
+ {267, 160},
+ {293, 155},
+ {316, 150},
+ {340, 145},
+ {364, 140},
+ {396, 135},
+ {425, 130},
+ {460, 125},
+ {489, 120},
+ {526, 115},
+ {558, 110},
+ {591, 105},
+ {628, 100},
+ {660, 95},
+ {696, 90},
+ {733, 85},
+ {761, 80},
+ {794, 75},
+ {819, 70},
+ {847, 65},
+ {870, 60},
+ {892, 55},
+ {911, 50},
+ {929, 45},
+ {944, 40},
+ {959, 35},
+ {971, 30},
+ {981, 25},
+ {989, 20},
+ {994, 15},
+ {1001, 10},
+ {1005, 5}
+};
+#endif
+
+
+
#if THERMISTORHEATER == 1
#define NUMTEMPS NUMTEMPS_1
#define temptable temptable_1
@@ -285,6 +347,9 @@ const short temptable_6[NUMTEMPS_6][2] = {
#elif THERMISTORHEATER == 6
#define NUMTEMPS NUMTEMPS_6
#define temptable temptable_6
+#elif THERMISTORHEATER == 7
+#define NUMTEMPS NUMTEMPS_7
+#define temptable temptable_7
#elif defined HEATER_USES_THERMISTOR
#error No heater thermistor table specified
#endif
@@ -306,6 +371,9 @@ const short temptable_6[NUMTEMPS_6][2] = {
#elif THERMISTORBED == 6
#define BNUMTEMPS NUMTEMPS_6
#define bedtemptable temptable_6
+#elif THERMISTORBED == 7
+#define BNUMTEMPS NUMTEMPS_7
+#define bedtemptable temptable_7
#elif defined BED_USES_THERMISTOR
#error No bed thermistor table specified
#endif