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_ADSK.h 6.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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. * Arduino DUE Shield Kit (ADSK) pin assignments
  24. */
  25. #define BOARD_NAME "ADSK"
  26. #if !defined(__SAM3X8E__) && !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
  27. #error "Oops! Select 'Arduino Due or Mega' in 'Tools > Board.'"
  28. #endif
  29. /* CNC shield modifications:
  30. FROM THE BOTTOM CUT THE 5V PIN THAT GOES TO ARDUINO!!!
  31. On the top put jumper between 5V and 3V3 pins,
  32. jumper between D12 and A.STEP, jumper between D13 and A.DIR
  33. */
  34. /* CNC shield 3D printer connections:
  35. X,Y,Z steppers as normal
  36. A stepper for E0 extruder
  37. (X-)&(GND) - X limit
  38. (Y-)&(GND) - Y limit
  39. (Z-)&(GND) - Z limit
  40. (Abort)&(GND) - Extruder thermistor (also require pullup resistor 4.7K between "Abort" and
  41. Vcc (now "5V" on the board but actual 3.3V because of jumper))
  42. (Hold)&(GND) - Bed thermistor (also require pullup resistor 4.7K between "Hold" and
  43. Vcc (now "5V" on the board but actual 3.3V because of jumper))
  44. (CoolEn) - 3.3v signal to controll extruder heater MOSFET
  45. (Resume) - 3.3v signal to control heatbed MOSFET
  46. (SDA) - 3.3v signal to controll extruder fan
  47. (SCL) - 3.3v signal to controll extruder cooling fan
  48. */
  49. /* CNC Shield pinout
  50. "Name on the board": DUE pin
  51. "Abort": Analog pin 0 or Digital pin 54
  52. "Hold": Analog pin 1 or Digital pin 55
  53. "Resume": Analog pin 2 or Digital pin 56
  54. "CoolEn": Analog pin 3 or Digital pin 57
  55. "SDA": Analog pin 4 or Digital pin 58
  56. "SCL": Analog pin 5 or Digital pin 59
  57. "E-STOP": Reset pin
  58. "RX": Digital pin 0
  59. "TX": Digital pin 1
  60. "X.STEP": Digital pin 2
  61. "Y.STEP": Digital pin 3
  62. "Z.STEP": Digital pin 4
  63. "X.DIR": Digital pin 5
  64. "Y.DIR": Digital pin 6
  65. "Z.DIR": Digital pin 7
  66. "EN": Digital pin 8
  67. "X+","X-": Digital pin 9
  68. "Y+","Y-": Digital pin 10
  69. "Z+","Z-": Digital pin 11
  70. "SpinEn": Digital pin 12 -> will be connected to A.STEP with jumper
  71. "SpinDir": Digital pin 13 -> will be connected to A.DIR with jumper
  72. */
  73. //
  74. // Servos
  75. //
  76. #define SERVO0_PIN 61 // Analog pin 7, Digital pin 61
  77. //
  78. // Limit Switches
  79. //
  80. #define X_MIN_PIN 9
  81. #define Y_MIN_PIN 10
  82. #define Z_MIN_PIN 11
  83. #define Z_MIN_PROBE_PIN 62 // Analog pin 8, Digital pin 62
  84. //
  85. // Steppers
  86. //
  87. #define X_STEP_PIN 2
  88. #define X_DIR_PIN 5
  89. #define X_ENABLE_PIN 8
  90. #define Y_STEP_PIN 3
  91. #define Y_DIR_PIN 6
  92. #define Y_ENABLE_PIN 8
  93. #define Z_STEP_PIN 4
  94. #define Z_DIR_PIN 7
  95. #define Z_ENABLE_PIN 8
  96. #define E0_STEP_PIN 12
  97. #define E0_DIR_PIN 13
  98. #define E0_ENABLE_PIN 8
  99. //
  100. // Heaters / Fans
  101. //
  102. #define HEATER_0_PIN 55 // "Hold": Analog pin 1, Digital pin 55
  103. #define HEATER_BED_PIN 57 // "CoolEn": Analog pin 3, Digital pin 57
  104. #define FAN_PIN 54 // "Abort": Analog pin 0, Digital pin 54
  105. #undef E0_AUTO_FAN_PIN
  106. #define E0_AUTO_FAN_PIN 56 // "Resume": Analog pin 2, Digital pin 56
  107. //
  108. // Temperature Sensors
  109. //
  110. #define TEMP_0_PIN 4 // "SDA": Analog pin 4, Digital pin 58
  111. #define TEMP_BED_PIN 5 // "SCL": Analog pin 5, Digital pin 59
  112. //
  113. // Misc. Functions
  114. //
  115. #define SDSS 52
  116. #if ENABLED(ZONESTAR_LCD)
  117. /**
  118. * The 2004 LCD should be powered with 5V.
  119. * The next LCD pins RS,D4,D5,D6,D7 have internal pull-ups to 5V and as result the 5V will be on these pins.
  120. * Luckily these internal pull-ups have really high resistance and adding 33K pull-down resistors will create
  121. * simple voltage divider that will bring the voltage down just slightly bellow 3.3V.
  122. *
  123. * This LCD also has buttons that connected to the same ADC pin with different voltage divider combinations.
  124. * On the LCD panel there is internal pull-up resistor of the 4.7K connected to 5V.
  125. * Connecting another 4.7K pull-down resistor between ADC pin and the GND
  126. * will result in scaled values for voltage dividers and will bring them down to be always below 3.3V.
  127. *
  128. * For 2004 LCD to work with 3.3V board like Arduino DUE the next required:
  129. * Pull-down resistors of 33K between each of LCD pins RS,D4,D5,D6,D7 and the GND.
  130. * Pull-down resistor of 4.7K between ADC_KEYPAD_PIN and the GND
  131. *
  132. * All these modifications will still work with 5V based boards but require proper scaled ADC values
  133. */
  134. #ifdef __SAM3X8E__
  135. #define AREF_VOLTS 3.3
  136. #else
  137. #define AREF_VOLTS 5.0
  138. #endif
  139. //
  140. // LCD / Controller
  141. //
  142. #define LCD_PINS_ENABLE 14
  143. #define LCD_PINS_RS 15
  144. #define LCD_PINS_D4 16
  145. #define LCD_PINS_D5 17
  146. #define LCD_PINS_D6 18
  147. #define LCD_PINS_D7 19
  148. #define ADC_KEYPAD_PIN 6 //60 // Analog pin 6, Digital pin 60
  149. /**
  150. * The below defines will scale all the values to work properly on both
  151. * 5V (Mega) and 3.3V (DUE) boards with all pull-up resistors added for 3.3V
  152. */
  153. #define ADC_BUTTONS_VALUE_SCALE (5.0/AREF_VOLTS) // The LCD module pullup voltage is 5.0V but ADC reference voltage is 3.3V
  154. #define ADC_BUTTONS_R_PULLDOWN 4.7 // Moves voltage down to be bellow 3.3V instead of 5V
  155. // the resistors values will be scaled because of 4.7K pulldown parallel resistor
  156. #define _ADC_BUTTONS_R_SCALED(R) ((R) * (ADC_BUTTONS_R_PULLDOWN) / ((R) + ADC_BUTTONS_R_PULLDOWN))
  157. // buttons pullup resistor
  158. #define ADC_BUTTONS_R_PULLUP 4.7 // the resistor on the 2004 LCD panel
  159. // buttons resistors with scaled values because of parallel pulldown resistor
  160. #define ADC_BUTTONS_LEFT_R_PULLDOWN _ADC_BUTTONS_R_SCALED(0.47)
  161. #define ADC_BUTTONS_RIGHT_R_PULLDOWN _ADC_BUTTONS_R_SCALED(4.7)
  162. #define ADC_BUTTONS_UP_R_PULLDOWN _ADC_BUTTONS_R_SCALED(1.0)
  163. #define ADC_BUTTONS_DOWN_R_PULLDOWN _ADC_BUTTONS_R_SCALED(10.0)
  164. #define ADC_BUTTONS_MIDDLE_R_PULLDOWN _ADC_BUTTONS_R_SCALED(2.2)
  165. #endif // ZONESTAR_LCD
  166. /**
  167. * RJ45 8 pins extruder connector
  168. *
  169. * 1 - GND (Please do not connect to the same GND as extruder heater to prevent ground offset voltage)
  170. * 2 - thermistor
  171. * 3 - SERVO PWM
  172. * 4 - extruder heater
  173. * 5 - FAN (print cooling)
  174. * 6 - FAN (extruder cooling)
  175. * 7 - Probe signal
  176. * 8 - 5V
  177. *
  178. * Standard ethernet pairs: 1&2, 3&6, 4&5, 7&8
  179. * Use CAT7 cable to have all pairs shielded
  180. *
  181. */