Unable to get sensorless homing working....
-
@gloomyandy Update is done and I played a bit with the parameters but the homing is no very unreliable. Sometimes it works, sometimes not, sometimes to early.
M915 P1:2 S1 R1 F0 H10 ok G1 H4 X260 F4000 Warning: Driver 1 stalled at Z height 0.00 Warning: Driver 2 stalled at Z height 0.00
I changed the S on M915 and H10 to lower and higher values. But nothing changes it really. And it looks to me like the stepper try to drive the toolhead very long above the physical limit.
I test with: (plus some variants.)
M201 X1000 Y1000 ; reduce acceleration on X/Y to stop false triggers M913 X60 Y60 M566 X0 Y0 M915 P1:2 S1 R1 F0 H10 G91 G1 H4 X260 F5000
My config.g looks like that:
; Hardware: Duet Mini 5+ ; Toolboard 1.1 LC ; PalenlDue 7" PanelDueFirmware-logo-3.5.0-rc8-7.0i.bin ; Stepper XY = LDO 0,9° 2Amax LDO-42STH40-2004MAC ; Stepper Z = LDO 1,8° 2Amax LDO-42STH48-2004AC ; Stepper E = LDO 1,8 1Amax LDO-42STH20-1004ASH ; Enable network if {network.interfaces[0].type = "ethernet"} M552 P0.0.0.0 S1 else M552 S1 ; Network M586 P0 S1 ; enable HTTP M586 P1 S1 ; enable FTP M586 P2 S1 ; enable Telnet ; Some variables for later global tool_temp_initial=0 global bed_temp_initial=0 global debug=false global qgl_done=false global probe_settingsH=10 global probe_settingsA=1 global probe_attached=true global probe_keep=false global probe_offset=-0.70 ; Higher values=closer to the bed set global.probe_offset=2.90 ;(if positive, greater value = lower nozzle. if negative, more negative = higher nozzle) ;set global.probe_offset=2.90 ;set global.probe_offset=2.95 ;set global.probe_offset=3.00 ; AutoZ ;global klicky_home=true ;global nozzle_cleaned=false ;global Zswitch_homed=false ;global probetype="euclid" ;global clickystatus = "none" ;global autoz_temp2=20 G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"v2" ; set printer name M669 K1 ; 1=select CoreXY mode 0=Cadasian ;; Helpful Toolboards commands ; M115 B121 ; Show board 121 ; M997 B121 ; Update tool 121 ; M122 B121 ; Detailed status of toolboard G4 S1 ; wait 1s for expansion boards to start ;;; Drives ;X M569 P0.2 S1 D3 V100 ; physical drive 0.2 goes forward M584 X0.2 ; Map the stepper to X ;Y M569 P0.1 S0 D3 V100 ; physical drive 0.1 goes backward M584 Y0.1 ; Map the stepper to Y ;; Z ; - front left M569 P0.5 S1 D3 ; physical drive 0.5 goes forward ; - front right M569 P0.6 S0 D3 ; physical drive 0.6 goes backward ; - back right M569 P0.0 S1 D3 ; physical drive 0.0 goes forward ; - back left M569 P0.4 S0 D3 ; physical drive 0.4 goes backward M584 Z0.5:0.4:0.0:0.6 ; Mapping ;; E M569 P121.0 S0 D3 ; Extruder stepper goes backward M584 E121.0 ; Map the E stepper to E ; Stepper settings M350 X16 Y16 Z16 E32 I1 ; configure microstepping with interpolation M92 X160 Y160 Z400 E823 ; set steps per mm (800 from manuall, measured 823 M98 P"/macros/print_scripts/speed_printing.g" ; Accelerations and speed M906 X1400 Y1400 Z1000 E700 I30 ; set motor currents (mA) and motor idle factor in per cent (E stepper max 1A) M84 S120 ; Idle timeout ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X249 Y257 Z210 S0 ; set axis maxima ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; X ;M915 X S3 F0 H200 ; Y ;M915 Y S3 F0 H200 M915 P1:2 S-63 R1 F0 H10 ; both motors because corexy; Sensitivity 4, don’t take action, don’t filter, 400steps/sec ;Y M569 P0.1 S0 D3 ; physical drive 0.1 goes backward ;; Endstops -- Display status with: M119 ;M574 Y2 S1 P"0.io5.in" ; Y ;M574 X2 S1 P"!0.io6.in" ; X M574 Y2 S3 ; Y Sensorless M574 X2 S3 ; X Sensorless M574 Z0 P"nil" ; No endstop we have the switch and a probe M574 Z1 S2 ; configure Z-probe endstop for low end on Z ; Z probe M98 P"/macros/print_scripts/activate_z_probe.g" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Z-level settings ;M671 X-75:-75:288:289 Y0:320:320:0 S20 ; Define Z belts locations (Front_Left, Back_Left, Back_Right, Front_Right) ;M671 X-75:-75:288:289 Y0:328:328:0 S20 ; Define Z belts locations (Front_Left, Back_Left, Back_Right, Front_Right) ;M671 X-75:-75:288:289 Y0:358:358:0 S20 ; Define Z belts locations (Front_Left, Back_Left, Back_Right, Front_Right) M671 X-59.4:-59.4:309.16:309.16 Y5:327:327:5 S20 ; Define Z belts locations (Front_Left, Back_Left, Back_Right, Front_Right) ;; Define the mesh ;M557 X5:245 Y22:245 S35 ; spacing ;M557 X5:245 Y22:245 P9 ; grid (points per axis) M557 X5:245 Y5:245 P9 ; grid (points per axis) ;; Heaters :: Tune with: M303 H0 S110 ; Bed M308 S0 P"0.temp0" Y"thermistor" A"Bed" T100000 B4138 ; configure sensor 0 as thermistor on pin temp0 M950 H0 C"out5+out6" T0 Q10 ; create bed heater outputs for both SSRs on out0 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 ;; Bed Corner temp sensor (2=Orange, 3=Brown, 4=Green, 5=Yellow, 6=Purple 7=Black, ) ; Configure Bed corner temp sensor as thermistor on pin temp2 M308 S5 P"0.temp2" Y"thermistor" A"Bed-Corner" T100000 B4138 ; Hotend ; Tune in with: M303 H1 S270 (270=Temp) (M500 to save) ; Show current settings M307 H1 ;M308 S1 P"121.temp0" Y"thermistor" A"Hotend" T500000 B4702 C1.171057e-7 ; configure sensor 1 as thermistor on pin temp1 Mosquito ;M308 S1 P"121.temp0" A"Hotend" Y"thermistor" T100000 B4725 C7.06e-8 ; define E0 temperature sensor Rapido Argo M308 S1 P"121.temp0" A"Hotend" Y"thermistor" T100000 B4725 C7.060000e-8 ; define E0 temperature sensor e3d revo M950 H1 C"121.out0" T1 ; create nozzle heater output on 0.out3 and map it to sensor 1 M143 H1 S300 ; set temperature limit for heater 1 to 300C ;; Fans ; Fan for the printed part: M950 F0 C"121.out1" Q500 ; create fan 0 on pin 0.out9 and set its frequency M106 P0 S0 H-1 C"Part" ; set fan 0 value. Thermostatic control is turned off ; Fan for the Hotend: M950 F1 C"121.out2" Q500 ; create fan 1 on pin 0.out9 and set its frequency M106 P1 S1 H1 T45 C"Hotend" ; P="set fan 1" S="value" H="Thermostatic control Heater No." T=" is turned on at 45°C" ;; Tool M563 P0 S"Tool" D0 H1 F0 ; define tool G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C ; Filament sensor : Status M591 D0 ;M591 D0 P7 C"io4.in" L7 R50:150 E5 S0 ;pulse, disabled, 7 mm/pulse, measure every 22 sec, minimum 50 maximum 250, S1 = Enabled S0 = Disabled ;M591 D0 P1 C"io4.in" S1 M950 J3 C"!io4.in" ; Create a trigger on io4.in (NC) M581 P3 T3 S0 R1 ; R1=Trigger only while printing ;; Chamber temp sensor M308 S4 P"0.temp1" Y"thermistor" A"Chamber" T100000 B4138 ; configure Chamber temp sensor as thermistor on pin temp1 ;; Input Shaping ; Accelerometer https://duet3d.dozuki.com/Wiki/Input_shaping M955 P121.0 I05 ; specify orientation of accelerometer on Toolboard 1LC with CAN address 121 ; Input Shaping ;M593 P"zvd" F40.5 ; use ZVD input shaping to cancel ringing at 40.5Hz ;M593 P"none" ; disable input shaping ;M593 P"custom" H0.4:0.7 T0.0135:0.0135 ; use custom input shaping M593 P"zvddd" F20 ; PA https://duet3d.dozuki.com/Wiki/Pressure_advance M572 D0 S0.053 ;;;;;;;;;;;; Setup Only ;M564 S0 H0 ; Allow movement over the endstops ;M302 P1 ; allow cold extrusion ;M302 S1 ; deny cold extrusion ;;;;;;;;;;;; Setup Only END ;; Case Cooling ; Temps M308 S9 P"mcu-temp" Y"mcu-temp" A"Mainboard" ; define sensor 9 to be mcu temperature ; Case Fans M950 F3 C"!0.out3" Q50 ; Fan on out3 ground on top pin, plus on 3rd pin from top (V_OUTLC1) M106 P3 C"Base" S120 ; Setup the FAN and slow it down ; Nevermore m950 F4 C"0.out0" Q50 m106 P4 C"Nevermore" S0 ; Define the LED stripe and turn it off M950 F5 C"0.out1" Q100 ; LED on out1 M106 P5 C"LED" S0 ; Make sure that the LEDs are off ; Trigger on the toolboard ; Front button M950 J14 C"121.button0" M581 T14 P14 S1 R0 ; Rear button M950 J15 C"121.button1" M581 T15 P15 S1 R0 ;######################################## M950 J1 C"^0.io1.in" M581 P1 T2 S0 ;M572 D0 S0.037 ; Set preasure Advance Gemessen M501 ; Load config-override.g ;; Serial interface ; Duet M575 P1 S1 B57600 ;;;;;; Old Display ;M575 P1 B115200 S1 ;; Mini 12864 ;M918 P2 ;M918 P2 E4 R3 C100 ;M150 X2 R255 U255 B255 S3 ; set all 3 LEDs to white ;M150 X2 R0 U255 B0 S3 ; set all 3 LEDs to red T0 ; Select the tool 0 as default ; Make sure that all heaters are off M104 S0 ; Extruder temp to 0 M568 P0 A0 ; Extruder heater off M140 S0 ; Set the bed temp to 0 M140 S-276 ; Bed heater off ; Stealthburner LEDs: global sb_leds="n-off" M98 P"/macros/sb_leds/sb_leds.g" set global.sb_leds="hot" set global.sb_leds="n-off" ;set global.sb_logo="red" ;set global.sb_leds="n-off" ;global sb_nozzle="off" ; M307 H0 R0.327 C227.635:227.635 D5.48 S1.00 V24.4 B0 I0 ; R altered for a firmware bug ; EOF
I played with faster movements to, up to F10000. And the steppers skip steps for about 200ms till the stall message appears in the console. Should that be the case?
Any idea in which direction I should go? I reduced the S on M569 but this triggers the detection instantly, and I can not go below 60% of the current, that makes the stepper not to move at all anymore.
Cheers, Chriss
-
@Chriss If your motors are generating a stall detection too early, try increasing the H parameter on M915, this may also allow you to use a mire sensitive setting for the parameter. Sensorless homing a delicate balance between, stall detection, motor current and motor speed.
-
@gloomyandy I'm not convinced that it detects the stall to early. I increased the G1 H4 move a bit more and I can hear now that the detection appears at the end of the move. So it hits ths physical limit and goes further till the move comes to an end.
I changed H to 200 (as the recommendation from the docu) and the stall is still at the end of the G1 command. I reduced the S to -63 already.
It gets slightly better when I reduce H to 100 but it is stil the same, the stall does not get detected when the toolhead reaches the physical limit. (I changed F to 1 for testing too.)I'm a but helpless here to be honest.
It is clear to me that there is no general "use this and that" because of the variety in our printers. But I thought that it should be possible to start with "something" working. This here totally unpredictable, I think that it is me or my printer here....
And when I understood M915 correctly: S is the sensitivity and H is the amount of steps, isn't it? That would mean in my world that I want to have the lowest possible H value for accuracy. And the S should be the correct selected value to work with the speed of the move, is that "ruffly" what we are talking about?
Cheers, Chriss
-
@Chriss H is nothing to do with number of steps it is a speed threshold, basically stall detection is not enabled until the motor is moving faster than this threshold. That allows you to use a more sensitive S setting without it triggering during the acceleration phase of the move. If you are not getting the stall detection pretty much immediately with a S setting of -63 then there is probably something wrong elsewhere. You could take a look at our stm32 documentation, it may help, ignore all of the stuff about board.txt settings. https://teamgloomy.github.io/sensorless.html
-
@gloomyandy Thanks for the explanation.
I did not find any new information from your page. I still think that I do it the right way.M915 P1:2 S-64 R1 F0 H10 ok G1 H4 X260 F10000 Warning: Driver 1 stalled at Z height 0.00 Warning: Driver 2 stalled at Z height 0.00 ok
And it does not move anymore. That is expected I guess. But it does not stop when I use S-10:
M915 P1:2 S-10 R1 F0 H10 ok G1 H4 X260 F10000 Warning: Driver 1 stalled at Z height 0.00 Warning: Driver 1 stalled at Z height 0.00 Warning: Driver 2 stalled at Z height 0.00 ok
The First message came right at the moment the roolhead reached the physical limit, the other two at the end of the G1. There must be something totally wrong. I will write a simplifies config.g with the absolute minimum settings I need to test with that, it seems to me that I lost control of my config.
Cheers, Chriss
-
@Chriss said in Unable to get sensorless homing working....:
I did not find any new information from your page. I still think that I do it the right way.
I think you may have missed some things. In particular, the sample homing file that we provide. Using stealthchop for homing can be a little tricky because there are various "automatic" settings that need to be taken care of for correct operation. All of the various steps (like performing a small motor move at the start of the process and the various delays and waits) are there for a reason and are based on the recommendations from the TMC datasheets (which I'd strongly recommend you take a look at). I'm not saying that not having these is the cause of your current problems, but we have found that most/all of them are needed to ensure a reliable, safe and repeatable homing operation.
In your example if the head does not move with S-63 then it sounds like the endstops are actually working. Perhaps S-10 is simply not sensitive enough. As above I'd also say that a value of H10 is probably too low, the default of 200 was selected for a good reason by the Duet folks.
Anyway good luck!
-
Anyway good luck!
That did the trick.
For reference: I changed the config to a bare minimum, and yes, I saw the pauses and the M400 from your config example. I decided not to test with them because all of the timeouts are lower than I need to write or copy and paste the code to the telnet session.
I got it working now with V40 at the M569:
M569 P0.2 S1 D3 V40 M569 P0.1 S0 D3 V40 M201 X1000 Y1000 M913 X60 Y60 M566 X0 Y0 M201.1 X1000 Y1000 M915 P1:2 S-20 R0 H200
That is not very much tuned but it is "working" now and the toolhead stops where it is supposed to stop. I think that I have underestimated the impact of the V parameter at M569.
I should spend a bit more time in finding the "optimal" settings for the speed etc but this should be a peace of a cake since I have a working setup now. It was frustrating to turn the screws and did not get anything to work, this is over now luckily and I can start with the tuning and the polishing.
.Thanks for your technically and mentally support.
Cheers, Chriss
-
@gloomyandy Let me ask me one more question please.....
I came a step further but there is still a strange behaviour.
This is my curernt homex.g:
M915 P1:2 S64 R0 H200 ; Reduce stall detection sensitivity M98 P"/macros/print_scripts/xy_current_low.g" ; Lower AB currents G91 ; relative positioning M400 ; Wait for all moves to stop G1 H2 X0.01 ;Z0.01 ; Move X a small amount to enable M400 ; Wait for all moves to stop G4 P200 ; Delay to allow TMC to detect stopped state G1 H1 X-20 F8000 ; Back away from endstop M400 ; Wait for all moves to stop M915 P1:2 S-20 R0 H200 ; Configure motor stall detection G4 P200 ; Delay to ensure settings are made G1 H4 X260 F8000 ; Move towards endstop until it stalls M400 ; Wait for all moves to stop
It works so far that the motor stops when it hits the physical end and the axis is homed after that execution in 90% of the cases. But the X position is totally random after that, sometimes it is 372, the next time 273,1 etc.
I do not understand how that can happen, my config.g is clear here:
; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X249 Y257 S0 ; set axis maxima
I still play with a minimal config.g for now
; Hardware: Duet Mini 5+ ; Toolboard 1.1 LC ; PalenlDue 7" PanelDueFirmware-logo-3.5.0-rc8-7.0i.bin ; Stepper XY = LDO 0,9° 2Amax LDO-42STH40-2004MAC ; Stepper Z = LDO 1,8° 2Amax LDO-42STH48-2004AC ; Stepper E = LDO 1,8 1Amax LDO-42STH20-1004ASH ; Enable network if {network.interfaces[0].type = "ethernet"} M552 P0.0.0.0 S1 else M552 S1 ; Network M586 P0 S1 ; enable HTTP M586 P1 S1 ; enable FTP M586 P2 S1 ; enable Telnet M98 P"/sys/variables.g" ; Source the varaibles files G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"v2" ; set printer name M669 K1 ; 1=select CoreXY mode 0=Cadasian G4 S1 ; wait 1s for expansion boards to start ;;; Drives ;X M569 P0.2 S1 D3 V10 ; physical drive 0.2 goes forward M584 X0.2 ; Map the stepper to X ;Y M569 P0.1 S0 D3 V10 ; physical drive 0.1 goes backward M584 Y0.1 ; Map the stepper to Y ; Stepper settings M350 X16 Y16 I1 ; configure microstepping with interpolation M92 X160 Y160 ; set steps per mm (800 from manuall, measured 823 M98 P"/macros/print_scripts/speed_printing.g" ; Accelerations and speed M906 X1400 Y1400 I30 ; set motor currents (mA) and motor idle factor in per cent (E stepper max 1A) M201.1 X1000 Y1000 ; Set reduced acceleration for special move types M84 S120 ; Idle timeout ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X249 Y257 S0 ; set axis maxima ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Endstops -- Display status with: M119 ; Old endstops with HAL sensors ;M574 Y2 S1 P"0.io5.in" ; Y ;M574 X2 S1 P"!0.io6.in" ; X ; Stall detection M574 Y2 S3 ; Y Sensorless M574 X2 S3 ; X Sensorless ;M915 P1:2 S-20 R0 H200 ; Configure motor stall detection M915 P1:2 S-20 R0 H200 ; Configure motor stall detection
Should I change the home behaviour to home at 0 and not on max anymore? Would that make any difference?
Cheers, Chriss
-
@gloomyandy
Forget it..... I just found that in the docu:sets the X and Y endstops to sensorless homing at the axes low end. This is required.
Cheers, Chriss
-
@Chriss Actually I think your problem is this line:
G1 H4 X260 F8000
You are using a H4 move you need to be using a H1 move. See: https://docs.duet3d.com/User_manual/Reference/Gcodes#g0g1-h-and-s-parameter
Oh and where was the line you quoted in the documentation?
-
@gloomyandy True.. you are right... two mistakes... the G1 and the endstops at the wrong side.
Is that not true anymore?
Cheers, Chriss
-
@Chriss Honestly I'm not sure, that statement in the docs is a little ambiguous and I can't think of any reason why stall detection would only work on the low end. Having said that I've never used it on the high end. Try it and see if it works.
-
@gloomyandy
I tried it all the time with the high end and we know now that it is working after the parameter "nightmare". Maybe something for @droftarts ? I will play a bit more with x at the low end for now. I would like to have Y on the high end for optical reasons. Let's see how it works there than.Cheers, Chriss
-
-
-
@droftarts I will do. Let's wait what David will tell us.
-
-
@droftarts I can tell you that it is working on the high end. My problem came from the G1 H4 instead of using G1 H1.
-
@gloomyandy i use high end sensorless homing ok. i use Y high , x low
-
@Chriss the sentence is "For example, M574 X1 S2 and M574 Y1 S3 sets the X and Y endstops to sensorless homing at the axes low end". It's an example. However, it's unclear to me what the following sentence "This is required." refers to, or why it's there at all.