Quellcode durchsuchen

Implement automatic extruder/cold-end fan control based on temperature

This change allows fan outputs to automatically turn on/off when the
associated nozzle temperature of an extruder is above/below a threshold
temperature.
Multiple extruders can be assigned to the same pin in which case the fan
will turn on when any selected extruder is above the threshold.
It also makes the M42 command compatible with the M106/M107 command.
The majority of the logic in this change will be evaluated by the
compiler at build time (i.e, low code space requirements).
Robert F-C vor 12 Jahren
Ursprung
Commit
372e12f83f
4 geänderte Dateien mit 302 neuen und 234 gelöschten Zeilen
  1. 14
    4
      Marlin/Configuration_adv.h
  2. 9
    5
      Marlin/Marlin_main.cpp
  3. 52
    2
      Marlin/temperature.cpp
  4. 227
    223
      README.md

+ 14
- 4
Marlin/Configuration_adv.h Datei anzeigen

@@ -71,6 +71,16 @@
71 71
 // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
72 72
 //#define FAN_KICKSTART_TIME 100
73 73
 
74
+// Configure fan pin outputs to automatically turn on/off when the associated
75
+// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
76
+// Multiple extruders can be assigned to the same pin in which case 
77
+// the fan will turn on when any selected extruder is above the threshold.
78
+#define EXTRUDER_0_AUTO_FAN_PIN   -1
79
+#define EXTRUDER_1_AUTO_FAN_PIN   -1
80
+#define EXTRUDER_2_AUTO_FAN_PIN   -1
81
+#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
82
+#define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
83
+
74 84
 //===========================================================================
75 85
 //=============================Mechanical Settings===========================
76 86
 //===========================================================================
@@ -210,9 +220,9 @@
210 220
 //  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
211 221
 //#define WATCHDOG_RESET_MANUAL
212 222
 #endif
213
-
214
-// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
215
-//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
223
+
224
+// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
225
+//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
216 226
 
217 227
 // extruder advance constant (s2/mm3)
218 228
 //
@@ -276,7 +286,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
276 286
 #else
277 287
   #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
278 288
 #endif
279
-
289
+
280 290
 
281 291
 //The ASCII buffer for recieving from the serial:
282 292
 #define MAX_CMD_SIZE 96

+ 9
- 5
Marlin/Marlin_main.cpp Datei anzeigen

@@ -157,12 +157,12 @@ float add_homeing[3]={0,0,0};
157 157
 float min_pos[3] = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS };
158 158
 float max_pos[3] = { X_MAX_POS, Y_MAX_POS, Z_MAX_POS };
159 159
 // Extruder offset, only in XY plane
160
-#if EXTRUDERS > 1
160
+#if EXTRUDERS > 1
161 161
 float extruder_offset[2][EXTRUDERS] = { 
162 162
 #if defined(EXTRUDER_OFFSET_X) && defined(EXTRUDER_OFFSET_Y)
163 163
   EXTRUDER_OFFSET_X, EXTRUDER_OFFSET_Y 
164 164
 #endif
165
-}; 
165
+}; 
166 166
 #endif
167 167
 uint8_t active_extruder = 0;
168 168
 int fanSpeed=0;
@@ -982,6 +982,10 @@ void process_commands()
982 982
             break;
983 983
           }
984 984
         }
985
+      #if FAN_PIN > -1
986
+        if (pin_number == FAN_PIN)
987
+          fanSpeed = pin_status;
988
+      #endif
985 989
         if (pin_number > -1)
986 990
         {
987 991
           pinMode(pin_number, OUTPUT);
@@ -1380,7 +1384,7 @@ void process_commands()
1380 1384
       }
1381 1385
       
1382 1386
     }break;
1383
-    #endif // FWRETRACT
1387
+    #endif // FWRETRACT
1384 1388
     #if EXTRUDERS > 1
1385 1389
     case 218: // M218 - set hotend offset (in mm), T<extruder_number> X<offset_on_X> Y<offset_on_Y>
1386 1390
     {
@@ -1405,7 +1409,7 @@ void process_commands()
1405 1409
          SERIAL_ECHO(extruder_offset[Y_AXIS][tmp_extruder]);
1406 1410
       }
1407 1411
       SERIAL_ECHOLN("");
1408
-    }break;
1412
+    }break;
1409 1413
     #endif
1410 1414
     case 220: // M220 S<factor in percent>- set speed factor override percentage
1411 1415
     {
@@ -1756,7 +1760,7 @@ void process_commands()
1756 1760
         if(make_move && Stopped == false) {
1757 1761
            prepare_move();
1758 1762
         }
1759
-      }
1763
+      }
1760 1764
       #endif
1761 1765
       SERIAL_ECHO_START;
1762 1766
       SERIAL_ECHO(MSG_ACTIVE_EXTRUDER);

+ 52
- 2
Marlin/temperature.cpp Datei anzeigen

@@ -99,8 +99,9 @@ static volatile bool temp_meas_ready = false;
99 99
 #ifdef FAN_SOFT_PWM
100 100
   static unsigned char soft_pwm_fan;
101 101
 #endif
102
-
103
-
102
+#if EXTRUDER_0_AUTO_FAN_PIN > -1 || EXTRUDER_1_AUTO_FAN_PIN > -1 || EXTRUDER_2_AUTO_FAN_PIN > -1
103
+  static uint8_t extruderAutoFanState = 0; // extruder auto fan state stored as bitmap
104
+#endif  
104 105
   
105 106
 #if EXTRUDERS > 3
106 107
 # error Unsupported number of extruders
@@ -399,6 +400,55 @@ void manage_heater()
399 400
 
400 401
   } // End extruder for loop
401 402
   
403
+  #if EXTRUDER_0_AUTO_FAN_PIN > -1
404
+    // check the extruder 0 setting (and any ganged auto fan outputs)
405
+    bool newFanState = (EXTRUDER_0_AUTO_FAN_PIN > -1 && 
406
+        (current_temperature[0] > EXTRUDER_AUTO_FAN_TEMPERATURE || 
407
+            (EXTRUDER_0_AUTO_FAN_PIN == EXTRUDER_1_AUTO_FAN_PIN && current_temperature[1] > EXTRUDER_AUTO_FAN_TEMPERATURE) || 
408
+            (EXTRUDER_0_AUTO_FAN_PIN == EXTRUDER_2_AUTO_FAN_PIN && current_temperature[2] > EXTRUDER_AUTO_FAN_TEMPERATURE)));
409
+    if ((extruderAutoFanState & 1) != newFanState) // store state in first bit
410
+    {
411
+        int newFanSpeed = (newFanState ? EXTRUDER_AUTO_FAN_SPEED : 0);
412
+        if (EXTRUDER_0_AUTO_FAN_PIN == FAN_PIN) 
413
+            fanSpeed = newFanSpeed;
414
+        pinMode(EXTRUDER_0_AUTO_FAN_PIN, OUTPUT);
415
+        digitalWrite(EXTRUDER_0_AUTO_FAN_PIN, newFanSpeed);
416
+        analogWrite(EXTRUDER_0_AUTO_FAN_PIN, newFanSpeed);
417
+        extruderAutoFanState = newFanState | (extruderAutoFanState & ~1);
418
+    }
419
+  #endif //EXTRUDER_0_AUTO_FAN_PIN > -1
420
+  #if EXTRUDER_1_AUTO_FAN_PIN > -1
421
+    // check the extruder 1 setting (except when extruder 1 is the same as 0)
422
+    newFanState = (EXTRUDER_1_AUTO_FAN_PIN > -1 && EXTRUDER_1_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN &&
423
+        (current_temperature[1] > EXTRUDER_AUTO_FAN_TEMPERATURE ||
424
+            (EXTRUDER_1_AUTO_FAN_PIN == EXTRUDER_2_AUTO_FAN_PIN && current_temperature[2] > EXTRUDER_AUTO_FAN_TEMPERATURE)));
425
+    if ((extruderAutoFanState & 2) != (newFanState<<1)) // use second bit
426
+    {
427
+        int newFanSpeed = (newFanState ? EXTRUDER_AUTO_FAN_SPEED : 0);
428
+        if (EXTRUDER_1_AUTO_FAN_PIN == FAN_PIN) 
429
+            fanSpeed = newFanSpeed;
430
+        pinMode(EXTRUDER_1_AUTO_FAN_PIN, OUTPUT);
431
+        digitalWrite(EXTRUDER_1_AUTO_FAN_PIN, newFanSpeed);
432
+        analogWrite(EXTRUDER_1_AUTO_FAN_PIN, newFanSpeed);
433
+        extruderAutoFanState = (newFanState<<1) | (extruderAutoFanState & ~2);
434
+    }
435
+  #endif //EXTRUDER_1_AUTO_FAN_PIN > -1
436
+  #if EXTRUDER_2_AUTO_FAN_PIN > -1
437
+    // check the extruder 2 setting (except when extruder 2 is the same as 1 or 0)
438
+    newFanState = (EXTRUDER_2_AUTO_FAN_PIN > -1 && 
439
+            EXTRUDER_2_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN && EXTRUDER_2_AUTO_FAN_PIN != EXTRUDER_1_AUTO_FAN_PIN &&
440
+        current_temperature[2] > EXTRUDER_AUTO_FAN_TEMPERATURE);
441
+    if ((extruderAutoFanState & 4) != (newFanState<<2)) // use third bit
442
+    {
443
+        int newFanSpeed = (newFanState ? EXTRUDER_AUTO_FAN_SPEED : 0);
444
+        if (EXTRUDER_2_AUTO_FAN_PIN == FAN_PIN) 
445
+            fanSpeed = newFanSpeed;
446
+        pinMode(EXTRUDER_2_AUTO_FAN_PIN, OUTPUT);
447
+        digitalWrite(EXTRUDER_2_AUTO_FAN_PIN, newFanSpeed);
448
+        analogWrite(EXTRUDER_2_AUTO_FAN_PIN, newFanSpeed);
449
+        extruderAutoFanState = (newFanState<<2) | (extruderAutoFanState & ~4);
450
+    }
451
+  #endif //EXTRUDER_2_AUTO_FAN_PIN > -1
402 452
 
403 453
   #ifndef PIDTEMPBED
404 454
   if(millis() - previous_millis_bed_heater < BED_CHECK_INTERVAL)

+ 227
- 223
README.md Datei anzeigen

@@ -1,223 +1,227 @@
1
-WARNING: 
2
---------
3
-THIS IS RELEASE CANDIDATE 2 FOR MARLIN 1.0.0
4
-
5
-The configuration is now split in two files
6
-Configuration.h for the normal settings
7
-Configuration_adv.h for the advanced settings
8
-
9
-Gen7T is not supported.
10
-
11
-Quick Information
12
-===================
13
-This RepRap firmware is a mashup between <a href="https://github.com/kliment/Sprinter">Sprinter</a>, <a href="https://github.com/simen/grbl/tree">grbl</a> and many original parts.
14
-
15
-Derived from Sprinter and Grbl by Erik van der Zalm.
16
-Sprinters lead developers are Kliment and caru.
17
-Grbls lead developer is Simen Svale Skogsrud. Sonney Jeon (Chamnit) improved some parts of grbl
18
-A fork by bkubicek for the Ultimaker was merged, and further development was aided by him.
19
-Some features have been added by:
20
-Lampmaker, Bradley Feldman, and others...
21
-
22
-
23
-Features:
24
-
25
-*   Interrupt based movement with real linear acceleration
26
-*   High steprate
27
-*   Look ahead (Keep the speed high when possible. High cornering speed)
28
-*   Interrupt based temperature protection
29
-*   preliminary support for Matthew Roberts advance algorithm 
30
-    For more info see: http://reprap.org/pipermail/reprap-dev/2011-May/003323.html
31
-*   Full endstop support
32
-*   SD Card support
33
-*   SD Card folders (works in pronterface)
34
-*   SD Card autostart support
35
-*   LCD support (ideally 20x4) 
36
-*   LCD menu system for autonomous SD card printing, controlled by an click-encoder. 
37
-*   EEPROM storage of e.g. max-velocity, max-acceleration, and similar variables
38
-*   many small but handy things originating from bkubicek's fork.
39
-*   Arc support
40
-*   Temperature oversampling
41
-*   Dynamic Temperature setpointing aka "AutoTemp"
42
-*   Support for QTMarlin, a very beta GUI for PID-tuning and velocity-acceleration testing. https://github.com/bkubicek/QTMarlin
43
-*   Endstop trigger reporting to the host software.
44
-*   Updated sdcardlib
45
-*   Heater power reporting. Useful for PID monitoring.
46
-*   PID tuning
47
-*   CoreXY kinematics (www.corexy.com/theory.html)
48
-*   Configurable serial port to support connection of wireless adaptors.
49
-
50
-The default baudrate is 250000. This baudrate has less jitter and hence errors than the usual 115200 baud, but is less supported by drivers and host-environments.
51
-
52
-
53
-Differences and additions to the already good Sprinter firmware:
54
-================================================================
55
-
56
-*Look-ahead:*
57
-
58
-Marlin has look-ahead. While sprinter has to break and re-accelerate at each corner, 
59
-lookahead will only decelerate and accelerate to a velocity, 
60
-so that the change in vectorial velocity magnitude is less than the xy_jerk_velocity.
61
-This is only possible, if some future moves are already processed, hence the name. 
62
-It leads to less over-deposition at corners, especially at flat angles.
63
-
64
-*Arc support:*
65
-
66
-Slic3r can find curves that, although broken into segments, were ment to describe an arc.
67
-Marlin is able to print those arcs. The advantage is the firmware can choose the resolution,
68
-and can perform the arc with nearly constant velocity, resulting in a nice finish. 
69
-Also, less serial communication is needed.
70
-
71
-*Temperature Oversampling:*
72
-
73
-To reduce noise and make the PID-differential term more useful, 16 ADC conversion results are averaged.
74
-
75
-*AutoTemp:*
76
-
77
-If your gcode contains a wide spread of extruder velocities, or you realtime change the building speed, the temperature should be changed accordingly.
78
-Usually, higher speed requires higher temperature.
79
-This can now be performed by the AutoTemp function
80
-By calling M109 S<mintemp> T<maxtemp> F<factor> you enter the autotemp mode.
81
-
82
-You can leave it by calling M109 without any F.
83
-If active, the maximal extruder stepper rate of all buffered moves will be calculated, and named "maxerate" [steps/sec].
84
-The wanted temperature then will be set to t=tempmin+factor*maxerate, while being limited between tempmin and tempmax.
85
-If the target temperature is set manually or by gcode to a value less then tempmin, it will be kept without change.
86
-Ideally, your gcode can be completely free of temperature controls, apart from a M109 S T F in the start.gcode, and a M109 S0 in the end.gcode.
87
-
88
-*EEPROM:*
89
-
90
-If you know your PID values, the acceleration and max-velocities of your unique machine, you can set them, and finally store them in the EEPROM.
91
-After each reboot, it will magically load them from EEPROM, independent what your Configuration.h says.
92
-
93
-*LCD Menu:*
94
-
95
-If your hardware supports it, you can build yourself a LCD-CardReader+Click+encoder combination. It will enable you to realtime tune temperatures,
96
-accelerations, velocities, flow rates, select and print files from the SD card, preheat, disable the steppers, and do other fancy stuff.
97
-One working hardware is documented here: http://www.thingiverse.com/thing:12663 
98
-Also, with just a 20x4 or 16x2 display, useful data is shown.
99
-
100
-*SD card folders:*
101
-
102
-If you have an SD card reader attached to your controller, also folders work now. Listing the files in pronterface will show "/path/subpath/file.g".
103
-You can write to file in a subfolder by specifying a similar text using small letters in the path.
104
-Also, backup copies of various operating systems are hidden, as well as files not ending with ".g".
105
-
106
-*SD card folders:*
107
-
108
-If you place a file auto[0-9].g into the root of the sd card, it will be automatically executed if you boot the printer. The same file will be executed by selecting "Autostart" from the menu.
109
-First *0 will be performed, than *1 and so on. That way, you can heat up or even print automatically without user interaction.
110
-
111
-*Endstop trigger reporting:*
112
-
113
-If an endstop is hit while moving towards the endstop, the location at which the firmware thinks that the endstop was triggered is outputed on the serial port.
114
-This is useful, because the user gets a warning message.
115
-However, also tools like QTMarlin can use this for finding acceptable combinations of velocity+acceleration.
116
-
117
-*Coding paradigm:*
118
-
119
-Not relevant from a user side, but Marlin was split into thematic junks, and has tried to partially enforced private variables.
120
-This is intended to make it clearer, what interacts which what, and leads to a higher level of modularization.
121
-We think that this is a useful prestep for porting this firmware to e.g. an ARM platform in the future.
122
-A lot of RAM (with enabled LCD ~2200 bytes) was saved by storing char []="some message" in Program memory.
123
-In the serial communication, a #define based level of abstraction was enforced, so that it is clear that
124
-some transfer is information (usually beginning with "echo:"), an error "error:", or just normal protocol,
125
-necessary for backwards compatibility.
126
-
127
-*Interrupt based temperature measurements:*
128
-
129
-An interrupt is used to manage ADC conversions, and enforce checking for critical temperatures.
130
-This leads to less blocking in the heater management routine.
131
-
132
-
133
-Non-standard M-Codes, different to an old version of sprinter:
134
-==============================================================
135
-Movement:
136
-
137
-*   G2  - CW ARC
138
-*   G3  - CCW ARC
139
-
140
-General:
141
-
142
-*   M17  - Enable/Power all stepper motors. Compatibility to ReplicatorG.
143
-*   M18  - Disable all stepper motors; same as M84.Compatibility to ReplicatorG.
144
-*   M30  - Print time since last M109 or SD card start to serial
145
-*   M42  - Change pin status via gcode
146
-*   M80  - Turn on Power Supply
147
-*   M81  - Turn off Power Supply
148
-*   M114 - Output current position to serial port 
149
-*   M119 - Output Endstop status to serial port
150
-
151
-Movement variables:
152
-
153
-*   M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
154
-*   M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
155
-*   M204 - Set default acceleration: S normal moves T filament only moves (M204 S3000 T7000) im mm/sec^2  also sets minimum segment time in ms (B20000) to prevent buffer underruns and M20 minimum feedrate
156
-*   M206 - set home offsets.  This sets the X,Y,Z coordinates of the endstops (and is added to the {X,Y,Z}_HOME_POS configuration options (and is also added to the coordinates, if any, provided to G82, as with earlier firmware)
157
-*   M220 - set build speed mulitplying S:factor in percent ; aka "realtime tuneing in the gcode". So you can slow down if you have islands in one height-range, and speed up otherwise.
158
-*   M221 - set the extrude multiplying S:factor in percent
159
-*   M400 - Finish all buffered moves.
160
-
161
-Temperature variables:
162
-*   M301 - Set PID parameters P I and D
163
-*   M302 - Allow cold extrudes
164
-*   M303 - PID relay autotune S<temperature> sets the target temperature. (default target temperature = 150C)
165
-
166
-Advance:
167
-
168
-*   M200 - Set filament diameter for advance
169
-*   M205 - advanced settings:  minimum travel speed S=while printing T=travel only,  B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk
170
-
171
-EEPROM:
172
-
173
-*   M500 - stores paramters in EEPROM. This parameters are stored:  axis_steps_per_unit,  max_feedrate, max_acceleration  ,acceleration,retract_acceleration,
174
-  minimumfeedrate,mintravelfeedrate,minsegmenttime,  jerk velocities, PID
175
-*   M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).  
176
-*   M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
177
-*   M503 - print the current settings (from memory not from eeprom)
178
-
179
-MISC:
180
-
181
-*   M240 - Trigger a camera to take a photograph
182
-*   M999 - Restart after being stopped by error
183
-
184
-Configuring and compilation:
185
-============================
186
-
187
-Install the arduino software IDE/toolset v23 (Some configurations also work with 1.x.x)
188
-   http://www.arduino.cc/en/Main/Software
189
-
190
-For gen6/gen7 and sanguinololu the Sanguino directory in the Marlin dir needs to be copied to the arduino environment.
191
-  copy ArduinoAddons\Arduino_x.x.x\sanguino <arduino home>\hardware\Sanguino
192
-
193
-Install Ultimaker's RepG 25 build
194
-    http://software.ultimaker.com
195
-For SD handling and as better substitute (apart from stl manipulation) download
196
-the very nice Kliment's printrun/pronterface  https://github.com/kliment/Printrun
197
-
198
-Copy the Ultimaker Marlin firmware
199
-   https://github.com/ErikZalm/Marlin/tree/Marlin_v1
200
-   (Use the download button)
201
-
202
-Start the arduino IDE.
203
-Select Tools -> Board -> Arduino Mega 2560    or your microcontroller
204
-Select the correct serial port in Tools ->Serial Port
205
-Open Marlin.pde
206
-
207
-Click the Verify/Compile button
208
-
209
-Click the Upload button
210
-If all goes well the firmware is uploading
211
-
212
-Start Ultimaker's Custom RepG 25
213
-Make sure Show Experimental Profiles is enabled in Preferences
214
-Select Sprinter as the Driver
215
-
216
-Press the Connect button.
217
-
218
-KNOWN ISSUES: RepG will display:  Unknown: marlin x.y.z
219
-
220
-That's ok.  Enjoy Silky Smooth Printing.
221
-
222
-
223
-
1
+==========================
2
+Marlin 3D Printer Firmware
3
+==========================
4
+
5
+Notes: 
6
+-----
7
+
8
+The configuration is now split in two files:
9
+  Configuration.h for the normal settings
10
+  Configuration_adv.h for the advanced settings
11
+
12
+Gen7T is not supported.
13
+
14
+Quick Information
15
+===================
16
+This RepRap firmware is a mashup between <a href="https://github.com/kliment/Sprinter">Sprinter</a>, <a href="https://github.com/simen/grbl/tree">grbl</a> and many original parts.
17
+
18
+Derived from Sprinter and Grbl by Erik van der Zalm.
19
+Sprinters lead developers are Kliment and caru.
20
+Grbls lead developer is Simen Svale Skogsrud. Sonney Jeon (Chamnit) improved some parts of grbl
21
+A fork by bkubicek for the Ultimaker was merged, and further development was aided by him.
22
+Some features have been added by:
23
+Lampmaker, Bradley Feldman, and others...
24
+
25
+
26
+Features:
27
+
28
+*   Interrupt based movement with real linear acceleration
29
+*   High steprate
30
+*   Look ahead (Keep the speed high when possible. High cornering speed)
31
+*   Interrupt based temperature protection
32
+*   preliminary support for Matthew Roberts advance algorithm 
33
+    For more info see: http://reprap.org/pipermail/reprap-dev/2011-May/003323.html
34
+*   Full endstop support
35
+*   SD Card support
36
+*   SD Card folders (works in pronterface)
37
+*   SD Card autostart support
38
+*   LCD support (ideally 20x4) 
39
+*   LCD menu system for autonomous SD card printing, controlled by an click-encoder. 
40
+*   EEPROM storage of e.g. max-velocity, max-acceleration, and similar variables
41
+*   many small but handy things originating from bkubicek's fork.
42
+*   Arc support
43
+*   Temperature oversampling
44
+*   Dynamic Temperature setpointing aka "AutoTemp"
45
+*   Support for QTMarlin, a very beta GUI for PID-tuning and velocity-acceleration testing. https://github.com/bkubicek/QTMarlin
46
+*   Endstop trigger reporting to the host software.
47
+*   Updated sdcardlib
48
+*   Heater power reporting. Useful for PID monitoring.
49
+*   PID tuning
50
+*   CoreXY kinematics (www.corexy.com/theory.html)
51
+*   Configurable serial port to support connection of wireless adaptors.
52
+*   Automatic operation of extruder/cold-end cooling fans based on nozzle temperature
53
+
54
+The default baudrate is 250000. This baudrate has less jitter and hence errors than the usual 115200 baud, but is less supported by drivers and host-environments.
55
+
56
+
57
+Differences and additions to the already good Sprinter firmware:
58
+================================================================
59
+
60
+*Look-ahead:*
61
+
62
+Marlin has look-ahead. While sprinter has to break and re-accelerate at each corner, 
63
+lookahead will only decelerate and accelerate to a velocity, 
64
+so that the change in vectorial velocity magnitude is less than the xy_jerk_velocity.
65
+This is only possible, if some future moves are already processed, hence the name. 
66
+It leads to less over-deposition at corners, especially at flat angles.
67
+
68
+*Arc support:*
69
+
70
+Slic3r can find curves that, although broken into segments, were ment to describe an arc.
71
+Marlin is able to print those arcs. The advantage is the firmware can choose the resolution,
72
+and can perform the arc with nearly constant velocity, resulting in a nice finish. 
73
+Also, less serial communication is needed.
74
+
75
+*Temperature Oversampling:*
76
+
77
+To reduce noise and make the PID-differential term more useful, 16 ADC conversion results are averaged.
78
+
79
+*AutoTemp:*
80
+
81
+If your gcode contains a wide spread of extruder velocities, or you realtime change the building speed, the temperature should be changed accordingly.
82
+Usually, higher speed requires higher temperature.
83
+This can now be performed by the AutoTemp function
84
+By calling M109 S<mintemp> T<maxtemp> F<factor> you enter the autotemp mode.
85
+
86
+You can leave it by calling M109 without any F.
87
+If active, the maximal extruder stepper rate of all buffered moves will be calculated, and named "maxerate" [steps/sec].
88
+The wanted temperature then will be set to t=tempmin+factor*maxerate, while being limited between tempmin and tempmax.
89
+If the target temperature is set manually or by gcode to a value less then tempmin, it will be kept without change.
90
+Ideally, your gcode can be completely free of temperature controls, apart from a M109 S T F in the start.gcode, and a M109 S0 in the end.gcode.
91
+
92
+*EEPROM:*
93
+
94
+If you know your PID values, the acceleration and max-velocities of your unique machine, you can set them, and finally store them in the EEPROM.
95
+After each reboot, it will magically load them from EEPROM, independent what your Configuration.h says.
96
+
97
+*LCD Menu:*
98
+
99
+If your hardware supports it, you can build yourself a LCD-CardReader+Click+encoder combination. It will enable you to realtime tune temperatures,
100
+accelerations, velocities, flow rates, select and print files from the SD card, preheat, disable the steppers, and do other fancy stuff.
101
+One working hardware is documented here: http://www.thingiverse.com/thing:12663 
102
+Also, with just a 20x4 or 16x2 display, useful data is shown.
103
+
104
+*SD card folders:*
105
+
106
+If you have an SD card reader attached to your controller, also folders work now. Listing the files in pronterface will show "/path/subpath/file.g".
107
+You can write to file in a subfolder by specifying a similar text using small letters in the path.
108
+Also, backup copies of various operating systems are hidden, as well as files not ending with ".g".
109
+
110
+*SD card folders:*
111
+
112
+If you place a file auto[0-9].g into the root of the sd card, it will be automatically executed if you boot the printer. The same file will be executed by selecting "Autostart" from the menu.
113
+First *0 will be performed, than *1 and so on. That way, you can heat up or even print automatically without user interaction.
114
+
115
+*Endstop trigger reporting:*
116
+
117
+If an endstop is hit while moving towards the endstop, the location at which the firmware thinks that the endstop was triggered is outputed on the serial port.
118
+This is useful, because the user gets a warning message.
119
+However, also tools like QTMarlin can use this for finding acceptable combinations of velocity+acceleration.
120
+
121
+*Coding paradigm:*
122
+
123
+Not relevant from a user side, but Marlin was split into thematic junks, and has tried to partially enforced private variables.
124
+This is intended to make it clearer, what interacts which what, and leads to a higher level of modularization.
125
+We think that this is a useful prestep for porting this firmware to e.g. an ARM platform in the future.
126
+A lot of RAM (with enabled LCD ~2200 bytes) was saved by storing char []="some message" in Program memory.
127
+In the serial communication, a #define based level of abstraction was enforced, so that it is clear that
128
+some transfer is information (usually beginning with "echo:"), an error "error:", or just normal protocol,
129
+necessary for backwards compatibility.
130
+
131
+*Interrupt based temperature measurements:*
132
+
133
+An interrupt is used to manage ADC conversions, and enforce checking for critical temperatures.
134
+This leads to less blocking in the heater management routine.
135
+
136
+
137
+Non-standard M-Codes, different to an old version of sprinter:
138
+==============================================================
139
+Movement:
140
+
141
+*   G2  - CW ARC
142
+*   G3  - CCW ARC
143
+
144
+General:
145
+
146
+*   M17  - Enable/Power all stepper motors. Compatibility to ReplicatorG.
147
+*   M18  - Disable all stepper motors; same as M84.Compatibility to ReplicatorG.
148
+*   M30  - Print time since last M109 or SD card start to serial
149
+*   M42  - Change pin status via gcode
150
+*   M80  - Turn on Power Supply
151
+*   M81  - Turn off Power Supply
152
+*   M114 - Output current position to serial port 
153
+*   M119 - Output Endstop status to serial port
154
+
155
+Movement variables:
156
+
157
+*   M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
158
+*   M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
159
+*   M204 - Set default acceleration: S normal moves T filament only moves (M204 S3000 T7000) im mm/sec^2  also sets minimum segment time in ms (B20000) to prevent buffer underruns and M20 minimum feedrate
160
+*   M206 - set home offsets.  This sets the X,Y,Z coordinates of the endstops (and is added to the {X,Y,Z}_HOME_POS configuration options (and is also added to the coordinates, if any, provided to G82, as with earlier firmware)
161
+*   M220 - set build speed mulitplying S:factor in percent ; aka "realtime tuneing in the gcode". So you can slow down if you have islands in one height-range, and speed up otherwise.
162
+*   M221 - set the extrude multiplying S:factor in percent
163
+*   M400 - Finish all buffered moves.
164
+
165
+Temperature variables:
166
+*   M301 - Set PID parameters P I and D
167
+*   M302 - Allow cold extrudes
168
+*   M303 - PID relay autotune S<temperature> sets the target temperature. (default target temperature = 150C)
169
+
170
+Advance:
171
+
172
+*   M200 - Set filament diameter for advance
173
+*   M205 - advanced settings:  minimum travel speed S=while printing T=travel only,  B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk
174
+
175
+EEPROM:
176
+
177
+*   M500 - stores paramters in EEPROM. This parameters are stored:  axis_steps_per_unit,  max_feedrate, max_acceleration  ,acceleration,retract_acceleration,
178
+  minimumfeedrate,mintravelfeedrate,minsegmenttime,  jerk velocities, PID
179
+*   M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).  
180
+*   M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
181
+*   M503 - print the current settings (from memory not from eeprom)
182
+
183
+MISC:
184
+
185
+*   M240 - Trigger a camera to take a photograph
186
+*   M999 - Restart after being stopped by error
187
+
188
+Configuring and compilation:
189
+============================
190
+
191
+Install the arduino software IDE/toolset v23 (Some configurations also work with 1.x.x)
192
+   http://www.arduino.cc/en/Main/Software
193
+
194
+For gen6/gen7 and sanguinololu the Sanguino directory in the Marlin dir needs to be copied to the arduino environment.
195
+  copy ArduinoAddons\Arduino_x.x.x\sanguino <arduino home>\hardware\Sanguino
196
+
197
+Install Ultimaker's RepG 25 build
198
+    http://software.ultimaker.com
199
+For SD handling and as better substitute (apart from stl manipulation) download
200
+the very nice Kliment's printrun/pronterface  https://github.com/kliment/Printrun
201
+
202
+Copy the Ultimaker Marlin firmware
203
+   https://github.com/ErikZalm/Marlin/tree/Marlin_v1
204
+   (Use the download button)
205
+
206
+Start the arduino IDE.
207
+Select Tools -> Board -> Arduino Mega 2560    or your microcontroller
208
+Select the correct serial port in Tools ->Serial Port
209
+Open Marlin.pde
210
+
211
+Click the Verify/Compile button
212
+
213
+Click the Upload button
214
+If all goes well the firmware is uploading
215
+
216
+Start Ultimaker's Custom RepG 25
217
+Make sure Show Experimental Profiles is enabled in Preferences
218
+Select Sprinter as the Driver
219
+
220
+Press the Connect button.
221
+
222
+KNOWN ISSUES: RepG will display:  Unknown: marlin x.y.z
223
+
224
+That's ok.  Enjoy Silky Smooth Printing.
225
+
226
+
227
+

Laden…
Abbrechen
Speichern