Neil Darlow 10 years ago
parent
commit
b81021f475

+ 32
- 2
Marlin/Configuration.h View File

31
 #define SERIAL_PORT 0
31
 #define SERIAL_PORT 0
32
 
32
 
33
 // This determines the communication speed of the printer
33
 // This determines the communication speed of the printer
34
-// This determines the communication speed of the printer
35
 #define BAUDRATE 250000
34
 #define BAUDRATE 250000
36
 
35
 
37
 // This enables the serial port associated to the Bluetooth interface
36
 // This enables the serial port associated to the Bluetooth interface
49
 // 33 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
48
 // 33 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
50
 // 34 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
49
 // 34 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
51
 // 35 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan)
50
 // 35 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan)
51
+// 36 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan)
52
 // 4  = Duemilanove w/ ATMega328P pin assignment
52
 // 4  = Duemilanove w/ ATMega328P pin assignment
53
 // 5  = Gen6
53
 // 5  = Gen6
54
 // 51 = Gen6 deluxe
54
 // 51 = Gen6 deluxe
127
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
127
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
128
 // 11 is 100k beta 3950 1% thermistor (4.7k pullup)
128
 // 11 is 100k beta 3950 1% thermistor (4.7k pullup)
129
 // 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
129
 // 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
130
+// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" 
130
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
131
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
131
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
132
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
132
 //
133
 //
192
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
193
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
193
   #define PID_INTEGRAL_DRIVE_MAX 255  //limit for the integral term
194
   #define PID_INTEGRAL_DRIVE_MAX 255  //limit for the integral term
194
   #define K1 0.95 //smoothing factor within the PID
195
   #define K1 0.95 //smoothing factor within the PID
195
-  #define PID_dT ((OVERSAMPLENR * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
196
+  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
196
 
197
 
197
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
198
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
198
 // Ultimaker
199
 // Ultimaker
765
 //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
766
 //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
766
 //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles
767
 //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles
767
 
768
 
769
+/**********************************************************************\
770
+ * Support for a filament diameter sensor
771
+ * Also allows adjustment of diameter at print time (vs  at slicing)
772
+ * Single extruder only at this point (extruder 0)
773
+ * 
774
+ * Motherboards
775
+ * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector 
776
+ * 81 - Printrboard - Uses Analog input 2 on the Aux 2 connector
777
+ * 301 - Rambo  - uses Analog input 3
778
+ * Note may require analog pins to be defined for different motherboards
779
+ **********************************************************************/
780
+#define FILAMENT_SENSOR
781
+#define FILAMENT_SENSOR_EXTRUDER_NUM	0  //The number of the extruder that has the filament sensor (0,1,2)
782
+#define MEASUREMENT_DELAY_CM			14  //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
783
+
784
+#define DEFAULT_NOMINAL_FILAMENT_DIA  3.0  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
785
+#define MEASURED_UPPER_LIMIT          3.30  //upper limit factor used for sensor reading validation in mm
786
+#define MEASURED_LOWER_LIMIT          1.90  //lower limit factor for sensor reading validation in mm
787
+#define MAX_MEASUREMENT_DELAY			20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
788
+
789
+//defines used in the code
790
+#define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially 
791
+
792
+
793
+
794
+
795
+
796
+
797
+
768
 #include "Configuration_adv.h"
798
 #include "Configuration_adv.h"
769
 #include "thermistortables.h"
799
 #include "thermistortables.h"
770
 
800
 

+ 6
- 6
Marlin/ConfigurationStore.cpp View File

65
   EEPROM_WRITE_VAR(i,max_xy_jerk);
65
   EEPROM_WRITE_VAR(i,max_xy_jerk);
66
   EEPROM_WRITE_VAR(i,max_z_jerk);
66
   EEPROM_WRITE_VAR(i,max_z_jerk);
67
   EEPROM_WRITE_VAR(i,max_e_jerk);
67
   EEPROM_WRITE_VAR(i,max_e_jerk);
68
-  EEPROM_WRITE_VAR(i,add_homeing);
68
+  EEPROM_WRITE_VAR(i,add_homing);
69
   #ifdef DELTA
69
   #ifdef DELTA
70
   EEPROM_WRITE_VAR(i,endstop_adj);
70
   EEPROM_WRITE_VAR(i,endstop_adj);
71
   EEPROM_WRITE_VAR(i,delta_radius);
71
   EEPROM_WRITE_VAR(i,delta_radius);
170
     SERIAL_ECHO_START;
170
     SERIAL_ECHO_START;
171
     SERIAL_ECHOLNPGM("Home offset (mm):");
171
     SERIAL_ECHOLNPGM("Home offset (mm):");
172
     SERIAL_ECHO_START;
172
     SERIAL_ECHO_START;
173
-    SERIAL_ECHOPAIR("  M206 X",add_homeing[0] );
174
-    SERIAL_ECHOPAIR(" Y" ,add_homeing[1] );
175
-    SERIAL_ECHOPAIR(" Z" ,add_homeing[2] );
173
+    SERIAL_ECHOPAIR("  M206 X",add_homing[0] );
174
+    SERIAL_ECHOPAIR(" Y" ,add_homing[1] );
175
+    SERIAL_ECHOPAIR(" Z" ,add_homing[2] );
176
     SERIAL_ECHOLN("");
176
     SERIAL_ECHOLN("");
177
 #ifdef DELTA
177
 #ifdef DELTA
178
     SERIAL_ECHO_START;
178
     SERIAL_ECHO_START;
229
         EEPROM_READ_VAR(i,max_xy_jerk);
229
         EEPROM_READ_VAR(i,max_xy_jerk);
230
         EEPROM_READ_VAR(i,max_z_jerk);
230
         EEPROM_READ_VAR(i,max_z_jerk);
231
         EEPROM_READ_VAR(i,max_e_jerk);
231
         EEPROM_READ_VAR(i,max_e_jerk);
232
-        EEPROM_READ_VAR(i,add_homeing);
232
+        EEPROM_READ_VAR(i,add_homing);
233
         #ifdef DELTA
233
         #ifdef DELTA
234
 		EEPROM_READ_VAR(i,endstop_adj);
234
 		EEPROM_READ_VAR(i,endstop_adj);
235
 		EEPROM_READ_VAR(i,delta_radius);
235
 		EEPROM_READ_VAR(i,delta_radius);
303
     max_xy_jerk=DEFAULT_XYJERK;
303
     max_xy_jerk=DEFAULT_XYJERK;
304
     max_z_jerk=DEFAULT_ZJERK;
304
     max_z_jerk=DEFAULT_ZJERK;
305
     max_e_jerk=DEFAULT_EJERK;
305
     max_e_jerk=DEFAULT_EJERK;
306
-    add_homeing[0] = add_homeing[1] = add_homeing[2] = 0;
306
+    add_homing[0] = add_homing[1] = add_homing[2] = 0;
307
 #ifdef DELTA
307
 #ifdef DELTA
308
 	endstop_adj[0] = endstop_adj[1] = endstop_adj[2] = 0;
308
 	endstop_adj[0] = endstop_adj[1] = endstop_adj[2] = 0;
309
 	delta_radius= DELTA_RADIUS;
309
 	delta_radius= DELTA_RADIUS;

+ 11
- 1
Marlin/Marlin.h View File

211
 extern int extruder_multiply[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually
211
 extern int extruder_multiply[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually
212
 extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner
212
 extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner
213
 extern float current_position[NUM_AXIS] ;
213
 extern float current_position[NUM_AXIS] ;
214
-extern float add_homeing[3];
214
+extern float add_homing[3];
215
 #ifdef DELTA
215
 #ifdef DELTA
216
 extern float endstop_adj[3];
216
 extern float endstop_adj[3];
217
 extern float delta_radius;
217
 extern float delta_radius;
236
 extern unsigned char fanSpeedSoftPwm;
236
 extern unsigned char fanSpeedSoftPwm;
237
 #endif
237
 #endif
238
 
238
 
239
+#ifdef FILAMENT_SENSOR
240
+  extern float filament_width_nominal;  //holds the theoretical filament diameter ie., 3.00 or 1.75 
241
+  extern bool filament_sensor;  //indicates that filament sensor readings should control extrusion  
242
+  extern float filament_width_meas; //holds the filament diameter as accurately measured 
243
+  extern signed char measurement_delay[];  //ring buffer to delay measurement
244
+  extern int delay_index1, delay_index2;  //index into ring buffer
245
+  extern float delay_dist; //delay distance counter
246
+  extern int meas_delay_cm; //delay distance
247
+#endif
248
+
239
 #ifdef FWRETRACT
249
 #ifdef FWRETRACT
240
 extern bool autoretract_enabled;
250
 extern bool autoretract_enabled;
241
 extern bool retracted[EXTRUDERS];
251
 extern bool retracted[EXTRUDERS];

+ 1
- 1
Marlin/MarlinSerial.cpp View File

73
   bool useU2X = true;
73
   bool useU2X = true;
74
 
74
 
75
 #if F_CPU == 16000000UL && SERIAL_PORT == 0
75
 #if F_CPU == 16000000UL && SERIAL_PORT == 0
76
-  // hard coded exception for compatibility with the bootloader shipped
76
+  // hard-coded exception for compatibility with the bootloader shipped
77
   // with the Duemilanove and previous boards and the firmware on the 8U2
77
   // with the Duemilanove and previous boards and the firmware on the 8U2
78
   // on the Uno and Mega 2560.
78
   // on the Uno and Mega 2560.
79
   if (baud == 57600) {
79
   if (baud == 57600) {

+ 116
- 28
Marlin/Marlin_main.cpp View File

159
 // M400 - Finish all moves
159
 // M400 - Finish all moves
160
 // M401 - Lower z-probe if present
160
 // M401 - Lower z-probe if present
161
 // M402 - Raise z-probe if present
161
 // M402 - Raise z-probe if present
162
+// M404 - N<dia in mm> Enter the nominal filament width (3mm, 1.75mm ) or will display nominal filament width without parameters
163
+// M405 - Turn on Filament Sensor extrusion control.  Optional D<delay in cm> to set delay in centimeters between sensor and extruder 
164
+// M406 - Turn off Filament Sensor extrusion control 
165
+// M407 - Displays measured filament diameter 
162
 // M500 - stores parameters in EEPROM
166
 // M500 - stores parameters in EEPROM
163
 // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
167
 // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
164
 // M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
168
 // M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
220
   #endif
224
   #endif
221
 };
225
 };
222
 float current_position[NUM_AXIS] = { 0.0, 0.0, 0.0, 0.0 };
226
 float current_position[NUM_AXIS] = { 0.0, 0.0, 0.0, 0.0 };
223
-float add_homeing[3]={0,0,0};
227
+float add_homing[3]={0,0,0};
224
 #ifdef DELTA
228
 #ifdef DELTA
225
 float endstop_adj[3]={0,0,0};
229
 float endstop_adj[3]={0,0,0};
226
 #endif
230
 #endif
313
 
317
 
314
 bool cancel_heatup = false ;
318
 bool cancel_heatup = false ;
315
 
319
 
320
+#ifdef FILAMENT_SENSOR
321
+  //Variables for Filament Sensor input 
322
+  float filament_width_nominal=DEFAULT_NOMINAL_FILAMENT_DIA;  //Set nominal filament width, can be changed with M404 
323
+  bool filament_sensor=false;  //M405 turns on filament_sensor control, M406 turns it off 
324
+  float filament_width_meas=DEFAULT_MEASURED_FILAMENT_DIA; //Stores the measured filament diameter 
325
+  signed char measurement_delay[MAX_MEASUREMENT_DELAY+1];  //ring buffer to delay measurement  store extruder factor after subtracting 100 
326
+  int delay_index1=0;  //index into ring buffer
327
+  int delay_index2=-1;  //index into ring buffer - set to -1 on startup to indicate ring buffer needs to be initialized
328
+  float delay_dist=0; //delay distance counter  
329
+  int meas_delay_cm = MEASUREMENT_DELAY_CM;  //distance delay setting
330
+#endif
331
+
316
 //===========================================================================
332
 //===========================================================================
317
 //=============================Private Variables=============================
333
 //=============================Private Variables=============================
318
 //===========================================================================
334
 //===========================================================================
319
 const char axis_codes[NUM_AXIS] = {'X', 'Y', 'Z', 'E'};
335
 const char axis_codes[NUM_AXIS] = {'X', 'Y', 'Z', 'E'};
320
 static float destination[NUM_AXIS] = {  0.0, 0.0, 0.0, 0.0};
336
 static float destination[NUM_AXIS] = {  0.0, 0.0, 0.0, 0.0};
337
+
338
+#ifndef DELTA
321
 static float delta[3] = {0.0, 0.0, 0.0};
339
 static float delta[3] = {0.0, 0.0, 0.0};
340
+#endif
341
+
322
 static float offset[3] = {0.0, 0.0, 0.0};
342
 static float offset[3] = {0.0, 0.0, 0.0};
323
 static bool home_all_axis = true;
343
 static bool home_all_axis = true;
324
 static float feedrate = 1500.0, next_feedrate, saved_feedrate;
344
 static float feedrate = 1500.0, next_feedrate, saved_feedrate;
506
   #endif
526
   #endif
507
 }
527
 }
508
 
528
 
529
+
509
 void setup()
530
 void setup()
510
 {
531
 {
511
   setup_killpin();
532
   setup_killpin();
555
   st_init();    // Initialize stepper, this enables interrupts!
576
   st_init();    // Initialize stepper, this enables interrupts!
556
   setup_photpin();
577
   setup_photpin();
557
   servo_init();
578
   servo_init();
579
+  
558
 
580
 
559
   lcd_init();
581
   lcd_init();
560
   _delay_ms(1000);	// wait 1sec to display the splash screen
582
   _delay_ms(1000);	// wait 1sec to display the splash screen
852
 
874
 
853
 static float x_home_pos(int extruder) {
875
 static float x_home_pos(int extruder) {
854
   if (extruder == 0)
876
   if (extruder == 0)
855
-    return base_home_pos(X_AXIS) + add_homeing[X_AXIS];
877
+    return base_home_pos(X_AXIS) + add_homing[X_AXIS];
856
   else
878
   else
857
     // In dual carriage mode the extruder offset provides an override of the
879
     // In dual carriage mode the extruder offset provides an override of the
858
     // second X-carriage offset when homed - otherwise X2_HOME_POS is used.
880
     // second X-carriage offset when homed - otherwise X2_HOME_POS is used.
884
       return;
906
       return;
885
     }
907
     }
886
     else if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0) {
908
     else if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0) {
887
-      current_position[X_AXIS] = base_home_pos(X_AXIS) + add_homeing[X_AXIS];
888
-      min_pos[X_AXIS] =          base_min_pos(X_AXIS) + add_homeing[X_AXIS];
889
-      max_pos[X_AXIS] =          min(base_max_pos(X_AXIS) + add_homeing[X_AXIS],
909
+      current_position[X_AXIS] = base_home_pos(X_AXIS) + add_homing[X_AXIS];
910
+      min_pos[X_AXIS] =          base_min_pos(X_AXIS) + add_homing[X_AXIS];
911
+      max_pos[X_AXIS] =          min(base_max_pos(X_AXIS) + add_homing[X_AXIS],
890
                                   max(extruder_offset[X_AXIS][1], X2_MAX_POS) - duplicate_extruder_x_offset);
912
                                   max(extruder_offset[X_AXIS][1], X2_MAX_POS) - duplicate_extruder_x_offset);
891
       return;
913
       return;
892
     }
914
     }
914
      
936
      
915
      for (i=0; i<2; i++)
937
      for (i=0; i<2; i++)
916
      {
938
      {
917
-        delta[i] -= add_homeing[i];
939
+        delta[i] -= add_homing[i];
918
      } 
940
      } 
919
      
941
      
920
-    // SERIAL_ECHOPGM("addhome X="); SERIAL_ECHO(add_homeing[X_AXIS]);
921
-	// SERIAL_ECHOPGM(" addhome Y="); SERIAL_ECHO(add_homeing[Y_AXIS]);
942
+    // SERIAL_ECHOPGM("addhome X="); SERIAL_ECHO(add_homing[X_AXIS]);
943
+	// SERIAL_ECHOPGM(" addhome Y="); SERIAL_ECHO(add_homing[Y_AXIS]);
922
     // SERIAL_ECHOPGM(" addhome Theta="); SERIAL_ECHO(delta[X_AXIS]);
944
     // SERIAL_ECHOPGM(" addhome Theta="); SERIAL_ECHO(delta[X_AXIS]);
923
     // SERIAL_ECHOPGM(" addhome Psi+Theta="); SERIAL_ECHOLN(delta[Y_AXIS]);
945
     // SERIAL_ECHOPGM(" addhome Psi+Theta="); SERIAL_ECHOLN(delta[Y_AXIS]);
924
       
946
       
936
    } 
958
    } 
937
    else
959
    else
938
    {
960
    {
939
-      current_position[axis] = base_home_pos(axis) + add_homeing[axis];
940
-      min_pos[axis] =          base_min_pos(axis) + add_homeing[axis];
941
-      max_pos[axis] =          base_max_pos(axis) + add_homeing[axis];
961
+      current_position[axis] = base_home_pos(axis) + add_homing[axis];
962
+      min_pos[axis] =          base_min_pos(axis) + add_homing[axis];
963
+      max_pos[axis] =          base_max_pos(axis) + add_homing[axis];
942
    }
964
    }
943
 #else
965
 #else
944
-  current_position[axis] = base_home_pos(axis) + add_homeing[axis];
945
-  min_pos[axis] =          base_min_pos(axis) + add_homeing[axis];
946
-  max_pos[axis] =          base_max_pos(axis) + add_homeing[axis];
966
+  current_position[axis] = base_home_pos(axis) + add_homing[axis];
967
+  min_pos[axis] =          base_min_pos(axis) + add_homing[axis];
968
+  max_pos[axis] =          base_max_pos(axis) + add_homing[axis];
947
 #endif
969
 #endif
948
 }
970
 }
949
 
971
 
1432
           HOMEAXIS(Z);
1454
           HOMEAXIS(Z);
1433
 
1455
 
1434
           calculate_delta(current_position);
1456
           calculate_delta(current_position);
1435
-          plan_set_position(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]);		  
1436
-		  
1457
+          plan_set_position(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]);
1458
+
1437
 #else // NOT DELTA
1459
 #else // NOT DELTA
1438
 
1460
 
1439
       home_all_axis = !((code_seen(axis_codes[X_AXIS])) || (code_seen(axis_codes[Y_AXIS])) || (code_seen(axis_codes[Z_AXIS])));
1461
       home_all_axis = !((code_seen(axis_codes[X_AXIS])) || (code_seen(axis_codes[Y_AXIS])) || (code_seen(axis_codes[Z_AXIS])));
1440
-	  
1462
+
1441
       #if Z_HOME_DIR > 0                      // If homing away from BED do Z first
1463
       #if Z_HOME_DIR > 0                      // If homing away from BED do Z first
1442
       if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) {
1464
       if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) {
1443
         HOMEAXIS(Z);
1465
         HOMEAXIS(Z);
1516
 		#ifdef SCARA
1538
 		#ifdef SCARA
1517
 		   current_position[X_AXIS]=code_value();
1539
 		   current_position[X_AXIS]=code_value();
1518
 		#else
1540
 		#else
1519
-		   current_position[X_AXIS]=code_value()+add_homeing[0];
1541
+		   current_position[X_AXIS]=code_value()+add_homing[0];
1520
 		#endif
1542
 		#endif
1521
         }
1543
         }
1522
       }
1544
       }
1526
          #ifdef SCARA
1548
          #ifdef SCARA
1527
 		   current_position[Y_AXIS]=code_value();
1549
 		   current_position[Y_AXIS]=code_value();
1528
 		#else
1550
 		#else
1529
-		   current_position[Y_AXIS]=code_value()+add_homeing[1];
1551
+		   current_position[Y_AXIS]=code_value()+add_homing[1];
1530
 		#endif
1552
 		#endif
1531
         }
1553
         }
1532
       }
1554
       }
1591
 
1613
 
1592
       if(code_seen(axis_codes[Z_AXIS])) {
1614
       if(code_seen(axis_codes[Z_AXIS])) {
1593
         if(code_value_long() != 0) {
1615
         if(code_value_long() != 0) {
1594
-          current_position[Z_AXIS]=code_value()+add_homeing[2];
1616
+          current_position[Z_AXIS]=code_value()+add_homing[2];
1595
         }
1617
         }
1596
       }
1618
       }
1597
       #ifdef ENABLE_AUTO_BED_LEVELING
1619
       #ifdef ENABLE_AUTO_BED_LEVELING
1820
                 	current_position[i] = code_value();  
1842
                 	current_position[i] = code_value();  
1821
 		}
1843
 		}
1822
 		else {
1844
 		else {
1823
-                current_position[i] = code_value()+add_homeing[i];  
1845
+                current_position[i] = code_value()+add_homing[i];  
1824
             	}  
1846
             	}  
1825
 #else
1847
 #else
1826
-		current_position[i] = code_value()+add_homeing[i];
1848
+		current_position[i] = code_value()+add_homing[i];
1827
 #endif
1849
 #endif
1828
             plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1850
             plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1829
            }
1851
            }
2702
       SERIAL_PROTOCOLLN("");
2724
       SERIAL_PROTOCOLLN("");
2703
       
2725
       
2704
       SERIAL_PROTOCOLPGM("SCARA Cal - Theta:");
2726
       SERIAL_PROTOCOLPGM("SCARA Cal - Theta:");
2705
-      SERIAL_PROTOCOL(delta[X_AXIS]+add_homeing[0]);
2727
+      SERIAL_PROTOCOL(delta[X_AXIS]+add_homing[0]);
2706
       SERIAL_PROTOCOLPGM("   Psi+Theta (90):");
2728
       SERIAL_PROTOCOLPGM("   Psi+Theta (90):");
2707
-      SERIAL_PROTOCOL(delta[Y_AXIS]-delta[X_AXIS]-90+add_homeing[1]);
2729
+      SERIAL_PROTOCOL(delta[Y_AXIS]-delta[X_AXIS]-90+add_homing[1]);
2708
       SERIAL_PROTOCOLLN("");
2730
       SERIAL_PROTOCOLLN("");
2709
       
2731
       
2710
       SERIAL_PROTOCOLPGM("SCARA step Cal - Theta:");
2732
       SERIAL_PROTOCOLPGM("SCARA step Cal - Theta:");
2778
         } else {
2800
         } else {
2779
           //reserved for setting filament diameter via UFID or filament measuring device
2801
           //reserved for setting filament diameter via UFID or filament measuring device
2780
           break;
2802
           break;
2803
+        
2804
+          
2781
         }
2805
         }
2782
         tmp_extruder = active_extruder;
2806
         tmp_extruder = active_extruder;
2783
         if(code_seen('T')) {
2807
         if(code_seen('T')) {
2830
       if(code_seen('E')) max_e_jerk = code_value() ;
2854
       if(code_seen('E')) max_e_jerk = code_value() ;
2831
     }
2855
     }
2832
     break;
2856
     break;
2833
-    case 206: // M206 additional homeing offset
2857
+    case 206: // M206 additional homing offset
2834
       for(int8_t i=0; i < 3; i++)
2858
       for(int8_t i=0; i < 3; i++)
2835
       {
2859
       {
2836
-        if(code_seen(axis_codes[i])) add_homeing[i] = code_value();
2860
+        if(code_seen(axis_codes[i])) add_homing[i] = code_value();
2837
       }
2861
       }
2838
 	  #ifdef SCARA
2862
 	  #ifdef SCARA
2839
 	   if(code_seen('T'))       // Theta
2863
 	   if(code_seen('T'))       // Theta
2840
       {
2864
       {
2841
-        add_homeing[0] = code_value() ;
2865
+        add_homing[0] = code_value() ;
2842
       }
2866
       }
2843
       if(code_seen('P'))       // Psi
2867
       if(code_seen('P'))       // Psi
2844
       {
2868
       {
2845
-        add_homeing[1] = code_value() ;
2869
+        add_homing[1] = code_value() ;
2846
       }
2870
       }
2847
 	  #endif
2871
 	  #endif
2848
       break;
2872
       break;
3340
     }
3364
     }
3341
     break;
3365
     break;
3342
 #endif
3366
 #endif
3367
+
3368
+#ifdef FILAMENT_SENSOR
3369
+case 404:  //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width 
3370
+    {
3371
+    #if (FILWIDTH_PIN > -1) 
3372
+    if(code_seen('N')) filament_width_nominal=code_value();
3373
+    else{
3374
+    SERIAL_PROTOCOLPGM("Filament dia (nominal mm):"); 
3375
+    SERIAL_PROTOCOLLN(filament_width_nominal); 
3376
+    }
3377
+    #endif
3378
+    }
3379
+    break; 
3380
+    
3381
+    case 405:  //M405 Turn on filament sensor for control 
3382
+    {
3383
+    
3384
+    
3385
+    if(code_seen('D')) meas_delay_cm=code_value();
3386
+       
3387
+       if(meas_delay_cm> MAX_MEASUREMENT_DELAY)
3388
+       	meas_delay_cm = MAX_MEASUREMENT_DELAY;
3389
+    
3390
+       if(delay_index2 == -1)  //initialize the ring buffer if it has not been done since startup
3391
+    	   {
3392
+    	   int temp_ratio = widthFil_to_size_ratio(); 
3393
+       	    
3394
+       	    for (delay_index1=0; delay_index1<(MAX_MEASUREMENT_DELAY+1); ++delay_index1 ){
3395
+       	              measurement_delay[delay_index1]=temp_ratio-100;  //subtract 100 to scale within a signed byte
3396
+       	        }
3397
+       	    delay_index1=0;
3398
+       	    delay_index2=0;	
3399
+    	   }
3400
+    
3401
+    filament_sensor = true ; 
3402
+    
3403
+    //SERIAL_PROTOCOLPGM("Filament dia (measured mm):"); 
3404
+    //SERIAL_PROTOCOL(filament_width_meas); 
3405
+    //SERIAL_PROTOCOLPGM("Extrusion ratio(%):"); 
3406
+    //SERIAL_PROTOCOL(extrudemultiply); 
3407
+    } 
3408
+    break; 
3409
+    
3410
+    case 406:  //M406 Turn off filament sensor for control 
3411
+    {      
3412
+    filament_sensor = false ; 
3413
+    } 
3414
+    break; 
3415
+  
3416
+    case 407:   //M407 Display measured filament diameter 
3417
+    { 
3418
+     
3419
+    
3420
+    
3421
+    SERIAL_PROTOCOLPGM("Filament dia (measured mm):"); 
3422
+    SERIAL_PROTOCOLLN(filament_width_meas);   
3423
+    } 
3424
+    break; 
3425
+    #endif
3426
+    
3427
+
3428
+
3429
+
3430
+
3343
     case 500: // M500 Store settings in EEPROM
3431
     case 500: // M500 Store settings in EEPROM
3344
     {
3432
     {
3345
         Config_StoreSettings();
3433
         Config_StoreSettings();

+ 30
- 21
Marlin/example_configurations/delta/Configuration.h View File

8
 //===========================================================================
8
 //===========================================================================
9
 //============================= DELTA Printer ===============================
9
 //============================= DELTA Printer ===============================
10
 //===========================================================================
10
 //===========================================================================
11
-// For a Delta printer rplace the configuration files wilth the files in the
11
+// For a Delta printer replace the configuration files with the files in the
12
 // example_configurations/delta directory.
12
 // example_configurations/delta directory.
13
 //
13
 //
14
 
14
 
66
 // 702= Minitronics v1.0
66
 // 702= Minitronics v1.0
67
 // 90 = Alpha OMCA board
67
 // 90 = Alpha OMCA board
68
 // 91 = Final OMCA board
68
 // 91 = Final OMCA board
69
-// 301 = Rambo
69
+// 301= Rambo
70
 // 21 = Elefu Ra Board (v3)
70
 // 21 = Elefu Ra Board (v3)
71
 
71
 
72
 #ifndef MOTHERBOARD
72
 #ifndef MOTHERBOARD
89
 
89
 
90
 #define POWER_SUPPLY 1
90
 #define POWER_SUPPLY 1
91
 
91
 
92
-// Define this to have the electronics keep the powersupply off on startup. If you don't know what this is leave it.
92
+// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it.
93
 // #define PS_DEFAULT_OFF
93
 // #define PS_DEFAULT_OFF
94
 
94
 
95
 //===========================================================================
95
 //===========================================================================
103
 // and processor overload (too many expensive sqrt calls).
103
 // and processor overload (too many expensive sqrt calls).
104
 #define DELTA_SEGMENTS_PER_SECOND 200
104
 #define DELTA_SEGMENTS_PER_SECOND 200
105
 
105
 
106
-// NOTE NB all values for DELTA_* values MOUST be floating point, so always have a decimal point in them
106
+// NOTE NB all values for DELTA_* values MUST be floating point, so always have a decimal point in them
107
 
107
 
108
 // Center-to-center distance of the holes in the diagonal push rods.
108
 // Center-to-center distance of the holes in the diagonal push rods.
109
 #define DELTA_DIAGONAL_ROD 250.0 // mm
109
 #define DELTA_DIAGONAL_ROD 250.0 // mm
132
 // 0 is not used
132
 // 0 is not used
133
 // 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
133
 // 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
134
 // 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
134
 // 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
135
-// 3 is mendel-parts thermistor (4.7k pullup)
135
+// 3 is Mendel-parts thermistor (4.7k pullup)
136
 // 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
136
 // 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
137
 // 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
137
 // 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
138
 // 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
138
 // 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
141
 // 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
141
 // 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
142
 // 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
142
 // 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
143
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
143
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
144
-// 60 is 100k Maker's Tool Works Kapton Bed Thermister
144
+// 60 is 100k Maker's Tool Works Kapton Bed Thermistor
145
 //
145
 //
146
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
146
 //    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
147
 //                          (but gives greater accuracy and more stable PID)
147
 //                          (but gives greater accuracy and more stable PID)
148
 // 51 is 100k thermistor - EPCOS (1k pullup)
148
 // 51 is 100k thermistor - EPCOS (1k pullup)
149
 // 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
149
 // 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
150
 // 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
150
 // 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
151
+//
152
+// 1047 is Pt1000 with 4k7 pullup
153
+// 1010 is Pt1000 with 1k pullup (non standard)
154
+// 147 is Pt100 with 4k7 pullup
155
+// 110 is Pt100 with 1k pullup (non standard)
151
 
156
 
152
 #define TEMP_SENSOR_0 -1
157
 #define TEMP_SENSOR_0 -1
153
 #define TEMP_SENSOR_1 -1
158
 #define TEMP_SENSOR_1 -1
184
 // HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
189
 // HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
185
 //#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
190
 //#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
186
 
191
 
192
+// If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
193
+//#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
194
+//#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
195
+
187
 // PID settings:
196
 // PID settings:
188
 // Comment the following line to disable PID and enable bang-bang.
197
 // Comment the following line to disable PID and enable bang-bang.
189
 #define PIDTEMP
198
 #define PIDTEMP
198
   #define K1 0.95 //smoothing factor within the PID
207
   #define K1 0.95 //smoothing factor within the PID
199
   #define PID_dT ((16.0 * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
208
   #define PID_dT ((16.0 * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
200
 
209
 
201
-// If you are using a preconfigured hotend then you can use one of the value sets by uncommenting it
210
+// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
202
 // Ultimaker
211
 // Ultimaker
203
     #define  DEFAULT_Kp 22.2
212
     #define  DEFAULT_Kp 22.2
204
     #define  DEFAULT_Ki 1.08
213
     #define  DEFAULT_Ki 1.08
205
     #define  DEFAULT_Kd 114
214
     #define  DEFAULT_Kd 114
206
 
215
 
207
-// Makergear
216
+// MakerGear
208
 //    #define  DEFAULT_Kp 7.0
217
 //    #define  DEFAULT_Kp 7.0
209
 //    #define  DEFAULT_Ki 0.1
218
 //    #define  DEFAULT_Ki 0.1
210
 //    #define  DEFAULT_Kd 12
219
 //    #define  DEFAULT_Kd 12
273
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
282
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
274
 
283
 
275
 #ifndef ENDSTOPPULLUPS
284
 #ifndef ENDSTOPPULLUPS
276
-  // fine Enstop settings: Individual Pullups. will be ignored if ENDSTOPPULLUPS is defined
285
+  // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
277
   // #define ENDSTOPPULLUP_XMAX
286
   // #define ENDSTOPPULLUP_XMAX
278
   // #define ENDSTOPPULLUP_YMAX
287
   // #define ENDSTOPPULLUP_YMAX
279
   // #define ENDSTOPPULLUP_ZMAX
288
   // #define ENDSTOPPULLUP_ZMAX
359
   #define BACK_PROBE_BED_POSITION 180
368
   #define BACK_PROBE_BED_POSITION 180
360
   #define FRONT_PROBE_BED_POSITION 20
369
   #define FRONT_PROBE_BED_POSITION 20
361
 
370
 
362
-  // these are the offsets to the prob relative to the extruder tip (Hotend - Probe)
371
+  // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
363
   #define X_PROBE_OFFSET_FROM_EXTRUDER -25
372
   #define X_PROBE_OFFSET_FROM_EXTRUDER -25
364
   #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
373
   #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
365
   #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
374
   #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
380
 //  #define PROBE_SERVO_DEACTIVATION_DELAY 300
389
 //  #define PROBE_SERVO_DEACTIVATION_DELAY 300
381
 
390
 
382
 
391
 
383
-//If you have enabled the Bed Auto Levelling and are using the same Z Probe for Z Homing,
392
+//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
384
 //it is highly recommended you let this Z_SAFE_HOMING enabled!!!
393
 //it is highly recommended you let this Z_SAFE_HOMING enabled!!!
385
 
394
 
386
   #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with probe outside the bed area.
395
   #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with probe outside the bed area.
407
 //Manual homing switch locations:
416
 //Manual homing switch locations:
408
 
417
 
409
 #define MANUAL_HOME_POSITIONS  // MANUAL_*_HOME_POS below will be used
418
 #define MANUAL_HOME_POSITIONS  // MANUAL_*_HOME_POS below will be used
410
-// For deltabots this means top and center of the cartesian print volume.
419
+// For deltabots this means top and center of the Cartesian print volume.
411
 #define MANUAL_X_HOME_POS 0
420
 #define MANUAL_X_HOME_POS 0
412
 #define MANUAL_Y_HOME_POS 0
421
 #define MANUAL_Y_HOME_POS 0
413
 #define MANUAL_Z_HOME_POS 250 // For delta: Distance between nozzle and print surface after homing.
422
 #define MANUAL_Z_HOME_POS 250 // For delta: Distance between nozzle and print surface after homing.
443
 //===========================================================================
452
 //===========================================================================
444
 
453
 
445
 // EEPROM
454
 // EEPROM
446
-// the microcontroller can store settings in the EEPROM, e.g. max velocity...
447
-// M500 - stores paramters in EEPROM
455
+// The microcontroller can store settings in the EEPROM, e.g. max velocity...
456
+// M500 - stores parameters in EEPROM
448
 // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
457
 // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
449
 // M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
458
 // M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
450
-//define this to enable eeprom support
459
+//define this to enable EEPROM support
451
 //#define EEPROM_SETTINGS
460
 //#define EEPROM_SETTINGS
452
 //to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
461
 //to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
453
 // please keep turned on if you can.
462
 // please keep turned on if you can.
463
 #define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
472
 #define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
464
 
473
 
465
 //LCD and SD support
474
 //LCD and SD support
466
-//#define ULTRA_LCD  //general lcd support, also 16x2
475
+//#define ULTRA_LCD  //general LCD support, also 16x2
467
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
476
 //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
468
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
477
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
469
 //#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
478
 //#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
470
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
479
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
471
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
480
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
472
-//#define ULTIMAKERCONTROLLER //as available from the ultimaker online store.
473
-//#define ULTIPANEL  //the ultipanel as on thingiverse
481
+//#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
482
+//#define ULTIPANEL  //the UltiPanel as on Thingiverse
474
 
483
 
475
 // The MaKr3d Makr-Panel with graphic controller and SD support
484
 // The MaKr3d Makr-Panel with graphic controller and SD support
476
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
485
 // http://reprap.org/wiki/MaKr3d_MaKrPanel
594
     #define LCD_WIDTH 20
603
     #define LCD_WIDTH 20
595
     #define LCD_HEIGHT 4
604
     #define LCD_HEIGHT 4
596
   #endif
605
   #endif
597
-#else //no panel but just lcd
606
+#else //no panel but just LCD
598
   #ifdef ULTRA_LCD
607
   #ifdef ULTRA_LCD
599
   #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
608
   #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
600
     #define LCD_WIDTH 20
609
     #define LCD_WIDTH 20
616
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
625
 // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
617
 //#define FAST_PWM_FAN
626
 //#define FAST_PWM_FAN
618
 
627
 
619
-// Temperature status leds that display the hotend and bet temperature.
620
-// If alle hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
628
+// Temperature status LEDs that display the hotend and bet temperature.
629
+// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
621
 // Otherwise the RED led is on. There is 1C hysteresis.
630
 // Otherwise the RED led is on. There is 1C hysteresis.
622
 //#define TEMP_STAT_LEDS
631
 //#define TEMP_STAT_LEDS
623
 
632
 

+ 14
- 3
Marlin/language.h View File

155
 	#define MSG_AUTOSTART "Autostart"
155
 	#define MSG_AUTOSTART "Autostart"
156
 	#define MSG_DISABLE_STEPPERS "Disable steppers"
156
 	#define MSG_DISABLE_STEPPERS "Disable steppers"
157
 	#define MSG_AUTO_HOME "Auto home"
157
 	#define MSG_AUTO_HOME "Auto home"
158
+	#define MSG_SET_HOME_OFFSETS "Set home offsets"
158
 	#define MSG_SET_ORIGIN "Set origin"
159
 	#define MSG_SET_ORIGIN "Set origin"
159
 	#define MSG_PREHEAT_PLA "Preheat PLA"
160
 	#define MSG_PREHEAT_PLA "Preheat PLA"
160
 	#define MSG_PREHEAT_PLA0 "Preheat PLA 1"
161
 	#define MSG_PREHEAT_PLA0 "Preheat PLA 1"
279
 	#define MSG_AUTOSTART "Autostart"
280
 	#define MSG_AUTOSTART "Autostart"
280
 	#define MSG_DISABLE_STEPPERS "Wylacz silniki"
281
 	#define MSG_DISABLE_STEPPERS "Wylacz silniki"
281
 	#define MSG_AUTO_HOME "Auto. poz. zerowa"
282
 	#define MSG_AUTO_HOME "Auto. poz. zerowa"
283
+	#define MSG_SET_HOME_OFFSETS "Set home offsets"
282
 	#define MSG_SET_ORIGIN "Ustaw punkt zero"
284
 	#define MSG_SET_ORIGIN "Ustaw punkt zero"
283
 	#define MSG_PREHEAT_PLA "Rozgrzej PLA"
285
 	#define MSG_PREHEAT_PLA "Rozgrzej PLA"
284
 	#define MSG_PREHEAT_PLA0 "Rozgrzej PLA 1"
286
 	#define MSG_PREHEAT_PLA0 "Rozgrzej PLA 1"
406
 	#define MSG_AUTOSTART "Demarrage auto"
408
 	#define MSG_AUTOSTART "Demarrage auto"
407
 	#define MSG_DISABLE_STEPPERS "Arreter moteurs"
409
 	#define MSG_DISABLE_STEPPERS "Arreter moteurs"
408
 	#define MSG_AUTO_HOME "Home auto."
410
 	#define MSG_AUTO_HOME "Home auto."
411
+	#define MSG_SET_HOME_OFFSETS "Set home offsets"
409
 	#define MSG_SET_ORIGIN "Regler origine"
412
 	#define MSG_SET_ORIGIN "Regler origine"
410
 	#define MSG_PREHEAT_PLA " Prechauffage PLA"
413
 	#define MSG_PREHEAT_PLA " Prechauffage PLA"
411
 	#define MSG_PREHEAT_PLA0 "Prechauff. PLA 1"
414
 	#define MSG_PREHEAT_PLA0 "Prechauff. PLA 1"
412
-        #define MSG_PREHEAT_PLA1 "Prechauff. PLA 2"
415
+    #define MSG_PREHEAT_PLA1 "Prechauff. PLA 2"
413
 	#define MSG_PREHEAT_PLA2 "Prechauff. PLA 3"
416
 	#define MSG_PREHEAT_PLA2 "Prechauff. PLA 3"
414
 	#define MSG_PREHEAT_PLA012 "Prech. PLA Tout"
417
 	#define MSG_PREHEAT_PLA012 "Prech. PLA Tout"
415
 	#define MSG_PREHEAT_PLA_BEDONLY "Prech. PLA Plateau"
418
 	#define MSG_PREHEAT_PLA_BEDONLY "Prech. PLA Plateau"
534
 	#define MSG_AUTOSTART        "Autostart"
537
 	#define MSG_AUTOSTART        "Autostart"
535
 	#define MSG_DISABLE_STEPPERS "Stepper abschalt."
538
 	#define MSG_DISABLE_STEPPERS "Stepper abschalt."
536
 	#define MSG_AUTO_HOME        "Auto Nullpunkt"
539
 	#define MSG_AUTO_HOME        "Auto Nullpunkt"
540
+	#define MSG_SET_HOME_OFFSETS "Set home offsets"
537
 	#define MSG_SET_ORIGIN       "Setze Nullpunkt"
541
 	#define MSG_SET_ORIGIN       "Setze Nullpunkt"
538
 	#define MSG_PREHEAT_PLA      "Vorwärmen PLA"
542
 	#define MSG_PREHEAT_PLA      "Vorwärmen PLA"
539
 	#define MSG_PREHEAT_PLA0     "Vorwärmen PLA 1"
543
 	#define MSG_PREHEAT_PLA0     "Vorwärmen PLA 1"
661
 	#define MSG_AUTOSTART " Autostart"
665
 	#define MSG_AUTOSTART " Autostart"
662
 	#define MSG_DISABLE_STEPPERS "Apagar motores"
666
 	#define MSG_DISABLE_STEPPERS "Apagar motores"
663
 	#define MSG_AUTO_HOME "Llevar al origen"
667
 	#define MSG_AUTO_HOME "Llevar al origen"
668
+	#define MSG_SET_HOME_OFFSETS "Set home offsets"
664
 	#define MSG_SET_ORIGIN "Establecer cero"
669
 	#define MSG_SET_ORIGIN "Establecer cero"
665
 	#define MSG_PREHEAT_PLA "Precalentar PLA"
670
 	#define MSG_PREHEAT_PLA "Precalentar PLA"
666
 	#define MSG_PREHEAT_PLA0 "Precalentar PLA 1"
671
 	#define MSG_PREHEAT_PLA0 "Precalentar PLA 1"
794
 	#define MSG_AUTOSTART						"Автостарт"
799
 	#define MSG_AUTOSTART						"Автостарт"
795
 	#define MSG_DISABLE_STEPPERS 				"Выкл. двигатели"
800
 	#define MSG_DISABLE_STEPPERS 				"Выкл. двигатели"
796
 	#define MSG_AUTO_HOME						"Парковка"
801
 	#define MSG_AUTO_HOME						"Парковка"
802
+	#define MSG_SET_HOME_OFFSETS				"Set home offsets"
797
 	#define MSG_SET_ORIGIN						"Запомнить ноль"
803
 	#define MSG_SET_ORIGIN						"Запомнить ноль"
798
 	#define MSG_PREHEAT_PLA 					"Преднагрев PLA"
804
 	#define MSG_PREHEAT_PLA 					"Преднагрев PLA"
799
 	#define MSG_PREHEAT_PLA0					"Преднагрев PLA0"
805
 	#define MSG_PREHEAT_PLA0					"Преднагрев PLA0"
885
 	#define MSG_KILLED							"УБИТО."
891
 	#define MSG_KILLED							"УБИТО."
886
 	#define MSG_STOPPED							"ОСТАНОВЛЕНО."
892
 	#define MSG_STOPPED							"ОСТАНОВЛЕНО."
887
 	#define MSG_CONTROL_RETRACT					"Откат mm:"
893
 	#define MSG_CONTROL_RETRACT					"Откат mm:"
888
-	#define MSG_CONTROL_RETRACT_SWAP				"своп Откат mm:"
894
+	#define MSG_CONTROL_RETRACT_SWAP			"своп Откат mm:"
889
 	#define MSG_CONTROL_RETRACTF				"Откат  V:"
895
 	#define MSG_CONTROL_RETRACTF				"Откат  V:"
890
 	#define MSG_CONTROL_RETRACT_ZLIFT			"Прыжок mm:"
896
 	#define MSG_CONTROL_RETRACT_ZLIFT			"Прыжок mm:"
891
 	#define MSG_CONTROL_RETRACT_RECOVER			"Возврат +mm:"
897
 	#define MSG_CONTROL_RETRACT_RECOVER			"Возврат +mm:"
892
-	#define MSG_CONTROL_RETRACT_RECOVER_SWAP		"своп Возврат +mm:"
898
+	#define MSG_CONTROL_RETRACT_RECOVER_SWAP	"своп Возврат +mm:"
893
 	#define MSG_CONTROL_RETRACT_RECOVERF		"Возврат  V:"
899
 	#define MSG_CONTROL_RETRACT_RECOVERF		"Возврат  V:"
894
 	#define MSG_AUTORETRACT						"АвтоОткат:"
900
 	#define MSG_AUTORETRACT						"АвтоОткат:"
895
 	#define MSG_FILAMENTCHANGE 					"Change filament"
901
 	#define MSG_FILAMENTCHANGE 					"Change filament"
919
 	#define MSG_AUTOSTART            "Autostart"
925
 	#define MSG_AUTOSTART            "Autostart"
920
 	#define MSG_DISABLE_STEPPERS     "Disabilita Motori"
926
 	#define MSG_DISABLE_STEPPERS     "Disabilita Motori"
921
 	#define MSG_AUTO_HOME            "Auto Home"
927
 	#define MSG_AUTO_HOME            "Auto Home"
928
+	#define MSG_SET_HOME_OFFSETS     "Set home offsets"
922
 	#define MSG_SET_ORIGIN           "Imposta Origine"
929
 	#define MSG_SET_ORIGIN           "Imposta Origine"
923
 	#define MSG_PREHEAT_PLA          "Preriscalda PLA"
930
 	#define MSG_PREHEAT_PLA          "Preriscalda PLA"
924
 	#define MSG_PREHEAT_PLA0         "Preriscalda PLA 1"
931
 	#define MSG_PREHEAT_PLA0         "Preriscalda PLA 1"
1044
 	#define MSG_AUTOSTART "Autostart"
1051
 	#define MSG_AUTOSTART "Autostart"
1045
 	#define MSG_DISABLE_STEPPERS " Apagar motores"
1052
 	#define MSG_DISABLE_STEPPERS " Apagar motores"
1046
 	#define MSG_AUTO_HOME "Ir para origen"
1053
 	#define MSG_AUTO_HOME "Ir para origen"
1054
+	#define MSG_SET_HOME_OFFSETS "Set home offsets"
1047
 	#define MSG_SET_ORIGIN "Estabelecer orig."
1055
 	#define MSG_SET_ORIGIN "Estabelecer orig."
1048
 	#define MSG_PREHEAT_PLA "Pre-aquecer PLA"
1056
 	#define MSG_PREHEAT_PLA "Pre-aquecer PLA"
1049
 	#define MSG_PREHEAT_PLA0 " pre-aquecer PLA 1"
1057
 	#define MSG_PREHEAT_PLA0 " pre-aquecer PLA 1"
1176
 	#define MSG_AUTOSTART "Automaatti"
1184
 	#define MSG_AUTOSTART "Automaatti"
1177
 	#define MSG_DISABLE_STEPPERS "Vapauta moottorit"
1185
 	#define MSG_DISABLE_STEPPERS "Vapauta moottorit"
1178
 	#define MSG_AUTO_HOME "Aja referenssiin"
1186
 	#define MSG_AUTO_HOME "Aja referenssiin"
1187
+	#define MSG_SET_HOME_OFFSETS "Set home offsets"
1179
 	#define MSG_SET_ORIGIN "Aseta origo"
1188
 	#define MSG_SET_ORIGIN "Aseta origo"
1180
 	#define MSG_PREHEAT_PLA "Esilammita PLA"
1189
 	#define MSG_PREHEAT_PLA "Esilammita PLA"
1181
 	#define MSG_PREHEAT_PLA0 "Esilammita PLA 1"
1190
 	#define MSG_PREHEAT_PLA0 "Esilammita PLA 1"
1299
 	#define MSG_AUTOSTART " Autostart"
1308
 	#define MSG_AUTOSTART " Autostart"
1300
 	#define MSG_DISABLE_STEPPERS "Amortar motors"
1309
 	#define MSG_DISABLE_STEPPERS "Amortar motors"
1301
 	#define MSG_AUTO_HOME "Levar a l'orichen"
1310
 	#define MSG_AUTO_HOME "Levar a l'orichen"
1311
+	#define MSG_SET_HOME_OFFSETS "Set home offsets"
1302
 	#define MSG_SET_ORIGIN "Establir zero"
1312
 	#define MSG_SET_ORIGIN "Establir zero"
1303
 	#define MSG_PREHEAT_PLA "Precalentar PLA"
1313
 	#define MSG_PREHEAT_PLA "Precalentar PLA"
1304
 	#define MSG_PREHEAT_PLA0 "Precalentar PLA0"
1314
 	#define MSG_PREHEAT_PLA0 "Precalentar PLA0"
1431
 	#define MSG_AUTOSTART "Autostart"
1441
 	#define MSG_AUTOSTART "Autostart"
1432
 	#define MSG_DISABLE_STEPPERS "Motoren uit"
1442
 	#define MSG_DISABLE_STEPPERS "Motoren uit"
1433
 	#define MSG_AUTO_HOME "Auto home"
1443
 	#define MSG_AUTO_HOME "Auto home"
1444
+	#define MSG_SET_HOME_OFFSETS "Set home offsets"
1434
 	#define MSG_SET_ORIGIN "Nulpunt instellen"
1445
 	#define MSG_SET_ORIGIN "Nulpunt instellen"
1435
 	#define MSG_PREHEAT_PLA "PLA voorverwarmen"
1446
 	#define MSG_PREHEAT_PLA "PLA voorverwarmen"
1436
 	#define MSG_PREHEAT_PLA0 "PLA voorverw. 0"
1447
 	#define MSG_PREHEAT_PLA0 "PLA voorverw. 0"

+ 8
- 0
Marlin/motion_control.cpp View File

44
   if (angular_travel < 0) { angular_travel += 2*M_PI; }
44
   if (angular_travel < 0) { angular_travel += 2*M_PI; }
45
   if (isclockwise) { angular_travel -= 2*M_PI; }
45
   if (isclockwise) { angular_travel -= 2*M_PI; }
46
   
46
   
47
+  //20141002:full circle for G03 did not work, e.g. G03 X80 Y80 I20 J0 F2000 is giving an Angle of zero so head is not moving
48
+  //to compensate when start pos = target pos && angle is zero -> angle = 2Pi
49
+  if (position[axis_0] == target[axis_0] && position[axis_1] == target[axis_1] && angular_travel == 0)
50
+  {
51
+	  angular_travel += 2*M_PI;
52
+  }
53
+  //end fix G03
54
+  
47
   float millimeters_of_travel = hypot(angular_travel*radius, fabs(linear_travel));
55
   float millimeters_of_travel = hypot(angular_travel*radius, fabs(linear_travel));
48
   if (millimeters_of_travel < 0.001) { return; }
56
   if (millimeters_of_travel < 0.001) { return; }
49
   uint16_t segments = floor(millimeters_of_travel/MM_PER_ARC_SEGMENT);
57
   uint16_t segments = floor(millimeters_of_travel/MM_PER_ARC_SEGMENT);

+ 22
- 6
Marlin/pins.h View File

531
 * Arduino Mega pin assignment
531
 * Arduino Mega pin assignment
532
 *
532
 *
533
 ****************************************************************************************/
533
 ****************************************************************************************/
534
-#if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77 || MOTHERBOARD == 67 || MOTHERBOARD == 68
534
+#if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 36 || MOTHERBOARD == 77 || MOTHERBOARD == 67 || MOTHERBOARD == 68
535
 #define KNOWN_BOARD 1
535
 #define KNOWN_BOARD 1
536
 
536
 
537
 //////////////////FIX THIS//////////////
537
 //////////////////FIX THIS//////////////
547
 // #define RAMPS_V_1_0
547
 // #define RAMPS_V_1_0
548
 
548
 
549
 
549
 
550
-#if MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77 || MOTHERBOARD == 67 || MOTHERBOARD == 68
550
+#if MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 36 ||  MOTHERBOARD == 77 || MOTHERBOARD == 67 || MOTHERBOARD == 68
551
 
551
 
552
   #define LARGE_FLASH true
552
   #define LARGE_FLASH true
553
 
553
 
628
     #define E1_DIR_PIN         34
628
     #define E1_DIR_PIN         34
629
     #define E1_ENABLE_PIN      30
629
     #define E1_ENABLE_PIN      30
630
 
630
 
631
+#if MOTHERBOARD == 34  //FMM added for Filament Extruder
632
+#ifdef FILAMENT_SENSOR
633
+	  //define analog pin for the filament width sensor input
634
+	  //Use the RAMPS 1.4 Analog input 5 on the AUX2 connector
635
+      #define FILWIDTH_PIN        5
636
+#endif
637
+#endif
638
+
639
+
631
     #if MOTHERBOARD == 68
640
     #if MOTHERBOARD == 68
632
       #define E2_STEP_PIN        23
641
       #define E2_STEP_PIN        23
633
       #define E2_DIR_PIN         25
642
       #define E2_DIR_PIN         25
653
     #define FAN_PIN            4 // IO pin. Buffer needed
662
     #define FAN_PIN            4 // IO pin. Buffer needed
654
   #endif
663
   #endif
655
 
664
 
656
-  #if MOTHERBOARD == 77
665
+  #if MOTHERBOARD == 77 || MOTHERBOARD == 36
657
     #define FAN_PIN            8
666
     #define FAN_PIN            8
658
   #endif
667
   #endif
659
 
668
 
709
     #define TEMP_2_PIN         -1   // ANALOG NUMBERING
718
     #define TEMP_2_PIN         -1   // ANALOG NUMBERING
710
   #endif
719
   #endif
711
 
720
 
712
-  #if MOTHERBOARD == 35
721
+  #if MOTHERBOARD == 35 || MOTHERBOARD == 36
713
     #define HEATER_BED_PIN     -1    // NO BED
722
     #define HEATER_BED_PIN     -1    // NO BED
714
   #else
723
   #else
715
     #if MOTHERBOARD == 77
724
     #if MOTHERBOARD == 77
1762
   #define Z_STOP_PIN         36
1771
   #define Z_STOP_PIN         36
1763
   #define TEMP_0_PIN          1  // Extruder / Analog pin numbering
1772
   #define TEMP_0_PIN          1  // Extruder / Analog pin numbering
1764
   #define TEMP_BED_PIN        0  // Bed / Analog pin numbering
1773
   #define TEMP_BED_PIN        0  // Bed / Analog pin numbering
1774
+  #ifdef FILAMENT_SENSOR
1775
+   #define FILWIDTH_PIN        2
1776
+  #endif //FILAMENT_SENSOR
1765
 #endif
1777
 #endif
1766
 
1778
 
1767
 #define TEMP_1_PIN         -1
1779
 #define TEMP_1_PIN         -1
2078
 #define Z_DIR_PIN          28
2090
 #define Z_DIR_PIN          28
2079
 #define Z_STOP_PIN         30
2091
 #define Z_STOP_PIN         30
2080
 
2092
 
2081
-#define E0_STEP_PIN         17
2082
-#define E0_DIR_PIN          21
2093
+#define E0_STEP_PIN        17
2094
+#define E0_DIR_PIN         21
2083
 
2095
 
2084
 #define LED_PIN            -1
2096
 #define LED_PIN            -1
2085
 
2097
 
2396
   #endif
2408
   #endif
2397
 #endif //ULTRA_LCD
2409
 #endif //ULTRA_LCD
2398
 
2410
 
2411
+#ifdef FILAMENT_SENSOR
2412
+  //Filip added pin for Filament sensor analog input 
2413
+  #define FILWIDTH_PIN        3
2414
+#endif //FILAMENT_SENSOR
2399
 
2415
 
2400
 #endif
2416
 #endif
2401
 
2417
 

+ 47
- 0
Marlin/planner.cpp View File

119
 static long y_segment_time[3]={MAX_FREQ_TIME + 1,0,0};
119
 static long y_segment_time[3]={MAX_FREQ_TIME + 1,0,0};
120
 #endif
120
 #endif
121
 
121
 
122
+#ifdef FILAMENT_SENSOR
123
+ static char meas_sample; //temporary variable to hold filament measurement sample
124
+#endif
125
+
122
 // Returns the index of the next block in the ring buffer
126
 // Returns the index of the next block in the ring buffer
123
 // NOTE: Removed modulo (%) operator, which uses an expensive divide and multiplication.
127
 // NOTE: Removed modulo (%) operator, which uses an expensive divide and multiplication.
124
 static int8_t next_block_index(int8_t block_index) {
128
 static int8_t next_block_index(int8_t block_index) {
762
   block->nominal_speed = block->millimeters * inverse_second; // (mm/sec) Always > 0
766
   block->nominal_speed = block->millimeters * inverse_second; // (mm/sec) Always > 0
763
   block->nominal_rate = ceil(block->step_event_count * inverse_second); // (step/sec) Always > 0
767
   block->nominal_rate = ceil(block->step_event_count * inverse_second); // (step/sec) Always > 0
764
 
768
 
769
+#ifdef FILAMENT_SENSOR
770
+  //FMM update ring buffer used for delay with filament measurements
771
+  
772
+  
773
+    if((extruder==FILAMENT_SENSOR_EXTRUDER_NUM) && (delay_index2 > -1))  //only for extruder with filament sensor and if ring buffer is initialized
774
+  	  {
775
+    delay_dist = delay_dist + delta_mm[E_AXIS];  //increment counter with next move in e axis
776
+  
777
+    while (delay_dist >= (10*(MAX_MEASUREMENT_DELAY+1)))  //check if counter is over max buffer size in mm
778
+      	  delay_dist = delay_dist - 10*(MAX_MEASUREMENT_DELAY+1);  //loop around the buffer
779
+    while (delay_dist<0)
780
+    	  delay_dist = delay_dist + 10*(MAX_MEASUREMENT_DELAY+1); //loop around the buffer
781
+      
782
+    delay_index1=delay_dist/10.0;  //calculate index
783
+    
784
+    //ensure the number is within range of the array after converting from floating point
785
+    if(delay_index1<0)
786
+    	delay_index1=0;
787
+    else if (delay_index1>MAX_MEASUREMENT_DELAY)
788
+    	delay_index1=MAX_MEASUREMENT_DELAY;
789
+    	
790
+    if(delay_index1 != delay_index2)  //moved index
791
+  	  {
792
+    	meas_sample=widthFil_to_size_ratio()-100;  //subtract off 100 to reduce magnitude - to store in a signed char
793
+  	  }
794
+    while( delay_index1 != delay_index2)
795
+  	  {
796
+  	  delay_index2 = delay_index2 + 1;
797
+  	if(delay_index2>MAX_MEASUREMENT_DELAY)
798
+  			  delay_index2=delay_index2-(MAX_MEASUREMENT_DELAY+1);  //loop around buffer when incrementing
799
+  	  if(delay_index2<0)
800
+  		delay_index2=0;
801
+  	  else if (delay_index2>MAX_MEASUREMENT_DELAY)
802
+  		delay_index2=MAX_MEASUREMENT_DELAY;  
803
+  	  
804
+  	  measurement_delay[delay_index2]=meas_sample;
805
+  	  }
806
+    	
807
+    
808
+  	  }
809
+#endif
810
+
811
+
765
   // Calculate and limit speed in mm/sec for each axis
812
   // Calculate and limit speed in mm/sec for each axis
766
   float current_speed[4];
813
   float current_speed[4];
767
   float speed_factor = 1.0; //factor <=1 do decrease speed
814
   float speed_factor = 1.0; //factor <=1 do decrease speed

+ 1
- 1
Marlin/stepper.cpp View File

1241
   pinMode(Y_MS1_PIN,OUTPUT);
1241
   pinMode(Y_MS1_PIN,OUTPUT);
1242
   pinMode(Y_MS2_PIN,OUTPUT);
1242
   pinMode(Y_MS2_PIN,OUTPUT);
1243
   pinMode(Z_MS1_PIN,OUTPUT);
1243
   pinMode(Z_MS1_PIN,OUTPUT);
1244
-  pinMode(Z_MS2_PIN,OUTPUT);  
1244
+  pinMode(Z_MS2_PIN,OUTPUT);
1245
   pinMode(E0_MS1_PIN,OUTPUT);
1245
   pinMode(E0_MS1_PIN,OUTPUT);
1246
   pinMode(E0_MS2_PIN,OUTPUT);
1246
   pinMode(E0_MS2_PIN,OUTPUT);
1247
   for(int i=0;i<=4;i++) microstep_mode(i,microstep_modes[i]);
1247
   for(int i=0;i<=4;i++) microstep_mode(i,microstep_modes[i]);

+ 117
- 6
Marlin/temperature.cpp View File

74
 #ifdef BABYSTEPPING
74
 #ifdef BABYSTEPPING
75
   volatile int babystepsTodo[3]={0,0,0};
75
   volatile int babystepsTodo[3]={0,0,0};
76
 #endif
76
 #endif
77
-  
77
+
78
+#ifdef FILAMENT_SENSOR
79
+  int current_raw_filwidth = 0;  //Holds measured filament diameter - one extruder only
80
+#endif  
78
 //===========================================================================
81
 //===========================================================================
79
 //=============================private variables============================
82
 //=============================private variables============================
80
 //===========================================================================
83
 //===========================================================================
161
 #define SOFT_PWM_SCALE 0
164
 #define SOFT_PWM_SCALE 0
162
 #endif
165
 #endif
163
 
166
 
167
+#ifdef FILAMENT_SENSOR
168
+  static int meas_shift_index;  //used to point to a delayed sample in buffer for filament width sensor
169
+#endif
164
 //===========================================================================
170
 //===========================================================================
165
 //=============================   functions      ============================
171
 //=============================   functions      ============================
166
 //===========================================================================
172
 //===========================================================================
604
       }
610
       }
605
     #endif
611
     #endif
606
   #endif
612
   #endif
613
+  
614
+//code for controlling the extruder rate based on the width sensor 
615
+#ifdef FILAMENT_SENSOR
616
+  if(filament_sensor) 
617
+	{
618
+	meas_shift_index=delay_index1-meas_delay_cm;
619
+		  if(meas_shift_index<0)
620
+			  meas_shift_index = meas_shift_index + (MAX_MEASUREMENT_DELAY+1);  //loop around buffer if needed
621
+		  
622
+		  //get the delayed info and add 100 to reconstitute to a percent of the nominal filament diameter
623
+		  //then square it to get an area
624
+		  
625
+		  if(meas_shift_index<0)
626
+			  meas_shift_index=0;
627
+		  else if (meas_shift_index>MAX_MEASUREMENT_DELAY)
628
+			  meas_shift_index=MAX_MEASUREMENT_DELAY;
629
+		  
630
+		     volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] = pow((float)(100+measurement_delay[meas_shift_index])/100.0,2);
631
+		     if (volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] <0.01)
632
+		    	 volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]=0.01;
633
+	}
634
+#endif
607
 }
635
 }
608
 
636
 
609
 #define PGM_RD_W(x)   (short)pgm_read_word(&x)
637
 #define PGM_RD_W(x)   (short)pgm_read_word(&x)
697
     #ifdef TEMP_SENSOR_1_AS_REDUNDANT
725
     #ifdef TEMP_SENSOR_1_AS_REDUNDANT
698
       redundant_temperature = analog2temp(redundant_temperature_raw, 1);
726
       redundant_temperature = analog2temp(redundant_temperature_raw, 1);
699
     #endif
727
     #endif
728
+    #ifdef FILAMENT_SENSOR  && (FILWIDTH_PIN > -1)    //check if a sensor is supported 
729
+      filament_width_meas = analog2widthFil();
730
+    #endif  
700
     //Reset the watchdog after we know we have a temperature measurement.
731
     //Reset the watchdog after we know we have a temperature measurement.
701
     watchdog_reset();
732
     watchdog_reset();
702
 
733
 
705
     CRITICAL_SECTION_END;
736
     CRITICAL_SECTION_END;
706
 }
737
 }
707
 
738
 
739
+
740
+// For converting raw Filament Width to milimeters 
741
+#ifdef FILAMENT_SENSOR
742
+float analog2widthFil() { 
743
+return current_raw_filwidth/16383.0*5.0; 
744
+//return current_raw_filwidth; 
745
+} 
746
+ 
747
+// For converting raw Filament Width to a ratio 
748
+int widthFil_to_size_ratio() { 
749
+ 
750
+float temp; 
751
+      
752
+temp=filament_width_meas;
753
+if(filament_width_meas<MEASURED_LOWER_LIMIT)
754
+	temp=filament_width_nominal;  //assume sensor cut out
755
+else if (filament_width_meas>MEASURED_UPPER_LIMIT)
756
+	temp= MEASURED_UPPER_LIMIT;
757
+
758
+
759
+return(filament_width_nominal/temp*100); 
760
+
761
+
762
+} 
763
+#endif
764
+
765
+
766
+
767
+
768
+
708
 void tp_init()
769
 void tp_init()
709
 {
770
 {
710
 #if (MOTHERBOARD == 80) && ((TEMP_SENSOR_0==-1)||(TEMP_SENSOR_1==-1)||(TEMP_SENSOR_2==-1)||(TEMP_SENSOR_BED==-1))
771
 #if (MOTHERBOARD == 80) && ((TEMP_SENSOR_0==-1)||(TEMP_SENSOR_1==-1)||(TEMP_SENSOR_2==-1)||(TEMP_SENSOR_BED==-1))
804
     #endif
865
     #endif
805
   #endif
866
   #endif
806
   
867
   
868
+  //Added for Filament Sensor 
869
+  #ifdef FILAMENT_SENSOR
870
+   #if defined(FILWIDTH_PIN) && (FILWIDTH_PIN > -1) 
871
+	#if FILWIDTH_PIN < 8 
872
+       	   DIDR0 |= 1<<FILWIDTH_PIN;  
873
+	#else 
874
+       	   DIDR2 |= 1<<(FILWIDTH_PIN - 8);  
875
+	#endif 
876
+   #endif
877
+  #endif
878
+  
807
   // Use timer0 for temperature measurement
879
   // Use timer0 for temperature measurement
808
   // Interleave temperature interrupt with millies interrupt
880
   // Interleave temperature interrupt with millies interrupt
809
   OCR0B = 128;
881
   OCR0B = 128;
1116
   static unsigned long raw_temp_1_value = 0;
1188
   static unsigned long raw_temp_1_value = 0;
1117
   static unsigned long raw_temp_2_value = 0;
1189
   static unsigned long raw_temp_2_value = 0;
1118
   static unsigned long raw_temp_bed_value = 0;
1190
   static unsigned long raw_temp_bed_value = 0;
1119
-  static unsigned char temp_state = 8;
1191
+  static unsigned char temp_state = 10;
1120
   static unsigned char pwm_count = (1 << SOFT_PWM_SCALE);
1192
   static unsigned char pwm_count = (1 << SOFT_PWM_SCALE);
1121
   static unsigned char soft_pwm_0;
1193
   static unsigned char soft_pwm_0;
1122
   #if (EXTRUDERS > 1) || defined(HEATERS_PARALLEL)
1194
   #if (EXTRUDERS > 1) || defined(HEATERS_PARALLEL)
1129
   static unsigned char soft_pwm_b;
1201
   static unsigned char soft_pwm_b;
1130
   #endif
1202
   #endif
1131
   
1203
   
1204
+  #if defined(FILWIDTH_PIN) &&(FILWIDTH_PIN > -1)
1205
+   static unsigned long raw_filwidth_value = 0;  //added for filament width sensor
1206
+  #endif
1207
+  
1132
   if(pwm_count == 0){
1208
   if(pwm_count == 0){
1133
     soft_pwm_0 = soft_pwm[0];
1209
     soft_pwm_0 = soft_pwm[0];
1134
     if(soft_pwm_0 > 0) { 
1210
     if(soft_pwm_0 > 0) { 
1255
       #if defined(TEMP_2_PIN) && (TEMP_2_PIN > -1)
1331
       #if defined(TEMP_2_PIN) && (TEMP_2_PIN > -1)
1256
         raw_temp_2_value += ADC;
1332
         raw_temp_2_value += ADC;
1257
       #endif
1333
       #endif
1258
-      temp_state = 0;
1259
-      temp_count++;
1334
+      temp_state = 8;//change so that Filament Width is also measured
1335
+      
1260
       break;
1336
       break;
1261
-    case 8: //Startup, delay initial temp reading a tiny bit so the hardware can settle.
1337
+    case 8: //Prepare FILWIDTH 
1338
+     #if defined(FILWIDTH_PIN) && (FILWIDTH_PIN> -1) 
1339
+      #if FILWIDTH_PIN>7 
1340
+         ADCSRB = 1<<MUX5;
1341
+      #else
1342
+         ADCSRB = 0; 
1343
+      #endif 
1344
+      ADMUX = ((1 << REFS0) | (FILWIDTH_PIN & 0x07)); 
1345
+      ADCSRA |= 1<<ADSC; // Start conversion 
1346
+     #endif 
1347
+     lcd_buttons_update();       
1348
+     temp_state = 9; 
1349
+     break; 
1350
+    case 9:   //Measure FILWIDTH 
1351
+     #if defined(FILWIDTH_PIN) &&(FILWIDTH_PIN > -1) 
1352
+     //raw_filwidth_value += ADC;  //remove to use an IIR filter approach 
1353
+      if(ADC>102)  //check that ADC is reading a voltage > 0.5 volts, otherwise don't take in the data.
1354
+        {
1355
+    	raw_filwidth_value= raw_filwidth_value-(raw_filwidth_value>>7);  //multipliy raw_filwidth_value by 127/128
1356
+        
1357
+        raw_filwidth_value= raw_filwidth_value + ((unsigned long)ADC<<7);  //add new ADC reading 
1358
+        }
1359
+     #endif 
1360
+     temp_state = 0;   
1361
+      
1362
+     temp_count++;
1363
+     break;      
1364
+      
1365
+      
1366
+    case 10: //Startup, delay initial temp reading a tiny bit so the hardware can settle.
1262
       temp_state = 0;
1367
       temp_state = 0;
1263
       break;
1368
       break;
1264
 //    default:
1369
 //    default:
1267
 //      break;
1372
 //      break;
1268
   }
1373
   }
1269
     
1374
     
1270
-  if(temp_count >= OVERSAMPLENR) // 8 * 16 * 1/(16000000/64/256)  = 131ms.
1375
+  if(temp_count >= OVERSAMPLENR) // 10 * 16 * 1/(16000000/64/256)  = 164ms.
1271
   {
1376
   {
1272
     if (!temp_meas_ready) //Only update the raw values if they have been read. Else we could be updating them during reading.
1377
     if (!temp_meas_ready) //Only update the raw values if they have been read. Else we could be updating them during reading.
1273
     {
1378
     {
1283
 #endif
1388
 #endif
1284
       current_temperature_bed_raw = raw_temp_bed_value;
1389
       current_temperature_bed_raw = raw_temp_bed_value;
1285
     }
1390
     }
1391
+
1392
+//Add similar code for Filament Sensor - can be read any time since IIR filtering is used 
1393
+#if defined(FILWIDTH_PIN) &&(FILWIDTH_PIN > -1)
1394
+  current_raw_filwidth = raw_filwidth_value>>10;  //need to divide to get to 0-16384 range since we used 1/128 IIR filter approach 
1395
+#endif
1396
+    
1286
     
1397
     
1287
     temp_meas_ready = true;
1398
     temp_meas_ready = true;
1288
     temp_count = 0;
1399
     temp_count = 0;

+ 8
- 0
Marlin/temperature.h View File

31
 void tp_init();  //initialize the heating
31
 void tp_init();  //initialize the heating
32
 void manage_heater(); //it is critical that this is called periodically.
32
 void manage_heater(); //it is critical that this is called periodically.
33
 
33
 
34
+#ifdef FILAMENT_SENSOR
35
+// For converting raw Filament Width to milimeters 
36
+ float analog2widthFil(); 
37
+ 
38
+// For converting raw Filament Width to an extrusion ratio 
39
+ int widthFil_to_size_ratio();
40
+#endif
41
+
34
 // low level conversion routines
42
 // low level conversion routines
35
 // do not use these routines and variables outside of temperature.cpp
43
 // do not use these routines and variables outside of temperature.cpp
36
 extern int target_temperature[EXTRUDERS];  
44
 extern int target_temperature[EXTRUDERS];  

+ 69
- 0
Marlin/thermistortables.h View File

621
 };
621
 };
622
 #endif
622
 #endif
623
 
623
 
624
+#if (THERMISTORHEATER_0 == 13) || (THERMISTORHEATER_1 == 13) || (THERMISTORHEATER_2 == 13) || (THERMISTORBED == 13)
625
+// Hisens thermistor B25/50 =3950 +/-1%
626
+
627
+const short temptable_13[][2] PROGMEM = {
628
+ {	22.5*OVERSAMPLENR,	300	},
629
+{	24.125*OVERSAMPLENR,	295	},
630
+{	25.875*OVERSAMPLENR,	290	},
631
+{	27.8125*OVERSAMPLENR,	285	},
632
+{	29.9375*OVERSAMPLENR,	280	},
633
+{	32.25*OVERSAMPLENR,	275	},
634
+{	34.8125*OVERSAMPLENR,	270	},
635
+{	37.625*OVERSAMPLENR,	265	},
636
+{	40.6875*OVERSAMPLENR,	260	},
637
+{	44.0625*OVERSAMPLENR,	255	},
638
+{	47.75*OVERSAMPLENR,	250	},
639
+{	51.8125*OVERSAMPLENR,	245	},
640
+{	56.3125*OVERSAMPLENR,	240	},
641
+{	61.25*OVERSAMPLENR,	235	},
642
+{	66.75*OVERSAMPLENR,	230	},
643
+{	72.8125*OVERSAMPLENR,	225	},
644
+{	79.5*OVERSAMPLENR,	220	},
645
+{	87*OVERSAMPLENR,	215	},
646
+{	95.3125*OVERSAMPLENR,	210	},
647
+{	104.1875*OVERSAMPLENR,	205	},
648
+{	112.75*OVERSAMPLENR,	200	},
649
+{	123.125*OVERSAMPLENR,	195	},
650
+{	135.75*OVERSAMPLENR,	190	},
651
+{	148.3125*OVERSAMPLENR,	185	},
652
+{	163.8125*OVERSAMPLENR,	180	},
653
+{	179*OVERSAMPLENR,	175	},
654
+{	211.125*OVERSAMPLENR,	170	},
655
+{	216.125*OVERSAMPLENR,	165	},
656
+{	236.5625*OVERSAMPLENR,	160	},
657
+{	258.5*OVERSAMPLENR,	155	},
658
+{	279.875*OVERSAMPLENR,	150	},
659
+{	305.375*OVERSAMPLENR,	145	},
660
+{	333.25*OVERSAMPLENR,	140	},
661
+{	362.5625*OVERSAMPLENR,	135	},
662
+{	393.6875*OVERSAMPLENR,	130	},
663
+{	425*OVERSAMPLENR,	125	},
664
+{	460.625*OVERSAMPLENR,	120	},
665
+{	495.1875*OVERSAMPLENR,	115	},
666
+{	530.875*OVERSAMPLENR,	110	},
667
+{	567.25*OVERSAMPLENR,	105	},
668
+{	601.625*OVERSAMPLENR,	100	},
669
+{	637.875*OVERSAMPLENR,	95	},
670
+{	674.5625*OVERSAMPLENR,	90	},
671
+{	710*OVERSAMPLENR,	85	},
672
+{	744.125*OVERSAMPLENR,	80	},
673
+{	775.9375*OVERSAMPLENR,	75	},
674
+{	806.875*OVERSAMPLENR,	70	},
675
+{	835.1875*OVERSAMPLENR,	65	},
676
+{	861.125*OVERSAMPLENR,	60	},
677
+{	884.375*OVERSAMPLENR,	55	},
678
+{	904.5625*OVERSAMPLENR,	50	},
679
+{	923.8125*OVERSAMPLENR,	45	},
680
+{	940.375*OVERSAMPLENR,	40	},
681
+{	954.625*OVERSAMPLENR,	35	},
682
+{	966.875*OVERSAMPLENR,	30	},
683
+{	977.0625*OVERSAMPLENR,	25	},
684
+{	986*OVERSAMPLENR,	20	},
685
+{	993.375*OVERSAMPLENR,	15	},
686
+{	999.5*OVERSAMPLENR,	10	},
687
+{	1004.5*OVERSAMPLENR,	5	},
688
+{	1008.5*OVERSAMPLENR,	0	}
689
+
690
+ };
691
+#endif
692
+
624
 #if (THERMISTORHEATER_0 == 20) || (THERMISTORHEATER_1 == 20) || (THERMISTORHEATER_2 == 20) || (THERMISTORBED == 20) // PT100 with INA826 amp on Ultimaker v2.0 electronics
693
 #if (THERMISTORHEATER_0 == 20) || (THERMISTORHEATER_1 == 20) || (THERMISTORHEATER_2 == 20) || (THERMISTORBED == 20) // PT100 with INA826 amp on Ultimaker v2.0 electronics
625
 /* The PT100 in the Ultimaker v2.0 electronics has a high sample value for a high temperature.
694
 /* The PT100 in the Ultimaker v2.0 electronics has a high sample value for a high temperature.
626
 This does not match the normal thermistor behaviour so we need to set the following defines */
695
 This does not match the normal thermistor behaviour so we need to set the following defines */

+ 27
- 1
Marlin/ultralcd.cpp View File

307
 }
307
 }
308
 #endif
308
 #endif
309
 
309
 
310
+void lcd_set_home_offsets()
311
+{
312
+    for(int8_t i=0; i < NUM_AXIS; i++) {
313
+      if (i != E_AXIS) {
314
+        add_homing[i] -= current_position[i];
315
+        current_position[i] = 0.0;
316
+      }
317
+    }
318
+    plan_set_position(0.0, 0.0, 0.0, current_position[E_AXIS]);
319
+
320
+    // Audio feedback
321
+    enquecommand_P(PSTR("M300 S659 P200"));
322
+    enquecommand_P(PSTR("M300 S698 P200"));
323
+    lcd_return_to_status();
324
+}
325
+
326
+
310
 #ifdef BABYSTEPPING
327
 #ifdef BABYSTEPPING
311
 static void lcd_babystep_x()
328
 static void lcd_babystep_x()
312
 {
329
 {
374
     START_MENU();
391
     START_MENU();
375
     MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
392
     MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
376
     MENU_ITEM_EDIT(int3, MSG_SPEED, &feedmultiply, 10, 999);
393
     MENU_ITEM_EDIT(int3, MSG_SPEED, &feedmultiply, 10, 999);
394
+#if TEMP_SENSOR_0 != 0
377
     MENU_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15);
395
     MENU_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15);
396
+#endif
378
 #if TEMP_SENSOR_1 != 0
397
 #if TEMP_SENSOR_1 != 0
379
     MENU_ITEM_EDIT(int3, MSG_NOZZLE1, &target_temperature[1], 0, HEATER_1_MAXTEMP - 15);
398
     MENU_ITEM_EDIT(int3, MSG_NOZZLE1, &target_temperature[1], 0, HEATER_1_MAXTEMP - 15);
380
 #endif
399
 #endif
566
 #endif
585
 #endif
567
     MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84"));
586
     MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84"));
568
     MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
587
     MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
588
+    MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets);
569
     //MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0"));
589
     //MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0"));
570
 #if TEMP_SENSOR_0 != 0
590
 #if TEMP_SENSOR_0 != 0
571
   #if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_BED != 0
591
   #if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_BED != 0
780
 
800
 
781
     START_MENU();
801
     START_MENU();
782
     MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
802
     MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
803
+#if TEMP_SENSOR_0 != 0
783
     MENU_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15);
804
     MENU_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15);
805
+#endif
784
 #if TEMP_SENSOR_1 != 0
806
 #if TEMP_SENSOR_1 != 0
785
     MENU_ITEM_EDIT(int3, MSG_NOZZLE1, &target_temperature[1], 0, HEATER_1_MAXTEMP - 15);
807
     MENU_ITEM_EDIT(int3, MSG_NOZZLE1, &target_temperature[1], 0, HEATER_1_MAXTEMP - 15);
786
 #endif
808
 #endif
791
     MENU_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
813
     MENU_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
792
 #endif
814
 #endif
793
     MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
815
     MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
794
-#ifdef AUTOTEMP
816
+#if defined AUTOTEMP && (TEMP_SENSOR_0 != 0)
795
     MENU_ITEM_EDIT(bool, MSG_AUTOTEMP, &autotemp_enabled);
817
     MENU_ITEM_EDIT(bool, MSG_AUTOTEMP, &autotemp_enabled);
796
     MENU_ITEM_EDIT(float3, MSG_MIN, &autotemp_min, 0, HEATER_0_MAXTEMP - 15);
818
     MENU_ITEM_EDIT(float3, MSG_MIN, &autotemp_min, 0, HEATER_0_MAXTEMP - 15);
797
     MENU_ITEM_EDIT(float3, MSG_MAX, &autotemp_max, 0, HEATER_0_MAXTEMP - 15);
819
     MENU_ITEM_EDIT(float3, MSG_MAX, &autotemp_max, 0, HEATER_0_MAXTEMP - 15);
816
     START_MENU();
838
     START_MENU();
817
     MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
839
     MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
818
     MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &plaPreheatFanSpeed, 0, 255);
840
     MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &plaPreheatFanSpeed, 0, 255);
841
+#if TEMP_SENSOR_0 != 0
819
     MENU_ITEM_EDIT(int3, MSG_NOZZLE, &plaPreheatHotendTemp, 0, HEATER_0_MAXTEMP - 15);
842
     MENU_ITEM_EDIT(int3, MSG_NOZZLE, &plaPreheatHotendTemp, 0, HEATER_0_MAXTEMP - 15);
843
+#endif
820
 #if TEMP_SENSOR_BED != 0
844
 #if TEMP_SENSOR_BED != 0
821
     MENU_ITEM_EDIT(int3, MSG_BED, &plaPreheatHPBTemp, 0, BED_MAXTEMP - 15);
845
     MENU_ITEM_EDIT(int3, MSG_BED, &plaPreheatHPBTemp, 0, BED_MAXTEMP - 15);
822
 #endif
846
 #endif
831
     START_MENU();
855
     START_MENU();
832
     MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
856
     MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
833
     MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &absPreheatFanSpeed, 0, 255);
857
     MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &absPreheatFanSpeed, 0, 255);
858
+#if TEMP_SENSOR_0 != 0
834
     MENU_ITEM_EDIT(int3, MSG_NOZZLE, &absPreheatHotendTemp, 0, HEATER_0_MAXTEMP - 15);
859
     MENU_ITEM_EDIT(int3, MSG_NOZZLE, &absPreheatHotendTemp, 0, HEATER_0_MAXTEMP - 15);
860
+#endif
835
 #if TEMP_SENSOR_BED != 0
861
 #if TEMP_SENSOR_BED != 0
836
     MENU_ITEM_EDIT(int3, MSG_BED, &absPreheatHPBTemp, 0, BED_MAXTEMP - 15);
862
     MENU_ITEM_EDIT(int3, MSG_BED, &absPreheatHPBTemp, 0, BED_MAXTEMP - 15);
837
 #endif
863
 #endif

+ 1
- 1
Marlin/ultralcd_implementation_hitachi_HD44780.h View File

475
 # endif//LCD_WIDTH > 19
475
 # endif//LCD_WIDTH > 19
476
     lcd.setCursor(LCD_WIDTH - 8, 1);
476
     lcd.setCursor(LCD_WIDTH - 8, 1);
477
     lcd.print('Z');
477
     lcd.print('Z');
478
-    lcd.print(ftostr32(current_position[Z_AXIS]));
478
+    lcd.print(ftostr32(current_position[Z_AXIS] + 0.00001));
479
 #endif//LCD_HEIGHT > 2
479
 #endif//LCD_HEIGHT > 2
480
 
480
 
481
 #if LCD_HEIGHT > 3
481
 #if LCD_HEIGHT > 3

+ 4
- 0
README.md View File

233
 *  M400 - Finish all moves
233
 *  M400 - Finish all moves
234
 *  M401 - Lower z-probe if present
234
 *  M401 - Lower z-probe if present
235
 *  M402 - Raise z-probe if present
235
 *  M402 - Raise z-probe if present
236
+*  M404 - N<dia in mm> Enter the nominal filament width (3mm, 1.75mm ) or will display nominal filament width without parameters
237
+*  M405 - Turn on Filament Sensor extrusion control.  Optional D<delay in cm> to set delay in centimeters between sensor and extruder
238
+*  M406 - Turn off Filament Sensor extrusion control
239
+*  M407 - Displays measured filament diameter
236
 *  M500 - stores paramters in EEPROM
240
 *  M500 - stores paramters in EEPROM
237
 *  M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
241
 *  M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
238
 *  M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
242
 *  M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.

Loading…
Cancel
Save