Duet3d 5+ mini eth. Sensorless homing not work at all.
-
Hi,
I have a big problem with sensor less homing. Cannot make it to work at all. I have read almost whole forum and tested almost all configuration proposals and cannot find the reason why stall detection do not work at all. There is no reaction. Just anything.
It looks like it is disabled and any tuning or changing params doesn't take any effect.
Can you take a look at my configs and maybe find somthing missing there?
The machine is a CO2 lasser cutter with external drivers for XY (8Nm steppers) and Z axis (800mA small stepper 1.8*) without endswitch which I want to home with stall detection.
Here is my config.g:
; General preferences G90 ; send absolute coordinates... M550 P"ACKnord 80W Laser Cutter" ; set machine name (can be anything you like) ; Enable network if {network.interfaces[0].type = "ethernet"} M552 P0.0.0.0 S1 else M552 S1 ;M950 R0 C"!exp.heater3" L12000 ; Create spindle index 0, with PWM pin on heater 3 and 12000 RPM achieved at full PWM ;M563 P1 S"Spindle 1" R0 ; Create tool 1 with spindle 0 and call it "Spindle 1" ;M453 M452 C"out6" R255 F200 ; Enable Laser mode, on out6, with max intensity being 255, and a PWM frequency of 200 ; Drives M569 P0 S0 D3 V0 ; physical drive 0 goes forwards (change to S0 to reverse it) M569 P5 S0 T2.5:2.5:5:0 ; physical drive 5 goes backwards M569 P6 S1 T2.5:2.5:5:0 ; physical drive 6 goes forwards M584 X5 Y6 Z0 ; drive mapping M350 X16 Y16 Z16 I1 ; configure microstepping with interpolation M92 X32 Y32 Z40 ; set steps per mm M566 X200.00 Y200.00 Z60.00 ; set maximum instantaneous speed changes (mm/min) M203 X40000.00 Y26000.00 Z600.00 ; set maximum speeds (mm/min) M201 X1500.00 Y1500.00 Z60.00 ; set accelerations (mm/s^2) M906 Z800 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S5 ; Set idle timeout M915 Z S-128 F0 H200 R1 ; Set stall detection for Z driver ; Endstops M574 X1 S1 P"io5.in" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin io0.in M574 Y2 S1 P"io6.in" ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin io1.in M574 Z2 S3 ; configure Z endstop for high end on Z with sensorless homing M208 X1680 Y1900 Z0 S0 ; set axis maxima and high homing switch positions (adjust to suit your machine) M208 X0 Y0 Z-50 S1 ; set axis minima and low homing switch positions (adjust to make X=0 and Y=0 the edges of the bed) M563 P0 S"T0" ; define tool 0 to use extruder drive 0, heater 1, fan 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G54
Here is homez.g file:
M17 G4 P150 M569 P0 V0 ; reduce V to ensure stealthChop is enabled for X M913 Z70 ; drop motor current to 70% G4 P100 ; wait 100ms ; tune drivers G91 ; relative positioning G1 H2 Z0.2 F3000 ; power up motors to ensure they are not stalled G4 P100 ; wait 100ms M400 ; wait for current moves to finish G1 H1 Z45 F5000 ; move quickly to Z endstop and stop there (first pass) G1 H2 Z-5 F1000 ; go back a few mm M913 Z100 ; return current to 100% for X and Y M569 P0 V2000 ; restore default V for X G90 ; absolute positioning
Here is an output from M122 command:
M122 === Diagnostics === RepRapFirmware for Duet 3 Mini 5+ version 3.5.3 (2024-09-18 11:25:48) running on Duet 3 Mini5plus Ethernet (standalone mode) Board ID: GK4QJ-PU8LU-F65J0-409NL-K903Z-HM4Z8 Used output buffers: 1 of 40 (19 max) Error in macro line 19 while starting up: unconfigured spindle === RTOS === Static ram: 103368 Dynamic ram: 116348 of which 140 recycled Never used RAM 18968, free system stack 158 words Tasks: NETWORK(1,ready,24.1%,172) ETHERNET(5,nWait 7,0.1%,565) LASER(5,nWait 7,0.0%,235) HEAT(3,nWait 6,0.0%,371) Move(4,nWait 6,0.0%,308) CanReceiv(6,nWait 1,0.0%,939) CanSender(5,nWait 7,0.0%,336) CanClock(7,delaying,0.0%,339) TMC(4,nWait 6,0.8%,101) MAIN(1,running,74.3%,789) IDLE(0,ready,0.0%,29) AIN(4,delaying,0.8%,259), total 100.0% Owned mutexes: === Platform === Last reset 00:17:12 ago, cause: power up Last software reset at 2024-10-24 09:01, reason: User, Gcodes spinning, available RAM 19108, slot 2 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00000000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x00 MCU revision 3, ADC conversions started 774323, completed 774323, timed out 0, errs 0 MCU temperature: min 24.8, current 27.6, max 27.8 Supply voltage: min 10.9, current 12.0, max 12.4, under voltage events: 0, over voltage events: 0, power good: yes Heap OK, handles allocated/used 99/2, heap memory allocated/used/recyclable 2048/56/24, gc cycles 0 Events: 0 queued, 0 completed Driver 0: standstill, SG min 0, read errors 0, write errors 0, ifcnt 24, reads 54292, writes 24, timeouts 0, DMA errors 0, CC errors 0 Driver 1: standstill, SG min 0, read errors 0, write errors 0, ifcnt 10, reads 54306, writes 10, timeouts 0, DMA errors 0, CC errors 0 Driver 2: standstill, SG min 0, read errors 0, write errors 0, ifcnt 10, reads 54305, writes 10, timeouts 0, DMA errors 0, CC errors 0 Driver 3: standstill, SG min 0, read errors 0, write errors 0, ifcnt 10, reads 54305, writes 10, timeouts 0, DMA errors 0, CC errors 0 Driver 4: standstill, SG min 0, read errors 0, write errors 0, ifcnt 10, reads 54306, writes 10, timeouts 0, DMA errors 0, CC errors 0 Driver 5: not present Driver 6: not present Date/time: 2024-10-24 09:18:56 Cache data hit count 1818469506 Slowest loop: 32.39ms; fastest: 0.14ms === Storage === Free file entries: 20 SD card 0 detected, interface speed: 22.5MBytes/sec SD card longest read time 3.7ms, write time 5.8ms, max retries 0 === Move === DMs created 83, segments created 3, maxWait 16119ms, bed compensation in use: none, height map offset 0.000, max steps late 0, min interval 0, bad calcs 0, ebfmin 0.00, ebfmax 0.00 no step interrupt scheduled Moves shaped first try 0, on retry 0, too short 0, wrong shape 0, maybepossible 0 === DDARing 0 === Scheduled moves 3, completed 3, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === DDARing 1 === Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters -1 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0 === GCodes === Movement locks held by null, null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 SBC is idle in state(s) 0 Daemon is idle in state(s) 0 Aux2 is idle in state(s) 0 Autopause is idle in state(s) 0 File2 is idle in state(s) 0 Queue2 is idle in state(s) 0 Q0 segments left 0, axes/extruders owned 0x0000000 Code queue 0 is empty Q1 segments left 0, axes/extruders owned 0x0000000 Code queue 1 is empty === CAN === Messages queued 5162, received 0, lost 0, errs 4865697, boc 0 Longest wait 0ms for reply type 0, peak Tx sync delay 0, free buffers 26 (min 26), ts 5162/0/0 Tx timeouts 0,0,5161,0,0,0 last cancelled message type 30 dest 127 === Network === Slowest loop: 48.46ms; fastest: 0.03ms Responder states: MQTT(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) HTTP sessions: 1 of 8 = Ethernet = Interface state: active Error counts: 0 0 0 0 0 0 Socket states: 5 2 2 2 2 0 0 0
And the last one. Driver status:
M569 P0 Drive 0 runs in reverse, active low enable, timing fast, mode stealthChop, ccr 0x00053, toff 3, tblank 0, tpwmthrs 0 (inf mm/sec), pwmScaleSum 35, pwmScaleAuto 20, pwmOfsAuto 255, pwmGradAuto 30, pos 136
I don't have any idea what is wrong. That config above is the result of more then 2 days of tries. The stupid ideas I have tried also. It just behaves as disabled at all. Nothing is happening, no logs, no events, nothing. The motor just crashes.
-
@wwwektor you're set in spreadcycle all the time with
D3 V0
in M569. Try setting it to something likeD3 V40
insteadif you run
G91 M915 P0 S-127 H10 R1 ; Set very sensitive stall detect M574 Z1 S3 ; configure endstop for stall detection G1 Z-200 H1 ; Should stall pretty much immediately G90
it should stall straight away with no movement. if it does, then its working and you just need to get the sensitivity right
-
@jay_s_uk Unfortunatelly it is not helping. I have tried V0, V10, V100, V1000, V2000 (default), V3000. No reaction at all.
If I understand correctly R1 for M915 should report detected stall to the console. Am I right? -
@wwwektor it won't report anything in the console, it will just mark the axis as homed and won't move it.
Just noticed an error in the macro too, which i've fixed.
If the axis is not moving and shows as homed once you run the macro, then its working -
@jay_s_uk In my case when I click HOME Z the motor crashes with machine frame, continously looses steps till the G1 H1 distance ends. Then macro reports error and the Z axis remains not homed.
-
@wwwektor i'm not saying click homeZ, i'm saying run the macro I posted above
-
@jay_s_uk Ok. That is the result from the console
It seems that it works.
M98 P"stall_test.g" Warning: Driver 0 stalled at Z height 116.80
-
@jay_s_uk Thanks a lot!
I need to adapt it to my machine.
-
@wwwektor so now you need to get the H and S settings correct, thats the fun part!
-
@jay_s_uk It seems that that tuning is extreamly hard.
-
@wwwektor I used sensorless homing on Z on a laser cutter I had. Sometimes it worked and sometimes it didn't.
Its even hard if you're driving multiple screws with 1 motor -
@jay_s_uk Ok. It seems that it is working for me right now.
The most importat thing was to tune H param and find the lowest value where stall is not detected then tune S parameter to the value which work when real crash happend at the end of Z axis.
Thanks a lot for your help