Skip to content

Commit

Permalink
Moved coolant outputs to auxiliary outputs pool.
Browse files Browse the repository at this point in the history
  • Loading branch information
terjeio committed Dec 17, 2024
1 parent 11e4117 commit fccaa8b
Show file tree
Hide file tree
Showing 30 changed files with 1,132 additions and 599 deletions.
72 changes: 39 additions & 33 deletions main/boards/BlackBoxX32_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,65 +43,71 @@
#endif

// Stepper Driver Pins
#define STEPPERS_ENABLE_PIN GPIO_NUM_17
#define STEPPERS_ENABLE_PIN GPIO_NUM_17

#define X_STEP_PIN GPIO_NUM_12
#define X_DIRECTION_PIN GPIO_NUM_14
#define X_STEP_PIN GPIO_NUM_12
#define X_DIRECTION_PIN GPIO_NUM_14

#define Y_STEP_PIN GPIO_NUM_27
#define Y_DIRECTION_PIN GPIO_NUM_26
#define Y_STEP_PIN GPIO_NUM_27
#define Y_DIRECTION_PIN GPIO_NUM_26

#define Z_STEP_PIN GPIO_NUM_15
#define Z_DIRECTION_PIN GPIO_NUM_2
#define Z_STEP_PIN GPIO_NUM_15
#define Z_DIRECTION_PIN GPIO_NUM_2

// Define ganged axis or A axis step pulse and step direction output pins.
#if N_ABC_MOTORS > 0
#define M3_AVAILABLE
#define M3_STEP_PIN GPIO_NUM_33
#define M3_DIRECTION_PIN GPIO_NUM_32
#define M3_STEP_PIN GPIO_NUM_33
#define M3_DIRECTION_PIN GPIO_NUM_32
#if N_AUTO_SQUARED
// add limit pin definitions to stop compiler complaints (from preprocessor).
#if X_AUTO_SQUARE
#define M3_LIMIT_PIN GPIO_NUM_35 // Same as X limit, switched to Z by board code during homing.
#define M3_LIMIT_PIN GPIO_NUM_35 // Same as X limit, switched to Z by board code during homing.
#elif Y_AUTO_SQUARE
#define M3_LIMIT_PIN GPIO_NUM_34 // Same as Y limit, switched to Z by board code during homing.
#define M3_LIMIT_PIN GPIO_NUM_34 // Same as Y limit, switched to Z by board code during homing.
#else
#define M3_LIMIT_PIN GPIO_NUM_39 // Same as Z limit, switched to X by board code during homing.
#define M3_LIMIT_PIN GPIO_NUM_39 // Same as Z limit, switched to X by board code during homing.
#endif
#endif
#endif

// Endstops
#define X_LIMIT_PIN GPIO_NUM_35
#define Y_LIMIT_PIN GPIO_NUM_34
#define Z_LIMIT_PIN GPIO_NUM_39
#define X_LIMIT_PIN GPIO_NUM_35
#define Y_LIMIT_PIN GPIO_NUM_34
#define Z_LIMIT_PIN GPIO_NUM_39

// Define driver spindle pins
#define AUXOUTPUT0_PIN GPIO_NUM_25 // Spindle PWM
#define AUXOUTPUT1_PIN GPIO_NUM_4 // Spindle direction
#define AUXOUTPUT2_PIN GPIO_NUM_13 // Spindle enable
#define AUXOUTPUT3_PIN GPIO_NUM_21 // Coolant flood

#if DRIVER_SPINDLE_PWM_ENABLE
#define SPINDLE_PWM_PIN GPIO_NUM_25
#else
#define AUXOUTPUT0_PIN GPIO_NUM_25
// Define driver spindle pins
#if DRIVER_SPINDLE_ENABLE & SPINDLE_PWM
#define SPINDLE_PWM_PIN AUXOUTPUT0_PIN
#endif

#if DRIVER_SPINDLE_DIR_ENABLE
#define SPINDLE_DIRECTION_PIN GPIO_NUM_4
#else
#define AUXOUTPUT1_PIN GPIO_NUM_4
#if DRIVER_SPINDLE_ENABLE & SPINDLE_DIR
#define SPINDLE_DIRECTION_PIN AUXOUTPUT1_PIN
#endif

#if DRIVER_SPINDLE_ENABLE
#define SPINDLE_ENABLE_PIN GPIO_NUM_13
#else
#define AUXOUTPUT2_PIN GPIO_NUM_13
#if DRIVER_SPINDLE_ENABLE & SPINDLE_ENA
#define SPINDLE_ENABLE_PIN AUXOUTPUT2_PIN
#endif

// Define flood and mist coolant enable output pins.
// Only one can be enabled!
#define COOLANT_FLOOD_PIN GPIO_NUM_21 // coolant
//#define COOLANT_MIST_PIN GPIO_NUM_21 // or mist
#if COOLANT_ENABLE & COOLANT_FLOOD
#define COOLANT_FLOOD_PIN AUXOUTPUT3_PIN
#endif
#if COOLANT_ENABLE & COOLANT_MIST
#undef COOLANT_ENABLE
#ifdef COOLANT_FLOOD_PIN
#define COOLANT_ENABLE COOLANT_FLOOD
#else
#define COOLANT_ENABLE 0
#endif
#endif

// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
#undef CONTROL_ENABLE
#define CONTROL_ENABLE 0 // No control inputs

#define AUXINPUT0_PIN GPIO_NUM_0 // Mode button on front panel
#define AUXINPUT1_PIN GPIO_NUM_16
Expand Down
46 changes: 25 additions & 21 deletions main/boards/bdring_i2s_6_axis_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
#error No free pins for I2C keypad!
#endif

#define USE_I2S_OUT
#define I2S_OUT_PIN_BASE 64
#include "use_i2s_out.h"

#if SDCARD_ENABLE || TRINAMIC_SPI_ENABLE

Expand Down Expand Up @@ -89,33 +88,38 @@
#define M5_LIMIT_PIN GPIO_NUM_33
#endif

// Define driver spindle pins
#define AUXOUTPUT0_PIN GPIO_NUM_26 // Spindle PWM
#define AUXOUTPUT1_PIN GPIO_NUM_16 // Spindle direction
#define AUXOUTPUT2_PIN GPIO_NUM_4 // Spindle enable
#define AUXOUTPUT3_PIN GPIO_NUM_2 // Coolant mist

#if DRIVER_SPINDLE_PWM_ENABLE
#define SPINDLE_PWM_PIN GPIO_NUM_26
#else
#define AUXOUTPUT0_PIN GPIO_NUM_26
// Define driver spindle pins
#if DRIVER_SPINDLE_ENABLE & SPINDLE_PWM
#define SPINDLE_PWM_PIN AUXOUTPUT0_PIN
#endif

#if DRIVER_SPINDLE_DIR_ENABLE
#define SPINDLE_DIRECTION_PIN GPIO_NUM_16
#else
#define AUXOUTPUT1_PIN GPIO_NUM_16
#if DRIVER_SPINDLE_ENABLE & SPINDLE_DIR
#define SPINDLE_DIRECTION_PIN AUXOUTPUT1_PIN
#endif

#if DRIVER_SPINDLE_ENABLE
#define SPINDLE_ENABLE_PIN GPIO_NUM_4
#else
#define AUXOUTPUT2_PIN GPIO_NUM_4
#if DRIVER_SPINDLE_ENABLE & SPINDLE_ENA
#define SPINDLE_ENABLE_PIN AUXOUTPUT2_PIN
#endif

// Define flood and mist coolant enable output pins.

#define COOLANT_MIST_PIN GPIO_NUM_2
#if COOLANT_ENABLE & COOLANT_MIST
#define COOLANT_MIST_PIN AUXOUTPUT3_PIN
#endif
#if COOLANT_ENABLE & COOLANT_FLOOD
#undef COOLANT_ENABLE
#ifdef COOLANT_MIST_PIN
#define COOLANT_ENABLE COOLANT_MIST
#else
#define COOLANT_ENABLE 0
#endif
#endif

// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.

// N/A
#undef CONTROL_ENABLE
#define CONTROL_ENABLE 0 // No control inputs

#define AUXINPUT0_PIN GPIO_NUM_25

Expand Down
34 changes: 17 additions & 17 deletions main/boards/bdring_i2s_6pack_ext_v2_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@
along with grblHAL. If not, see <http://www.gnu.org/licenses/>.
*/

#define BOARD_NAME "BDRING 6-Pack External drives V2.0"
#include "use_i2s_out.h"

#define USE_I2S_OUT
#define I2S_OUT_PIN_BASE 64
#define BOARD_NAME "BDRING 6-Pack External drives V2.0"

#if SDCARD_ENABLE

Expand Down Expand Up @@ -81,30 +80,31 @@
#define M5_STEP_PIN I2SO(21)
#define M5_DIRECTION_PIN I2SO(20)
#define M5_ENABLE_PIN I2SO(23)
#define M5_LIMIT_PIN GPIO_NUM_34
#endif

// Define driver spindle pins
#define AUXOUTPUT0_PIN GPIO_NUM_26 // Spindle PWM
#define AUXOUTPUT1_PIN GPIO_NUM_16 // Spindle direction
#define AUXOUTPUT2_PIN GPIO_NUM_4 // Spindle enable
#define AUXOUTPUT3_PIN GPIO_NUM_2 // Coolant mist

#if DRIVER_SPINDLE_PWM_ENABLE
#define SPINDLE_PWM_PIN GPIO_NUM_26
// Define driver spindle pins
#if DRIVER_SPINDLE_ENABLE & SPINDLE_PWM
#define SPINDLE_PWM_PIN AUXOUTPUT0_PIN
#endif

#if DRIVER_SPINDLE_DIR_ENABLE
#define SPINDLE_DIRECTION_PIN GPIO_NUM_16
#if DRIVER_SPINDLE_ENABLE & SPINDLE_DIR
#define SPINDLE_DIRECTION_PIN AUXOUTPUT1_PIN
#endif

#if DRIVER_SPINDLE_ENABLE
#define SPINDLE_ENABLE_PIN GPIO_NUM_4
#if DRIVER_SPINDLE_ENABLE & SPINDLE_ENA
#define SPINDLE_ENABLE_PIN AUXOUTPUT2_PIN
#endif

// Define flood and mist coolant enable output pins.

//#define COOLANT_MIST_PIN ?
#undef COOLANT_ENABLE
#define COOLANT_ENABLE 0 // No coolant outputs

// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.

// N/A
#undef CONTROL_ENABLE
#define CONTROL_ENABLE 0 // No control inputs

#define AUXINPUT0_PIN GPIO_NUM_25

Expand Down
47 changes: 22 additions & 25 deletions main/boards/bdring_i2s_6x_v1_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@
along with grblHAL. If not, see <http://www.gnu.org/licenses/>.
*/

#define BOARD_NAME "BDRING 6x External Drives V1.1"
#include "use_i2s_out.h"

#define USE_I2S_OUT
#define I2S_OUT_PIN_BASE 64
#define BOARD_NAME "BDRING 6x External Drives V1.1"

#if SDCARD_ENABLE
// Pin mapping when using SPI mode.
Expand Down Expand Up @@ -82,20 +81,26 @@
#define M5_LIMIT_PIN GPIO_NUM_34
#endif

// Define driver spindle pins
#define AUXOUTPUT0_PIN GPIO_NUM_13 // Spindle PWM
#define AUXOUTPUT1_PIN GPIO_NUM_15 // Spindle enable

#if DRIVER_SPINDLE_PWM_ENABLE
#define SPINDLE_PWM_PIN GPIO_NUM_13
#else
#define AUXOUTPUT0_PIN GPIO_NUM_13
// Define driver spindle pins
#if DRIVER_SPINDLE_ENABLE & SPINDLE_PWM
#define SPINDLE_PWM_PIN AUXOUTPUT0_PIN
#endif

#if DRIVER_SPINDLE_ENABLE
#define SPINDLE_ENABLE_PIN GPIO_NUM_15
#if DRIVER_SPINDLE_ENABLE & SPINDLE_ENA
#define SPINDLE_ENABLE_PIN AUXOUTPUT1_PIN
#endif

// Define MODBUS spindle pins (exclusive use - can use PWM or modbus since they share output pins)
// Define flood and mist coolant enable output pins.
#undef COOLANT_ENABLE
#define COOLANT_ENABLE 0 // No coolant outputs

// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
#undef CONTROL_ENABLE
#define CONTROL_ENABLE 0 // No control inputs

// Define MODBUS spindle pins (exclusive use - can use PWM or modbus since they share output pins)
#if MODBUS_ENABLE & MODBUS_RTU_ENABLED
#define UART1_RX_PIN GPIO_NUM_16
#define UART1_TX_PIN GPIO_NUM_15
Expand All @@ -105,25 +110,17 @@
#endif

// If neither PWM nor modbus, gpio14 is aux output

#if !MODBUS_ENABLE & !DRIVER_SPINDLE_PWM_ENABLE
#define AUXOUTPUT1_PIN GPIO_NUM_14
#if !MODBUS_ENABLE && !(DRIVER_SPINDLE_ENABLE & SPINDLE_PWM)
#define AUXOUTPUT2_PIN GPIO_NUM_14
#endif

#define AUXINPUT0_PIN GPIO_NUM_2

// Define probe switch input pin.
#if PROBE_ENABLE
#define PROBE_PIN GPIO_NUM_2
#define PROBE_PIN AUXINPUT0_PIN
#endif

#if KEYPAD_ENABLE
#error No free pins for keypad!
#endif


// Define flood and mist coolant enable output pins.

//#define COOLANT_MIST_PIN ?

// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.

// N/A
21 changes: 9 additions & 12 deletions main/boards/bdring_v3.5_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,20 @@
#define Y_LIMIT_PIN GPIO_NUM_4
#define Z_LIMIT_PIN GPIO_NUM_15

// Define driver spindle pins
#define AUXOUTPUT0_PIN GPIO_NUM_17 // Spindle PWM
#define AUXOUTPUT1_PIN GPIO_NUM_22 // Spindle enable

#if DRIVER_SPINDLE_PWM_ENABLE
#define SPINDLE_PWM_PIN GPIO_NUM_17
#else
#define AUXOUTPUT0_PIN GPIO_NUM_17
// Define driver spindle pins
#if DRIVER_SPINDLE_ENABLE & SPINDLE_PWM
#define SPINDLE_PWM_PIN AUXOUTPUT0_PIN
#endif

#if DRIVER_SPINDLE_ENABLE
#define SPINDLE_ENABLE_PIN GPIO_NUM_22
#else
#define AUXOUTPUT1_PIN GPIO_NUM_22
#if DRIVER_SPINDLE_ENABLE & SPINDLE_ENA
#define SPINDLE_ENABLE_PIN AUXOUTPUT1_PIN
#endif

// Define flood and mist coolant enable output pins.

// N/A
#undef COOLANT_ENABLE
#define COOLANT_ENABLE 0 // No coolant outputs

// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
#define RESET_PIN GPIO_NUM_34
Expand Down
33 changes: 23 additions & 10 deletions main/boards/bdring_v4_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,34 @@
#define Y_LIMIT_PIN GPIO_NUM_4
#define Z_LIMIT_PIN GPIO_NUM_16

// Define driver spindle pins

#if DRIVER_SPINDLE_PWM_ENABLE && !(MODBUS_ENABLE & MODBUS_RTU_ENABLED)
#define SPINDLE_PWM_PIN GPIO_NUM_2
#define AUXOUTPUT0_PIN GPIO_NUM_2 // Spindle PWM
#define AUXOUTPUT1_PIN GPIO_NUM_22 // Spindle enable
#define AUXOUTPUT2_PIN GPIO_NUM_25 // Coolant flood
#ifndef ADD_SERIAL1
#define AUXOUTPUT3_PIN GPIO_NUM_21 // Coolant mist
#endif

#if DRIVER_SPINDLE_ENABLE && !(MODBUS_ENABLE & MODBUS_RTU_ENABLED)
#define SPINDLE_ENABLE_PIN GPIO_NUM_22
// Define driver spindle pins
#if DRIVER_SPINDLE_ENABLE & SPINDLE_PWM
#define SPINDLE_PWM_PIN AUXOUTPUT0_PIN
#endif
#if DRIVER_SPINDLE_ENABLE & SPINDLE_ENA
#define SPINDLE_ENABLE_PIN AUXOUTPUT1_PIN
#endif

// Define flood and mist coolant enable output pins.

#define COOLANT_FLOOD_PIN GPIO_NUM_25
#if DRIVER_SPINDLE_ENABLE
#define COOLANT_MIST_PIN GPIO_NUM_21
#if COOLANT_ENABLE & COOLANT_FLOOD
#define COOLANT_FLOOD_PIN AUXOUTPUT2_PIN
#endif
#if (COOLANT_ENABLE & COOLANT_MIST) && defined(AUXOUTPUT3_PIN)
#define COOLANT_MIST_PIN AUXOUTPUT3_PIN
#else
#undef COOLANT_ENABLE
#ifdef COOLANT_FLOOD_PIN
#define COOLANT_ENABLE COOLANT_FLOOD
#else
#define COOLANT_ENABLE 0
#endif
#endif

// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
Expand Down
Loading

0 comments on commit fccaa8b

Please sign in to comment.