2020-12-03 B. Dring
This is a machine definition file to use the FYSETC E4 3D Printer controller
This is a 4 motor controller. This is setup for XYZA, but XYYZ, could also be used.
There are 5 inputs
The controller has outputs for a Fan, Hotbed and Extruder. There are mapped to
spindle, mist and flood coolant to drive an external relay.
Grbl_ESP32 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Grbl is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Grbl_ESP32. If not, see <http://www.gnu.org/licenses/>.
#pragma once
// 关闭 clang 格式
/*
fysetc_e4.h
https://github.com/FYSETC/FYSETC-E4
*/
#define MACHINE_NAME “FYSETC E4 3D 打印机控制器”
#define N_AXIS 3
#定义 TRINAMIC_RUN_MODE TrinamicMode :: StealthChop
#define TRINAMIC_HOMING_MODE TrinamicMode :: StealthChop
#define TMC_UART UART_NUM_1
#define TMC_UART_RX GPIO_NUM_21
#define TMC_UART_TX GPIO_NUM_22
#define X_TRINAMIC_DRIVER 2209
#define X_STEP_PIN GPIO_NUM_27
#define X_DIRECTION_PIN GPIO_NUM_26
#define X_RSENSE TMC2209_RSENSE_DEFAULT
#define X_DRIVER_ADDRESS 1
#define DEFAULT_X_MICROSTEPS 64
#define Y_TRINAMIC_DRIVER 2209
#define Y_STEP_PIN GPIO_NUM_33
#define Y_DIRECTION_PIN GPIO_NUM_32
#define Y_RSENSE TMC2209_RSENSE_DEFAULT
#define Y_DRIVER_ADDRESS 3
#define DEFAULT_Y_MICROSTEPS 64
#define Y2_TRINAMIC_DRIVER 2209
#define Y2_STEP_PIN GPIO_NUM_33
#define Y2_DIRECTION_PIN GPIO_NUM_32
#define Y2_RSENSE TMC2209_RSENSE_DEFAULT
#define Y2_DRIVER_ADDRESS 0
#define DEFAULT_Y2_MICROSTEPS 64
#define Z_TRINAMIC_DRIVER 2209
#define Z_STEP_PIN GPIO_NUM_14
#define Z_DIRECTION_PIN GPIO_NUM_12
#define Z_RSENSE TMC2209_RSENSE_DEFAULT
#define Z_DRIVER_ADDRESS 2
#define DEFAULT_Z_MICROSTEPS 64
#define X_LIMIT_PIN GPIO_NUM_34
#define Y_LIMIT_PIN GPIO_NUM_35
#define Z_LIMIT_PIN GPIO_NUM_15
#define PROBE_PIN GPIO_NUM_39 // 标记为 TE
#define Y2_LIMIT_PIN GPIO_NUM_36 // 标记为 TB
#define CONTROL_FEED_HOLD_PIN GPIO_NUM_36 // 标记为 TB
// 可以注释掉以将 pin 用于其他功能
#define STEPPERS_DISABLE_PIN GPIO_NUM_25
#define SPINDLE_TYPE SpindleType::RELAY
#define SPINDLE_OUTPUT_PIN GPIO_NUM_13 // 标签风扇
#define COOLANT_MIST_PIN GPIO_NUM_2 // 标签温床
#define COOLANT_FLOOD_PIN GPIO_NUM_4 // 标签加热器