Skip to content

Commit ab8ce36

Browse files
MichaelRabektharts
authored andcommitted
Support for Ramps-S v1.2 (MarlinFirmware#19815)
1 parent dcfcb5e commit ab8ce36

File tree

4 files changed

+285
-1
lines changed

4 files changed

+285
-1
lines changed

Marlin/src/core/boards.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@
109109
#define BOARD_COPYMASTER_3D 1153 // Copymaster 3D
110110
#define BOARD_ORTUR_4 1154 // Ortur 4
111111
#define BOARD_TENLOG_D3_HERO 1155 // Tenlog D3 Hero IDEX printer
112+
#define BOARD_RAMPS_S_12_EEFB 1156 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed)
113+
#define BOARD_RAMPS_S_12_EEEB 1157 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed)
114+
#define BOARD_RAMPS_S_12_EFFB 1158 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed)
112115

113116
//
114117
// RAMBo and derivatives

Marlin/src/pins/pins.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,12 @@
207207
#include "ramps/pins_TENLOG_D3_HERO.h" // ATmega2560 env:mega2560
208208
#elif MB(MKS_GEN_L_V21)
209209
#include "ramps/pins_MKS_GEN_L_V21.h" // ATmega2560 env:mega2560
210+
#elif MB(RAMPS_S_12_EEFB)
211+
#include "ramps/pins_RAMPS_S_12.h" // ATmega2560 env:mega2560
212+
#elif MB(RAMPS_S_12_EEEB)
213+
#include "ramps/pins_RAMPS_S_12.h" // ATmega2560 env:mega2560
214+
#elif MB(RAMPS_S_12_EFFB)
215+
#include "ramps/pins_RAMPS_S_12.h" // ATmega2560 env:mega2560
210216

211217
//
212218
// RAMBo and derivatives

Marlin/src/pins/ramps/pins_RAMPS.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
#endif
5353

5454
#if NOT_TARGET(IS_RAMPS_SMART, IS_RAMPS_DUO, IS_RAMPS4DUE, TARGET_LPC1768, __AVR_ATmega1280__, __AVR_ATmega2560__)
55-
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
55+
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' (or other appropriate target) in 'Tools > Board.'"
5656
#endif
5757

5858
// Custom flags and defines for the build
Lines changed: 275 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,275 @@
1+
/**
2+
* Marlin 3D Printer Firmware
3+
* Copyright (c) 2020 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 <https://www.gnu.org/licenses/>.
20+
*
21+
*/
22+
#pragma once
23+
24+
/**
25+
* Arduino Mega with RAMPS-S v1.2 by Sakul.cz pin assignments
26+
* Written by Michal Rábek <[email protected]>
27+
*
28+
* Applies to the following boards:
29+
*
30+
* BOARD_RAMPS_S_12_EEFB Ramps S 1.2 (Hotend0, Hotend1, Fan, Bed)
31+
* BOARD_RAMPS_S_12_EEEB Ramps S 1.2 (Hotend0, Hotend1, Hotend2, Bed)
32+
* BOARD_RAMPS_S_12_EFFB Ramps S 1.2 (Hotend, Fan0, Fan1, Bed)
33+
*
34+
* Other pins_MYBOARD.h files may override these defaults
35+
*/
36+
37+
#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__)
38+
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
39+
#endif
40+
41+
// Custom flags and defines for the build
42+
//#define BOARD_CUSTOM_BUILD_FLAGS -D__FOO__
43+
44+
#ifndef BOARD_INFO_NAME
45+
#define BOARD_INFO_NAME "RAMPS S 1.2"
46+
#endif
47+
48+
//
49+
// Servos
50+
//
51+
#ifndef SERVO0_PIN
52+
#define SERVO0_PIN 10
53+
#endif
54+
#ifndef SERVO1_PIN
55+
#define SERVO1_PIN 11
56+
#endif
57+
#ifndef SERVO2_PIN
58+
#define SERVO2_PIN 12
59+
#endif
60+
#ifndef SERVO3_PIN
61+
#define SERVO3_PIN 44
62+
#endif
63+
64+
//
65+
// Limit Switches
66+
//
67+
#ifndef X_STOP_PIN
68+
#ifndef X_MIN_PIN
69+
#define X_MIN_PIN 37
70+
#endif
71+
#ifndef X_MAX_PIN
72+
#define X_MAX_PIN 36
73+
#endif
74+
#endif
75+
#ifndef Y_STOP_PIN
76+
#ifndef Y_MIN_PIN
77+
#define Y_MIN_PIN 35
78+
#endif
79+
#ifndef Y_MAX_PIN
80+
#define Y_MAX_PIN 34
81+
#endif
82+
#endif
83+
#ifndef Z_STOP_PIN
84+
#ifndef Z_MIN_PIN
85+
#define Z_MIN_PIN 33
86+
#endif
87+
#ifndef Z_MAX_PIN
88+
#define Z_MAX_PIN 32
89+
#endif
90+
#endif
91+
92+
//
93+
// Z Probe (when not Z_MIN_PIN)
94+
//
95+
#ifndef Z_MIN_PROBE_PIN
96+
#define Z_MIN_PROBE_PIN 5
97+
#endif
98+
99+
//
100+
// Filament Runout Sensor
101+
//
102+
#ifndef FIL_RUNOUT_PIN
103+
#define FIL_RUNOUT_PIN 44 // RAMPS_S S3 on the servos connector
104+
#endif
105+
106+
//
107+
// Steppers
108+
//
109+
#define X_STEP_PIN 17
110+
#define X_DIR_PIN 16
111+
#define X_ENABLE_PIN 48
112+
113+
#define Y_STEP_PIN 54
114+
#define Y_DIR_PIN 47
115+
#define Y_ENABLE_PIN 55
116+
117+
#ifndef Z_STEP_PIN
118+
#define Z_STEP_PIN 57
119+
#endif
120+
#define Z_DIR_PIN 56
121+
#define Z_ENABLE_PIN 62
122+
123+
#define E0_STEP_PIN 23
124+
#define E0_DIR_PIN 22
125+
#define E0_ENABLE_PIN 24
126+
127+
#define E1_STEP_PIN 26
128+
#define E1_DIR_PIN 25
129+
#define E1_ENABLE_PIN 27
130+
131+
#define E2_STEP_PIN 29
132+
#define E2_DIR_PIN 28
133+
#define E2_ENABLE_PIN 39
134+
135+
//
136+
// Temperature Sensors
137+
//
138+
#ifndef TEMP_0_PIN
139+
#define TEMP_0_PIN 15 // Analog Input
140+
#endif
141+
#ifndef TEMP_1_PIN
142+
#define TEMP_1_PIN 14 // Analog Input
143+
#endif
144+
#ifndef TEMP_2_PIN
145+
#define TEMP_2_PIN 13 // Analog Input
146+
#endif
147+
#ifndef TEMP_3_PIN
148+
#define TEMP_3_PIN 12 // Analog Input
149+
#endif
150+
#ifndef TEMP_BED_PIN
151+
#define TEMP_BED_PIN 11 // Analog Input
152+
#endif
153+
154+
//
155+
// Heaters / Fans
156+
//
157+
#ifndef MOSFET_D_PIN
158+
#define MOSFET_D_PIN -1
159+
#endif
160+
#ifndef RAMPS_S_HE_0
161+
#define RAMPS_S_HE_0 2
162+
#endif
163+
#ifndef RAMPS_S_HE_1
164+
#define RAMPS_S_HE_1 3
165+
#endif
166+
#ifndef RAMPS_S_HE_2
167+
#define RAMPS_S_HE_2 6
168+
#endif
169+
170+
#define HEATER_BED_PIN 9
171+
172+
#define HEATER_0_PIN RAMPS_S_HE_0
173+
174+
#if MB(RAMPS_S_12_EEFB) // Hotend0, Hotend1, Fan, Bed
175+
#define HEATER_1_PIN RAMPS_S_HE_1
176+
#define FAN_PIN RAMPS_S_HE_2
177+
#elif MB(RAMPS_S_12_EEEB) // Hotend0, Hotend1, Hotend2, Bed
178+
#define HEATER_1_PIN RAMPS_S_HE_1
179+
#define HEATER_2_PIN RAMPS_S_HE_2
180+
#elif MB(RAMPS_S_12_EFFB) // Hotend, Fan0, Fan1, Bed
181+
#define FAN_PIN RAMPS_S_HE_1
182+
#define FAN1_PIN RAMPS_S_HE_2
183+
#endif
184+
185+
//
186+
// Misc. Functions
187+
//
188+
#define SDSS 53
189+
#define LED_PIN 13
190+
191+
#ifndef KILL_PIN
192+
#define KILL_PIN 46
193+
#endif
194+
195+
#ifndef FILWIDTH_PIN
196+
#define FILWIDTH_PIN 60 // Analog Input on EXTEND
197+
#endif
198+
199+
#ifndef PS_ON_PIN
200+
#define PS_ON_PIN 12 // RAMPS_S S2 on the servos connector
201+
#endif
202+
203+
#if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN)
204+
#if NUM_SERVOS <= 1 // Prefer the servo connector
205+
#define CASE_LIGHT_PIN 12 // Hardware PWM (RAMPS_S S1 on the servos connector)
206+
#elif HAS_FREE_AUX2_PINS
207+
#define CASE_LIGHT_PIN 44 // Hardware PWM
208+
#endif
209+
#endif
210+
211+
//
212+
// M3/M4/M5 - Spindle/Laser Control
213+
//
214+
#if HAS_CUTTER && !defined(SPINDLE_LASER_ENA_PIN)
215+
#define SPINDLE_LASER_ENA_PIN 4 // Pullup or pulldown!
216+
#define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM
217+
#define SPINDLE_DIR_PIN 5
218+
#endif
219+
220+
//
221+
// TMC software SPI
222+
//
223+
#if ENABLED(TMC_USE_SW_SPI)
224+
#ifndef TMC_SW_MOSI
225+
#define TMC_SW_MOSI 51
226+
#endif
227+
#ifndef TMC_SW_MISO
228+
#define TMC_SW_MISO 50
229+
#endif
230+
#ifndef TMC_SW_SCK
231+
#define TMC_SW_SCK 53
232+
#endif
233+
#endif
234+
235+
//
236+
// Průša i3 MK2 Multiplexer Support
237+
//
238+
#ifndef E_MUX0_PIN
239+
#define E_MUX0_PIN 29 // E2_STEP_PIN
240+
#endif
241+
#ifndef E_MUX1_PIN
242+
#define E_MUX1_PIN 28 // E2_DIR_PIN
243+
#endif
244+
#ifndef E_MUX2_PIN
245+
#define E_MUX2_PIN 39 // E2_ENABLE_PIN
246+
#endif
247+
248+
//////////////////////////
249+
// LCDs and Controllers //
250+
//////////////////////////
251+
252+
//
253+
// LCD Display output pins
254+
//
255+
#if HAS_WIRED_LCD
256+
#define BEEPER_PIN 45
257+
#define LCD_PINS_RS 19
258+
#define LCD_PINS_ENABLE 49
259+
#define LCD_PINS_D4 18
260+
#define LCD_PINS_D5 30
261+
#define LCD_PINS_D6 41
262+
#define LCD_PINS_D7 31
263+
#ifndef SD_DETECT_PIN
264+
#define SD_DETECT_PIN 38
265+
#endif
266+
#endif
267+
268+
//
269+
// LCD Display input pins
270+
//
271+
#if IS_NEWPANEL
272+
#define BTN_EN1 40
273+
#define BTN_EN2 42
274+
#define BTN_ENC 43
275+
#endif

0 commit comments

Comments
 (0)