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_MIGHTYBOARD_REVE.h 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  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. * Mightyboard Rev.E pin assignments
  24. * also works for Rev D boards. It's all rev E despite what the silk screen says
  25. */
  26. /**
  27. * Rev B 2 JAN 2017
  28. *
  29. * Added pin definitions for:
  30. * M3, M4 & M5 spindle control commands
  31. * case light
  32. *
  33. * Corrected pin assignment for EX2_HEAT_PIN pin. Changed it from 9 to 11. The port
  34. * number (B5) agrees with the schematic but B5 is assigned to logical pin 11.
  35. */
  36. #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
  37. #error "Oops! Select 'Mega 1280' or 'Mega 2560' in 'Tools > Board.'"
  38. #endif
  39. #define DEFAULT_MACHINE_NAME "MB Replicator"
  40. #define BOARD_NAME "Mightyboard"
  41. //
  42. // Servos
  43. //
  44. #define SERVO0_PIN 36 // C1 (1280-EX1)
  45. #define SERVO1_PIN 37 // C0 (1280-EX2)
  46. #define SERVO2_PIN 40 // G1 (1280-EX3)
  47. #define SERVO3_PIN 41 // G0 (1280-EX4)
  48. //
  49. // Limit Switches
  50. //
  51. #define X_MIN_PIN 49 // L0
  52. #define X_MAX_PIN 48 // L1
  53. #define Y_MIN_PIN 47 // L2
  54. #define Y_MAX_PIN 46 // L3
  55. #define Z_MIN_PIN 43 // L6
  56. #define Z_MAX_PIN 42 // L7
  57. //
  58. // Z Probe (when not Z_MIN_PIN)
  59. //
  60. #ifndef Z_MIN_PROBE_PIN
  61. #define Z_MIN_PROBE_PIN 42
  62. #endif
  63. //
  64. // Filament Runout Pins
  65. //
  66. #ifndef FIL_RUNOUT_PIN
  67. #define FIL_RUNOUT_PIN 49
  68. #endif
  69. #ifndef FIL_RUNOUT2_PIN
  70. #define FIL_RUNOUT2_PIN 47
  71. #endif
  72. //
  73. // Steppers
  74. //
  75. #define X_STEP_PIN 55 // F1
  76. #define X_DIR_PIN 54 // F0
  77. #define X_ENABLE_PIN 56 // F2
  78. #define Y_STEP_PIN 59 // F5
  79. #define Y_DIR_PIN 58 // F4
  80. #define Y_ENABLE_PIN 60 // F6
  81. #define Z_STEP_PIN 63 // K1
  82. #define Z_DIR_PIN 62 // K0
  83. #define Z_ENABLE_PIN 64 // K2
  84. #define E0_STEP_PIN 25 // A3
  85. #define E0_DIR_PIN 24 // A2
  86. #define E0_ENABLE_PIN 26 // A4
  87. #define E1_STEP_PIN 29 // A7
  88. #define E1_DIR_PIN 28 // A6
  89. #define E1_ENABLE_PIN 39 // G2
  90. //
  91. // I2C Digipots - MCP4018
  92. // Address 5E (2F << 1)
  93. // Set from 0 - 127 with stop bit.
  94. // (Ex. 3F << 1 | 1)
  95. //
  96. #define DIGIPOTS_I2C_SCL 76 // J5
  97. #define DIGIPOTS_I2C_SDA_X 57 // F3
  98. #define DIGIPOTS_I2C_SDA_Y 61 // F7
  99. #define DIGIPOTS_I2C_SDA_Z 65 // K3
  100. #define DIGIPOTS_I2C_SDA_E0 27 // A5
  101. #define DIGIPOTS_I2C_SDA_E1 77 // J6
  102. #ifndef DIGIPOT_I2C_ADDRESS_A
  103. #define DIGIPOT_I2C_ADDRESS_A 0x2F // unshifted slave address (5E <- 2F << 1)
  104. #endif
  105. //
  106. // Temperature Sensors
  107. //
  108. // K7 - 69 / ADC15 - 15
  109. #define TEMP_BED_PIN 15
  110. // SPI for Max6675 or Max31855 Thermocouple
  111. // Uses a separate SPI bus
  112. //
  113. // 3 E5 DO (SO)
  114. // 5 E3 CS1
  115. // 2 E4 CS2
  116. // 78 E2 SCK
  117. //
  118. #define THERMO_SCK_PIN 78 // E2
  119. #define THERMO_DO_PIN 3 // E5
  120. #define THERMO_CS1_PIN 5 // E3
  121. #define THERMO_CS2_PIN 2 // E4
  122. #define MAX6675_SS_PIN THERMO_CS1_PIN
  123. #define MAX6675_SS2_PIN THERMO_CS2_PIN
  124. #define MAX6675_SCK_PIN THERMO_SCK_PIN
  125. #define MAX6675_DO_PIN THERMO_DO_PIN
  126. //
  127. // Augmentation for auto-assigning plugs
  128. //
  129. // Two thermocouple connectors allows for either
  130. // 2 extruders or 1 extruder and a heated bed.
  131. // With no heated bed, an additional 24V fan is possible.
  132. //
  133. // Labels from the schematic:
  134. #define EX1_HEAT_PIN 6 // H3
  135. #define EX1_FAN_PIN 7 // H4
  136. #define EX2_HEAT_PIN 11 // B5
  137. #define EX2_FAN_PIN 12 // B6
  138. #define HBP_PIN 45 // L4
  139. #define EXTRA_FET_PIN 44 // L5
  140. #if HOTENDS > 1
  141. #if TEMP_SENSOR_BED
  142. #define IS_EEB
  143. #else
  144. #define IS_EEF
  145. #endif
  146. #elif TEMP_SENSOR_BED
  147. #define IS_EFB
  148. #else
  149. #define IS_EFF
  150. #endif
  151. //
  152. // Heaters / Fans (24V)
  153. //
  154. #define HEATER_0_PIN EX1_HEAT_PIN
  155. #if ENABLED(IS_EFB) // Hotend, Fan, Bed
  156. #define HEATER_BED_PIN HBP_PIN
  157. #elif ENABLED(IS_EEF) // Hotend, Hotend, Fan
  158. #define HEATER_1_PIN EX2_HEAT_PIN
  159. #elif ENABLED(IS_EEB) // Hotend, Hotend, Bed
  160. #define HEATER_1_PIN EX2_HEAT_PIN
  161. #define HEATER_BED_PIN HBP_PIN
  162. #elif ENABLED(IS_EFF) // Hotend, Fan, Fan
  163. #define FAN1_PIN HBP_PIN
  164. #endif
  165. #ifndef FAN_PIN
  166. #if EITHER(IS_EFB, IS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
  167. #define FAN_PIN EX2_HEAT_PIN
  168. #elif EITHER(IS_EEF, IS_SF) // Hotend, Hotend, Fan or Spindle, Fan
  169. #define FAN_PIN HBP_PIN
  170. #else
  171. #define FAN_PIN EXTRA_FET_PIN
  172. #endif
  173. #endif
  174. //
  175. // Misc. Functions
  176. //
  177. #define LED_PIN 13 // B7
  178. #define CUTOFF_RESET_PIN 16 // H1
  179. #define CUTOFF_TEST_PIN 17 // H0
  180. //
  181. // LCD / Controller
  182. //
  183. #if HAS_SPI_LCD
  184. #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
  185. #define LCD_PINS_RS 33 // C4: LCD-STROBE
  186. #define LCD_PINS_ENABLE 72 // J2: LEFT
  187. #define LCD_PINS_D4 35 // C2: LCD-CLK
  188. #define LCD_PINS_D5 32 // C5: RLED
  189. #define LCD_PINS_D6 34 // C3: LCD-DATA
  190. #define LCD_PINS_D7 31 // C6: GLED
  191. #define BTN_EN2 75 // J4, UP
  192. #define BTN_EN1 73 // J3, DOWN
  193. //STOP button connected as KILL_PIN
  194. #define KILL_PIN 14 // J1, RIGHT
  195. //KILL - not connected
  196. #define BEEPER_PIN 8 // H5, SD_WP
  197. //on board leds
  198. #define STAT_LED_RED_LED SERVO0_PIN // C1 (1280-EX1, DEBUG2)
  199. #define STAT_LED_BLUE_PIN SERVO1_PIN // C0 (1280-EX2, DEBUG3)
  200. #else
  201. // Replicator uses a 3-wire SR controller with HD44780
  202. #define SR_DATA_PIN 34 // C3
  203. #define SR_CLK_PIN 35 // C2
  204. #define SR_STROBE_PIN 33 // C4
  205. #define BTN_UP 75 // J4
  206. #define BTN_DWN 73 // J3
  207. #define BTN_LFT 72 // J2
  208. #define BTN_RT 14 // J1
  209. // Disable encoder
  210. #undef BTN_EN1
  211. #undef BTN_EN2
  212. #define BEEPER_PIN 4 // G5
  213. #define STAT_LED_RED_PIN 32 // C5
  214. #define STAT_LED_BLUE_PIN 31 // C6 (Actually green)
  215. #endif
  216. #define BTN_CENTER 15 // J0
  217. #define BTN_ENC BTN_CENTER
  218. #endif // HAS_SPI_LCD
  219. //
  220. // SD Card
  221. //
  222. #define SDSS 53 // B0
  223. #define SD_DETECT_PIN 9 // H6
  224. //
  225. //TMC 2208
  226. //
  227. #if HAS_DRIVER(TMC2208)
  228. /**
  229. * TMC2208 stepper drivers
  230. *
  231. * Hardware serial communication ports.
  232. * If undefined software serial is used according to the pins below
  233. */
  234. #define X_HARDWARE_SERIAL Serial2
  235. #define Y_HARDWARE_SERIAL Serial1
  236. /**
  237. * Software serial
  238. */
  239. #define X_SERIAL_TX_PIN 16
  240. #define X_SERIAL_RX_PIN 17
  241. #define Y_SERIAL_TX_PIN 18
  242. #define Y_SERIAL_RX_PIN 19
  243. #define Z_SERIAL_TX_PIN 41
  244. #define Z_SERIAL_RX_PIN 66
  245. #define E0_SERIAL_TX_PIN 40
  246. #define E0_SERIAL_RX_PIN 67
  247. #define E1_SERIAL_TX_PIN 37
  248. #define E1_SERIAL_RX_PIN 68
  249. #endif