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_ULTIMAKER_OLD.h 9.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016 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. * Ultimaker pin assignments (Old electronics)
  24. */
  25. /**
  26. * Rev B 3 JAN 2017
  27. *
  28. * Details on pin definitions for M3, M4 & M5 spindle control commands and for
  29. * the CASE_LIGHT_PIN are at the end of this file.
  30. *
  31. * This started out as an attempt to add pin definitions for M3, M4 & M5 spindle
  32. * control commands but quickly turned into a head scratcher as the sources for
  33. * the revisions provided inconsistent information.
  34. *
  35. * As best I can determine:
  36. * 1.5.3 boards should use the pins_ULTIMAKER.h file which means the BOARD_NAME
  37. * define in this file should say 1.5.3 rather than 1.5.4
  38. * This file is meant for 1.1 - 1.3 boards.
  39. * The endstops for the 1.0 boards use different definitions than on the 1.1 - 1.3
  40. * boards.
  41. *
  42. * I've added sections that have the 1.0 and 1.5.3 + endstop definitions so you can
  43. * easily switch if needed. I've also copied over the 1.5.3 + LCD definitions.
  44. *
  45. * To be 100% sure of the board you have:
  46. * 1. In Configuration_adv.h enable "PINS_DEBUGGING"
  47. * 2. Compile & uploade
  48. * 3. Enter the command "M43 W1 I1". This command will report that pin nmumber and
  49. * name of any pin that changes state.
  50. * 4. Using a 1k (approximately) resistor pull the endstops and some of the LCD pins
  51. * to ground and see what is reported.
  52. * 5. If the reported pin doesn't match the file then try a different board revision
  53. * and repeat steps 2 - 5
  54. */
  55. #define board_rev_1_1_TO_1_3
  56. //#define board_rev_1_0
  57. //#define board_rev_1_5
  58. #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
  59. #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
  60. #endif
  61. #define DEFAULT_MACHINE_NAME "Ultimaker"
  62. #define DEFAULT_SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin"
  63. #define BOARD_NAME "Ultimaker <1.5.4"
  64. #define LARGE_FLASH true
  65. //
  66. // Limit Switches
  67. //
  68. #if ENABLED(board_rev_1_1_TO_1_3)
  69. #define X_MIN_PIN 15 // SW1
  70. #define X_MAX_PIN 14 // SW2
  71. #define Y_MIN_PIN 17 // SW3
  72. #define Y_MAX_PIN 16 // SW4
  73. #define Z_MIN_PIN 19 // SW5
  74. #define Z_MAX_PIN 18 // SW6
  75. #endif
  76. #if ENABLED(board_rev_1_0)
  77. #define X_MIN_PIN 13 // SW1
  78. #define X_MAX_PIN 12 // SW2
  79. #define Y_MIN_PIN 11 // SW3
  80. #define Y_MAX_PIN 10 // SW4
  81. #define Z_MIN_PIN 9 // SW5
  82. #define Z_MAX_PIN 8 // SW6
  83. #endif
  84. #if ENABLED(board_rev_1_5)
  85. #define X_MIN_PIN 22
  86. #define X_MAX_PIN 24
  87. #define Y_MIN_PIN 26
  88. #define Y_MAX_PIN 28
  89. #define Z_MIN_PIN 30
  90. #define Z_MAX_PIN 32
  91. #endif
  92. //
  93. // Z Probe (when not Z_MIN_PIN)
  94. //
  95. #ifndef Z_MIN_PROBE_PIN
  96. #define Z_MIN_PROBE_PIN Z_MAX_PIN
  97. #endif
  98. //
  99. // Steppers
  100. //
  101. #define X_STEP_PIN 25
  102. #define X_DIR_PIN 23
  103. #define X_ENABLE_PIN 27
  104. #define Y_STEP_PIN 31
  105. #define Y_DIR_PIN 33
  106. #define Y_ENABLE_PIN 29
  107. #define Z_STEP_PIN 37
  108. #define Z_DIR_PIN 39
  109. #define Z_ENABLE_PIN 35
  110. #define E0_STEP_PIN 43
  111. #define E0_DIR_PIN 45
  112. #define E0_ENABLE_PIN 41
  113. #define E1_STEP_PIN -1 // 49
  114. #define E1_DIR_PIN -1 // 47
  115. #define E1_ENABLE_PIN -1 // 48
  116. //
  117. // Temperature Sensors
  118. //
  119. #define TEMP_0_PIN 8 // Analog Input
  120. #define TEMP_1_PIN 1 // Analog Input
  121. //
  122. // Heaters / Fans
  123. //
  124. #define HEATER_0_PIN 2
  125. //#define HEATER_1_PIN 3 // used for case light Rev A said "1"
  126. #define HEATER_BED_PIN 4
  127. //
  128. // LCD / Controller
  129. //
  130. #if ENABLED(board_rev_1_0) || ENABLED(board_rev_1_1_TO_1_3)
  131. #define LCD_PINS_RS 24
  132. #define LCD_PINS_ENABLE 22
  133. #define LCD_PINS_D4 36
  134. #define LCD_PINS_D5 34
  135. #define LCD_PINS_D6 32
  136. #define LCD_PINS_D7 30
  137. #elif ENABLED(board_rev_1_5) && ENABLED(ULTRA_LCD)
  138. #define BEEPER_PIN 18
  139. #if ENABLED(NEWPANEL)
  140. #define LCD_PINS_RS 20
  141. #define LCD_PINS_ENABLE 17
  142. #define LCD_PINS_D4 16
  143. #define LCD_PINS_D5 21
  144. #define LCD_PINS_D6 5
  145. #define LCD_PINS_D7 6
  146. // buttons are directly attached
  147. #define BTN_EN1 40
  148. #define BTN_EN2 42
  149. #define BTN_ENC 19
  150. #define SD_DETECT_PIN 38
  151. #else // !NEWPANEL - Old style panel with shift register
  152. // buttons are attached to a shift register
  153. #define SHIFT_CLK 38
  154. #define SHIFT_LD 42
  155. #define SHIFT_OUT 40
  156. #define SHIFT_EN 17
  157. #define LCD_PINS_RS 16
  158. #define LCD_PINS_ENABLE 5
  159. #define LCD_PINS_D4 6
  160. #define LCD_PINS_D5 21
  161. #define LCD_PINS_D6 20
  162. #define LCD_PINS_D7 19
  163. #define SD_DETECT_PIN -1
  164. #endif // !NEWPANEL
  165. #endif // ULTRA_LCD
  166. //
  167. // case light - see spindle section for more info on available hardware PWMs
  168. //
  169. #if !PIN_EXISTS(CASE_LIGHT) && ENABLED(board_rev_1_5)
  170. #define CASE_LIGHT_PIN 7 // use PWM - MUST BE HARDWARE PWM
  171. #endif
  172. //
  173. // M3/M4/M5 - Spindle/Laser Control
  174. //
  175. #if ENABLED(SPINDLE_LASER_ENABLE)
  176. #if ENABLED(board_rev_1_0) // use the last three SW positions
  177. #undef Z_MIN_PROBE_PIN
  178. #undef X_MIN_PIN // SW1
  179. #undef X_MAX_PIN // SW2
  180. #undef Y_MIN_PIN // SW3
  181. #undef Y_MAX_PIN // SW4
  182. #undef Z_MIN_PIN // SW5
  183. #undef Z_MAX_PIN // SW6
  184. #define X_STOP_PIN 13 // SW1 (didn't change) - also has a useable hardware PWM
  185. #define Y_STOP_PIN 12 // SW2
  186. #define Z_STOP_PIN 11 // SW3
  187. #define SPINDLE_DIR_PIN 10 // SW4
  188. #define SPINDLE_LASER_PWM_PIN 9 // SW5 MUST BE HARDWARE PWM
  189. #define SPINDLE_LASER_ENABLE_PIN 8 // SW6 Pin should have a pullup!
  190. #elif ENABLED(board_rev_1_5) // use the same pins - but now they are on a different connector
  191. #define SPINDLE_DIR_PIN 10 // EXP3-6 (silkscreen says 10)
  192. #define SPINDLE_LASER_PWM_PIN 9 // EXP3-7 (silkscreen says 9) MUST BE HARDWARE PWM
  193. #define SPINDLE_LASER_ENABLE_PIN 8 // EXP3-8 (silkscreen says 8) Pin should have a pullup!
  194. #elif ENABLED(board_rev_1_1_TO_1_3)
  195. /**
  196. * Only four hardware PWMs physically connected to anything on these boards:
  197. *
  198. * HEATER_0_PIN 2 silkscreen varies - usually "PWM 1" or "HEATER1"
  199. * HEATER_1_PIN 3 silkscreen varies - usually "PWM 2" or "HEATER2"
  200. * HEATER_BED_PIN 4 silkscreen varies - usually "PWM 3" or "HEATED BED"
  201. * E0_DIR_PIN 45
  202. *
  203. * If one of the heaters is used then special precautions will usually be needed.
  204. * They have an LED and resistor pullup to +24V which could damage 3.3V-5V ICs.
  205. */
  206. #if EXTRUDERS == 1 // Move E0 stepper module to the spare and get signals from E0
  207. #undef E0_STEP_PIN
  208. #undef E0_DIR_PIN
  209. #undef E0_ENABLE_PIN
  210. #define E0_STEP_PIN 49
  211. #define E0_DIR_PIN 47
  212. #define E0_ENABLE_PIN 48
  213. #define SPINDLE_DIR_PIN 43
  214. #define SPINDLE_LASER_PWM_PIN 45 // MUST BE HARDWARE PWM
  215. #define SPINDLE_LASER_ENABLE_PIN 41 // Pin should have a pullup!
  216. #elif TEMP_SENSOR_BED == 0 // Can't use E0 so see if HEATER_BED_PIN is available
  217. #undef HEATER_BED_PIN
  218. #define SPINDLE_DIR_PIN 38 // Probably pin 4 on 10 pin connector closest to the E0 socket
  219. #define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM - Special precautions usually needed.
  220. #define SPINDLE_LASER_ENABLE_PIN 40 // Pin should have a pullup! (Probably pin 6 on the 10-pin
  221. // connector closest to the E0 socket)
  222. #endif
  223. #endif
  224. #endif
  225. /**
  226. * Where to get the spindle signals on the E0 socket
  227. *
  228. * spindle signal socket name socket name
  229. * -------
  230. * SPINDLE_LASER_ENABLE_PIN /ENABLE *| |O VMOT
  231. * MS1 O| |O GND
  232. * MS2 O| |O 2B
  233. * MS3 O| |O 2A
  234. * /RESET O| |O 1A
  235. * /SLEEP O| |O 1B
  236. * SPINDLE_DIR_PIN STEP O| |O VDD
  237. * SPINDLE_LASER_PWM_PIN DIR O| |O GND
  238. * -------
  239. * * - pin closest to MS1, MS2 & MS3 jumpers on the board
  240. *
  241. * Note: Socket names vary from vendor to vendor.
  242. */