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

    Mini5+ 3.3b2 homing woes

    Scheduled Pinned Locked Moved
    Beta Firmware
    5
    40
    1.6k
    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.
    • dc42undefined
      dc42 administrators @carcamerarig
      last edited by

      @carcamerarig said in Mini5+ 3.3b2 homing woes:

      so one needs to go, my understanding is M564 H0 allows the movement even though its not un-homed (H1 forbids un-homed)

      No. G1 H1 and G1 H2 moves are p-rmitted even when the axis has not been homed.

      im telling it to:

      G1 H2 X10 Z5 ; Move Z and X up for a running start

      then

      G1 H1 X-270 F4000

      I assume you also have G91 before those commands so that the movement coordinates you supply are relative. If you are running firmware 3.3beta, try this instead:

      G91
      G1 H2 Z5 ; Move Z up
      M17 X ; energise X motor for stealthChop tuning
      G4 P100 ; pause to allow the driver to establish the motor parameters
      G1 H1 X-270 F4000 ; home X
      

      If you are running earlier firmware, then instead of M17 X use G1 H2 X0.02.

      Duet WiFi hardware designer and firmware engineer
      Please do not ask me for Duet support via PM or email, use the forum
      http://www.escher3d.com, https://miscsolutions.wordpress.com

      jay_s_ukundefined carcamerarigundefined 4 Replies Last reply Reply Quote 1
      • droftartsundefined
        droftarts administrators @carcamerarig
        last edited by

        @carcamerarig Unless your homeall.g calls each individual home[axis].g command, you're far more likely to use homeall.g than the others, once the printer is up and running correctly. So I wouldn't worry too much about what's in homex.g.

        I'd remove the M564 H0 from your config.g. This starts the printer in a state where it's possible to crash it.

        Note the difference between G1 H1 ... and G1 H2 ... see https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_G0_G1_Move

        H1 terminate the move when the endstop switch is triggered and set the axis position to the axis limit defined by M208. On delta printers, H1 also selects individual motor mode as for H2. Normally used with relative motor coordinates (see G91).
        H2 Individual motor mode. X refers to the X motor, Y refers to the Y motor, and so on. Normally used with relative motor coordinates (see G91).

        Has this configuration set of files been generated by someone else? It doesn't look like it's come from the configuration tool https://configtool.reprapfirmware.org/Start and as you said you're new to Duet, it's pretty complicated. It's always a bit of a gamble starting with someone else's config!

        Ian

        Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

        carcamerarigundefined 1 Reply Last reply Reply Quote 0
        • jay_s_ukundefined
          jay_s_uk @dc42
          last edited by

          @dc42 said in Mini5+ 3.3b2 homing woes:

          M17

          Can you add this to the gcode page as theres currently no information about what it is or what it does, other than its been implemented in the change notes

          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

          droftartsundefined 1 Reply Last reply Reply Quote 1
          • carcamerarigundefined
            carcamerarig @dc42
            last edited by

            @dc42 said in Mini5+ 3.3b2 homing woes:

            @carcamerarig said in Mini5+ 3.3b2 homing woes:

            so one needs to go, my understanding is M564 H0 allows the movement even though its not un-homed (H1 forbids un-homed)

            No. G1 H1 and G1 H2 moves are p-rmitted even when the axis has not been homed.

            im telling it to:

            G1 H2 X10 Z5 ; Move Z and X up for a running start

            then

            G1 H1 X-270 F4000

            I assume you also have G91 before those commands so that the movement coordinates you supply are relative. If you are running firmware 3.3beta, try this instead:

            G91
            G1 H2 Z5 ; Move Z up
            M17 X ; energise X motor for stealthChop tuning
            G4 P100 ; pause to allow the driver to establish the motor parameters
            G1 H1 X-270 F4000 ; home X
            

            If you are running earlier firmware, then instead of M17 X use G1 H2 X0.02.

            and keep this part of the code?

            M561
            M400                    ; make sure everything has stopped before we make changes
            M574 X1 S3            	; set endstops to use motor stall
            M913 X30           	; reduce motor current to 50% to prevent belts slipping
            

            so the file would look like this complete:

            ; homex.g
            ; called to home the X axis
            ;
            M561
            M400                    ; make sure everything has stopped before we make changes
            M574 X1 S3            	; set endstops to use motor stall
            M913 X30           	; reduce motor current to 50% to prevent belts slipping
            G91
            G1 H2 Z5 ; Move Z up
            M17 X ; energise X motor for stealthChop tuning
            G4 P100 ; pause to allow the driver to establish the motor parameters
            G1 H1 X-270 F4000 ; home X
            
            1 Reply Last reply Reply Quote 0
            • carcamerarigundefined
              carcamerarig @droftarts
              last edited by

              @droftarts said in Mini5+ 3.3b2 homing woes:

              @carcamerarig Unless your homeall.g calls each individual home[axis].g command, you're far more likely to use homeall.g than the others, once the printer is up and running correctly. So I wouldn't worry too much about what's in homex.g.

              I'd remove the M564 H0 from your config.g. This starts the printer in a state where it's possible to crash it.

              Note the difference between G1 H1 ... and G1 H2 ... see https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_G0_G1_Move

              H1 terminate the move when the endstop switch is triggered and set the axis position to the axis limit defined by M208. On delta printers, H1 also selects individual motor mode as for H2. Normally used with relative motor coordinates (see G91).
              H2 Individual motor mode. X refers to the X motor, Y refers to the Y motor, and so on. Normally used with relative motor coordinates (see G91).

              Has this configuration set of files been generated by someone else? It doesn't look like it's come from the configuration tool https://configtool.reprapfirmware.org/Start and as you said you're new to Duet, it's pretty complicated. It's always a bit of a gamble starting with someone else's config!

              Ian

              Yes it was given to me, somebody started to help me out but then ive ended up actually with a number of people chiming in and out with very much welcomed support but I think I got lost in translation. Its ended up as a try this try that situation...
              You're the second person to suggest binning the home X Y in favour of home ALL it concerned me as why include it if its not necessary?

              droftartsundefined 1 Reply Last reply Reply Quote 0
              • droftartsundefined
                droftarts administrators @jay_s_uk
                last edited by droftarts

                @jay_s_uk said in Mini5+ 3.3b2 homing woes:

                M17

                Can you add this to the gcode page as theres currently no information about what it is or what it does, other than its been implemented in the change notes

                Done. https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M17_Enable_all_stepper_motors
                I also added a note about how to use it for stealthChop tuning.

                Edit: I probably need to add it to these pages, too...
                https://duet3d.dozuki.com/Wiki/Stall_detection_and_sensorless_homing
                https://duet3d.dozuki.com/Wiki/Tuning_Stepper_Motor_Drivers#Section_stealthChop_tuning

                Ian

                Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                1 Reply Last reply Reply Quote 2
                • droftartsundefined
                  droftarts administrators @carcamerarig
                  last edited by

                  @carcamerarig said in Mini5+ 3.3b2 homing woes:

                  Yes it was given to me, somebody started to help me out but then ive ended up actually with a number of people chiming in and out with very much welcomed support but I think I got lost in translation. Its ended up as a try this try that situation...

                  Fair enough. We'll try to get it sorted, but once you understand what each part is doing, probably worth going back and tidying it up, and adding notes for yourself. Don't forget to back it up as well, just in case your SD card dies!

                  You're the second person to suggest binning the home X Y in favour of home ALL it concerned me as why include it if its not necessary?

                  Because some people's machines need this functionality. And sometimes you do need to home just one axis.

                  Ian

                  Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                  1 Reply Last reply Reply Quote 1
                  • carcamerarigundefined
                    carcamerarig @dc42
                    last edited by

                    @dc42 said in Mini5+ 3.3b2 homing woes:

                    @carcamerarig said in Mini5+ 3.3b2 homing woes:

                    so one needs to go, my understanding is M564 H0 allows the movement even though its not un-homed (H1 forbids un-homed)

                    No. G1 H1 and G1 H2 moves are p-rmitted even when the axis has not been homed.

                    im telling it to:

                    G1 H2 X10 Z5 ; Move Z and X up for a running start

                    then

                    G1 H1 X-270 F4000

                    I assume you also have G91 before those commands so that the movement coordinates you supply are relative. If you are running firmware 3.3beta, try this instead:

                    G91
                    G1 H2 Z5 ; Move Z up
                    M17 X ; energise X motor for stealthChop tuning
                    G4 P100 ; pause to allow the driver to establish the motor parameters
                    G1 H1 X-270 F4000 ; home X
                    

                    If you are running earlier firmware, then instead of M17 X use G1 H2 X0.02.

                    Awesome thank you, so im cooking on gas for X and Y

                    X and Y axis playing nicely

                    So using the same code can I configure Z the same? I have tested the sperpinda with a metallic object mid homeALL move and it triggers:

                    G28
                    Error: Z probe was not triggered during probing move
                    

                    my current homeZ

                    ; homez.g
                    ; called to home the Z axis
                    ;
                    M561
                    G91							; relative mode
                    G1 Z4 F6000 H2				; raise head 4mm to ensure it is above the Z probe trigger height
                    G90							; back to absolute mode
                    G1 X100 Y100 H2  F6000		; put head over the centre of the bed, or wherever you want to probe
                    G30							; lower head, stop when probe triggered and set Z to trigger height
                    
                    
                    
                    

                    im quite worried about burying the nozzle into the bed lol

                    1 Reply Last reply Reply Quote 0
                    • carcamerarigundefined
                      carcamerarig @dc42
                      last edited by

                      @dc42
                      Sorry and is it safe to now to increase the motor current back to 100% or is it generally left in the reduced state?

                      ; homex.g
                      ; called to home the X axis
                      ;
                      M561
                      M400                    ; make sure everything has stopped before we make changes
                      M574 X1 S3            	; set endstops to use motor stall
                      M913 X40           	; reduce motor current to 50% to prevent belts slipping
                      G91
                      G1 H2 Z5 ; Move Z up
                      M17 X ; energise X motor for stealthChop tuning
                      G4 P100 ; pause to allow the driver to establish the motor parameters
                      G1 H1 X-270 F4000 ; home X
                      
                      droftartsundefined 1 Reply Last reply Reply Quote 0
                      • droftartsundefined
                        droftarts administrators @carcamerarig
                        last edited by

                        @carcamerarig Set it back to 100%, or it will have reduced torque, and will skip.

                        Ian

                        Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                        carcamerarigundefined 1 Reply Last reply Reply Quote 1
                        • carcamerarigundefined
                          carcamerarig @droftarts
                          last edited by carcamerarig

                          @droftarts said in Mini5+ 3.3b2 homing woes:

                          @carcamerarig Set it back to 100%, or it will have reduced torque, and will skip.

                          Ian

                          So setting it back to 100% causes it to crash again, 60% causes a triple bounce before stalling.

                          droftartsundefined 1 Reply Last reply Reply Quote 0
                          • droftartsundefined
                            droftarts administrators @carcamerarig
                            last edited by

                            @carcamerarig Sorry, I misunderstood. You need to leave the setting at 40% while homing, then set it back to 100% after. eg:

                            ; homex.g
                            ; called to home the X axis
                            ;
                            M561
                            M400                    ; make sure everything has stopped before we make changes
                            M574 X1 S3            	; set endstops to use motor stall
                            M913 X40           	; reduce motor current to 50% to prevent belts slipping
                            G91
                            G1 H2 Z5 ; Move Z up
                            M17 X ; energise X motor for stealthChop tuning
                            G4 P100 ; pause to allow the driver to establish the motor parameters
                            G1 H1 X-270 F4000 ; home X
                            M913 X100
                            

                            Ian

                            Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                            carcamerarigundefined 1 Reply Last reply Reply Quote 1
                            • carcamerarigundefined
                              carcamerarig @droftarts
                              last edited by carcamerarig

                              @droftarts said in Mini5+ 3.3b2 homing woes:

                              @carcamerarig Sorry, I misunderstood. You need to leave the setting at 40% while homing, then set it back to 100% after. eg:

                              ; homex.g
                              ; called to home the X axis
                              ;
                              M561
                              M400                    ; make sure everything has stopped before we make changes
                              M574 X1 S3            	; set endstops to use motor stall
                              M913 X40           	; reduce motor current to 50% to prevent belts slipping
                              G91
                              G1 H2 Z5 ; Move Z up
                              M17 X ; energise X motor for stealthChop tuning
                              G4 P100 ; pause to allow the driver to establish the motor parameters
                              G1 H1 X-270 F4000 ; home X
                              M913 X100
                              

                              Ian

                              I was asking that very question to myself, did you mean 913 X100. Me being a numpty 🙏

                              just set my probe height and homed Z all good but can I tidy up the code and include M17 or does the probe make it different?

                              ; homez.g
                              ; called to home the Z axis
                              ;
                              M561
                              G91							; relative mode
                              G1 Z4 F6000 H2				; raise head 4mm to ensure it is above the Z probe trigger height
                              G90							; back to absolute mode
                              G1 X100 Y100 H2  F6000		; put head over the centre of the bed, or wherever you want to probe
                              G30							; lower head, stop when probe triggered and set Z to trigger height
                              
                              droftartsundefined 1 Reply Last reply Reply Quote 0
                              • droftartsundefined
                                droftarts administrators @carcamerarig
                                last edited by

                                @carcamerarig You can tune stealthChop on Z if you want (with M17 Z and a pause), but realistically you're not using stall detection/sensor less homing on Z, so it's not necessary.

                                I've gone back to the datasheet (https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC2209_Datasheet_V103.pdf page 35 '6.1 Automatic Tuning), and I think there's one more change to be made.

                                In the datasheet it says that the motor has to be idle for greater than 130ms. So you need to change the G4 P100 after M17 to G4 P150.

                                stealthChop will continue to be tuned on the fly, on all axes, so long as it pauses for longer than 130ms after being enabled, and then moves the motor at around 60-300RPM; this will be quite common during a print. It's just that the first movement needs to be correct for sensorless homing to work.

                                Ian

                                Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                                carcamerarigundefined 1 Reply Last reply Reply Quote 0
                                • carcamerarigundefined
                                  carcamerarig @droftarts
                                  last edited by

                                  @droftarts said in Mini5+ 3.3b2 homing woes:

                                  @carcamerarig You can tune stealthChop on Z if you want (with M17 Z and a pause), but realistically you're not using stall detection/sensor less homing on Z, so it's not necessary.

                                  I've gone back to the datasheet (https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC2209_Datasheet_V103.pdf page 35 '6.1 Automatic Tuning), and I think there's one more change to be made.

                                  In the datasheet it says that the motor has to be idle for greater than 130ms. So you need to change the G4 P100 after M17 to G4 P150.

                                  stealthChop will continue to be tuned on the fly, on all axes, so long as it pauses for longer than 130ms after being enabled, and then moves the motor at around 60-300RPM; this will be quite common during a print. It's just that the first movement needs to be correct for sensorless homing to work.

                                  Ian

                                  Amazing thanks so much.
                                  yeah so I realise the probe is the end stop for Z but I was thinking at the top of the frame 415 in my case, chances of it doing that are probably never but I while im here I might as well get It done? What I didn't understand was will the probe still be the "end stop" for the bed if I use M17? I sometimes send the X carriage to hit the top frame to check the X carriage is level, at the moment it unsets the homing. I don't know if its a more elegant solution to set the Z height in printer geometry or use the frame as an end stop?

                                  droftartsundefined 1 Reply Last reply Reply Quote 0
                                  • droftartsundefined
                                    droftarts administrators @carcamerarig
                                    last edited by

                                    @carcamerarig Yes, you can use the motor stall homing on Z at the top of the frame, and keep the probe for bed levelling. I'd write the motor stall as a separate macro, so you call it when you want to do it, not as part of homing Z. The commands will be pretty similar to your homex.g.

                                    However, as you have two Z motors, each connected to separate motor drivers, and a probe, you can level the X axis to the bed. See https://duet3d.dozuki.com/Wiki/Bed_levelling_using_multiple_independent_Z_motors

                                    However, this does assume that the bed is square to the frame first! If you're sure the frame is square, and stalling the X axis at the top of the frame sets the X axis square, then you can use this to check the bed is square to the frame and X axis, by running a bed mesh and seeing if it needs levelling. Once level, you can then level the X axis to the bed.

                                    You also need to change your M208 Z value, currently Z-0.5:205. If you have 415mm of Z travel, and Z is high up (over 205+10%), you'll get failed homing behaviour.

                                    Ian

                                    Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                                    carcamerarigundefined 1 Reply Last reply Reply Quote 0
                                    • carcamerarigundefined
                                      carcamerarig @droftarts
                                      last edited by

                                      @droftarts said in Mini5+ 3.3b2 homing woes:

                                      @carcamerarig Yes, you can use the motor stall homing on Z at the top of the frame, and keep the probe for bed levelling. I'd write the motor stall as a separate macro, so you call it when you want to do it, not as part of homing Z. The commands will be pretty similar to your homex.g.

                                      However, as you have two Z motors, each connected to separate motor drivers, and a probe, you can level the X axis to the bed. See https://duet3d.dozuki.com/Wiki/Bed_levelling_using_multiple_independent_Z_motors

                                      However, this does assume that the bed is square to the frame first! If you're sure the frame is square, and stalling the X axis at the top of the frame sets the X axis square, then you can use this to check the bed is square to the frame and X axis, by running a bed mesh and seeing if it needs levelling. Once level, you can then level the X axis to the bed.

                                      You also need to change your M208 Z value, currently Z-0.5:205. If you have 415mm of Z travel, and Z is high up (over 205+10%), you'll get failed homing behaviour.

                                      Ian

                                      ohh haha
                                      well I wrote this up before seeing your reply, for curiosity sake would this work?

                                      ; homez.g
                                      ; called to home the Z axis
                                      ;
                                      M561			This cancels any bed-plane fitting as the result of probing (or 			anything else) and returns the machine to moving in the user's 				coordinate system.
                                      M400                    ; make sure everything has stopped before we make changes
                                      M574 X1 S2		; set endstops to use motor stall
                                      M913 Z100		; set Z motors to 100% of their normal current
                                      G91			; relative positioning
                                      G1 H2 Z5 		; Move Z up
                                      M17 Z			; Energise Z motor for stealthChop tuning
                                      G4 P150			; pause to allow the driver to establish the motor (>+130ms to maintain stealthchop)
                                      G1 X104 Y100 H2  F3800	; put head over the centre of the bed, or wherever you want to probe
                                      G90			; back to absolute mode
                                      M913 X100		set Z motors to 100% of their normal current
                                      G30			; Probe the bed at the current XY position. When the probe is triggered, set the Z coordinate to the probe trigger height
                                      

                                      I homed Z then sent the carriage up til it hit the cross bar (417.5) so set the geometry to 415, at 205 height I hit the Z+25 a couple times before I realised. Wolfgang has always been very critical in his manual about getting the frame square and true, I went to great lengths lol. (I hope it is after the effort I went to)
                                      I didn't think about the macros, nice I like that and I never thought to check the bed being level to the frame.

                                      1 Reply Last reply Reply Quote 0
                                      • Argoundefined
                                        Argo
                                        last edited by Argo

                                        I would use both Z stepper drivers for leveling the X gantry. No need to push them against any endstops.
                                        My bed.g and homeall.g as reference:

                                        bed.g:

                                        M561 ; clear any bed transform
                                        G28 W ; home
                                        G30 P0 X25 Y100 Z-99999 ; probe near a leadscrew, half way along Y axis
                                        G30 P1 X220 Y100 Z-99999 S2 ; probe near a leadscrew and calibrate 2 motors
                                        G1 H2 Z8 F2600 ; raise head to ensure it is above the Z probe trigger height
                                        G90 ; back to absolute mode
                                        G1 X104 Y100 F6000 ; put head over the centre of the bed, or wherever you want to probe
                                        G30 ; lower head, stop when probe triggered and set Z to trigger height
                                        

                                        homeall.g:

                                        M913 X80 Y85 Z100 ; reduce motor current
                                        
                                        G91                     ; relative positioning
                                        G1 Z8 F800 H2          ; lift Z relative to current position
                                        G1 H1 X-255 F3800 ; move quickly to X and Y axis endstops and stop there (first pass)
                                        G1 H1 Y-215 F3800 ; move quickly to X and Y axis endstops and stop there (first pass)
                                        
                                        
                                        M913 X100 Y100 Z100 ; set X Y Z motors to 100% of their normal current
                                        
                                        G91 ; relative mode
                                        
                                        G1 H2 Z2 F2600 ; raise head 2mm to ensure it is above the Z probe trigger height
                                        G90 ; back to absolute mode
                                        
                                        
                                        G1 X104 Y100 F3800 ; put head over the centre of the bed, or wherever you want to probe
                                        G30 ; lower head, stop when probe triggered and set Z to trigger height
                                        
                                        
                                        

                                        bed.g is called via G32 which also calls homeall.g beforehand.

                                        1 Reply Last reply Reply Quote 1
                                        • carcamerarigundefined
                                          carcamerarig
                                          last edited by

                                          Excellent help, advice and support from the forum, big thank you from me to everyone that helped. 🙏

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA