bdring / FluidNC

The next generation of motion control firmware
Other
1.6k stars 383 forks source link

Problem: can't use gpio.36 as a limit pin #447

Closed TorAllex closed 2 years ago

TorAllex commented 2 years ago

Controller Board

4 Axis (SPI) CNC controller V1.3

Help From Board Vendor

Machine Description

TAIG TOOL Lathe with a Milling attachment

Configuration file

board: 4 Axis SPI Daisy
name: 4 Axis SPI stealthChop +Relay
stepping:
  engine: RMT
  idle_ms: 254
  pulse_us: 2
  dir_delay_us: 1
  disable_delay_us: 0

axes:
  shared_stepper_disable_pin: NO_PIN
  x:
    steps_per_mm: 2400
    max_rate_mm_per_min: 500.000
    acceleration_mm_per_sec2: 3.000
    max_travel_mm: 300.000
    soft_limits: false
    homing:
      cycle: 2
      positive_direction: true
      mpos_mm: 0.000
      feed_mm_per_min: 20.000
      seek_mm_per_min: 200.000
      settle_ms: 250
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      limit_all_pin: gpio.36
      hard_limits: false
      pulloff_mm: 1.000
      tmc_2130:
        cs_pin: gpio.17
        spi_index: 1
        r_sense_ohms: 0.110
        run_amps: 1.1
        hold_amps: 0.2
        microsteps: 8
        stallguard: 0
        stallguard_debug: false
        toff_disable: 1
        toff_stealthchop: 2
        toff_coolstep: 2
        run_mode: stealthChop
        homing_mode: CoolStep
        use_enable: true
        step_pin: gpio.12
        direction_pin: gpio.14
        disable_pin: NO_PIN

  y:
    steps_per_mm: 4800.000
    max_rate_mm_per_min: 300.000
    acceleration_mm_per_sec2: 5.000
    max_travel_mm: 60.000
    soft_limits: false
    homing:
      cycle: 1
      positive_direction: false
      mpos_mm: 0.000
      feed_mm_per_min: 100.000
      seek_mm_per_min: 200.000
      settle_ms: 250
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      limit_all_pin: gpio.39
      hard_limits: false
      pulloff_mm: 1.000
      tmc_2130:
        spi_index: 2
        r_sense_ohms: 0.110
        run_amps: 1.2
        hold_amps: 0.20
        microsteps: 16
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: stealthChop
        homing_mode: CoolStep
        use_enable: true
        step_pin: gpio.27
        direction_pin: gpio.26
        disable_pin: NO_PIN

  z:
    steps_per_mm: 800.000
    max_rate_mm_per_min: 5000.000
    acceleration_mm_per_sec2: 100.000
    max_travel_mm: 300.000
    soft_limits: false
    homing:
      cycle: 4
      positive_direction: false
      mpos_mm: 0.000
      feed_mm_per_min: 100.000
      seek_mm_per_min: 200.000
      settle_ms: 250
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      limit_all_pin: gpio.34
      hard_limits: false
      pulloff_mm: 1.000
      tmc_2130:
        spi_index: 3
        r_sense_ohms: 0.110
        run_amps: 1.2
        hold_amps: 0.20
        microsteps: 32
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: stealthChop
        homing_mode: CoolStep
        use_enable: false
        step_pin: gpio.15
        direction_pin: gpio.2
        disable_pin: NO_PIN

  a:
    steps_per_mm: 53.33333
    max_rate_mm_per_min: 180000.000
    acceleration_mm_per_sec2: 360.000
    max_travel_mm: 360.000
    soft_limits: false
    homing:
      cycle: 3
      positive_direction: false
      mpos_mm: 0.000
      feed_mm_per_min: 100.000
      seek_mm_per_min: 200.000
      settle_ms: 250
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      limit_all_pin: gpio.35
      hard_limits: false
      pulloff_mm: 1.000
      tmc_2130:
        spi_index: 4
        r_sense_ohms: 0.110
        run_amps: 1.2
        hold_amps: 0.50
        microsteps: 32
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: stealthChop
        homing_mode: CoolStep
        use_enable: true
        step_pin: gpio.33
        direction_pin: gpio.32
        disable_pin: NO_PIN

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

sdcard:
  card_detect_pin: NO_PIN
  cs_pin: gpio.5

PWM:
  pwm_hz: 250
  output_pin: gpio.25
  enable_pin: gpio.4
  direction_pin: NO_PIN
  disable_with_s0: false
  s0_with_disable: true
  spinup_ms: 0
  spindown_ms: 0
  tool_num: 0
  speed_map: 0=0.000% 1=100%

probe:
  pin: NO_PIN
  check_mode_start: true

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

start:
  must_home: false

Startup Messages

[MSG:INFO: FluidNC v3.4.5]
[MSG:INFO: Compiled with ESP32 SDK:v4.4-beta1-189-ga79dc75f0a]
[MSG:INFO: Local filesystem type is SPIFFS]
[MSG:INFO: Configuration file:TMC2130_Rel_testA.yaml]
[MSG:WARN: max_rate_mm_per_min value 180000.000 constrained to range (0.001,100000.000)]
[MSG:INFO: Machine 4 Axis SPI stealthChop +Relay]
[MSG:INFO: Board 4 Axis SPI Daisy]
[MSG:INFO: SPI SCK:gpio.18 MOSI:gpio.23 MISO:gpio.19]
[MSG:INFO: SD Card cs_pin:gpio.5 detect:NO_PIN]
[MSG:INFO: Stepping:RMT Pulse:2us Dsbl Delay:0us Dir Delay:1us Idle Delay:254ms]
[MSG:INFO: Axis count 4]
[MSG:INFO: Axis X (-300.000,0.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     tmc_2130 Step:gpio.12 Dir:gpio.14 CS:gpio.17 Disable:NO_PIN Index:1 R:0.110]
[MSG:INFO:     All Limit gpio.36]
[MSG:INFO: Axis Y (0.000,60.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     tmc_2130 Step:gpio.27 Dir:gpio.26 CS:NO_PIN Disable:NO_PIN Index:2 R:0.110]
[MSG:INFO:     All Limit gpio.39]
[MSG:INFO: Axis Z (0.000,300.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     tmc_2130 Step:gpio.15 Dir:gpio.2 CS:NO_PIN Disable:NO_PIN Index:3 R:0.110]
[MSG:INFO:     All Limit gpio.34]
[MSG:INFO: Axis A (0.000,360.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     tmc_2130 Step:gpio.33 Dir:gpio.32 CS:NO_PIN Disable:NO_PIN Index:4 R:0.110]
[MSG:INFO:     All Limit gpio.35]
[MSG:ERR: X Axis driver test failed. Check connection]
[MSG:ERR: Y Axis driver test failed. Check connection]
[MSG:ERR: Z Axis driver test failed. Check connection]
[MSG:ERR: A Axis driver test failed. Check connection]
[MSG:INFO: Kinematic system: Cartesian]
[MSG:INFO: PWM Spindle Ena:gpio.4 Out:gpio.25 Dir:NO_PIN Freq:250Hz Res:18bits]
[MSG:INFO: Using spindle PWM]
[MSG:INFO: Connecting to STA SSID:OpenWrt]
[MSG:INFO: Connecting.]
[MSG:INFO: Connecting..]
[MSG:INFO: Connected - IP is 192.168.1.134]
[MSG:INFO: WiFi on]
[MSG:INFO: Start mDNS with hostname:http://TaigGRBL.local/]
[MSG:INFO: SSDP Started]
[MSG:INFO: HTTP started on port 80]
[MSG:INFO: Telnet started on port 23]
ok

User Interface Software

WebUI

What happened?

GPIO36 have LOW state allways. GPIOs 39, 34, 35 works fine, also I've try use gpio21 for limit switch - it possible way, but not good option.

Other Information

No response

bdring commented 2 years ago

GPIO36 Does not have an internal pullup. You need to add one externally. That controller does have one, but it is possible it is not working. Can you measure the voltage on the pin with the switch open? It should be 3.3v. If it is not check to make sure the resistor is installed correctly.

https://github.com/bdring/FluidNC/wiki/ESP32-Pin-Reference#input-only-no-pulluppulldown

image

TorAllex commented 2 years ago

Oh, sorry! Of course, just a bad soldered R2. Fixed, works now.