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_RAMPS_14.h 7.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. /**
  2. * Arduino Mega with RAMPS v1.4 (or v1.3) pin assignments
  3. *
  4. * Applies to the following boards:
  5. *
  6. * RAMPS_14_EFB (Extruder, Fan, Bed)
  7. * RAMPS_14_EEB (Extruder, Extruder, Bed)
  8. * RAMPS_14_EFF (Extruder, Fan, Fan)
  9. * RAMPS_14_EEF (Extruder, Extruder, Fan)
  10. * RAMPS_14_SF (Spindle, Controller Fan)
  11. *
  12. * RAMPS_13_EFB (Extruder, Fan, Bed)
  13. * RAMPS_13_EEB (Extruder, Extruder, Bed)
  14. * RAMPS_13_EFF (Extruder, Fan, Fan)
  15. * RAMPS_13_EEF (Extruder, Extruder, Fan)
  16. * RAMPS_13_SF (Spindle, Controller Fan)
  17. *
  18. * Other pins_MYBOARD.h files may override these defaults
  19. *
  20. * Differences between
  21. * RAMPS_13 | RAMPS_14
  22. * 7 | 11
  23. */
  24. #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
  25. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  26. #endif
  27. #define LARGE_FLASH true
  28. #ifdef IS_RAMPS_13
  29. #define SERVO0_PIN 7 // RAMPS_13 // Will conflict with BTN_EN2 on LCD_I2C_VIKI
  30. #else
  31. #define SERVO0_PIN 11
  32. #endif
  33. #define SERVO1_PIN 6
  34. #define SERVO2_PIN 5
  35. #define SERVO3_PIN 4
  36. #define X_STEP_PIN 54
  37. #define X_DIR_PIN 55
  38. #define X_ENABLE_PIN 38
  39. #define X_MIN_PIN 3
  40. #ifndef X_MAX_PIN
  41. #define X_MAX_PIN 2
  42. #endif
  43. #define Y_STEP_PIN 60
  44. #define Y_DIR_PIN 61
  45. #define Y_ENABLE_PIN 56
  46. #define Y_MIN_PIN 14
  47. #define Y_MAX_PIN 15
  48. #define Z_STEP_PIN 46
  49. #define Z_DIR_PIN 48
  50. #define Z_ENABLE_PIN 62
  51. #define Z_MIN_PIN 18
  52. #define Z_MAX_PIN 19
  53. #define E0_STEP_PIN 26
  54. #define E0_DIR_PIN 28
  55. #define E0_ENABLE_PIN 24
  56. #define E1_STEP_PIN 36
  57. #define E1_DIR_PIN 34
  58. #define E1_ENABLE_PIN 30
  59. #define SDPOWER -1
  60. #define SDSS 53
  61. #define LED_PIN 13
  62. #if ENABLED(FILAMENT_SENSOR) // FMM added for Filament Extruder
  63. // define analog pin for the filament width sensor input
  64. // Use the RAMPS 1.4 Analog input 5 on the AUX2 connector
  65. #define FILWIDTH_PIN 5
  66. #endif
  67. #if ENABLED(Z_MIN_PROBE_ENDSTOP)
  68. // Define a pin to use as the signal pin on Arduino for the Z_PROBE endstop.
  69. #define Z_MIN_PROBE_PIN 32
  70. #endif
  71. #if ENABLED(FILAMENT_RUNOUT_SENSOR)
  72. // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
  73. #define FILRUNOUT_PIN 4
  74. #endif
  75. #if MB(RAMPS_14_EFF) || MB(RAMPS_13_EFF) || ENABLED(IS_RAMPS_EFB)
  76. #define FAN_PIN 9 // (Sprinter config)
  77. #if MB(RAMPS_14_EFF) || MB(RAMPS_13_EFF)
  78. #define CONTROLLERFAN_PIN -1 // Pin used for the fan to cool controller
  79. #endif
  80. #elif MB(RAMPS_14_EEF) || MB(RAMPS_14_SF) || MB(RAMPS_13_EEF) || MB(RAMPS_13_SF)
  81. #define FAN_PIN 8
  82. #else
  83. #define FAN_PIN 4 // IO pin. Buffer needed
  84. #endif
  85. #define PS_ON_PIN 12
  86. #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL)
  87. #define KILL_PIN 41
  88. #endif
  89. #if MB(RAMPS_14_EFF) || MB(RAMPS_13_EFF)
  90. #define HEATER_0_PIN 8
  91. #else
  92. #define HEATER_0_PIN 10 // EXTRUDER 1
  93. #endif
  94. #if MB(RAMPS_14_SF) || MB(RAMPS_13_SF) || ENABLED(IS_RAMPS_EFB)
  95. #define HEATER_1_PIN -1
  96. #else
  97. #define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter)
  98. #endif
  99. #define HEATER_2_PIN -1
  100. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  101. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  102. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  103. #if MB(RAMPS_14_EFF) || MB(RAMPS_14_EEF) || MB(RAMPS_14_SF) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF) || MB(RAMPS_13_SF)
  104. #define HEATER_BED_PIN -1 // NO BED
  105. #else
  106. #define HEATER_BED_PIN 8 // BED
  107. #endif
  108. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  109. #if ENABLED(Z_PROBE_SLED)
  110. #define SLED_PIN -1
  111. #endif
  112. #if ENABLED(ULTRA_LCD)
  113. #if ENABLED(NEWPANEL)
  114. #if ENABLED(PANEL_ONE)
  115. #define LCD_PINS_RS 40
  116. #define LCD_PINS_ENABLE 42
  117. #define LCD_PINS_D4 65
  118. #define LCD_PINS_D5 66
  119. #define LCD_PINS_D6 44
  120. #define LCD_PINS_D7 64
  121. #else
  122. #define LCD_PINS_RS 16
  123. #define LCD_PINS_ENABLE 17
  124. #define LCD_PINS_D4 23
  125. #define LCD_PINS_D5 25
  126. #define LCD_PINS_D6 27
  127. #define LCD_PINS_D7 29
  128. #endif
  129. #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
  130. #define BEEPER_PIN 37
  131. #define BTN_EN1 31
  132. #define BTN_EN2 33
  133. #define BTN_ENC 35
  134. #define SD_DETECT_PIN 49
  135. #elif ENABLED(LCD_I2C_PANELOLU2)
  136. #define BTN_EN1 47 // reverse if the encoder turns the wrong way.
  137. #define BTN_EN2 43
  138. #define BTN_ENC 32
  139. #define LCD_SDSS 53
  140. #define SD_DETECT_PIN -1
  141. #define KILL_PIN 41
  142. #elif ENABLED(LCD_I2C_VIKI)
  143. #define BTN_EN1 22 // reverse if the encoder turns the wrong way.
  144. #define BTN_EN2 7 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf
  145. // tells about 40/42.
  146. // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
  147. #define BTN_ENC -1
  148. #define LCD_SDSS 53
  149. #define SD_DETECT_PIN 49
  150. #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
  151. #define BTN_EN1 35 // reverse if the encoder turns the wrong way.
  152. #define BTN_EN2 37
  153. #define BTN_ENC 31
  154. #define SD_DETECT_PIN 49
  155. #define LCD_SDSS 53
  156. #define KILL_PIN 41
  157. #define BEEPER_PIN 23
  158. #define DOGLCD_CS 29
  159. #define DOGLCD_A0 27
  160. #define LCD_PIN_BL 33
  161. #elif ENABLED(MINIPANEL)
  162. #define BEEPER_PIN 42
  163. // Pins for DOGM SPI LCD Support
  164. #define DOGLCD_A0 44
  165. #define DOGLCD_CS 66
  166. #define LCD_PIN_BL 65 // backlight LED on A11/D65
  167. #define SDSS 53
  168. #define KILL_PIN 64
  169. // GLCD features
  170. //#define LCD_CONTRAST 190
  171. // Uncomment screen orientation
  172. //#define LCD_SCREEN_ROT_90
  173. //#define LCD_SCREEN_ROT_180
  174. //#define LCD_SCREEN_ROT_270
  175. //The encoder and click button
  176. #define BTN_EN1 40
  177. #define BTN_EN2 63
  178. #define BTN_ENC 59 //the click switch
  179. //not connected to a pin
  180. #define SD_DETECT_PIN 49
  181. #else
  182. #define BEEPER_PIN 33 // Beeper on AUX-4
  183. // buttons are directly attached using AUX-2
  184. #if ENABLED(REPRAPWORLD_KEYPAD)
  185. #define BTN_EN1 64 // encoder
  186. #define BTN_EN2 59 // encoder
  187. #define BTN_ENC 63 // enter button
  188. #define SHIFT_OUT 40 // shift register
  189. #define SHIFT_CLK 44 // shift register
  190. #define SHIFT_LD 42 // shift register
  191. #elif ENABLED(PANEL_ONE)
  192. #define BTN_EN1 59 // AUX2 PIN 3
  193. #define BTN_EN2 63 // AUX2 PIN 4
  194. #define BTN_ENC 49 // AUX3 PIN 7
  195. #else
  196. #define BTN_EN1 37
  197. #define BTN_EN2 35
  198. #define BTN_ENC 31 // the click
  199. #endif
  200. #if ENABLED(G3D_PANEL)
  201. #define SD_DETECT_PIN 49
  202. #else
  203. // #define SD_DETECT_PIN -1 // Ramps doesn't use this
  204. #endif
  205. #endif
  206. #else // !NEWPANEL (Old-style panel with shift register)
  207. #define BEEPER_PIN 33 // No Beeper added
  208. // Buttons are attached to a shift register
  209. // Not wired yet
  210. //#define SHIFT_CLK 38
  211. //#define SHIFT_LD 42
  212. //#define SHIFT_OUT 40
  213. //#define SHIFT_EN 17
  214. #define LCD_PINS_RS 16
  215. #define LCD_PINS_ENABLE 17
  216. #define LCD_PINS_D4 23
  217. #define LCD_PINS_D5 25
  218. #define LCD_PINS_D6 27
  219. #define LCD_PINS_D7 29
  220. #endif // !NEWPANEL
  221. #endif // ULTRA_LCD
  222. // SPI for Max6675 or Max31855 Thermocouple
  223. #if DISABLED(SDSUPPORT)
  224. #define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
  225. #else
  226. #define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
  227. #endif
  228. #if DISABLED(SDSUPPORT)
  229. // these pins are defined in the SD library if building with SD support
  230. #define SCK_PIN 52
  231. #define MISO_PIN 50
  232. #define MOSI_PIN 51
  233. #endif
  234. #ifndef KILL_PIN
  235. // #define KILL_PIN -1
  236. #endif