Socket Pin Number Mapping - bdring/6-Pack_CNC_Controller GitHub Wiki

Stepper Motor Pin mapping 1-6 Right to Left

Note: On early versions 123456 is labeled XYZABC, but axis letters may be assigned to any socket. Change the numbers in the definitions to the axis letter you want to use. Valid axis letters are X, Y, Z, A, B, and C. You can also have a second motor for each axis like X2, Y2, etc. You do not need to specify them in any special order. Any motor number can be used for any axis letter.

FluidNC

Note: Replace ms3_pin: with cs_pin: for use with SPI stepper drivers.



      # motor 1
        ms3_pin: i2so.3
        step_pin: I2SO.2
        direction_pin: I2SO.1
        disable_pin: I2SO.0

      # motor 2
        ms3_pin: i2so.6
        step_pin: I2SO.5
        direction_pin: I2SO.4
        disable_pin: I2SO.7

      # motor 3
        ms3_pin: i2so.11
        step_pin: I2SO.10
        direction_pin: I2SO.9
        disable_pin: I2SO.8
      
      # motor 4
        cs_pin: i2so.14
        step_pin: I2SO.13
        direction_pin: I2SO.12
        disable_pin: I2SO.15

      # motor 5
        cs_pin: i2so.19
        step_pin: I2SO.18
        direction_pin: I2SO.17
        disable_pin: I2SO.16

      # motor 6
        cs_pin: i2so.22
        step_pin: I2SO.21
        direction_pin: I2SO.20
        disable_pin: I2SO.23

Grbl_ESP32

// Motor Socket #1 (Change motor number to letter to use motor)
#define 1_DISABLE_PIN           I2SO(0)
#define 1_DIRECTION_PIN         I2SO(1)
#define 1_STEP_PIN              I2SO(2)
#define 1_CS_PIN                I2SO(3)

// Motor Socket #2 (Change motor number to letter to use motor)
#define 2_DIRECTION_PIN         I2SO(4)
#define 2_STEP_PIN              I2SO(5)
#define 2_CS_PIN                I2SO(6)
#define 2_DISABLE_PIN           I2SO(7)

// Motor Socket #3 (Change motor number to letter to use motor)
#define 3_DISABLE_PIN           I2SO(8)
#define 3_DIRECTION_PIN         I2SO(9)
#define 3_STEP_PIN              I2SO(10)
#define 3_CS_PIN                I2SO(11)

// Motor Socket #4 (Change motor number to letter to use motor)
#define 4_DIRECTION_PIN         I2SO(12)
#define 4_STEP_PIN              I2SO(13)
#define 4_CS_PIN                I2SO(14)
#define 4_DISABLE_PIN           I2SO(15)

// Motor Socket #5 (Change motor number to letter to use motor)
#define 5_DISABLE_PIN           I2SO(16)
#define 5_DIRECTION_PIN         I2SO(17)
#define 5_STEP_PIN              I2SO(18)
#define 5_CS_PIN                I2SO(19)

// Motor Socket #6 (Change motor number to letter to use motor)
#define 6_DIRECTION_PIN         I2SO(20)
#define 6_STEP_PIN              I2SO(21)
#define 6_CS_PIN                I2SO(22)
#define 6_DISABLE_PIN           I2SO(23)

CNC I/O Module Pin Mapping

Here is a view of the board for reference.

Here is a module

// Socket #1
// #1 GPIO_NUM_33 (Sg1)
// #2 GPIO_NUM_32 (Sg2)
// #3 GPIO_NUM_35 (Sg3) (input only)
// #4 GPIO_NUM_34 (Sg4) (input only)
// #5 GPIO_NUM_14
// #6 GPIO_NUM_13
// #7 GPIO_NUM_15
// #8 GPIO_NUM_12

// Socket #2
// #1 GPIO_NUM_2
// #2 GPIO_NUM_25
// #3 GPIO_NUM_39 (Sg5) (input only)
// #4 GPIO_NUM_36 (Sg6) (input only)
// #5 GPIO_NUM_14
// #6 GPIO_NUM_13
// #7 GPIO_NUM_15
// #8 GPIO_NUM_12

// Socket #3
// #1 GPIO_NUM_26
// #2 GPIO_NUM_4
// #3 GPIO_NUM_16
// #4 GPIO_NUM_27
// #5 GPIO_NUM_14
// #6 GPIO_NUM_13
// #7 GPIO_NUM_15
// #8 GPIO_NUM_12

// Socket #4
// #1 GPIO_NUM_14
// #2 GPIO_NUM_13
// #3 GPIO_NUM_15
// #4 GPIO_NUM_12
// #5 GPIO_NUM_14
// #6 GPIO_NUM_13
// #7 GPIO_NUM_15
// #8 GPIO_NUM_12

// Socket #5
// #1 I2SO(24)  (output only)
// #2 I2SO(25)  (output only)
// #3 I2SO26)  (output only)
// #4 I2SO(27)  (output only)
// #5 GPIO_NUM_14
// #6 GPIO_NUM_13
// #7 GPIO_NUM_15
// #8 GPIO_NUM_12

TMC2130 Examples

      #socket 1
      tmc_2130:
        cs_pin: i2so.3
        step_pin: I2SO.2
        direction_pin: I2SO.1
        disable_pin: I2SO.0
        spi_index: -1
        r_sense_ohms: 0.110
        run_amps: 0.750
        hold_amps: 0.250
        microsteps: 32
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: CoolStep
        homing_mode: CoolStep
        use_enable: false
 
      #socket 2
      tmc_2130:
        cs_pin: i2so.6
        step_pin: I2SO.5
        direction_pin: I2SO.4
        disable_pin: I2SO.7
        spi_index: -1
        r_sense_ohms: 0.110
        run_amps: 0.750
        hold_amps: 0.250
        microsteps: 32
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: CoolStep
        homing_mode: CoolStep
        use_enable: false

      #socket 3
      tmc_2130:
        cs_pin: i2so.11
        step_pin: I2SO.10
        direction_pin: I2SO.9
        disable_pin: I2SO.8
        spi_index: -1
        r_sense_ohms: 0.110
        run_amps: 0.750
        hold_amps: 0.250
        microsteps: 32
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: CoolStep
        homing_mode: CoolStep
        use_enable: false

      #socket #4
      tmc_2130:
        cs_pin: i2so.14
        step_pin: I2SO.13
        direction_pin: I2SO.12
        disable_pin: I2SO.15
        spi_index: -1
        r_sense_ohms: 0.110
        run_amps: 0.750
        hold_amps: 0.250
        microsteps: 32
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: CoolStep
        homing_mode: CoolStep
        use_enable: false
  
    #socket #5
      tmc_2130:
        cs_pin: i2so.19
        step_pin: I2SO.18
        direction_pin: I2SO.17
        disable_pin: I2SO.16
        spi_index: -1
        r_sense_ohms: 0.110
        run_amps: 0.750
        hold_amps: 0.250
        microsteps: 32
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: CoolStep
        homing_mode: CoolStep
        use_enable: false

    #socket #6
      tmc_2130:
        cs_pin: i2so.22
        step_pin: I2SO.21
        direction_pin: I2SO.20
        disable_pin: I2SO.23
        spi_index: -1
        r_sense_ohms: 0.110
        run_amps: 0.750
        hold_amps: 0.250
        microsteps: 32
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: CoolStep
        homing_mode: CoolStep
        use_enable: false