1 |
ron |
1 |
/**
|
|
|
2 |
* Marlin 3D Printer Firmware
|
|
|
3 |
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
|
4 |
*
|
|
|
5 |
* Based on Sprinter and grbl.
|
|
|
6 |
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
|
|
7 |
*
|
|
|
8 |
* This program is free software: you can redistribute it and/or modify
|
|
|
9 |
* it under the terms of the GNU General Public License as published by
|
|
|
10 |
* the Free Software Foundation, either version 3 of the License, or
|
|
|
11 |
* (at your option) any later version.
|
|
|
12 |
*
|
|
|
13 |
* This program is distributed in the hope that it will be useful,
|
|
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
16 |
* GNU General Public License for more details.
|
|
|
17 |
*
|
|
|
18 |
* You should have received a copy of the GNU General Public License
|
|
|
19 |
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
20 |
*
|
|
|
21 |
*/
|
|
|
22 |
|
|
|
23 |
/**
|
|
|
24 |
* Ultimaker pin assignments (Old electronics)
|
|
|
25 |
*/
|
|
|
26 |
|
|
|
27 |
/**
|
|
|
28 |
* Rev B 3 JAN 2017
|
|
|
29 |
*
|
|
|
30 |
* Details on pin definitions for M3, M4 & M5 spindle control commands and for
|
|
|
31 |
* the CASE_LIGHT_PIN are at the end of this file.
|
|
|
32 |
*
|
|
|
33 |
* This started out as an attempt to add pin definitions for M3, M4 & M5 spindle
|
|
|
34 |
* control commands but quickly turned into a head scratcher as the sources for
|
|
|
35 |
* the revisions provided inconsistent information.
|
|
|
36 |
*
|
|
|
37 |
* As best I can determine:
|
|
|
38 |
* 1.5.3 boards should use the pins_ULTIMAKER.h file which means the BOARD_NAME
|
|
|
39 |
* define in this file should say 1.5.3 rather than 1.5.4
|
|
|
40 |
* This file is meant for 1.1 - 1.3 boards.
|
|
|
41 |
* The endstops for the 1.0 boards use different definitions than on the 1.1 - 1.3
|
|
|
42 |
* boards.
|
|
|
43 |
*
|
|
|
44 |
* I've added sections that have the 1.0 and 1.5.3 + endstop definitions so you can
|
|
|
45 |
* easily switch if needed. I've also copied over the 1.5.3 + LCD definitions.
|
|
|
46 |
*
|
|
|
47 |
* To be 100% sure of the board you have:
|
|
|
48 |
* 1. In Configuration_adv.h enable "PINS_DEBUGGING"
|
|
|
49 |
* 2. Compile & uploade
|
|
|
50 |
* 3. Enter the command "M43 W1 I1". This command will report that pin nmumber and
|
|
|
51 |
* name of any pin that changes state.
|
|
|
52 |
* 4. Using a 1k (approximately) resistor pull the endstops and some of the LCD pins
|
|
|
53 |
* to ground and see what is reported.
|
|
|
54 |
* 5. If the reported pin doesn't match the file then try a different board revision
|
|
|
55 |
* and repeat steps 2 - 5
|
|
|
56 |
*/
|
|
|
57 |
|
|
|
58 |
#define board_rev_1_1_TO_1_3
|
|
|
59 |
//#define board_rev_1_0
|
|
|
60 |
//#define board_rev_1_5
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
|
|
|
64 |
#error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
|
|
|
65 |
#endif
|
|
|
66 |
|
|
|
67 |
#define DEFAULT_MACHINE_NAME "Ultimaker"
|
|
|
68 |
#define DEFAULT_SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin"
|
|
|
69 |
#define BOARD_NAME "Ultimaker <1.5.4"
|
|
|
70 |
|
|
|
71 |
//
|
|
|
72 |
// Limit Switches
|
|
|
73 |
//
|
|
|
74 |
#if ENABLED(board_rev_1_1_TO_1_3)
|
|
|
75 |
#define X_MIN_PIN 15 // SW1
|
|
|
76 |
#define X_MAX_PIN 14 // SW2
|
|
|
77 |
#define Y_MIN_PIN 17 // SW3
|
|
|
78 |
#define Y_MAX_PIN 16 // SW4
|
|
|
79 |
#define Z_MIN_PIN 19 // SW5
|
|
|
80 |
#define Z_MAX_PIN 18 // SW6
|
|
|
81 |
#endif
|
|
|
82 |
|
|
|
83 |
#if ENABLED(board_rev_1_0)
|
|
|
84 |
#define X_MIN_PIN 13 // SW1
|
|
|
85 |
#define X_MAX_PIN 12 // SW2
|
|
|
86 |
#define Y_MIN_PIN 11 // SW3
|
|
|
87 |
#define Y_MAX_PIN 10 // SW4
|
|
|
88 |
#define Z_MIN_PIN 9 // SW5
|
|
|
89 |
#define Z_MAX_PIN 8 // SW6
|
|
|
90 |
#endif
|
|
|
91 |
|
|
|
92 |
#if ENABLED(board_rev_1_5)
|
|
|
93 |
#define X_MIN_PIN 22
|
|
|
94 |
#define X_MAX_PIN 24
|
|
|
95 |
#define Y_MIN_PIN 26
|
|
|
96 |
#define Y_MAX_PIN 28
|
|
|
97 |
#define Z_MIN_PIN 30
|
|
|
98 |
#define Z_MAX_PIN 32
|
|
|
99 |
#endif
|
|
|
100 |
|
|
|
101 |
//
|
|
|
102 |
// Z Probe (when not Z_MIN_PIN)
|
|
|
103 |
//
|
|
|
104 |
#ifndef Z_MIN_PROBE_PIN
|
|
|
105 |
#define Z_MIN_PROBE_PIN Z_MAX_PIN
|
|
|
106 |
#endif
|
|
|
107 |
|
|
|
108 |
//
|
|
|
109 |
// Steppers
|
|
|
110 |
//
|
|
|
111 |
#define X_STEP_PIN 25
|
|
|
112 |
#define X_DIR_PIN 23
|
|
|
113 |
#define X_ENABLE_PIN 27
|
|
|
114 |
|
|
|
115 |
#define Y_STEP_PIN 31
|
|
|
116 |
#define Y_DIR_PIN 33
|
|
|
117 |
#define Y_ENABLE_PIN 29
|
|
|
118 |
|
|
|
119 |
#define Z_STEP_PIN 37
|
|
|
120 |
#define Z_DIR_PIN 39
|
|
|
121 |
#define Z_ENABLE_PIN 35
|
|
|
122 |
|
|
|
123 |
#define E0_STEP_PIN 43
|
|
|
124 |
#define E0_DIR_PIN 45
|
|
|
125 |
#define E0_ENABLE_PIN 41
|
|
|
126 |
|
|
|
127 |
#define E1_STEP_PIN -1 // 49
|
|
|
128 |
#define E1_DIR_PIN -1 // 47
|
|
|
129 |
#define E1_ENABLE_PIN -1 // 48
|
|
|
130 |
|
|
|
131 |
//
|
|
|
132 |
// Temperature Sensors
|
|
|
133 |
//
|
|
|
134 |
#define TEMP_0_PIN 8 // Analog Input
|
|
|
135 |
#define TEMP_1_PIN 1 // Analog Input
|
|
|
136 |
|
|
|
137 |
//
|
|
|
138 |
// Heaters / Fans
|
|
|
139 |
//
|
|
|
140 |
#define HEATER_0_PIN 2
|
|
|
141 |
//#define HEATER_1_PIN 3 // used for case light Rev A said "1"
|
|
|
142 |
#define HEATER_BED_PIN 4
|
|
|
143 |
|
|
|
144 |
//
|
|
|
145 |
// LCD / Controller
|
|
|
146 |
//
|
|
|
147 |
#if ENABLED(board_rev_1_0) || ENABLED(board_rev_1_1_TO_1_3)
|
|
|
148 |
#define LCD_PINS_RS 24
|
|
|
149 |
#define LCD_PINS_ENABLE 22
|
|
|
150 |
#define LCD_PINS_D4 36
|
|
|
151 |
#define LCD_PINS_D5 34
|
|
|
152 |
#define LCD_PINS_D6 32
|
|
|
153 |
#define LCD_PINS_D7 30
|
|
|
154 |
#elif ENABLED(board_rev_1_5) && ENABLED(ULTRA_LCD)
|
|
|
155 |
|
|
|
156 |
#define BEEPER_PIN 18
|
|
|
157 |
|
|
|
158 |
#if ENABLED(NEWPANEL)
|
|
|
159 |
|
|
|
160 |
#define LCD_PINS_RS 20
|
|
|
161 |
#define LCD_PINS_ENABLE 17
|
|
|
162 |
#define LCD_PINS_D4 16
|
|
|
163 |
#define LCD_PINS_D5 21
|
|
|
164 |
#define LCD_PINS_D6 5
|
|
|
165 |
#define LCD_PINS_D7 6
|
|
|
166 |
|
|
|
167 |
// buttons are directly attached
|
|
|
168 |
#define BTN_EN1 40
|
|
|
169 |
#define BTN_EN2 42
|
|
|
170 |
#define BTN_ENC 19
|
|
|
171 |
|
|
|
172 |
#define SD_DETECT_PIN 38
|
|
|
173 |
|
|
|
174 |
#else // !NEWPANEL - Old style panel with shift register
|
|
|
175 |
|
|
|
176 |
// buttons are attached to a shift register
|
|
|
177 |
#define SHIFT_CLK 38
|
|
|
178 |
#define SHIFT_LD 42
|
|
|
179 |
#define SHIFT_OUT 40
|
|
|
180 |
#define SHIFT_EN 17
|
|
|
181 |
|
|
|
182 |
#define LCD_PINS_RS 16
|
|
|
183 |
#define LCD_PINS_ENABLE 5
|
|
|
184 |
#define LCD_PINS_D4 6
|
|
|
185 |
#define LCD_PINS_D5 21
|
|
|
186 |
#define LCD_PINS_D6 20
|
|
|
187 |
#define LCD_PINS_D7 19
|
|
|
188 |
|
|
|
189 |
#define SD_DETECT_PIN -1
|
|
|
190 |
|
|
|
191 |
#endif // !NEWPANEL
|
|
|
192 |
|
|
|
193 |
#endif // ULTRA_LCD
|
|
|
194 |
|
|
|
195 |
//
|
|
|
196 |
// case light - see spindle section for more info on available hardware PWMs
|
|
|
197 |
//
|
|
|
198 |
#if !PIN_EXISTS(CASE_LIGHT) && ENABLED(board_rev_1_5)
|
|
|
199 |
#define CASE_LIGHT_PIN 7 // use PWM - MUST BE HARDWARE PWM
|
|
|
200 |
#endif
|
|
|
201 |
|
|
|
202 |
//
|
|
|
203 |
// M3/M4/M5 - Spindle/Laser Control
|
|
|
204 |
//
|
|
|
205 |
#if ENABLED(SPINDLE_LASER_ENABLE)
|
|
|
206 |
|
|
|
207 |
#if ENABLED(board_rev_1_0) // use the last three SW positions
|
|
|
208 |
|
|
|
209 |
#undef Z_MIN_PROBE_PIN
|
|
|
210 |
#undef X_MIN_PIN // SW1
|
|
|
211 |
#undef X_MAX_PIN // SW2
|
|
|
212 |
#undef Y_MIN_PIN // SW3
|
|
|
213 |
#undef Y_MAX_PIN // SW4
|
|
|
214 |
#undef Z_MIN_PIN // SW5
|
|
|
215 |
#undef Z_MAX_PIN // SW6
|
|
|
216 |
|
|
|
217 |
#define X_STOP_PIN 13 // SW1 (didn't change) - also has a useable hardware PWM
|
|
|
218 |
#define Y_STOP_PIN 12 // SW2
|
|
|
219 |
#define Z_STOP_PIN 11 // SW3
|
|
|
220 |
|
|
|
221 |
#define SPINDLE_DIR_PIN 10 // SW4
|
|
|
222 |
#define SPINDLE_LASER_PWM_PIN 9 // SW5 MUST BE HARDWARE PWM
|
|
|
223 |
#define SPINDLE_LASER_ENABLE_PIN 8 // SW6 Pin should have a pullup!
|
|
|
224 |
|
|
|
225 |
#elif ENABLED(board_rev_1_5) // use the same pins - but now they are on a different connector
|
|
|
226 |
|
|
|
227 |
#define SPINDLE_DIR_PIN 10 // EXP3-6 (silkscreen says 10)
|
|
|
228 |
#define SPINDLE_LASER_PWM_PIN 9 // EXP3-7 (silkscreen says 9) MUST BE HARDWARE PWM
|
|
|
229 |
#define SPINDLE_LASER_ENABLE_PIN 8 // EXP3-8 (silkscreen says 8) Pin should have a pullup!
|
|
|
230 |
|
|
|
231 |
#elif ENABLED(board_rev_1_1_TO_1_3)
|
|
|
232 |
|
|
|
233 |
/**
|
|
|
234 |
* Only four hardware PWMs physically connected to anything on these boards:
|
|
|
235 |
*
|
|
|
236 |
* HEATER_0_PIN 2 silkscreen varies - usually "PWM 1" or "HEATER1"
|
|
|
237 |
* HEATER_1_PIN 3 silkscreen varies - usually "PWM 2" or "HEATER2"
|
|
|
238 |
* HEATER_BED_PIN 4 silkscreen varies - usually "PWM 3" or "HEATED BED"
|
|
|
239 |
* E0_DIR_PIN 45
|
|
|
240 |
*
|
|
|
241 |
* If one of the heaters is used then special precautions will usually be needed.
|
|
|
242 |
* They have an LED and resistor pullup to +24V which could damage 3.3V-5V ICs.
|
|
|
243 |
*/
|
|
|
244 |
#if EXTRUDERS == 1 // Move E0 stepper module to the spare and get signals from E0
|
|
|
245 |
#undef E0_STEP_PIN
|
|
|
246 |
#undef E0_DIR_PIN
|
|
|
247 |
#undef E0_ENABLE_PIN
|
|
|
248 |
#define E0_STEP_PIN 49
|
|
|
249 |
#define E0_DIR_PIN 47
|
|
|
250 |
#define E0_ENABLE_PIN 48
|
|
|
251 |
#define SPINDLE_DIR_PIN 43
|
|
|
252 |
#define SPINDLE_LASER_PWM_PIN 45 // MUST BE HARDWARE PWM
|
|
|
253 |
#define SPINDLE_LASER_ENABLE_PIN 41 // Pin should have a pullup!
|
|
|
254 |
#elif TEMP_SENSOR_BED == 0 // Can't use E0 so see if HEATER_BED_PIN is available
|
|
|
255 |
#undef HEATER_BED_PIN
|
|
|
256 |
#define SPINDLE_DIR_PIN 38 // Probably pin 4 on 10 pin connector closest to the E0 socket
|
|
|
257 |
#define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM - Special precautions usually needed.
|
|
|
258 |
#define SPINDLE_LASER_ENABLE_PIN 40 // Pin should have a pullup! (Probably pin 6 on the 10-pin
|
|
|
259 |
// connector closest to the E0 socket)
|
|
|
260 |
#endif
|
|
|
261 |
#endif
|
|
|
262 |
#endif
|
|
|
263 |
|
|
|
264 |
/**
|
|
|
265 |
* Where to get the spindle signals on the E0 socket
|
|
|
266 |
*
|
|
|
267 |
* spindle signal socket name socket name
|
|
|
268 |
* -------
|
|
|
269 |
* SPINDLE_LASER_ENABLE_PIN /ENABLE *| |O VMOT
|
|
|
270 |
* MS1 O| |O GND
|
|
|
271 |
* MS2 O| |O 2B
|
|
|
272 |
* MS3 O| |O 2A
|
|
|
273 |
* /RESET O| |O 1A
|
|
|
274 |
* /SLEEP O| |O 1B
|
|
|
275 |
* SPINDLE_DIR_PIN STEP O| |O VDD
|
|
|
276 |
* SPINDLE_LASER_PWM_PIN DIR O| |O GND
|
|
|
277 |
* -------
|
|
|
278 |
* * - pin closest to MS1, MS2 & MS3 jumpers on the board
|
|
|
279 |
*
|
|
|
280 |
* Note: Socket names vary from vendor to vendor.
|
|
|
281 |
*/
|