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 9.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  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. * Mightyboard Rev.E pin assignments
  25. * also works for Rev D boards. It's all rev E despite what the silk screen says
  26. */
  27. /**
  28. * Rev B 2 JAN 2017
  29. *
  30. * Added pin definitions for:
  31. * M3, M4 & M5 spindle control commands
  32. * case light
  33. *
  34. * Corrected pin assignment for EX2_HEAT_PIN pin. Changed it from 9 to 11. The port
  35. * number (B5) agrees with the schematic but B5 is assigned to logical pin 11.
  36. */
  37. #define ALLOW_MEGA1280
  38. #include "env_validate.h"
  39. #define BOARD_INFO_NAME "Mightyboard"
  40. #define DEFAULT_MACHINE_NAME "MB Replicator"
  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. #define DIGIPOT_ENABLE_I2C_PULLUPS // MightyBoard doesn't have hardware I2C pin pull-ups.
  106. //
  107. // Temperature Sensors
  108. //
  109. // K7 - 69 / ADC15 - 15
  110. #define TEMP_BED_PIN 15
  111. // SPI for Max6675 or Max31855 Thermocouple
  112. // Uses a separate SPI bus
  113. //
  114. // 3 E5 DO (SO)
  115. // 5 E3 CS1
  116. // 2 E4 CS2
  117. // 78 E2 SCK
  118. //
  119. #define THERMO_SCK_PIN 78 // E2
  120. #define THERMO_DO_PIN 3 // E5
  121. #define THERMO_CS1_PIN 5 // E3
  122. #define THERMO_CS2_PIN 2 // E4
  123. #define MAX6675_SS_PIN THERMO_CS1_PIN
  124. #define MAX6675_SS2_PIN THERMO_CS2_PIN
  125. #define MAX6675_SCK_PIN THERMO_SCK_PIN
  126. #define MAX6675_DO_PIN THERMO_DO_PIN
  127. //
  128. // Augmentation for auto-assigning plugs
  129. //
  130. // Two thermocouple connectors allows for either
  131. // 2 extruders or 1 extruder and a heated bed.
  132. // With no heated bed, an additional 24V fan is possible.
  133. //
  134. // Labels from the schematic:
  135. #define EX1_HEAT_PIN 6 // H3
  136. #define EX1_FAN_PIN 7 // H4
  137. #define EX2_HEAT_PIN 11 // B5
  138. #define EX2_FAN_PIN 12 // B6
  139. #define HBP_PIN 45 // L4
  140. #define EXTRA_FET_PIN 44 // L5
  141. #if HAS_MULTI_HOTEND
  142. #if TEMP_SENSOR_BED
  143. #define IS_EEB
  144. #else
  145. #define IS_EEF
  146. #endif
  147. #elif TEMP_SENSOR_BED
  148. #define IS_EFB
  149. #else
  150. #define IS_EFF
  151. #endif
  152. //
  153. // Heaters / Fans (24V)
  154. //
  155. #define HEATER_0_PIN EX1_HEAT_PIN
  156. #if ENABLED(IS_EFB) // Hotend, Fan, Bed
  157. #define HEATER_BED_PIN HBP_PIN
  158. #elif ENABLED(IS_EEF) // Hotend, Hotend, Fan
  159. #define HEATER_1_PIN EX2_HEAT_PIN
  160. #elif ENABLED(IS_EEB) // Hotend, Hotend, Bed
  161. #define HEATER_1_PIN EX2_HEAT_PIN
  162. #define HEATER_BED_PIN HBP_PIN
  163. #elif ENABLED(IS_EFF) // Hotend, Fan, Fan
  164. #define FAN1_PIN HBP_PIN
  165. #endif
  166. #ifndef FAN_PIN
  167. #if EITHER(IS_EFB, IS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
  168. #define FAN_PIN EX2_HEAT_PIN
  169. #elif EITHER(IS_EEF, IS_SF) // Hotend, Hotend, Fan or Spindle, Fan
  170. #define FAN_PIN HBP_PIN
  171. #else
  172. #define FAN_PIN EXTRA_FET_PIN
  173. #endif
  174. #endif
  175. #ifndef CONTROLLER_FAN_PIN
  176. #define CONTROLLER_FAN_PIN EX2_FAN_PIN
  177. #endif
  178. //
  179. // Misc. Functions
  180. //
  181. #define LED_PIN 13 // B7
  182. #define CUTOFF_RESET_PIN 16 // H1
  183. #define CUTOFF_TEST_PIN 17 // H0
  184. #define CUTOFF_SR_CHECK_PIN 70 // G4 (TOSC1)
  185. //
  186. // LCD / Controller
  187. //
  188. #if HAS_WIRED_LCD
  189. #if IS_RRD_FG_SC
  190. #define LCD_PINS_RS 33 // C4: LCD-STROBE
  191. #define LCD_PINS_ENABLE 72 // J2: LEFT
  192. #define LCD_PINS_D4 35 // C2: LCD-CLK
  193. #define LCD_PINS_D5 32 // C5: RLED
  194. #define LCD_PINS_D6 34 // C3: LCD-DATA
  195. #define LCD_PINS_D7 31 // C6: GLED
  196. #define BTN_EN2 75 // J4, UP
  197. #define BTN_EN1 73 // J3, DOWN
  198. //STOP button connected as KILL_PIN
  199. #define KILL_PIN 14 // J1, RIGHT
  200. //KILL - not connected
  201. #define BEEPER_PIN 8 // H5, SD_WP
  202. //on board leds
  203. #define STAT_LED_RED_LED SERVO0_PIN // C1 (1280-EX1, DEBUG2)
  204. #define STAT_LED_BLUE_PIN SERVO1_PIN // C0 (1280-EX2, DEBUG3)
  205. #else
  206. // Replicator uses a 3-wire SR controller with HD44780
  207. #define SR_DATA_PIN 34 // C3
  208. #define SR_CLK_PIN 35 // C2
  209. #define SR_STROBE_PIN 33 // C4
  210. #define BTN_UP 75 // J4
  211. #define BTN_DWN 73 // J3
  212. #define BTN_LFT 72 // J2
  213. #define BTN_RT 14 // J1
  214. // Disable encoder
  215. #undef BTN_EN1
  216. #undef BTN_EN2
  217. #define BEEPER_PIN 4 // G5
  218. #define STAT_LED_RED_PIN 32 // C5
  219. #define STAT_LED_BLUE_PIN 31 // C6 (Actually green)
  220. #endif
  221. #define BTN_CENTER 15 // J0
  222. #define BTN_ENC BTN_CENTER
  223. #endif // HAS_WIRED_LCD
  224. //
  225. // SD Card
  226. //
  227. #define SDSS 53 // B0
  228. #define SD_DETECT_PIN 9 // H6
  229. //
  230. // TMC 220x
  231. //
  232. #if HAS_TMC_UART
  233. /**
  234. * TMC220x stepper drivers
  235. *
  236. * Hardware serial communication ports.
  237. * If undefined software serial is used according to the pins below
  238. */
  239. #define X_HARDWARE_SERIAL Serial2
  240. #define Y_HARDWARE_SERIAL Serial1
  241. /**
  242. * Software serial
  243. */
  244. #define X_SERIAL_TX_PIN 16
  245. #define X_SERIAL_RX_PIN 17
  246. #define Y_SERIAL_TX_PIN 18
  247. #define Y_SERIAL_RX_PIN 19
  248. #define Z_SERIAL_TX_PIN 41
  249. #define Z_SERIAL_RX_PIN 66
  250. #define E0_SERIAL_TX_PIN 40
  251. #define E0_SERIAL_RX_PIN 67
  252. #define E1_SERIAL_TX_PIN 37
  253. #define E1_SERIAL_RX_PIN 68
  254. #endif