bdring / Grbl_Esp32

A port of Grbl CNC Firmware for ESP32
GNU General Public License v3.0
1.69k stars 529 forks source link

Translate Machine.h for myESP32-2130v6 #1225

Open bDuthieDev opened 2 years ago

bDuthieDev commented 2 years ago

This issue will automatically convert a Grbl_Esp32 machine definition file to FluidNC YAML format.

Change YOUR NAME in the title to some string that identifies your machine configuration.

IMPORTANT: Change only the YOUR NAME part of the title, not the entire title. If you change the entire title, GitHub will not run the converter program.

Attach your machine definition file here - but first change the .h extension to .txt because GitHub will not allow you to attach a file with a .h extension. Submit the issue, and after a few minutes, a new comment will appear with the FluidNC YAML file.

IMPORTANT: Attach the file - do not paste the file text into the issue. If you paste, the converter will not work. myEsp32_2130v6.txt

github-actions[bot] commented 2 years ago

Dear bDuthieDev, we converted your machine header-file myEsp32_2130v6.txt into a corresponding fluidNc yaml-file. Please copy the following content into your config.yaml file and upload the file to your esp32.

name: 6-pack 2130sg XYYZA 4xIn 4x5v 10vCNC (v6)
board: 6-pack

kinematics:
  Cartesian:

stepping:
  engine: I2S_stream
  idle_ms: 250
  dir_delay_us: 0
  pulse_us: 4
  disable_delay_us: 0

axes:
  x:
    steps_per_mm: 100.000
    max_rate_mm_per_min: 1000.000
    acceleration_mm_per_sec2: 200.000
    max_travel_mm: 300.000
    soft_limits: false
    homing:
      cycle: 2
      mpos_mm: 0.000
      positive_direction: true
      settle_ms: 250.000
      seek_mm_per_min: 2000.000
      feed_mm_per_min: 200.000
      seek_scaler: 1.100
      feed_scaler: 5.000
    motor0:
      limit_all_pin: gpio.33:low
      hard_limits: false
      tmc_2130:
        direction_pin: i2so.1
        step_pin: i2so.2
        disable_pin: i2so.0
        run_amps: 0.250
        hold_amps: 0.125
        microsteps: 16
        stallguard: 16
        stallguard_debug: false
        run_mode: CoolStep
        homing_mode: Stallguard
        use_enable: false
        r_sense_ohms: 0.110
        cs_pin: i2so.3:low
    motor1:
      null_motor:
  y:
    steps_per_mm: 100.000
    max_rate_mm_per_min: 1000.000
    acceleration_mm_per_sec2: 200.000
    max_travel_mm: 300.000
    soft_limits: false
    homing:
      cycle: 2
      mpos_mm: 0.000
      positive_direction: true
      settle_ms: 250.000
      seek_mm_per_min: 2000.000
      feed_mm_per_min: 200.000
      seek_scaler: 1.100
      feed_scaler: 5.000
    motor0:
      limit_all_pin: gpio.32:low
      hard_limits: false
      tmc_2130:
        direction_pin: i2so.4
        step_pin: i2so.5
        disable_pin: i2so.7
        run_amps: 0.250
        hold_amps: 0.125
        microsteps: 16
        stallguard: 16
        stallguard_debug: false
        run_mode: CoolStep
        homing_mode: Stallguard
        use_enable: false
        r_sense_ohms: 0.110
        cs_pin: i2so.6:low
    motor1:
      limit_all_pin: gpio.35:low
      hard_limits: false
      tmc_2130:
        direction_pin: i2so.9
        step_pin: i2so.10
        disable_pin: i2so.8
        run_amps: 0.250
        hold_amps: 0.125
        microsteps: 16
        stallguard: 16
        stallguard_debug: false
        run_mode: CoolStep
        homing_mode: Stallguard
        use_enable: false
        r_sense_ohms: 0.110
        cs_pin: i2so.11:low
  z:
    steps_per_mm: 100.000
    max_rate_mm_per_min: 1000.000
    acceleration_mm_per_sec2: 200.000
    max_travel_mm: 300.000
    soft_limits: false
    homing:
      cycle: 1
      mpos_mm: 0.000
      positive_direction: false
      settle_ms: 250.000
      seek_mm_per_min: 2000.000
      feed_mm_per_min: 200.000
      seek_scaler: 1.100
      feed_scaler: 5.000
    motor0:
      limit_all_pin: gpio.34:low
      hard_limits: false
      tmc_2130:
        direction_pin: i2so.12
        step_pin: i2so.13
        disable_pin: i2so.15
        run_amps: 0.250
        hold_amps: 0.125
        microsteps: 16
        stallguard: 16
        stallguard_debug: false
        run_mode: CoolStep
        homing_mode: Stallguard
        use_enable: false
        r_sense_ohms: 0.110
        cs_pin: i2so.14:low
    motor1:
      null_motor:
  a:
    steps_per_mm: 100.000
    max_rate_mm_per_min: 1000.000
    acceleration_mm_per_sec2: 200.000
    max_travel_mm: 300.000
    soft_limits: false
    motor0:
      tmc_2130:
        direction_pin: i2so.17
        step_pin: i2so.18
        disable_pin: i2so.16
        run_amps: 0.250
        hold_amps: 0.125
        microsteps: 16
        stallguard: 16
        stallguard_debug: false
        run_mode: CoolStep
        homing_mode: Stallguard
        use_enable: false
        r_sense_ohms: 0.110
        cs_pin: i2so.19:low
    motor1:
      null_motor:

i2so:
  bck_pin: gpio.22
  data_pin: gpio.21
  ws_pin: gpio.17

spi:
  miso_pin: gpio.19
  mosi_pin: gpio.23
  sck_pin: gpio.18

sdcard:
  cs_pin: gpio.5

control:
  reset_pin: gpio.39
  feed_hold_pin: gpio.36
  cycle_start_pin: gpio.25:pu

coolant:
  delay_ms: 1000.000

probe:
  pin: gpio.2:pu
  check_mode_start: false

macros:
  startup_line0: 
  startup_line1: 
  macro0: 
  macro1: 
  macro2: 
  macro3: 

start:
  must_home: true
  check_limits: true
  deactivate_parking: false

user_outputs:

laser:
  tool_num: 0
  speed_map: 0=0.0% 1000=100.0%
  output_pin: gpio.27
  enable_pin: gpio.16
  disable_with_s0: false
  s0_with_disable: false
  pwm_hz: 5000
arc_tolerance_mm: 0.002
junction_deviation_mm: 0.010
verbose_errors: false
report_inches: false
enable_parking_override_control: false
use_line_numbers: false 
MitchBradley commented 2 years ago

Please note that lasers do not work well with i2s_stream mode, because of synchronization problems with the laser power and the stepping. You should probably change to i2s_static.