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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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 Sensor
  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 MAX 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 TEMP_0_CS_PIN 5 // E3
  120. #define TEMP_0_SCK_PIN 78 // E2
  121. #define TEMP_0_MISO_PIN 3 // E5
  122. //#define TEMP_0_MOSI_PIN ... // For MAX31865
  123. #define TEMP_1_CS_PIN 2 // E4
  124. #define TEMP_1_SCK_PIN TEMP_0_SCK_PIN
  125. #define TEMP_1_MISO_PIN TEMP_0_MISO_PIN
  126. //#define TEMP_1_MOSI_PIN TEMP_0_MOSI_PIN
  127. //
  128. // FET Pin Mapping - FET 1 is closest to the input power connector
  129. //
  130. #define MOSFET_1_PIN 6 // Plug EX1 Pin 1-2 -> PH3 #15 -> Logical 06
  131. #define MOSFET_2_PIN 7 // Plug EX1 Pin 3-4 -> PH4 #16 -> Logical 07
  132. #define MOSFET_3_PIN 11 // Plug EX2 1-2 -> PB5 #24 -> Logical 11
  133. #define MOSFET_4_PIN 12 // Plug EX2 3-4 -> PB6 #25 -> Logical 12
  134. #define MOSFET_5_PIN 45 // Plug HBD 1-2 -> PL4 #39 -> Logical 45
  135. #define MOSFET_6_PIN 44 // Plug Extra 1-2 -> PL5 #40 -> Logical 44 (FET not soldered in all boards)
  136. //
  137. // Heaters / Fans (24V)
  138. //
  139. #define HEATER_0_PIN MOSFET_1_PIN // EX1
  140. #define HEATER_1_PIN MOSFET_3_PIN // EX2
  141. #define HEATER_BED_PIN MOSFET_5_PIN // HBP
  142. // EX1 FAN (Automatic Fans are disabled by default in Configuration_adv.h - comment that out for auto fans)
  143. #ifndef E0_AUTO_FAN_PIN
  144. #define E0_AUTO_FAN_PIN MOSFET_2_PIN
  145. #else
  146. #ifndef FAN_PIN
  147. #define FAN_PIN MOSFET_2_PIN
  148. #endif
  149. #endif
  150. // EX2 FAN (Automatic Fans are disabled by default in Configuration_adv.h - comment that out for auto fans)
  151. #ifndef E1_AUTO_FAN_PIN
  152. #define E1_AUTO_FAN_PIN MOSFET_4_PIN
  153. #else
  154. #ifndef FAN1_PIN
  155. #define FAN1_PIN MOSFET_4_PIN
  156. #endif
  157. #endif
  158. //
  159. // Misc. Functions
  160. //
  161. #define LED_PIN 13 // B7
  162. #define CUTOFF_RESET_PIN 16 // H1
  163. #define CUTOFF_TEST_PIN 17 // H0
  164. #define CUTOFF_SR_CHECK_PIN 70 // G4 (TOSC1)
  165. //
  166. // LCD / Controller
  167. //
  168. #if HAS_WIRED_LCD
  169. #if IS_RRD_FG_SC
  170. #define LCD_PINS_RS 33 // C4: LCD-STROBE
  171. #define LCD_PINS_ENABLE 72 // J2: LEFT
  172. #define LCD_PINS_D4 35 // C2: LCD-CLK
  173. #define LCD_PINS_D5 32 // C5: RLED
  174. #define LCD_PINS_D6 34 // C3: LCD-DATA
  175. #define LCD_PINS_D7 31 // C6: GLED
  176. #define BTN_EN2 75 // J4, UP
  177. #define BTN_EN1 73 // J3, DOWN
  178. // STOP button connected as KILL_PIN
  179. #define KILL_PIN 14 // J1, RIGHT (not connected)
  180. #define BEEPER_PIN 8 // H5, SD_WP
  181. // Onboard leds
  182. #define STAT_LED_RED_PIN SERVO0_PIN // C1 (1280-EX1, DEBUG2)
  183. #define STAT_LED_BLUE_PIN SERVO1_PIN // C0 (1280-EX2, DEBUG3)
  184. #else
  185. // Replicator uses a 3-wire SR controller with HD44780
  186. #define SR_DATA_PIN 34 // C3
  187. #define SR_CLK_PIN 35 // C2
  188. #define SR_STROBE_PIN 33 // C4
  189. #define BTN_UP 75 // J4
  190. #define BTN_DOWN 73 // J3
  191. #define BTN_LEFT 72 // J2
  192. #define BTN_RIGHT 14 // J1
  193. // Disable encoder
  194. #undef BTN_EN1
  195. #undef BTN_EN2
  196. #define BEEPER_PIN 4 // G5
  197. #define STAT_LED_RED_PIN 32 // C5
  198. #define STAT_LED_BLUE_PIN 31 // C6 (Actually green)
  199. #endif
  200. #define BTN_CENTER 15 // J0
  201. #define BTN_ENC BTN_CENTER
  202. #endif // HAS_WIRED_LCD
  203. //
  204. // SD Card
  205. //
  206. #define SDSS 53 // B0
  207. #define SD_DETECT_PIN 9 // H6
  208. #if HAS_TMC_UART
  209. /**
  210. * TMC220x stepper drivers
  211. *
  212. * Hardware serial communication ports.
  213. * If undefined software serial is used according to the pins below
  214. */
  215. #define X_HARDWARE_SERIAL Serial2
  216. #define Y_HARDWARE_SERIAL Serial1
  217. /**
  218. * Software serial
  219. */
  220. #define X_SERIAL_TX_PIN 16
  221. #define X_SERIAL_RX_PIN 17
  222. #define Y_SERIAL_TX_PIN 18
  223. #define Y_SERIAL_RX_PIN 19
  224. #define Z_SERIAL_TX_PIN 41
  225. #define Z_SERIAL_RX_PIN 66
  226. #define E0_SERIAL_TX_PIN 40
  227. #define E0_SERIAL_RX_PIN 67
  228. #define E1_SERIAL_TX_PIN 37
  229. #define E1_SERIAL_RX_PIN 68
  230. #endif