Преглед изворни кода

Added Fabrikator Mini Marlin Firmware blog post

Thomas Buck пре 8 година
родитељ
комит
cc94bc1814
1 измењених фајлова са 307 додато и 0 уклоњено
  1. 307
    0
      input/blog/2016/2016_03_24_marlin_fabrikator_mini.md

+ 307
- 0
input/blog/2016/2016_03_24_marlin_fabrikator_mini.md Прегледај датотеку

@@ -0,0 +1,307 @@
1
+title: Blog
2
+post: Configuring Marlin Firmware for the Fabrikator Mini
3
+date: 2016-03-24
4
+comments: true
5
+flattr: true
6
+---
7
+
8
+## {{ page["post"] }}
9
+<!--%
10
+from datetime import datetime
11
+date = datetime.strptime(page["date"], "%Y-%m-%d").strftime("%B %d, %Y")
12
+print "*Posted at %s.*" % date
13
+%-->
14
+
15
+I’ve recently aquired a [Turnigy Fabrikator Mini V1.5](http://www.hobbyking.com/hobbyking/store/__82020__Fabrikator_Mini_3D_Printer_V1_5_Transparent_EU_230V.html) from HobbyKing. This is a very cheap 3D printer with surprisingly good quality.
16
+
17
+Many 3D printers are based on an Arduino with some stepper motor drivers, commonly on a [RAMPS shield](http://reprap.org/wiki/RAMPS_1.4). The Fabrikator Mini is using an [MKS-Base board](http://reprap.org/wiki/MKS_BASE), which is basically an Arduino Mega (with an ATmega2560) and a RAMPS 1.4 shield on a single PCB.
18
+
19
+I’ve also got the so-called [RepRapDiscount Full Graphic Smart Controller](http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller), a graphic LCD, a beeper, some buttons to control the menu and an SD-card slot. It does, however, not work out-of-the-box, you need to compile a new firmware to get it to run.
20
+
21
+As far as I can tell, the most common and actively developed firmware for these boards is the [Marlin Firmware](https://github.com/MarlinFirmware/Marlin/releases), but there are [many alternatives](http://reprap.org/wiki/List_of_Firmware).
22
+
23
+The [YouTuber Chuck Hellebuyck](https://www.youtube.com/channel/UCsdc_0ZTXikARFEn2dRDJhg) offers a pre-configured Marlin Firmware on [his website](http://www.elproducts.com/fabrikator-mini.html), but it seems to be a very old version. That’s why I’ve decided to get the newest Marlin Firmware working on the Fabrikator Mini.
24
+
25
+At the time of this writing, [Marlin version 1.1.0-RC3](https://github.com/MarlinFirmware/Marlin/releases/tag/1.1.0-RC3) was the newest available firmware release. Clone the repository and check out the corresponding tag:
26
+
27
+<pre class="sh_sh">
28
+git clone https://github.com/MarlinFirmware/Marlin.git
29
+cd Marlin
30
+git checkout 1.1.0-RC3
31
+</pre>
32
+
33
+The configuration happens in the files `Marlin/Configuration.h` and `Marlin/Configuration_adv.h`. It’s best to read through the whole file to get to know all available options. I’ve listed the important changes in the following section, including the changes required to get the display and SD card working:
34
+
35
+<pre class="sh_cpp">
36
+// Configuration.h
37
+#define MOTHERBOARD BOARD_RAMPS_14_EFB
38
+#define TEMP_SENSOR_0 3
39
+#define HEATER_0_MAXTEMP 230
40
+#define HEATER_1_MAXTEMP 230
41
+#define HEATER_2_MAXTEMP 230
42
+#define HEATER_3_MAXTEMP 230
43
+const bool Y_MIN_ENDSTOP_INVERTING = true;
44
+const bool X_MAX_ENDSTOP_INVERTING = true;
45
+const bool Z_MAX_ENDSTOP_INVERTING = true;
46
+#define Y_HOME_DIR 1
47
+#define X_MAX_POS 80
48
+#define Y_MAX_POS 80
49
+#define Z_MAX_POS 80
50
+#define MANUAL_HOME_POSITIONS
51
+#define MANUAL_Y_HOME_POS 80
52
+#define HOMING_FEEDRATE {10*60, 10*60, 2*60, 0}
53
+#define DEFAULT_AXIS_STEPS_PER_UNIT   {201.01,201.01,6366.88,97.11}
54
+#define DEFAULT_MAX_FEEDRATE          {40, 40, 2, 40}
55
+#define DEFAULT_MAX_ACCELERATION      {200,200,50,2000}
56
+#define DEFAULT_ACCELERATION          300
57
+#define DEFAULT_RETRACT_ACCELERATION  2000
58
+#define DEFAULT_TRAVEL_ACCELERATION   300
59
+#define SDSUPPORT
60
+#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
61
+
62
+// Configuration_adv.h
63
+#define EXTRUDER_0_AUTO_FAN_PIN 9
64
+//#define ENDSTOPS_ONLY_FOR_HOMING // Comment this!
65
+</pre>
66
+
67
+With its default firmware, the Fabrikator Mini by default runs the fan as soon as the extruder temperature exceeds 50 degrees Celsius. To get this behavior from the Marlin Firmware, `EXTRUDER_0_AUTO_FAN_PIN` is set to the same value as `FAN_PIN`. This leads to a compile error. To fix this, `FAN_PIN` has to be undefined. This can be achieved by modifying the `pins.h` file corresponding to the mainboard used, in this case `Marlin/pins_RAMPS_13_EFB.h`, adding these two lines at the end:
68
+
69
+<pre class="sh_cpp">
70
+#undef FAN_PIN
71
+#define FAN_PIN -1
72
+</pre>
73
+
74
+That’s it. You can now open the `Marlin/Marlin.ino` file in the Arduino IDE, select `Arduino Mega 2560` as device and the Fabrikator Mini USB port and hit upload. If this is your first time compiling Marlin with Graphic LCD support, you need to install the `u8glib` from the Arduino IDE library manager.
75
+
76
+The following is a git patch for all required changes:
77
+
78
+<pre class="sh_diff">
79
+From 284c1d4bdeda82c18477f01f99aada0cbfb10de7 Mon Sep 17 00:00:00 2001
80
+From: Thomas Buck <xythobuz@xythobuz.de>
81
+Date: Fri, 25 Mar 2016 00:04:54 +0100
82
+Subject: [PATCH 1/1] Modified configuration for Turnigy Fabrikator Mini with
83
+ RepRapDiscount Full Graphic Smart Controller support.
84
+
85
+---
86
+ Marlin/Configuration.h     | 64 +++++++++++++++++++++++-----------------------
87
+ Marlin/Configuration_adv.h |  4 +--
88
+ Marlin/pins_RAMPS_13_EFB.h |  6 ++++-
89
+ 3 files changed, 39 insertions(+), 35 deletions(-)
90
+
91
+diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
92
+index c4fa028..c0411cf 100644
93
+--- a/Marlin/Configuration.h
94
++++ b/Marlin/Configuration.h
95
+@@ -47,7 +47,7 @@ Here are some standard links for getting your machine calibrated:
96
+ // User-specified version info of this build to display in [Pronterface, etc] terminal window during
97
+ // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
98
+ // build by the user have been successfully uploaded into firmware.
99
+-#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
100
++#define STRING_CONFIG_H_AUTHOR "(xythobuz, FabMin)" // Who made the changes.
101
+ #define SHOW_BOOTSCREEN
102
+ #define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
103
+ //#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
104
+@@ -62,7 +62,7 @@ Here are some standard links for getting your machine calibrated:
105
+ 
106
+ // This determines the communication speed of the printer
107
+ // :[2400,9600,19200,38400,57600,115200,250000]
108
+-#define BAUDRATE 250000
109
++#define BAUDRATE 115200
110
+ 
111
+ // Enable the Bluetooth serial interface on AT90USB devices
112
+ //#define BLUETOOTH
113
+@@ -70,12 +70,12 @@ Here are some standard links for getting your machine calibrated:
114
+ // The following define selects which electronics board you have.
115
+ // Please choose the name from boards.h that matches your setup
116
+ #ifndef MOTHERBOARD
117
+-  #define MOTHERBOARD BOARD_RAMPS_13_EFB
118
++  #define MOTHERBOARD BOARD_RAMPS_14_EFB
119
+ #endif
120
+ 
121
+ // Optional custom name for your RepStrap or other custom machine
122
+ // Displayed in the LCD "Ready" message
123
+-//#define CUSTOM_MACHINE_NAME "3D Printer"
124
++#define CUSTOM_MACHINE_NAME "Fabrikator Mini"
125
+ 
126
+ // Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
127
+ // You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
128
+@@ -145,7 +145,7 @@ Here are some standard links for getting your machine calibrated:
129
+ //#define DUMMY_THERMISTOR_998_VALUE 25
130
+ //#define DUMMY_THERMISTOR_999_VALUE 100
131
+ // :{ '0': "Not used", '4': "10k !! do not use for a hotend. Bad resolution at high temp. !!", '1': "100k / 4.7k - EPCOS", '51': "100k / 1k - EPCOS", '6': "100k / 4.7k EPCOS - Not as accurate as Table 1", '5': "100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '7': "100k / 4.7k Honeywell 135-104LAG-J01", '71': "100k / 4.7k Honeywell 135-104LAF-J01", '8': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9': "100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10': "100k / 4.7k RS 198-961", '11': "100k / 4.7k beta 3950 1%", '12': "100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13': "100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '60': "100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '55': "100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '2': "200k / 4.7k - ATC Semitec 204GT-2", '52': "200k / 1k - ATC Semitec 204GT-2", '-2': "Thermocouple + MAX6675 (only for sensor 0)", '-1': "Thermocouple + AD595", '3': "Mendel-parts / 4.7k", '1047': "Pt1000 / 4.7k", '1010': "Pt1000 / 1k (non standard)", '20': "PT100 (Ultimainboard V2.x)", '147': "Pt100 / 4.7k", '110': "Pt100 / 1k (non-standard)", '998': "Dummy 1", '999': "Dummy 2" }
132
+-#define TEMP_SENSOR_0 1
133
++#define TEMP_SENSOR_0 3
134
+ #define TEMP_SENSOR_1 0
135
+ #define TEMP_SENSOR_2 0
136
+ #define TEMP_SENSOR_3 0
137
+@@ -172,10 +172,10 @@ Here are some standard links for getting your machine calibrated:
138
+ // When temperature exceeds max temp, your heater will be switched off.
139
+ // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
140
+ // You should use MINTEMP for thermistor short/failure protection.
141
+-#define HEATER_0_MAXTEMP 275
142
+-#define HEATER_1_MAXTEMP 275
143
+-#define HEATER_2_MAXTEMP 275
144
+-#define HEATER_3_MAXTEMP 275
145
++#define HEATER_0_MAXTEMP 230
146
++#define HEATER_1_MAXTEMP 230
147
++#define HEATER_2_MAXTEMP 230
148
++#define HEATER_3_MAXTEMP 230
149
+ #define BED_MAXTEMP 150
150
+ 
151
+ // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
152
+@@ -332,11 +332,11 @@ Here are some standard links for getting your machine calibrated:
153
+ 
154
+ // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
155
+ const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
156
+-const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
157
++const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
158
+ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
159
+-const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
160
++const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
161
+ const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
162
+-const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
163
++const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
164
+ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
165
+ //#define DISABLE_MAX_ENDSTOPS
166
+ //#define DISABLE_MIN_ENDSTOPS
167
+@@ -386,7 +386,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
168
+ // Sets direction of endstops when homing; 1=MAX, -1=MIN
169
+ // :[-1,1]
170
+ #define X_HOME_DIR -1
171
+-#define Y_HOME_DIR -1
172
++#define Y_HOME_DIR 1
173
+ #define Z_HOME_DIR -1
174
+ 
175
+ #define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
176
+@@ -398,9 +398,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
177
+ #define X_MIN_POS 0
178
+ #define Y_MIN_POS 0
179
+ #define Z_MIN_POS 0
180
+-#define X_MAX_POS 200
181
+-#define Y_MAX_POS 200
182
+-#define Z_MAX_POS 200
183
++#define X_MAX_POS 80
184
++#define Y_MAX_POS 80
185
++#define Z_MAX_POS 80
186
+ 
187
+ //===========================================================================
188
+ //========================= Filament Runout Sensor ==========================
189
+@@ -565,14 +565,14 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
190
+ // @section homing
191
+ 
192
+ // The position of the homing switches
193
+-//#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
194
++#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
195
+ //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
196
+ 
197
+ // Manual homing switch locations:
198
+ // For deltabots this means top and center of the Cartesian print volume.
199
+ #if ENABLED(MANUAL_HOME_POSITIONS)
200
+   #define MANUAL_X_HOME_POS 0
201
+-  #define MANUAL_Y_HOME_POS 0
202
++  #define MANUAL_Y_HOME_POS 80
203
+   #define MANUAL_Z_HOME_POS 0
204
+   //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
205
+ #endif
206
+@@ -583,17 +583,17 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
207
+  * MOVEMENT SETTINGS
208
+  */
209
+ 
210
+-#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0}  // set the homing speeds (mm/min)
211
++#define HOMING_FEEDRATE {10*60, 10*60, 2*60, 0}  // set the homing speeds (mm/min)
212
+ 
213
+ // default settings
214
+ 
215
+-#define DEFAULT_AXIS_STEPS_PER_UNIT   {80,80,4000,500}  // default steps per unit for Ultimaker
216
+-#define DEFAULT_MAX_FEEDRATE          {300, 300, 5, 25}    // (mm/sec)
217
+-#define DEFAULT_MAX_ACCELERATION      {3000,3000,100,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
218
++#define DEFAULT_AXIS_STEPS_PER_UNIT   {201.01,201.01,6366.88,97.11}  // default steps per unit for Ultimaker
219
++#define DEFAULT_MAX_FEEDRATE          {40, 40, 2, 40}    // (mm/sec)
220
++#define DEFAULT_MAX_ACCELERATION      {200,200,50,2000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
221
+ 
222
+-#define DEFAULT_ACCELERATION          3000    // X, Y, Z and E acceleration in mm/s^2 for printing moves
223
+-#define DEFAULT_RETRACT_ACCELERATION  3000    // E acceleration in mm/s^2 for retracts
224
+-#define DEFAULT_TRAVEL_ACCELERATION   3000    // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
225
++#define DEFAULT_ACCELERATION          300    // X, Y, Z and E acceleration in mm/s^2 for printing moves
226
++#define DEFAULT_RETRACT_ACCELERATION  2000    // E acceleration in mm/s^2 for retracts
227
++#define DEFAULT_TRAVEL_ACCELERATION   300    // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
228
+ 
229
+ // The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
230
+ #define DEFAULT_XYJERK                20.0    // (mm/sec)
231
+@@ -641,12 +641,12 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
232
+ 
233
+ // Preheat Constants
234
+ #define PLA_PREHEAT_HOTEND_TEMP 180
235
+-#define PLA_PREHEAT_HPB_TEMP 70
236
+-#define PLA_PREHEAT_FAN_SPEED 0   // Insert Value between 0 and 255
237
++#define PLA_PREHEAT_HPB_TEMP 0
238
++#define PLA_PREHEAT_FAN_SPEED 127   // Insert Value between 0 and 255
239
+ 
240
+-#define ABS_PREHEAT_HOTEND_TEMP 240
241
+-#define ABS_PREHEAT_HPB_TEMP 110
242
+-#define ABS_PREHEAT_FAN_SPEED 0   // Insert Value between 0 and 255
243
++#define ABS_PREHEAT_HOTEND_TEMP 200
244
++#define ABS_PREHEAT_HPB_TEMP 0
245
++#define ABS_PREHEAT_FAN_SPEED 127   // Insert Value between 0 and 255
246
+ 
247
+ //==============================LCD and SD support=============================
248
+ // @section lcd
249
+@@ -665,7 +665,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
250
+ 
251
+ //#define ULTRA_LCD  //general LCD support, also 16x2
252
+ //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
253
+-//#define SDSUPPORT // Enable SD Card Support in Hardware Console
254
++#define SDSUPPORT // Enable SD Card Support in Hardware Console
255
+ // Changed behaviour! If you need SDSUPPORT uncomment it!
256
+ //#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
257
+ //#define SDEXTRASLOW // Use even slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
258
+@@ -710,7 +710,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
259
+ // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
260
+ //
261
+ // ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
262
+-//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
263
++#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
264
+ 
265
+ // The RepRapWorld REPRAPWORLD_KEYPAD v1.1
266
+ // http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
267
+diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h
268
+index 51141fc..41d61d2 100644
269
+--- a/Marlin/Configuration_adv.h
270
++++ b/Marlin/Configuration_adv.h
271
+@@ -107,7 +107,7 @@
272
+ // extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
273
+ // Multiple extruders can be assigned to the same pin in which case
274
+ // the fan will turn on when any selected extruder is above the threshold.
275
+-#define EXTRUDER_0_AUTO_FAN_PIN -1
276
++#define EXTRUDER_0_AUTO_FAN_PIN 9
277
+ #define EXTRUDER_1_AUTO_FAN_PIN -1
278
+ #define EXTRUDER_2_AUTO_FAN_PIN -1
279
+ #define EXTRUDER_3_AUTO_FAN_PIN -1
280
+@@ -121,7 +121,7 @@
281
+ 
282
+ // @section homing
283
+ 
284
+-#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
285
++//#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
286
+ 
287
+ // @section extras
288
+ 
289
+diff --git a/Marlin/pins_RAMPS_13_EFB.h b/Marlin/pins_RAMPS_13_EFB.h
290
+index c75acd8..aa43d90 100644
291
+--- a/Marlin/pins_RAMPS_13_EFB.h
292
++++ b/Marlin/pins_RAMPS_13_EFB.h
293
+@@ -6,4 +6,8 @@
294
+ 
295
+ #define IS_RAMPS_EFB
296
+ 
297
+-#include "pins_RAMPS_13.h"
298
+\ No newline at end of file
299
++#include "pins_RAMPS_13.h"
300
++
301
++#undef FAN_PIN
302
++#define FAN_PIN -1
303
++
304
+-- 
305
+2.7.2
306
+</pre>
307
+

Loading…
Откажи
Сачувај