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_Z_BOLT_X_SERIES.h 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  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. /**
  23. * Z-Bolt X Series board – based on Arduino Mega2560
  24. */
  25. #if HOTENDS > 4 || E_STEPPERS > 4
  26. #error "Z-Bolt X Series board supports up to 4 hotends / E-steppers."
  27. #endif
  28. #define BOARD_NAME "Z-Bolt X Series"
  29. #if ENABLED(TARGET_LPC1768)
  30. #error "Oops! Set MOTHERBOARD to an LPC1768-based board when building for LPC1768."
  31. #elif defined(__STM32F1__)
  32. #error "Oops! Set MOTHERBOARD to an STM32F1-based board when building for STM32F1."
  33. #endif
  34. #if DISABLED(IS_RAMPS_SMART, IS_RAMPS_DUO, IS_RAMPS4DUE, TARGET_LPC1768)
  35. #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
  36. #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
  37. #endif
  38. #endif
  39. //
  40. // Servos
  41. //
  42. #ifndef SERVO0_PIN
  43. #define SERVO0_PIN 11
  44. #endif
  45. #ifndef SERVO3_PIN
  46. #define SERVO3_PIN 4
  47. #endif
  48. //
  49. // Limit Switches
  50. //
  51. #define X_MIN_PIN 3
  52. #ifndef X_MAX_PIN
  53. #define X_MAX_PIN 2
  54. #endif
  55. #define Y_MIN_PIN 14
  56. #define Y_MAX_PIN 15
  57. #define Z_MIN_PIN 18
  58. #define Z_MAX_PIN 19
  59. //
  60. // Z Probe (when not Z_MIN_PIN)
  61. //
  62. #ifndef Z_MIN_PROBE_PIN
  63. #define Z_MIN_PROBE_PIN 32
  64. #endif
  65. //
  66. // Steppers
  67. //
  68. #define X_STEP_PIN 54
  69. #define X_DIR_PIN 55
  70. #define X_ENABLE_PIN 38
  71. #ifndef X_CS_PIN
  72. #define X_CS_PIN -1
  73. #endif
  74. #define Y_STEP_PIN 60
  75. #define Y_DIR_PIN 61
  76. #define Y_ENABLE_PIN 56
  77. #ifndef Y_CS_PIN
  78. #define Y_CS_PIN -1
  79. #endif
  80. #define Z_STEP_PIN 46
  81. #define Z_DIR_PIN 48
  82. #define Z_ENABLE_PIN 62
  83. #ifndef Z_CS_PIN
  84. #define Z_CS_PIN -1
  85. #endif
  86. #define E0_STEP_PIN 26
  87. #define E0_DIR_PIN 28
  88. #define E0_ENABLE_PIN 24
  89. #ifndef E0_CS_PIN
  90. #define E0_CS_PIN -1
  91. #endif
  92. #define E1_STEP_PIN 36
  93. #define E1_DIR_PIN 34
  94. #define E1_ENABLE_PIN 30
  95. #ifndef E1_CS_PIN
  96. #define E1_CS_PIN -1
  97. #endif
  98. // Red
  99. #define E2_STEP_PIN 42
  100. #define E2_DIR_PIN 40
  101. #define E2_ENABLE_PIN 65
  102. #ifndef E2_CS_PIN
  103. #define E2_CS_PIN -1
  104. #endif
  105. // Black
  106. #define E3_STEP_PIN 44
  107. #define E3_DIR_PIN 64
  108. #define E3_ENABLE_PIN 66
  109. #ifndef E3_CS_PIN
  110. #define E3_CS_PIN -1
  111. #endif
  112. //
  113. // Temperature Sensors
  114. //
  115. #define TEMP_0_PIN 13 // Analog Input
  116. #define TEMP_1_PIN 15 // Analog Input
  117. #define TEMP_2_PIN 5 // Analog Input (BLACK)
  118. #define TEMP_3_PIN 9 // Analog Input (RED)
  119. #define TEMP_BED_PIN 14 // Analog Input
  120. //
  121. // Heaters / Fans
  122. //
  123. #define HEATER_0_PIN 10
  124. #define HEATER_1_PIN 7
  125. #define HEATER_2_PIN 6
  126. #define HEATER_3_PIN 5
  127. #define HEATER_BED_PIN 8
  128. #define FAN_PIN 9
  129. //
  130. // Misc. Functions
  131. //
  132. #define SDSS 53
  133. #define LED_PIN 13
  134. #ifndef FILWIDTH_PIN
  135. #define FILWIDTH_PIN 5 // Analog Input on AUX2
  136. #endif
  137. // Оn the servos connector
  138. #ifndef FIL_RUNOUT_PIN
  139. #define FIL_RUNOUT_PIN 4
  140. #endif
  141. #ifndef PS_ON_PIN
  142. #define PS_ON_PIN 12
  143. #endif
  144. #define AUX2_PINS_FREE !( BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD) )
  145. #if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN)
  146. #if NUM_SERVOS <= 1 // try to use servo connector first
  147. #define CASE_LIGHT_PIN 6 // MUST BE HARDWARE PWM
  148. #elif AUX2_PINS_FREE
  149. #define CASE_LIGHT_PIN 44 // MUST BE HARDWARE PWM
  150. #endif
  151. #endif
  152. //
  153. // M3/M4/M5 - Spindle/Laser Control
  154. //
  155. #if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA)
  156. #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first
  157. #define SPINDLE_LASER_ENA_PIN 4 // Pin should have a pullup/pulldown!
  158. #define SPINDLE_LASER_PWM_PIN 6 // MUST BE HARDWARE PWM
  159. #define SPINDLE_DIR_PIN 5
  160. #elif AUX2_PINS_FREE
  161. #define SPINDLE_LASER_ENA_PIN 40 // Pin should have a pullup/pulldown!
  162. #define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM
  163. #define SPINDLE_DIR_PIN 65
  164. #endif
  165. #endif
  166. #undef AUX2_PINS_FREE
  167. //
  168. // TMC software SPI
  169. //
  170. #if ENABLED(TMC_USE_SW_SPI)
  171. #ifndef TMC_SW_MOSI
  172. #define TMC_SW_MOSI 66
  173. #endif
  174. #ifndef TMC_SW_MISO
  175. #define TMC_SW_MISO 44
  176. #endif
  177. #ifndef TMC_SW_SCK
  178. #define TMC_SW_SCK 64
  179. #endif
  180. #endif
  181. #if HAS_DRIVER(TMC2208)
  182. /**
  183. * TMC2208 stepper drivers
  184. *
  185. * Hardware serial communication ports.
  186. * If undefined software serial is used according to the pins below
  187. */
  188. //#define X_HARDWARE_SERIAL Serial1
  189. //#define X2_HARDWARE_SERIAL Serial1
  190. //#define Y_HARDWARE_SERIAL Serial1
  191. //#define Y2_HARDWARE_SERIAL Serial1
  192. //#define Z_HARDWARE_SERIAL Serial1
  193. //#define Z2_HARDWARE_SERIAL Serial1
  194. //#define E0_HARDWARE_SERIAL Serial1
  195. //#define E1_HARDWARE_SERIAL Serial1
  196. //#define E2_HARDWARE_SERIAL Serial1
  197. //#define E3_HARDWARE_SERIAL Serial1
  198. //#define E4_HARDWARE_SERIAL Serial1
  199. //
  200. // Software serial
  201. //
  202. #define X_SERIAL_TX_PIN 40
  203. #define X_SERIAL_RX_PIN 63
  204. #define X2_SERIAL_TX_PIN -1
  205. #define X2_SERIAL_RX_PIN -1
  206. #define Y_SERIAL_TX_PIN 59
  207. #define Y_SERIAL_RX_PIN 64
  208. #define Y2_SERIAL_TX_PIN -1
  209. #define Y2_SERIAL_RX_PIN -1
  210. #define Z_SERIAL_TX_PIN 42
  211. #define Z_SERIAL_RX_PIN 65
  212. #define Z2_SERIAL_TX_PIN -1
  213. #define Z2_SERIAL_RX_PIN -1
  214. #define E0_SERIAL_TX_PIN 44
  215. #define E0_SERIAL_RX_PIN 66
  216. #define E1_SERIAL_TX_PIN -1
  217. #define E1_SERIAL_RX_PIN -1
  218. #define E2_SERIAL_TX_PIN -1
  219. #define E2_SERIAL_RX_PIN -1
  220. #define E3_SERIAL_TX_PIN -1
  221. #define E3_SERIAL_RX_PIN -1
  222. #define E4_SERIAL_TX_PIN -1
  223. #define E4_SERIAL_RX_PIN -1
  224. #endif