• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Duet 5 Mini+ CoreXY and Sensorless homing

Scheduled Pinned Locked Moved Solved
Tuning and tweaking
mini+ duet5mini+ sensorless homing stall detection tmc2209 home homex homey
2
5
624
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    MacNite
    last edited by 16 Jul 2021, 15:03

    Hey guys,

    I think I need your help once again. A few weeks back I built a CoreXY using an Duet 3 6HC without Endstops for the XY-Stage.

    CoreBot V2 on Instructables

    I was really impressed how realiable that worked compared to the last time I tested this a few years ago. So I choose to use the same for the new version of my CorEssentials CoreXY printer using the Duet 5 Mini+.

    This does not work at all. The stall detection does not work. Not at all. The printer performs the "stealthchop calibration moves" and the first homing pass. But thats it. After that it throws out the error "G28 X homing failed" as well as "G28 X Error: G0/G1: insufficient axes homed".

    I assume I am doing something wrong...here is my config and home x:

    config.g

    ; Configuration file for Duet 3 Mini 5+ (firmware version 3)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v3.2.3 on Wed Jun 02 2021 13:51:01 GMT+0200 (Mitteleuropäische Sommerzeit)
    ; General preferences
    G90 ; send absolute coordinates...
    M83 ; ...but relative extruder moves
    M550 P"CorEssentials MK1" ; set printer name
    M669 K1 ; select CoreXY mode
    ; Network
    M552 S1 ; enable network
    M586 P0 S1 ; enable HTTP
    M586 P1 S0 ; disable FTP
    M586 P2 S0 ; disable Telnet
    ; Drives
    M569 P0.0 S0 ; physical drive 0.0 goes backwards
    M569 P0.1 S0 ; physical drive 0.1 goes backwards
    M569 P0.2 S1 ; physical drive 0.2 goes forwards
    M569 P0.3 S1 ; physical drive 0.3 goes forwards
    M569 P0.4 S1 ; physical drive 0.4 goes forwards
    M584 X0.0 Y0.1 Z0.2:0.3 E0.4 ; set drive mapping
    M350 X16 Y16 Z16:16 E16 I1 ; configure microstepping with interpolation
    M92 X80.00 Y80.00 Z6400/3:6400/3 E703.00 ; set steps per mm
    M566 X1800 Y1800 Z60:60 E120 ; set maximum instantaneous speed changes (mm/min)
    M203 X60000 Y60000 Z1200:1200 E1200 ; set maximum speeds (mm/min)
    M201 X10000 Y10000 Z100:100 E1000 ; set accelerations (mm/s^2)
    M906 X1200 Y1200 Z1000:1000 E700 I30 ; set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout
    ; Axis Limits
    M208 X0 Y0 Z0 S1 ; set axis minima
    M208 X310 Y310 Z310 S0 ; set axis maxima
    M671 X-33.5:377 Y155:155 S2 ; position of leadscrews, maximum correction S=2mm
    ; Endstops
    M574 X1 S3 ; configure sensorless endstop on X
    M574 Y2 S3 ; configure sensorless endstop on Y
    M574 Z1 S2 ; configure z-probe endstop for low end on Z
    ; Sensorless Homing Limits
    M915 X Y S-10 F0 H200 R0 ; S: Stall detection threshold; recommended values -10 to +63 / F: Filter Mode: 0 = unfiltered, every full step
    ; Z-Probe
    M558 P5 C"^io3.in" H5 F120 T18000 ; set Z probe type to switch and the dive height + speeds
    G31 P500 X-24 Y59 Z2 ; set Z probe trigger value, offset and trigger height
    M557 X30:270 Y30:270 P5 ; define mesh grid, P: 5 points in x- and y-direction
    ; Heaters & Sensors
    M308 S0 P"temp0" Y"thermistor" T100000 B4092 ; configure sensor 0 as thermistor on pin temp1
    M950 H0 C"out0" T0 ; create bed heater output on out1 and map it to sensor 0
    M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit
    M140 H0 ; map heated bed to heater 0
    M143 H0 S120 ; set temperature limit for heater 0 to 120C
    M308 S1 P"temp1" Y"thermistor" T100000 B4725 C7.06e-8 ; configure sensor 1 as thermistor on pin temp0
    M950 H1 C"out1" T1 ; create nozzle heater output on out0 and map it to sensor 1
    M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
    M143 H1 S280 ; set temperature limit for heater 1 to 280C
    M308 S2 P"temp2" Y"thermistor" T100000 B4725 C7.06e-8 C"Chamber" ; configure sensor 2 as thermistor on pin temp2
    ; Fans
    M950 F0 C"out3" Q500 ; create fan 0 on pin out3 and set its frequency
    M106 P0 C"Coldend" S1 H1 T45 ; set fan 0 name and value. Thermostatic control is turned on
    M950 F1 C"out4" Q500 ; create fan 1 on pin out4 and set its frequency
    M106 P1 C"Part" S0 H-1 ; set fan 1 name and value. Thermostatic control is turned off
    M950 F2 C"out5" Q500 ; create fan 2 on pin out5 and set its frequency
    M106 P2 C"Chamber" S0 H2 T50 ; set fan 2 name and value. Thermostatic control is turned off
    ; Tools
    M563 P0 S"Dragon" D0 H1 F0:1 ; define tool 0
    G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets
    G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C
    ; Pressure advance
    ;M572 D0 S0.03 ; Direct Drive: S0.025 - Short Bowden (200mm): S0.1
    ; Custom settings are not defined
    ; Miscellaneous
    M575 P1 S1 B57600 ; enable support for PanelDue
    M501 ; load saved parameters from non-volatile memory
    T0 ; select first tool
    ; LED
    M150 X1 Q3000000 ; set LED type to NeoPixel and set SPI frequency to 3MHz

    homex.g

    ; homex.g
    ; called to home the X axis
    M569 P0.1 V50 H50 ; make sure x-drive stays in stealthChop Mode
    M569 P0.2 V50 H50 ; make sure x-drive stays in stealthChop Mode
    G91 ; relative positioning
    ;G1 H2 Z5 F1800 ; lift Z relative to current position
    ;stealthChop calibration
    G1 H1 X0.5 F1000 ; move ~2 micro steps away from endstop
    G4 P200 ; wait 100ms
    G1 H1 X5 F1000 ; move 5mm away from homing direction
    G4 P200 ; wait 100ms
    M400 ; wait for all moves to finish
    M913 X50 Y50 ; set current of x- & y-stepper to 50%
    ;Homing move
    G1 H1 X-315 F6000 ; move quickly to X axis endstop and stop there (first pass)
    G1 X5 F18000 ; go back a few mm
    G1 H1 X-315 F6000 ; move slowly to X axis endstop once more (second pass)
    ;G1 H2 Z-5 F1800 ; lower Z again
    G90 ; absolute positioning
    ; set standard settings
    M913 X100 Y100 ; set current of x-stepper to 100%
    M569 P0.1 V2000 ; stealthChop Mode only for slow moves
    M569 P0.2 V2000 ; stealthChop Mode only for slow moves

    I already read through multiple threads in the forum to find a solution and tried the following:

    • update to RepRapFirmware for Duet 3 Mini 5+ 3.3 (2021-06-15) ; Including the necessary IAP update to install this firmware
    • included the "stealthchop calibration" in the homing files
    • changing the sensitivity of Stall Detection to S-64
    • made sure the steppers are skipping steps and the belts are not slipping
    • using M913 X50 Y50 before the stealthchop calibration
    • using 30-70% in M913
    • using only X-Stepper in M913 (instead of X & Y)
    • using only X-Stepper in M569 (instead of X & Y)
    • changing M569 V and H values (V=50 equals to 185mm/s, 1 to 2000)
    • using different speeds for homing (3000 mm/min to 18000 mm/min)
    • leaving out "stealthchop calibration"
    • using different feed rates for "stealthchop calibration" (1000mm/min & 6000mm/min)
    • reducing x & y jerk from 1800 to 600 mm/min (M566)
    • reducing acceleration from 10,000 to 1,000 mm/s² (M201)

    I really do not know what I should to anymore...on the Duet 3 6HC it was very easy. Just adjusting the S-Parameter in M915 command. Any Idea why this is not working on the Duet 5 Mini+?

    Thanks for your help,
    Max

    CorEssentials on GitHub | Instructables Profile | Thingiverse Profile

    undefined 1 Reply Last reply 16 Jul 2021, 16:35 Reply Quote 0
    • undefined
      gloomyandy @MacNite
      last edited by 16 Jul 2021, 16:35

      @macnite First step is to make sure your config is actually doing what you want it to do, so try running
      M98 P"config.g" and fix any reported errors. So for instance I'm pretty sure that the Z settings for M350, M92, M566, M203, M201 and M906 are not valid. With V3 firmware once you have joined multiple motors as a single axis (with M584) you can do not specify the individual motor parameters in the other settings as the single setting will be applied to all motors for that axis. See the notes section in https://duet3d.dozuki.com/Wiki/Gcode#Section_M584_Set_drive_mapping

      I'm not sure if this will cause problems with the settings for the other axis or not, but best to sort it out.

      I'm also pretty sure that the TMC2209 drivers (as used on the 5 Mini) do not support the thigh setting so I'm not sure what impact if any the H parameter on your M569 settings will be having. You should also check that the drivers are operating in stealthchop and that the various parameters are what you would expect by using M569 p# (where # is the driver number), similarly it is probably worth checking that the stall detection values are correct by using M915.

      What actually happens when you try to home the motors? Do they hit the printer frame but don't stall or do they just not move? If they don't move it may be that stall detection is triggering too early. You may want to adjust the M915 S parameter to a higher value (more positive) in small increments until it does actually move.

      Oh and although not for a duet board you may find this guide (still for RRF) of some use: https://teamgloomy.github.io/sensorless.html Ignore the stuff about board.txt settings as they do not apply to the Duet version. Oh and I think the "tip" is no longer correct I'm pretty sure that the Duet firmware uses the full stall detection range -127..127 for the TMC2209 drivers.

      1 Reply Last reply Reply Quote 1
      • undefined
        MacNite
        last edited by 16 Jul 2021, 19:46

        @gloomyandy

        Thank you for your input.
        Regarding M98 P"config.g" and the individual stepper settings: DWC / Console does not report an error.
        I removed the "settings" behind the ":" so I only have 1 setting per z-stepper. I.e.

        M350 X16 Y16 Z16 E16 I1  
        

        As you thought this was not the culprit.

        I tried both regarding M569, with only H, with only V, and leaving it away. No change in behaviour.

        M915 reports this:

        16.7.2021, 21:37:02 M915 P0.1
        Driver 0.1: stall threshold -10, steps/sec 200, coolstep 0, action on stall: none

        M569 P0.1 reports (after using the V50 values from homex.g)

        16.7.2021, 21:44:53 M569 P0.1
        Drive 1 runs in reverse, active low enable, timing fast, mode stealthChop, ccr 0x00053, toff 3, tblank 0, tpwmthrs 50 (187.5 mm/sec), pwmScaleSum 35, pwmScaleAuto 0, pwmOfsAuto 95, pwmGradAuto 11, pos 424

        What happens when I try to home the motors: They just hit the printer frame and don't stall. They move completely fine but "stall detection" or whatever the trigger for sensorless homing is does not work.
        I tried to use

        M915 X Y S-120 F0 H200 R0
        

        but even with these values the print head keeps hitting the frame until the "end" of the travel I defined in homex.g is reached and than reports "insufficient axis homed".

        I looked at https://teamgloomy.github.io/sensorless.html but could not find any "helpfull" information.

        CorEssentials on GitHub | Instructables Profile | Thingiverse Profile

        undefined 1 Reply Last reply 16 Jul 2021, 20:41 Reply Quote 0
        • undefined
          gloomyandy @MacNite
          last edited by 16 Jul 2021, 20:41

          @macnite Bit of a long shot, but what happens if you set the M915 parameters using P0.0 and P0.1 rather than X and Y? Also what happens if you lower the H parameter on the M915? Also does it make any difference to your X homing if you set the Y endstop to be M574 Y1 S3? Given this is a CoreXY and the stall detection actually applies to the motors I'm never totally sure how these settings are applied (and I can't easily check the source code at the moment!).

          undefined 1 Reply Last reply 16 Jul 2021, 20:58 Reply Quote 1
          • undefined
            MacNite @gloomyandy
            last edited by 16 Jul 2021, 20:58

            I do not think your ideas help. I tested them but they did not improve anything...

            but I found the mistake!

            You know....in programming you are often start counting with 0....not with 1. So my x Stepper is not P0.1 but P0.0....

            Oh my gosh...works now.

            CorEssentials on GitHub | Instructables Profile | Thingiverse Profile

            1 Reply Last reply Reply Quote 2
            2 out of 5
            • First post
              2/5
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA
              We use cookies to make the website work. See our privacy policy for more information about cookies and how we use them. https://www.duet3d.com/privacy