bdring / Grbl_Esp32

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

Translate Machine.h for Marcin #1186

Open aimeiz opened 2 years ago

aimeiz 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. corexy_pen_laser.txt Hi. Congratulations on this great project. Recently I build a plotter using GRBL, initially using standard GRBL. It Is COREXY with SG90 servo as pen activator using M3 / M5 GRBL commands. Firmware running on Arduino, but I decided to move it to ESP-32. Han some issues on COREXY configuration with Homing, but I finally solved them. All carriage movements work fine.

Still have problem with Servo based pen activator. Servo doesn't react on M3 and M5 commands. It sometimes react on Z axis movement, but it is very intermittent. I do not know how to prevent servo pulses to be off in idle state it should have steering pulses always, to keep pen in desired position also in idle state. Any hint how to configure software for servo as spindle / laser (M3 M5 commands) and / or Z axis. Preferably to work with both. Also I need firmware to wait 0.2s after servo controlling command to allow servo reach desired position before doing anything else. I introduced it in standard GRBL code, but ESP 32 grbl is a bit different so I need hints. I attach my Machine.h (corexy_pen_laser) for hint what I should add to make servo work as needed. Best regards.

Marcin.

github-actions[bot] commented 2 years ago

Dear aimeiz, we converted your machine header-file corexy_pen_laser.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: COREXY_PEN_LASER_SERVO
board: unknown

kinematics:
  CoreXY:

stepping:
  engine: RMT
  idle_ms: 250
  dir_delay_us: 0
  pulse_us: 3
  disable_delay_us: 0

axes:
  shared_stepper_disable_pin: gpio.12
  x:
    steps_per_mm: 80.000
    max_rate_mm_per_min: 5000.000
    acceleration_mm_per_sec2: 50.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: 1000.000
      feed_mm_per_min: 200.000
      seek_scaler: 1.100
      feed_scaler: 5.000
    motor0:
      limit_all_pin: gpio.13
      hard_limits: false
      stepstick:
        direction_pin: gpio.16
        step_pin: gpio.26
    motor1:
      null_motor:
  y:
    steps_per_mm: 80.000
    max_rate_mm_per_min: 5000.000
    acceleration_mm_per_sec2: 50.000
    max_travel_mm: 300.000
    soft_limits: false
    homing:
      cycle: 2
      mpos_mm: 0.000
      positive_direction: false
      settle_ms: 250.000
      seek_mm_per_min: 1000.000
      feed_mm_per_min: 200.000
      seek_scaler: 1.100
      feed_scaler: 5.000
    motor0:
      limit_all_pin: gpio.5
      hard_limits: false
      stepstick:
        direction_pin: gpio.27
        step_pin: gpio.25
    motor1:
      null_motor:
  z:
    steps_per_mm: 100.000
    max_rate_mm_per_min: 5000.000
    acceleration_mm_per_sec2: 50.000
    max_travel_mm: 100.000
    soft_limits: false
    motor0:
      rc_servo:
        timer_ms: 75.000
        cal_min: 1.000
        cal_max: 1.000
        pwm_pin: gpio.23
        min_pulse_us: 3276
        max_pulse_us: 6553
    motor1:
      null_motor:

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

sdcard:
  cs_pin: gpio.5

control:

coolant:
  delay_ms: 1000.000

probe:
  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:
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