Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TMC5160 #45

Closed
boucz opened this issue Oct 7, 2021 · 13 comments
Closed

TMC5160 #45

boucz opened this issue Oct 7, 2021 · 13 comments

Comments

@boucz
Copy link

boucz commented Oct 7, 2021

Hi
Is the bug with grbl-esp32 and TMC5160 still present in FluidNC? I would like to use stealthchop but with higher Amps than allowed with TMC2130. (I do not have the drivers for now)
Thanks !

@bdring
Copy link
Owner

bdring commented Oct 7, 2021

I assume so, but there may be few things we could try to fix it in FluidNC. I could create a test branch with the changes, but there is no guarantee it will be fixed.

@boucz
Copy link
Author

boucz commented Oct 7, 2021

Ok, a friend will let me play with his 3d printer drivers. I will try to run some tests this we :)

@bdring
Copy link
Owner

bdring commented Oct 7, 2021

OK, test the main branch first. Run some gcode through a full range of current levels.

I will create a new branch for you to compare it with. That will take a day or 2.

@bdring
Copy link
Owner

bdring commented Oct 8, 2021

I think it is fixed. Try the Trinamic branch.

@boucz
Copy link
Author

boucz commented Oct 10, 2021

I just try the trinamic branch and the bug is still here (running 1A, holding 0.75A) using coolstep as well as stealthchop mode.
What do you need as information?
here is my last config file
`
board: 4 Axis SPI Daisy
name: 4 Axis SPI Daisy Test
stepping:
engine: RMT
idle_ms: 255
pulse_us: 2
dir_delay_us: 1
disable_delay_us: 0

axes:
shared_stepper_disable_pin: NO_PIN
x:
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: 2
positive_direction: false
mpos_mm: 150.000
feed_mm_per_min: 100.000
seek_mm_per_min: 200.000
debounce_ms: 500
seek_scaler: 1.100
feed_scaler: 1.100

motor0:
  limit_neg_pin: NO_PIN
  limit_pos_pin: NO_PIN
  limit_all_pin: NO_PIN
  hard_limits: true
  pulloff_mm:1.000
  tmc_5160:
    cs_pin: gpio.17
    spi_index: 1
    r_sense_ohms: 0.075
    run_amps: 1.000
    hold_amps: 1.000
    microsteps: 16
    stallguard: 0
    stallguard_debug: false
    toff_disable: 0
    toff_stealthchop: 5
    toff_coolstep: 3
    run_mode: CoolStep
    homing_mode: CoolStep
    use_enable: true
    step_pin: gpio.12
    direction_pin: gpio.14
    disable_pin: NO_PIN

y:
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: 2
positive_direction: false
mpos_mm: 150.000
feed_mm_per_min: 100.000
seek_mm_per_min: 200.000
debounce_ms: 500
seek_scaler: 1.100
feed_scaler: 1.100

motor0:
  limit_neg_pin: NO_PIN
  limit_pos_pin: NO_PIN
  limit_all_pin: NO_PIN
  hard_limits: true
  pulloff_mm:1.000
  tmc_5160:
    spi_index: 2
    r_sense_ohms: 0.075
    run_amps: 1.000
    hold_amps: 1.000
    microsteps: 16
    stallguard: 0
    stallguard_debug: false
    toff_disable: 0
    toff_stealthchop: 5
    toff_coolstep: 3
    run_mode: CoolStep
    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: 2
positive_direction: false
mpos_mm: 150.000
feed_mm_per_min: 100.000
seek_mm_per_min: 200.000
debounce_ms: 500
seek_scaler: 1.100
feed_scaler: 1.100

motor0:
  limit_neg_pin: NO_PIN
  limit_pos_pin: NO_PIN
  limit_all_pin: NO_PIN
  hard_limits: true
  pulloff_mm:1.000
  tmc_5160:
    spi_index: 3
    r_sense_ohms: 0.075
    run_amps: 1.000
    hold_amps: 1.000
    microsteps: 16
    stallguard: 0
    stallguard_debug: false
    toff_disable: 0
    toff_stealthchop: 5
    toff_coolstep: 3
    run_mode: CoolStep
    homing_mode: CoolStep
    use_enable: true
    step_pin: gpio.15
    direction_pin: gpio.2
    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: NO_PIN

probe:
pin: gpio.35
check_mode_start: true

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

start:
must_home: false

PWM:
pwm_freq: 5000
output_pin: gpio.25
enable_pin: gpio.4
direction_pin: NO_PIN
disable_with_zero_speed: false
zero_speed_with_disable: true
spinup_ms: 0
spindown_ms: 0
tool: 0
speeds: 0=0% 12000=100%

`

@bdring
Copy link
Owner

bdring commented Oct 10, 2021

What is happening exactly.

@boucz
Copy link
Author

boucz commented Oct 10, 2021

Motors (random position) stops working but the gcode continue.
First time it was the x axes, the second time with lower current the y axis stops when running the same gcode (spindle running without bit speed and acceleration very conservative)

@bdring
Copy link
Owner

bdring commented Oct 10, 2021

It might be a problem we cannot fix in firmware.

@boucz
Copy link
Author

boucz commented Oct 10, 2021

maybe, i'll run it with my tmc2130 to be sure.

@atlaste
Copy link
Collaborator

atlaste commented Oct 10, 2021

Can you please double and triple-check that you have the right branch? https://github.com/bdring/FluidNC/tree/Trinamic is the right one, not to be confused with the TMCsomething branch. You can spot it in the TrinamicSPI class with all the if's if you look for 5160 and 2130. The boot message of Fluidnc should also dump the version with the git tag.

@bdring
Copy link
Owner

bdring commented Oct 10, 2021

FWIW: It has been pushed to main already.

@boucz
Copy link
Author

boucz commented Oct 14, 2021

Ok, you were right, I did swap the TMC5160 with another (thanks for 3d printer to have so much drivers :)) and no more problems.
Did another test using the faulty driver on another axe and I had the same problem on this axe.
with "good" drivers, I've been able to run 3 gcodes without problem.
Even tried last Devt from this night without problem, it seems that the problem is gone :)
thanks a lot !

@boucz boucz closed this as completed Oct 14, 2021
@bdring
Copy link
Owner

bdring commented Oct 14, 2021

Great. Thanks for the help and patience as we iron out the wrinkles in beta mode. Here is a link to our Discord server.

https://discord.gg/qMVVmBua

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants