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