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

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