bdring / FluidNC

The next generation of motion control firmware
Other
1.59k stars 384 forks source link

Problem: Unable to move any axis - Motor leds stay off #1359

Open gbooysen opened 1 week ago

gbooysen commented 1 week ago

Wiki Search Terms

Axis setup, Testing movements, Testing enable motors.

Controller Board

6x CNC Controller v1.2

Machine Description

Gantry router XYZY, hardwired to DRV8825 drivers on Nema17s. Proximity end stops and a Makita r700 router. Just temp testing before I commit to larger motors and drivers. The cnc is currently working on a Mega5x GRBL in the same config.

Input Circuits

No response

Configuration file

'''yaml
board: 6x
name: GB CNC XYZY
stepping:
  engine: I2S_STREAM
  idle_ms: 254
  pulse_us: 4
  dir_delay_us: 1
  disable_delay_us: 0

axes:
  shared_stepper_disable_pin: I2SO.0
  shared_stepper_reset_pin: NO_PIN
  homing_runs: 2  
  x:
    steps_per_mm: 750.000
    max_rate_mm_per_min: 5000.000
    acceleration_mm_per_sec2: 100.000
    max_travel_mm: 314.000
    soft_limits: false
    homing:
      cycle: 2
      positive_direction: true
      mpos_mm: 150.000
      feed_mm_per_min: 100.000
      seek_mm_per_min: 500.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      limit_all_pin: gpio.2:high:pu
      hard_limits: true
      pulloff_mm: 1.000
      standard_stepper:
        step_pin: I2SO.2
        direction_pin: I2SO.1
        disable_pin: NO_PIN

  y:
    steps_per_mm: 750.000
    max_rate_mm_per_min: 5000.000
    acceleration_mm_per_sec2: 100.000
    max_travel_mm: 309.000
    soft_limits: false
    homing:
      cycle: 3
      positive_direction: true
      mpos_mm: 150.000
      feed_mm_per_min: 100.000
      seek_mm_per_min: 500.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      limit_all_pin: gpio.26:high:pu
      hard_limits: true
      pulloff_mm: 1.000
      standard_stepper:
        step_pin: I2SO.5
        direction_pin: I2SO.4
        disable_pin: NO_PIN

    motor1:
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      limit_all_pin: gpio.32:high:pu
      hard_limits: true
      pulloff_mm: 1.000
      standard_stepper:
        step_pin: I2SO.13
        direction_pin: I2SO.12
        disable_pin: NO_PIN       

  z:
    steps_per_mm: 750.000
    max_rate_mm_per_min: 5000.000
    acceleration_mm_per_sec2: 100.000
    max_travel_mm: 91.000
    soft_limits: false
    homing:
      cycle: 1
      positive_direction: true
      mpos_mm: 150.000
      feed_mm_per_min: 100.000
      seek_mm_per_min: 500.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      limit_all_pin: gpio.33:high:pu
      hard_limits: true
      pulloff_mm: 1.000
      standard_stepper:
        step_pin: I2SO.10
        direction_pin: I2SO.9
        disable_pin: NO_PIN

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:
  card_detect_pin: NO_PIN
  cs_pin: gpio.5

probe:
  pin: gpio.39:low
  toolsetter_pin: gpio.36:low

# Using MOSFETs (Check Spindle Pin Usage
# coolant:
  # flood_pin: gpio.12
  # mist_pin: gpio.4
  # delay_ms: 0

start:
  must_home: false

# Begin Huanyang
uart1:
  txd_pin: gpio.15
  rxd_pin: gpio.16
  rts_pin: gpio.14
  baud: 9600
  mode: 8N1

Huanyang:
  uart_num: 1
  modbus_id: 1
  tool_num: 0
  speed_map: 0=0% 0=25% 6000=25% 24000=100%
  off_on_alarm: false

# #begin PWM
# pwm:
  # pwm_hz: 5000
  # direction_pin: NO_PIN
  # output_pin: gpio.13
  # enable_pin: gpio.14
  # disable_with_s0: false
  # s0_with_disable: true
  # spinup_ms: 0
  # spindown_ms: 0
  # tool_num: 0
  # speed_map: 0=0.000% 10000=100.000%
  # off_on_alarm: false

# #begin Laser
# Laser:
  # pwm_hz: 5000
  # output_pin: gpio.4
  # enable_pin: gpio.12
  # disable_with_s0: false
  # s0_with_disable: true
  # tool_num: 1
  # speed_map: 0=0.000% 255=100.000%
  # off_on_alarm: true

# #begin 10V
# 10V:
  # forward_pin: gpio.15
  # reverse_pin: gpio.14
  # pwm_hz: 5000
  # output_pin: gpio.13
  # enable_pin: NO_PIN
  # 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% 1000=0.000% 24000=100.000%
  # off_on_alarm: false
'''

Startup Messages

FluidTerm v1.2.1 (1cf9483) using COM5
Exit: Ctrl-C, Ctrl-Q or Ctrl-], Clear screen: CTRL-W
Upload: Ctrl-U, Reset ESP32: Ctrl-R, Send Override: Ctrl-O
Resetting MCU
[MSG:INFO: uart_channel0 created]
[MSG:RST]
[MSG:INFO: FluidNC v3.7.17 https://github.com/bdring/FluidNC]
[MSG:INFO: Compiled with ESP32 SDK:v4.4.4]
[MSG:INFO: Local filesystem type is littlefs]
[MSG:INFO: Configuration file:config.yaml]
[MSG:INFO: Machine 6x Default]
[MSG:INFO: Board 6x]
[MSG:INFO: I2SO BCK:gpio.22 WS:gpio.17 DATA:gpio.21]
[MSG:INFO: SPI SCK:gpio.18 MOSI:gpio.23 MISO:gpio.19]
[MSG:INFO: SD Card cs_pin:gpio.5 detect:NO_PIN freq:8000000]
[MSG:INFO: Stepping:I2S_stream Pulse:4us Dsbl Delay:0us Dir Delay:1us Idle Delay:254ms]
[MSG:INFO: Axis count 6]
[MSG:INFO: Axis X (150.000,450.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     standard_stepper Step:I2SO.2 Dir:I2SO.1 Disable:I2SO.0]
[MSG:INFO:  X Neg Limit gpio.2:low:pu]
[MSG:INFO: Axis Y (-150.000,150.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     standard_stepper Step:I2SO.5 Dir:I2SO.4 Disable:I2SO.7]
[MSG:INFO:  Y Neg Limit gpio.26:low:pu]
[MSG:INFO: Axis Z (-150.000,150.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     standard_stepper Step:I2SO.10 Dir:I2SO.9 Disable:I2SO.8]
[MSG:INFO:  Z Neg Limit gpio.33:low]
[MSG:INFO: Axis A (150.000,1110.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     standard_stepper Step:I2SO.13 Dir:I2SO.12 Disable:I2SO.15]
[MSG:INFO:  A Neg Limit gpio.32:low]
[MSG:INFO: Axis B (150.000,350.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     standard_stepper Step:I2SO.18 Dir:I2SO.17 Disable:I2SO.16]
[MSG:INFO:  B Neg Limit gpio.35:low]
[MSG:INFO: Axis C (150.000,350.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     standard_stepper Step:I2SO.21 Dir:I2SO.20 Disable:I2SO.23]
[MSG:INFO:  C Neg Limit gpio.34:low]
[MSG:INFO: Kinematic system: Cartesian]
[MSG:INFO: PWM Spindle Ena:gpio.14 Out:gpio.13 Dir:NO_PIN Freq:5000Hz Period:8191]
[MSG:INFO: Using spindle PWM]
[MSG:INFO: Flood coolant gpio.12]
[MSG:INFO: Mist coolant gpio.4]
[MSG:INFO: Probe gpio.39:low]
[MSG:INFO: Toolsetter gpio.36:low]
[MSG:INFO: Connecting to STA SSID:BooysenWIFI]
[MSG:INFO: Connecting.]
[MSG:INFO: Connecting..]
[MSG:INFO: Connected - IP is 192.168.99.132]
[MSG:INFO: WiFi on]
[MSG:INFO: Start mDNS with hostname:http://GBcnc-fluidnc.local/]
[MSG:INFO: SSDP Started]
[MSG:INFO: HTTP started on port 80]
[MSG:INFO: Telnet started on port 23]

Grbl 3.7 [FluidNC v3.7.17 (wifi) '$' for help]

User Interface Software

WebUI and FluidTerm

What happened?

I started with the 6x_xyyz_pwm.yaml config example, battled for some time to get the end stops to function correctly, but got that sorted. I then proceeded to connect the drivers so I could test movement and ultimately a homing run but this is when I hit a wall. I was not able to get the motors enabled or moving - they are getting signal as they do lock up but they are not moving at all. Nor does any of the motor LEDs light up when I jog X or send a movement and other commands: $ME, $MD, G0 X10, G28

This is my first attempt at fluidnc and a config file, so when I couldn't get it to move I uploaded the default 6x_default.yaml file renamed it to config.yaml and rebooted, thinking it might be some config I have wrong. I tried the IO_test.nc file with the drivers disconnected (didn't want my dual Y to cause issues if they move wrong) but the same result. I see the io4, 12, 14 and 15 LEDs light up but none of the motor ones.

Debug output: [MSG:INFO: GCode Comment...IO Test Begin] [MSG:INFO: Enabling all motors] [MSG:INFO: Disabling all motors] [MSG:INFO: Enabling all motors] [MSG:INFO: Disabling all motors] [MSG:INFO: Enabling all motors] [MSG:INFO: Disabling all motors] [MSG:INFO: GCode Comment...Tesing IO4] [MSG:INFO: GCode Comment...Tesing IO12] [MSG:INFO: GCode Comment...Tesing IO14 and IO15] [MSG:INFO: GCode Comment...Test Complete] [MSG:/sd/io_test.nc file job succeeded]

I've added my initial config.yaml - the one currently on the board is the 6x_default.yaml renamed. I'm confident I've not messed up the wiring, as it works fine when I hook the mega back up.

GCode File

No response

Other Information

$Grbl/HomingCycleEnable=1 $Grbl/HardLimitsEnable=0 $Grbl/SoftLimitsEnable=0 $Grbl/Resolution/Z=800.000 $Grbl/Resolution/Y=800.000 $Grbl/Resolution/X=800.000 $Grbl/MaxRate/Z=5000.000 $Grbl/MaxRate/Y=5000.000 $Grbl/MaxRate/X=5000.000 $Grbl/Acceleration/Z=100.000 $Grbl/Acceleration/Y=100.000 $Grbl/Acceleration/X=100.000 $Grbl/MaxTravel/Z=300.000 $Grbl/MaxTravel/Y=300.000 $Grbl/MaxTravel/X=300.000 $Start/Message=Grbl \V [FluidNC \B (\R) \H] $Firmware/Build= $SD/FallbackCS=-1 $Report/Status=1 $Config/Filename=config.yaml $Message/Level=Debug $WiFi/Mode=STA>AP $Sta/SSID=MyWIFI $Sta/Password=**** $Sta/MinSecurity=WPA2-PSK $WiFi/FastScan=OFF $Sta/IPMode=DHCP $Sta/IP=0.0.0.0 $Sta/Gateway=0.0.0.0 $Sta/Netmask=0.0.0.0 $Sta/SSDP/Enable=ON $AP/Country=01 $AP/SSID=FluidNC $AP/Password=**** $AP/IP=192.168.0.1 $AP/Channel=1 $Hostname=GBcnc-fluidnc $HTTP/BlockDuringMotion=ON $HTTP/Enable=ON $HTTP/Port=80 $Telnet/Enable=ON $Telnet/Port=23 $Notification/Type=NONE $Notification/T1= $Notification/T2= $Notification/TS= ok

[VER:3.7 FluidNC v3.7.17:] [OPT:MPHS] [MSG:Machine: 6x Default] [MSG:Mode=STA:SSID=MyWIFI:Status=Connected:IP=192.168.xx.132:MAC=08-B6-1F-BA-77-7C] ok

bdring commented 1 week ago

Are you sure you are using the correct config file.

It says config.yaml, but you mentioned a different one.

Be careful with those stepstick drivers. The controller was not designed for them and any miswire can break the I2SO chips.

bdring commented 1 week ago

The disable pins are not correct. See this and send a photo of your setup

http://wiki.fluidnc.com/en/hardware/official/6x_CNC_Controller#motors

gbooysen commented 1 week ago

I'm sure about the config file - renamed it from original example files on git. Wiring: I just connected ena, stp, dir and neg to the stepstics - the rest I wire directly from powersupply and then to the steppers.

As for the disable pin, my initial config file was using a shared pin: I2SO.0 - which is motor1's in the example config files. I tried the 6x_default.yaml file which I renamed to config.yaml which still uses the individual disable pins, still no joy. I'll take a picture of the setup when I can.