mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-09-02 10:53:01 +02:00
Machine file cleanup
Cleaning up tmc2130_pen for a user. - Removed the Servo and Solenoid setup from config.h. It was typically used from machine definition files. - Added some defines for default resistor values. Note: some of this may be redone with saved settings in the future.
This commit is contained in:
@@ -40,9 +40,7 @@
|
||||
#define Y_LIMIT_PIN GPIO_NUM_4
|
||||
#define LIMIT_MASK B11
|
||||
|
||||
#ifndef USE_SERVO_AXES // maybe set in config.h
|
||||
#define USE_SERVO_AXES
|
||||
#endif
|
||||
|
||||
#define SERVO_Z_PIN GPIO_NUM_27
|
||||
#define SERVO_Z_RANGE_MIN 0.0
|
||||
|
@@ -43,9 +43,7 @@
|
||||
|
||||
#define STEPPERS_DISABLE_PIN GPIO_NUM_17
|
||||
|
||||
#ifndef USE_SERVO_AXES // maybe set in config.h
|
||||
#define USE_SERVO_AXES
|
||||
#endif
|
||||
|
||||
#define SERVO_Z_PIN GPIO_NUM_16
|
||||
#define SERVO_Z_RANGE_MIN 0.0
|
||||
|
@@ -38,21 +38,21 @@
|
||||
#define USE_TRINAMIC_ENABLE
|
||||
|
||||
#define X_DRIVER_TMC2130 // Which Driver Type?
|
||||
#define X_RSENSE 0.11f // .11 Ohm...typical of 2130 type 0.075 typical for TMC5160
|
||||
#define X_RSENSE TMC2130_RSENSE_DEFAULT
|
||||
#define X_STEP_PIN GPIO_NUM_12
|
||||
#define X_DIRECTION_PIN GPIO_NUM_14
|
||||
#define X_TRINAMIC // using SPI control
|
||||
#define X_CS_PIN GPIO_NUM_17 // Daisy Chain, all share same CS pin
|
||||
|
||||
#define Y_DRIVER_TMC2130 // Which Driver Type?
|
||||
#define Y_RSENSE 0.11f // .11 Ohm...typical of 2130 type 0.075 typical for TMC5160
|
||||
#define Y_RSENSE TMC2130_RSENSE_DEFAULT
|
||||
#define Y_STEP_PIN GPIO_NUM_27
|
||||
#define Y_DIRECTION_PIN GPIO_NUM_26
|
||||
#define Y_TRINAMIC // using SPI control
|
||||
#define Y_CS_PIN X_CS_PIN // Daisy Chain, all share same CS pin
|
||||
|
||||
#define Z_DRIVER_TMC2130 // Which Driver Type?
|
||||
#define Z_RSENSE 0.11f // .11 Ohm...typical of 2130 type 0.075 typical for TMC5160
|
||||
#define Z_RSENSE TMC2130_RSENSE_DEFAULT
|
||||
#define Z_STEP_PIN GPIO_NUM_15
|
||||
#define Z_DIRECTION_PIN GPIO_NUM_2
|
||||
#define Z_TRINAMIC // using SPI control
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
#if (N_AXIS == 4)
|
||||
#define A_DRIVER_TMC2130 // Which Driver Type?
|
||||
#define A_RSENSE 0.11f // .11 Ohm...typical of 2130 type 0.075 typical for TMC5160
|
||||
#define A_RSENSE TMC2130_RSENSE_DEFAULT
|
||||
#define A_STEP_PIN GPIO_NUM_33
|
||||
#define A_DIRECTION_PIN GPIO_NUM_32
|
||||
#define A_TRINAMIC // using SPI control
|
||||
|
@@ -42,7 +42,7 @@
|
||||
|
||||
// Y motor connects to the 1st driver
|
||||
#define X_DRIVER_TMC2130 // Which Driver Type?
|
||||
#define X_RSENSE 0.11f // .11 Ohm...typical of 2130 type 0.075 typical for TMC5160
|
||||
#define X_RSENSE TMC2130_RSENSE_DEFAULT
|
||||
#define X_STEP_PIN GPIO_NUM_12
|
||||
#define X_DIRECTION_PIN GPIO_NUM_14
|
||||
#define X_TRINAMIC // using SPI control
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
// Y motor connects to the 2nd driver
|
||||
#define Y_DRIVER_TMC2130 // Which Driver Type?
|
||||
#define Y_RSENSE 0.11f // .11 Ohm...typical of 2130 type 0.075 typical for TMC5160
|
||||
#define Y_RSENSE TMC2130_RSENSE_DEFAULT
|
||||
#define Y_STEP_PIN GPIO_NUM_27
|
||||
#define Y_DIRECTION_PIN GPIO_NUM_26
|
||||
#define Y_TRINAMIC // using SPI control
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
// Y2 motor connects to the 2nd driver
|
||||
#define Y2_DRIVER_TMC2130 // Which Driver Type?
|
||||
#define Y2_RSENSE 0.11f // .11 Ohm...typical of 2130 type 0.075 typical for TMC5160
|
||||
#define Y2_RSENSE TMC2130_RSENSE_DEFAULT
|
||||
#define Y2_STEP_PIN GPIO_NUM_15 // Z on schem
|
||||
#define Y2_DIRECTION_PIN GPIO_NUM_2 // Z on schem
|
||||
#define Y2_TRINAMIC // using SPI control
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
// Z Axis motor connects to the 4th driver
|
||||
#define Z_DRIVER_TMC2130 // Which Driver Type?
|
||||
#define Z_RSENSE 0.11f // .11 Ohm...typical of 2130 type 0.075 typical for TMC5160
|
||||
#define Z_RSENSE TMC2130_RSENSE_DEFAULT
|
||||
#define Z_STEP_PIN GPIO_NUM_33 // A on schem
|
||||
#define Z_DIRECTION_PIN GPIO_NUM_32 // A on schem
|
||||
#define Z_TRINAMIC // using SPI control
|
||||
|
@@ -42,36 +42,36 @@
|
||||
#define X_TRINAMIC // using SPI control
|
||||
#define X_DRIVER_TMC2130 // Which Driver Type?
|
||||
#define X_CS_PIN GPIO_NUM_17 //chip select
|
||||
#define X_RSENSE 0.11f // .11 Ohm
|
||||
#define X_RSENSE TMC2130_RSENSE_DEFAULT
|
||||
|
||||
#define Y_STEP_PIN GPIO_NUM_14
|
||||
#define Y_DIRECTION_PIN GPIO_NUM_25
|
||||
#define Y_TRINAMIC // using SPI control
|
||||
#define Y_DRIVER_TMC2130 // Which Driver Type?
|
||||
#define Y_CS_PIN GPIO_NUM_16 //chip select
|
||||
#define Y_RSENSE 0.11f // .11 Ohm
|
||||
#define Y_RSENSE TMC2130_RSENSE_DEFAULT
|
||||
|
||||
// OK to comment out to use pin for other features
|
||||
#define STEPPERS_DISABLE_PIN GPIO_NUM_13
|
||||
|
||||
#ifndef USE_SERVO_AXES // may be set in config.h
|
||||
#define USE_SERVO_AXES
|
||||
#endif
|
||||
|
||||
|
||||
// Define one of these 2 options for spindle or servo
|
||||
#define USE_SERVO_AXES
|
||||
//#define USE_SPINDLE
|
||||
|
||||
#ifdef USE_SERVO_AXES
|
||||
#define SERVO_Z_PIN GPIO_NUM_27 // comment this out if PWM spindle/laser control.
|
||||
#define SERVO_Z_RANGE_MIN 0.0
|
||||
#define SERVO_Z_RANGE_MAX 5.0
|
||||
#define SERVO_Z_HOMING_TYPE SERVO_HOMING_TARGET // during homing it will instantly move to a target value
|
||||
#define SERVO_Z_HOME_POS SERVO_Z_RANGE_MAX // move to max during homing
|
||||
#define SERVO_Z_MPOS false // will not use mpos, uses work coordinates
|
||||
|
||||
|
||||
// Comment out servo pin and uncomment spindle pwm pin to use the servo PWM to control a spindle
|
||||
/*
|
||||
#else
|
||||
#define SPINDLE_PWM_PIN GPIO_NUM_27
|
||||
*/
|
||||
#endif
|
||||
|
||||
// #define X_LIMIT_PIN See version section
|
||||
// #define X_LIMIT_PIN See version section at beginning of file
|
||||
#define Y_LIMIT_PIN GPIO_NUM_4
|
||||
#define LIMIT_MASK B11
|
||||
|
||||
|
@@ -303,16 +303,6 @@ Some features should not be changed. See notes below.
|
||||
// have the same steps per mm internally.
|
||||
// #define COREXY // Default disabled. Uncomment to enable.
|
||||
|
||||
// Enable using a servo for the Z axis on a pen type machine.
|
||||
// You typically should not define a pin for the Z axis in the machine definition file
|
||||
// You should configure your settings in servo_pen.h
|
||||
// #define USE_SERVO_AXES // the new method
|
||||
// define your servo pin here or in the machine definition file
|
||||
//#define SERVO_PEN_PIN GPIO_NUM_27
|
||||
|
||||
// Enable using a solenoid for the Z axis on a pen type machine
|
||||
// #define USE_PEN_SOLENOID
|
||||
|
||||
// Inverts select limit pin states based on the following mask. This effects all limit pin functions,
|
||||
// such as hard limits and homing. However, this is different from overall invert limits setting.
|
||||
// This build option will invert only the limit pins defined here, and then the invert limits setting
|
||||
|
@@ -25,6 +25,10 @@
|
||||
|
||||
#include "grbl.h"
|
||||
|
||||
// the default current sense resistors used on most driver modules
|
||||
#define TMC2130_RSENSE_DEFAULT 0.11f
|
||||
#define TMC5160_RSENSE_DEFAULT 0.075f
|
||||
|
||||
#ifdef USE_TRINAMIC
|
||||
#include <TMCStepper.h> // https://github.com/teemuatlut/TMCStepper
|
||||
void Trinamic_Init();
|
||||
|
Reference in New Issue
Block a user