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_MKS_TINYBEE.h 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2021 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. * MRR ESPE pin assignments
  25. * MRR ESPE is a 3D printer control board based on the ESP32 microcontroller.
  26. * Supports 5 stepper drivers (using I2S stepper stream), heated bed,
  27. * single hotend, and LCD controller.
  28. */
  29. #include "env_validate.h"
  30. #if EXTRUDERS > 2 || E_STEPPERS > 2
  31. #error "MKS TinyBee supports up to 2 E steppers."
  32. #elif HOTENDS > 2
  33. #error "MKS TinyBee supports up to 2 hotends / E steppers."
  34. #endif
  35. #define BOARD_INFO_NAME "MKS TinyBee"
  36. #define BOARD_WEBSITE_URL "https://github.com/makerbase-mks"
  37. #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
  38. // MAX_EXPANDER_BITS is defined for MKS TinyBee in HAL/ESP32/inc/Conditionals_adv.h
  39. //
  40. // Servos
  41. //
  42. #define SERVO0_PIN 2
  43. //
  44. // Limit Switches
  45. //
  46. #define X_STOP_PIN 33
  47. #define Y_STOP_PIN 32
  48. #define Z_STOP_PIN 22
  49. //#define FIL_RUNOUT_PIN 35
  50. //
  51. // Enable I2S stepper stream
  52. //
  53. #define I2S_STEPPER_STREAM
  54. #if ENABLED(I2S_STEPPER_STREAM)
  55. #define I2S_WS 26
  56. #define I2S_BCK 25
  57. #define I2S_DATA 27
  58. #endif
  59. //
  60. // Steppers
  61. //
  62. #define X_STEP_PIN 129
  63. #define X_DIR_PIN 130
  64. #define X_ENABLE_PIN 128
  65. #define Y_STEP_PIN 132
  66. #define Y_DIR_PIN 133
  67. #define Y_ENABLE_PIN 131
  68. #define Z_STEP_PIN 135
  69. #define Z_DIR_PIN 136
  70. #define Z_ENABLE_PIN 134
  71. #define E0_STEP_PIN 138
  72. #define E0_DIR_PIN 139
  73. #define E0_ENABLE_PIN 137
  74. #define E1_STEP_PIN 141
  75. #define E1_DIR_PIN 142
  76. #define E1_ENABLE_PIN 140
  77. #define Z2_STEP_PIN 141
  78. #define Z2_DIR_PIN 142
  79. #define Z2_ENABLE_PIN 140
  80. //
  81. // Temperature Sensors
  82. //
  83. #define TEMP_0_PIN 36 // Analog Input
  84. #define TEMP_1_PIN 34 // Analog Input, you need set R6=0Ω and R7=NC
  85. #define TEMP_BED_PIN 39 // Analog Input
  86. //
  87. // Heaters / Fans
  88. //
  89. #define HEATER_0_PIN 145
  90. #define HEATER_1_PIN 146
  91. #define FAN_PIN 147
  92. #define FAN1_PIN 148
  93. #define HEATER_BED_PIN 144
  94. //#define CONTROLLER_FAN_PIN 148
  95. //#define E0_AUTO_FAN_PIN 148 // need to update Configuration_adv.h @section extruder
  96. //#define E1_AUTO_FAN_PIN 149 // need to update Configuration_adv.h @section extruder
  97. //
  98. // ADC Reference Voltage
  99. //
  100. #define ADC_REFERENCE_VOLTAGE 2.5 // 2.5V reference VDDA
  101. /**
  102. * ------ ------
  103. * (BEEPER) 149 |10 9 | 13 (BTN_ENC) (SPI MISO) 19 |10 9 | 18 (SPI SCK)
  104. * (LCD_EN) 21 | 8 7 | 4 (LCD_RS) (BTN_EN1) 14 | 8 7 | 5 (SPI CS)
  105. * (LCD_D4) 0 6 5 | 16 (LCD_D5) (BTN_EN2) 12 6 5 | 23 (SPI MOSI)
  106. * (LCD_D6) 15 | 4 3 | 17 (LCD_D7) (SPI_DET) 34 | 4 3 | RESET
  107. * GND | 2 1 | 5V GND | 2 1 | 3.3V
  108. * ------ ------
  109. * EXP1 EXP2
  110. */
  111. #define EXP1_03_PIN 17
  112. #define EXP1_04_PIN 15
  113. #define EXP1_05_PIN 16
  114. #define EXP1_06_PIN 0
  115. #define EXP1_07_PIN 4
  116. #define EXP1_08_PIN 21
  117. #define EXP1_09_PIN 13
  118. #define EXP1_10_PIN 149
  119. #define EXP2_03_PIN -1 // RESET
  120. #define EXP2_04_PIN 34
  121. #define EXP2_05_PIN 23
  122. #define EXP2_06_PIN 12
  123. #define EXP2_07_PIN 5
  124. #define EXP2_08_PIN 14
  125. #define EXP2_09_PIN 18
  126. #define EXP2_10_PIN 19
  127. //
  128. // MicroSD card
  129. //
  130. //#define SD_MOSI_PIN EXP2_05_PIN // uses esp32 default 23
  131. //#define SD_MISO_PIN EXP2_10_PIN // uses esp32 default 19
  132. //#define SD_SCK_PIN EXP2_09_PIN // uses esp32 default 18
  133. #define SDSS EXP2_07_PIN
  134. #define SD_DETECT_PIN EXP2_04_PIN // IO34 default is SD_DET signal (Jump to SDDET)
  135. #define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
  136. #if HAS_WIRED_LCD
  137. #define BEEPER_PIN EXP1_10_PIN
  138. #define LCD_PINS_ENABLE EXP1_08_PIN
  139. #define LCD_PINS_RS EXP1_07_PIN
  140. #define BTN_ENC EXP1_09_PIN
  141. #define BTN_EN1 EXP2_08_PIN
  142. #define BTN_EN2 EXP2_06_PIN
  143. #define LCD_BACKLIGHT_PIN -1
  144. #if ENABLED(MKS_MINI_12864)
  145. // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor)
  146. #define DOGLCD_CS EXP1_05_PIN
  147. #define DOGLCD_A0 EXP1_04_PIN
  148. #define LCD_RESET_PIN -1
  149. #elif ENABLED(FYSETC_MINI_12864_2_1)
  150. // MKS_MINI_12864_V3, BTT_MINI_12864_V1, FYSETC_MINI_12864_2_1
  151. #define DOGLCD_CS EXP1_08_PIN
  152. #define DOGLCD_A0 EXP1_07_PIN
  153. #define LCD_RESET_PIN EXP1_06_PIN
  154. #define NEOPIXEL_PIN EXP1_05_PIN
  155. #if SD_CONNECTION_IS(ONBOARD)
  156. #define FORCE_SOFT_SPI
  157. #endif
  158. #else
  159. #define LCD_PINS_D4 EXP1_06_PIN
  160. #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
  161. #define LCD_PINS_D5 EXP1_05_PIN
  162. #define LCD_PINS_D6 EXP1_04_PIN
  163. #define LCD_PINS_D7 EXP1_03_PIN
  164. #endif
  165. #define BOARD_ST7920_DELAY_1 96
  166. #define BOARD_ST7920_DELAY_2 48
  167. #define BOARD_ST7920_DELAY_3 600
  168. #endif
  169. #endif // HAS_WIRED_LCD