1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-03 19:32:39 +02:00

minor update to machine definition files

- Got rid of MACHINE in names, that is already in the const prefix for that message
- Add spindle tpyes....just a temporary method until prefs are ready
- minor formatting
This commit is contained in:
bdring
2020-04-21 13:22:12 -05:00
parent 774f6322d1
commit 16269ec117
18 changed files with 42 additions and 206 deletions

View File

@@ -23,7 +23,7 @@
along with Grbl_ESP32. If not, see <http://www.gnu.org/licenses/>.
*/
#define MACHINE_NAME "MACHINE_ESP32_V3.5"
#define MACHINE_NAME "ESP32_V3.5"
#define X_STEP_PIN GPIO_NUM_12
#define X_DIRECTION_PIN GPIO_NUM_26
@@ -40,8 +40,10 @@
// OK to comment out to use pin for other features
#define STEPPERS_DISABLE_PIN GPIO_NUM_13
#define SPINDLE_TYPE SPINDLE_TYPE_PWM
#define SPINDLE_PWM_PIN GPIO_NUM_17 // labeled SpinPWM
#define SPINDLE_ENABLE_PIN GPIO_NUM_22 // labeled SpinEnbl
#define COOLANT_MIST_PIN GPIO_NUM_21 // labeled Mist
#define COOLANT_FLOOD_PIN GPIO_NUM_16 // labeled Flood
#define PROBE_PIN GPIO_NUM_32 // labeled Probe

View File

@@ -23,7 +23,7 @@
along with Grbl_ESP32. If not, see <http://www.gnu.org/licenses/>.
*/
#define MACHINE_NAME "MACHINE_ESP32_V4"
#define MACHINE_NAME "ESP32_V4"
#define X_STEP_PIN GPIO_NUM_12
#define X_DIRECTION_PIN GPIO_NUM_14
@@ -40,8 +40,10 @@
// OK to comment out to use pin for other features
#define STEPPERS_DISABLE_PIN GPIO_NUM_13
#define SPINDLE_TYPE SPINDLE_TYPE_PWM
#define SPINDLE_PWM_PIN GPIO_NUM_2 // labeled SpinPWM
#define SPINDLE_ENABLE_PIN GPIO_NUM_22 // labeled SpinEnbl
#define MIST_PIN GPIO_NUM_21 // labeled Mist
#define FLOOD_PIN GPIO_NUM_25 // labeled Flood
#define PROBE_PIN GPIO_NUM_32 // labeled Probe

View File

@@ -24,7 +24,7 @@
along with Grbl_ESP32. If not, see <http://www.gnu.org/licenses/>.
*/
#define MACHINE_NAME "MACHINE_ESP32_V4_XYX"
#define MACHINE_NAME "ESP32_V4_XYX"
#define X_STEP_PIN GPIO_NUM_26 /* labeled Y */
#define X_DIRECTION_PIN GPIO_NUM_15 /* labeled Y */
#define Y_STEP_PIN GPIO_NUM_12 /* labeled X */
@@ -32,7 +32,9 @@
#define Y2_STEP_PIN GPIO_NUM_27 /* labeled Z */
#define Y2_DIRECTION_PIN GPIO_NUM_33 /* labeled Z */
#define SPINDLE_TYPE SPINDLE_TYPE_PWM
#define SPINDLE_PWM_PIN GPIO_NUM_2
#define SPINDLE_ENABLE_PIN GPIO_NUM_22
#define LIMIT_MASK B11
#define X_LIMIT_PIN GPIO_NUM_17
@@ -44,7 +46,7 @@
#define COOLANT_MIST_PIN GPIO_NUM_21
#define COOLANT_FLOOD_PIN GPIO_NUM_25
#define SPINDLE_ENABLE_PIN GPIO_NUM_22
// see versions for X and Z
#define PROBE_PIN GPIO_NUM_32

View File

@@ -39,10 +39,13 @@
#define A_DIRECTION_PIN GPIO_NUM_12
#define STEPPERS_DISABLE_PIN GPIO_NUM_13
/*
#define SPINDLE_TYPE SPINDLE_TYPE_PWM
#define SPINDLE_PWM_PIN GPIO_NUM_25
#define SPINDLE_ENABLE_PIN GPIO_NUM_22
*/
#define SPINDLE_TYPE SPINDLE_TYPE_HUANYANG
#define MODBUS_TX GPIO_NUM_17
#define MODBUS_RX GPIO_NUM_4
#define MODBUS_CTRL GPIO_NUM_16

View File

@@ -1,61 +0,0 @@
/*
add_esc_spindle.h
Part of Grbl_ESP32
This is an additional configuration fragment that can be
included after a base configuration file. The base file
establishes most settings and the add-on changes a few things.
For example, in machines.h, you would write:
#include "Machines/3axis_v4.h" // Basic pin assignments
#include "Machines/add_esc_spindle.h" // Add-ons for ESC spindle
This uses a Brushless DC Hobby motor as a spindle motor. See:
https://github.com/bdring/Grbl_Esp32/wiki/BESC-Spindle-Feature
2019 - Bart Dring
2020 - Mitch Bradley
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/>.
*/
// MACHINE_EXTRA is appended to MACHINE_NAME for startup message display
#define MACHINE_EXTRA "_ESC_SPINDLE"
#define SHOW_EXTENDED_SETTINGS
#define SPINDLE_PWM_BIT_PRECISION 16 // 16 bit recommended for ESC (don't change)
/*
Important ESC Settings
$33=50 // Hz this is the typical good frequency for an ESC
#define DEFAULT_SPINDLE_FREQ 5000.0 // $33 Hz (extended set)
Determine the typical min and max pulse length of your ESC
min_pulse is typically 1ms (0.001 sec) or less
max_pulse is typically 2ms (0.002 sec) or more
determine PWM_period. It is (1/freq) if freq = 50...period = 0.02
determine pulse length for min_pulse and max_pulse in percent.
(pulse / PWM_period)
min_pulse = (0.001 / 0.02) = 0.05 = 5% so ... $34 and $35 = 5.0
max_pulse = (0.002 / .02) = 0.1 = 10% so ... $36=10
*/
#define DEFAULT_SPINDLE_FREQ 50.0
#define DEFAULT_SPINDLE_OFF_VALUE 5.0
#define DEFAULT_SPINDLE_MIN_VALUE 5.0
#define DEFAULT_SPINDLE_MAX_VALUE 10.0

View File

@@ -25,7 +25,7 @@
along with Grbl_ESP32. If not, see <http://www.gnu.org/licenses/>.
*/
#define MACHINE_NAME "MACHINE_ESPDUINO_32"
#define MACHINE_NAME "ESPDUINO_32"
#define X_STEP_PIN GPIO_NUM_26
#define X_DIRECTION_PIN GPIO_NUM_16
@@ -39,6 +39,7 @@
// OK to comment out to use pin for other features
#define STEPPERS_DISABLE_PIN GPIO_NUM_12
#define SPINDLE_TYPE SPINDLE_TYPE_PWM
#define SPINDLE_PWM_PIN GPIO_NUM_19
#define SPINDLE_DIR_PIN GPIO_NUM_18

View File

@@ -22,13 +22,15 @@
*/
#define MACHINE_NAME "MACHINE_FOO_6X"
#define MACHINE_NAME "FOO_6X"
#ifdef N_AXIS
#undef N_AXIS
#endif
#define N_AXIS 6
#define SPINDLE_TYPE SPINDLE_TYPE_NONE
// stepper motors
#define X_STEP_PIN GPIO_NUM_12
#define X_DIRECTION_PIN GPIO_NUM_26
@@ -122,11 +124,6 @@
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
#define DEFAULT_HOMING_PULLOFF 3.0 // mm
#define DEFAULT_SPINDLE_RPM_MAX 1000.0 // rpm
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
#define DEFAULT_LASER_MODE 0 // false
#define DEFAULT_X_STEPS_PER_MM 400.0
#define DEFAULT_Y_STEPS_PER_MM 400.0
#define DEFAULT_Z_STEPS_PER_MM 100.0 // This is percent in servo mode

View File

@@ -22,7 +22,9 @@
along with Grbl_ESP32. If not, see <http://www.gnu.org/licenses/>.
*/
#define MACHINE_NAME "MACHINE_MIDTBOT"
#define MACHINE_NAME "MIDTBOT"
#define SPINDLE_TYPE SPINDLE_TYPE_NONE
#define X_STEP_PIN GPIO_NUM_12
#define Y_STEP_PIN GPIO_NUM_14
@@ -98,11 +100,6 @@
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
#define DEFAULT_HOMING_PULLOFF 3.0 // mm
#define DEFAULT_SPINDLE_RPM_MAX 1000.0 // rpm
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
#define DEFAULT_LASER_MODE 0 // false
#define DEFAULT_X_STEPS_PER_MM 200.0
#define DEFAULT_Y_STEPS_PER_MM 100.0
#define DEFAULT_Z_STEPS_PER_MM 100.0 // This is percent in servo mode

View File

@@ -25,7 +25,7 @@
// // Pin assignments for the Buildlog.net MPCNC controller
#define MACHINE_NAME "MACHINE_MPCNC_V1P1"
#define MACHINE_NAME "MPCNC_V1P1"
#define USE_GANGED_AXES // allow two motors on an axis
@@ -50,8 +50,10 @@
//#define USE_SPINDLE_RELAY
#ifdef USE_SPINDLE_RELAY
#define SPINDLE_TYPE SPINDLE_TYPE_RELAY
#define SPINDLE_PWM_PIN GPIO_NUM_17
#else
#define SPINDLE_TYPE SPINDLE_TYPE_PWM
#define SPINDLE_PWM_PIN GPIO_NUM_16
#define SPINDLE_ENABLE_PIN GPIO_NUM_32
#endif

View File

@@ -26,7 +26,7 @@
#define MACHINE_NAME "MACHINE_MPCNC_V1P2"
#define MACHINE_NAME "MPCNC_V1P2"
#define USE_GANGED_AXES // allow two motors on an axis
@@ -51,8 +51,10 @@
//#define USE_SPINDLE_RELAY
#ifdef USE_SPINDLE_RELAY
#define SPINDLE_TYPE SPINDLE_TYPE_RELAY
#define SPINDLE_PWM_PIN GPIO_NUM_2
#else
#define SPINDLE_TYPE SPINDLE_TYPE_PWM
#define SPINDLE_PWM_PIN GPIO_NUM_16
#define SPINDLE_ENABLE_PIN GPIO_NUM_32
#endif

View File

@@ -26,7 +26,7 @@
along with Grbl_ESP32. If not, see <http://www.gnu.org/licenses/>.
*/
#define MACHINE_NAME "MACHINE_PEN_LASER"
#define MACHINE_NAME "PEN_LASER"
// Pick a board version
//#define PEN_LASER_V1

View File

@@ -22,12 +22,14 @@
along with Grbl_ESP32. If not, see <http://www.gnu.org/licenses/>.
*/
#define MACHINE_NAME "MACHINE_POLAR_COASTER"
#define MACHINE_NAME "POLAR_COASTER"
// This causes the custom code file to be included in the build
// via ../custom_code.cpp
#define CUSTOM_CODE_FILENAME "Custom/polar_coaster.cpp"
#define SPINDLE_TYPE SPINDLE_TYPE_NONE
#define RADIUS_AXIS 0
#define POLAR_AXIS 1

View File

@@ -1,120 +0,0 @@
/*
servo_axis.h
Part of Grbl_ESP32
Pin assignments for the Buildlog.net pen laser controller V1
using servos.
For pen mode be sure to uncomment #define USE_PEN_SERVO in config.h
For solenoid mode be sure to uncomment #define USE_PEN_SERVO in config.h
For laser mode, you do not need to change anything
Note: You can use all 3 modes at the same time if you want
2018 - Bart Dring
2020 - Mitch Bradley
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/>.
*/
#define MACHINE_NAME "MACHINE_SERVO_AXIS"
// Pick a board version
//#define PEN_LASER_V1
#define PEN_LASER_V2
#define X_STEP_PIN GPIO_NUM_12
#define X_DIRECTION_PIN GPIO_NUM_26
#define STEPPERS_DISABLE_PIN GPIO_NUM_13
#ifdef PEN_LASER_V1
#define X_LIMIT_PIN GPIO_NUM_2
#endif
#ifdef PEN_LASER_V2
#define X_LIMIT_PIN GPIO_NUM_15
#endif
#define Y_LIMIT_PIN GPIO_NUM_4
#define LIMIT_MASK B11
// If SPINDLE_PWM_PIN is commented out, this frees up the pin, but Grbl will still
// use a virtual spindle. Do not comment out the other parameters for the spindle.
#define SPINDLE_PWM_PIN GPIO_NUM_17 // Laser PWM
// PWM Generator is based on 80,000,000 Hz counter
// Therefor the freq determines the resolution
// 80,000,000 / freq = max resolution
// For 5000 that is 80,000,000 / 5000 = 16000
// round down to nearest bit count for SPINDLE_PWM_MAX_VALUE
//#define SPINDLE_PWM_BASE_FREQ 5000 // Hz
#define SPINDLE_PWM_OFF_VALUE 0
#ifndef SPINDLE_PWM_MIN_VALUE
#define SPINDLE_PWM_MIN_VALUE 1 // Must be greater than zero.
#endif
#define SERVO_Y_PIN GPIO_NUM_14
#define SERVO_Y_RANGE_MIN 0.0
#define SERVO_Y_RANGE_MAX 30.0
#define SERVO_Z_PIN GPIO_NUM_27
#define SERVO_Z_RANGE_MIN 0.0
#define SERVO_Z_RANGE_MAX 20.0
// defaults
#define DEFAULT_STEP_PULSE_MICROSECONDS 3
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 250 // stay on
#define DEFAULT_STEPPING_INVERT_MASK 0 // uint8_t
#define DEFAULT_DIRECTION_INVERT_MASK 0 // uint8_t
#define DEFAULT_INVERT_ST_ENABLE 0 // boolean
#define DEFAULT_INVERT_LIMIT_PINS 1 // boolean
#define DEFAULT_INVERT_PROBE_PIN 0 // boolean
#define DEFAULT_STATUS_REPORT_MASK 1
#define DEFAULT_JUNCTION_DEVIATION 0.01 // mm
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
#define DEFAULT_REPORT_INCHES 0 // false
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
#define DEFAULT_HOMING_ENABLE 0
#define DEFAULT_HOMING_DIR_MASK 0 // move positive dir Z, negative X,Y
#define DEFAULT_HOMING_FEED_RATE 200.0 // mm/min
#define DEFAULT_HOMING_SEEK_RATE 1000.0 // mm/min
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
#define DEFAULT_HOMING_PULLOFF 3.0 // mm
#define DEFAULT_SPINDLE_RPM_MAX 1000.0 // rpm
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
#define DEFAULT_LASER_MODE 0 // false
#define DEFAULT_X_STEPS_PER_MM 40 // half turn on a stepper
#define DEFAULT_Y_STEPS_PER_MM 100.0 // default calibration value
#define DEFAULT_Z_STEPS_PER_MM 100.0 // default calibration value
#define DEFAULT_X_MAX_RATE 2000.0 // mm/min
#define DEFAULT_Y_MAX_RATE 2000.0 // mm/min
#define DEFAULT_Z_MAX_RATE 2000.0 // mm/min
#define DEFAULT_X_ACCELERATION (50.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
#define DEFAULT_Y_ACCELERATION (50.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
#define DEFAULT_Z_ACCELERATION (50.0*60*60)
#define DEFAULT_X_MAX_TRAVEL 300.0 // mm NOTE: Must be a positive value.
#define DEFAULT_Y_MAX_TRAVEL 100.0 // default calibration value
#define DEFAULT_Z_MAX_TRAVEL 100.0 // default calibration value

View File

@@ -78,6 +78,7 @@
// Turn on with M7 and off with M9
#define COOLANT_MIST_PIN GPIO_NUM_21
#define SPINDLE_TYPE SPINDLE_TYPE_PWM
#define SPINDLE_PWM_PIN GPIO_NUM_25
#define SPINDLE_ENABLE_PIN GPIO_NUM_4

View File

@@ -63,6 +63,7 @@
// Turn on with M7 and off with M9
#define COOLANT_MIST_PIN GPIO_NUM_21
#define SPINDLE_TYPE SPINDLE_TYPE_PWM
#define SPINDLE_PWM_PIN GPIO_NUM_25
#define SPINDLE_ENABLE_PIN GPIO_NUM_4

View File

@@ -56,7 +56,7 @@
// will be shown in a Grbl startup message to identify your
// configuration.
#define MACHINE_NAME "MACHINE_TEMPLATE"
#define MACHINE_NAME "TEMPLATE"
// If your machine requires custom code as described below in
// Special Features, you must copy Custom/custom_code_template.cpp

View File

@@ -32,10 +32,12 @@
along with Grbl_ESP32. If not, see <http://www.gnu.org/licenses/>.
*/
#define MACHINE_NAME "MACHINE_DEFAULT - Demo Only No I/O!"
#define MACHINE_NAME "Test Drive - Demo Only No I/O!"
#define LIMIT_MASK 0 // no limit pins
#define SPINDLE_TYPE SPINDLE_TYPE_NONE
#ifdef USE_RMT_STEPS
#undef USE_RMT_STEPS // Suppress unused variable warning
#endif

View File

@@ -61,6 +61,8 @@
//#define USE_SPINDLE
#ifdef USE_SERVO_AXES
#define SPINDLE_TYPE SPINDLE_TYPE_NONE
#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
@@ -68,7 +70,8 @@
#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
#else
#define SPINDLE_PWM_PIN GPIO_NUM_27
#define SPINDLE_TYPE SPINDLE_TYPE_PWM
#define SPINDLE_PWM_PIN GPIO_NUM_27
#endif
// #define X_LIMIT_PIN See version section at beginning of file