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.4KB

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