Prusa MINI Firmware overview
pins_RAMBO.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  * IMPORTANT NOTE:
26  * Rambo users should be sure to compile Marlin using either the RAMBo
27  * board type if using the Arduino IDE - available via the link below - or
28  * the 'rambo' environment if using platformio, by specifying '-e rambo' on
29  * the command line or by changing the value of the 'env_default' variable to
30  * 'rambo' in the supplied platformio.ini.
31  *
32  * If you don't compile using the proper board type, the RAMBo's extended
33  * pins will likely be unavailable and accessories/addons may not work.
34  *
35  * Instructions for installing the Arduino RAMBo board type for the
36  * Arduino IDE are available at:
37  * http://reprap.org/wiki/Rambo_firmware
38  */
39 
40 /**
41  * Rambo pin assignments
42  */
43 
44 #ifndef __AVR_ATmega2560__
45  #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
46 #endif
47 
48 #define BOARD_INFO_NAME "Rambo"
49 
50 //
51 // Servos
52 //
53 #define SERVO0_PIN 22 // Motor header MX1
54 #define SERVO1_PIN 23 // Motor header MX2
55 #define SERVO2_PIN 24 // Motor header MX3
56 #define SERVO3_PIN 5 // PWM header pin 5
57 
58 //
59 // Limit Switches
60 //
61 #define X_MIN_PIN 12
62 #define X_MAX_PIN 24
63 #define Y_MIN_PIN 11
64 #define Y_MAX_PIN 23
65 #define Z_MIN_PIN 10
66 #define Z_MAX_PIN 30
67 
68 //
69 // Z Probe (when not Z_MIN_PIN)
70 //
71 #ifndef Z_MIN_PROBE_PIN
72  #define Z_MIN_PROBE_PIN 30
73 #endif
74 
75 //
76 // Steppers
77 //
78 #define X_STEP_PIN 37
79 #define X_DIR_PIN 48
80 #define X_ENABLE_PIN 29
81 
82 #define Y_STEP_PIN 36
83 #define Y_DIR_PIN 49
84 #define Y_ENABLE_PIN 28
85 
86 #define Z_STEP_PIN 35
87 #define Z_DIR_PIN 47
88 #define Z_ENABLE_PIN 27
89 
90 #define E0_STEP_PIN 34
91 #define E0_DIR_PIN 43
92 #define E0_ENABLE_PIN 26
93 
94 #define E1_STEP_PIN 33
95 #define E1_DIR_PIN 42
96 #define E1_ENABLE_PIN 25
97 
98 // Microstepping pins - Mapping not from fastio.h (?)
99 #define X_MS1_PIN 40
100 #define X_MS2_PIN 41
101 #define Y_MS1_PIN 69
102 #define Y_MS2_PIN 39
103 #define Z_MS1_PIN 68
104 #define Z_MS2_PIN 67
105 #define E0_MS1_PIN 65
106 #define E0_MS2_PIN 66
107 #define E1_MS1_PIN 63
108 #define E1_MS2_PIN 64
109 
110 #define DIGIPOTSS_PIN 38
111 #define DIGIPOT_CHANNELS { 4,5,3,0,1 } // X Y Z E0 E1 digipot channels to stepper driver mapping
112 #ifndef DIGIPOT_MOTOR_CURRENT
113  #define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
114 #endif
115 
116 //
117 // Temperature Sensors
118 //
119 #define TEMP_0_PIN 0 // Analog Input
120 #define TEMP_1_PIN 1 // Analog Input
121 #define TEMP_BED_PIN 2 // Analog Input
122 
123 //
124 // Heaters / Fans
125 //
126 #define HEATER_0_PIN 9
127 #define HEATER_1_PIN 7
128 #define HEATER_2_PIN 6
129 #define HEATER_BED_PIN 3
130 
131 #ifndef FAN_PIN
132  #define FAN_PIN 8
133 #endif
134 #define FAN1_PIN 6
135 #define FAN2_PIN 2
136 
137 //
138 // Misc. Functions
139 //
140 #define SDSS 53
141 #define LED_PIN 13
142 #define PS_ON_PIN 4
143 #define CASE_LIGHT_PIN 46
144 
145 #ifndef FILWIDTH_PIN
146  #define FILWIDTH_PIN 3 // Analog Input
147 #endif
148 
149 //
150 // M3/M4/M5 - Spindle/Laser Control
151 //
152 #define SPINDLE_LASER_PWM_PIN 45 // Hardware PWM
153 #define SPINDLE_LASER_ENA_PIN 31 // Pullup!
154 #define SPINDLE_DIR_PIN 32
155 
156 //
157 // M7/M8/M9 - Coolant Control
158 //
159 #define COOLANT_MIST_PIN 22
160 #define COOLANT_FLOOD_PIN 44
161 
162 //
163 // Průša i3 MK2 Multiplexer Support
164 //
165 #define E_MUX0_PIN 17
166 #define E_MUX1_PIN 16
167 #define E_MUX2_PIN 84 // 84 in MK2 Firmware
168 
169 //
170 // LCD / Controller
171 //
172 #if HAS_SPI_LCD || TOUCH_UI_ULTIPANEL
173 
174  #define KILL_PIN 80
175 
176  #if ENABLED(ULTIPANEL) || TOUCH_UI_ULTIPANEL
177 
178  #define LCD_PINS_RS 70
179  #define LCD_PINS_ENABLE 71
180  #define LCD_PINS_D4 72
181  #define LCD_PINS_D5 73
182  #define LCD_PINS_D6 74
183  #define LCD_PINS_D7 75
184 
185  #if ANY(VIKI2, miniVIKI)
186  #define BEEPER_PIN 44
187  // NB: Panucatt's Viki 2.0 wiring diagram (v1.2) indicates that the
188  // beeper/buzzer is connected to pin 33; however, the pin used in the
189  // diagram is actually pin 44, so this is correct.
190 
191  #define DOGLCD_A0 70
192  #define DOGLCD_CS 71
193  #define LCD_SCREEN_ROT_180
194 
195  #define BTN_EN1 85
196  #define BTN_EN2 84
197  #define BTN_ENC 83
198 
199  #define SD_DETECT_PIN -1 // Pin 72 if using easy adapter board
200 
201  #define STAT_LED_RED_PIN 22
202  #define STAT_LED_BLUE_PIN 32
203 
204  #else // !VIKI2 && !miniVIKI
205 
206  #define BEEPER_PIN 79 // AUX-4
207 
208  // AUX-2
209  #define BTN_EN1 76
210  #define BTN_EN2 77
211  #define BTN_ENC 78
212 
213  #define SD_DETECT_PIN 81
214 
215  #endif // !VIKI2 && !miniVIKI
216 
217  #else // !NEWPANEL - old style panel with shift register
218 
219  // No Beeper added
220  #define BEEPER_PIN 33
221 
222  // Buttons attached to a shift register
223  // Not wired yet
224  //#define SHIFT_CLK 38
225  //#define SHIFT_LD 42
226  //#define SHIFT_OUT 40
227  //#define SHIFT_EN 17
228 
229  #define LCD_PINS_RS 75
230  #define LCD_PINS_ENABLE 17
231  #define LCD_PINS_D4 23
232  #define LCD_PINS_D5 25
233  #define LCD_PINS_D6 27
234  #define LCD_PINS_D7 29
235 
236  #endif // !NEWPANEL
237 
238 #endif // HAS_SPI_LCD