My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pins_RAMPS_S_12.h 7.5KB

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