Servo deployed probe on Duet Maestro



  • So I've got the probe showing '0' when retracted. I position the probe over the bed and run G30. The probe immediately deploys and the bed starts moving towards the print heads.

    Following this guide: https://duet3d.dozuki.com/Wiki/Test_and_calibrate_the_Z_probe

    I press the Z probe up expecting the bed to stop but it continues leaving me to use emergency stop to kill things. What have I got wrong?


  • Moderator

    please share your current probe config and refresh me on your wiring.



  • @Phaedrux full config.g

    The probe is wired as per this.
    https://www.thingiverse.com/thing:3303618

    So 5v to servo and sensor, shared ground, zprobe mod to the servo, probe.in to the sensor

    ; Configuration file for Duet Maestro (firmware version 3)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v3.2.1 on Sat Jan 09 2021 18:02:08 GMT+0000 (Greenwich Mean Time)
    
    ; General preferences
    G90                                             ; send absolute coordinates...
    M83                                             ; ...but relative extruder moves
    M550 P"ST3Di280 Duet"                           ; set printer name
    
    ; Network
    M552 P0.0.0.0 S1                                ; enable network and acquire dynamic address via DHCP
    M586 P0 S1                                      ; enable HTTP
    M586 P1 S0                                      ; disable FTP
    M586 P2 S0                                      ; disable Telnet
    
    ; Drives
    M569 P0 S1                                      ; physical drive 0 goes forwards
    M569 P1 S0                                      ; physical drive 1 goes backwards
    M569 P2 S0                                      ; physical drive 2 goes backwards
    M569 P3 S0                                      ; physical drive 3 goes backwards
    M569 P4 S1                                      ; physical drive 4 goes forwards
    M584 X0 Y1 Z2 E3:4                              ; set drive mapping
    M350 X16 Y16 Z16 E16:16 I1                      ; configure microstepping with interpolation
    M92 X91.13 Y106.84 Z1235.52  E420.00:420.00       	; set steps per mm
    M566 X900.00 Y900.00 Z60.00 E120.00:120.00      ; set maximum instantaneous speed changes (mm/min)
    M203 X6000.00 Y6000.00 Z180.00 E1200.00:1200.00 ; set maximum speeds (mm/min)
    M201 X500.00 Y500.00 Z20.00 E250.00:250.00      ; set accelerations (mm/s^2)
    M906 X800 Y800 Z800 E800:800 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 X280 Y150 Z150 S0                          ; set axis maxima
    
    ; Endstops
    M574 X1 S1 P"xstop"                             ; configure active-high endstop for low end on X via pin xstop
    M574 Y1 S1 P"ystop"                             ; configure active-high endstop for low end on Y via pin ystop
    M574 Z1 S1 P"zstop"                             ; configure active-high endstop for low end on Z via pin zstop
    
    ; Z-Probe
    M574 Z1 S1 										; Set endstops controlled by probe
    M950 S0 C"^zprobe.mod" 							; create servo pin 0 for BLTouch
    M558 P8 C"^!zprobe.in" H150 F900 T6000 			; Set Z probe type to switch and the dive height + speeds
    G31 P50 X-50 Y-8 Z1.5 							;Set Z probe trigger value, offset and trigger height
    M557 X15:265 Y15:135 S20                        ; define mesh grid
    
    ; Heaters
    M308 S0 P"bedtemp" Y"thermistor" T100000 B3950  ; configure sensor 0 as thermistor on pin bedtemp
    M950 H0 C"bedheat" T0                           ; create bed heater output on bedheat 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"e0temp" Y"thermistor" T100000 B3950   ; configure sensor 1 as thermistor on pin e0temp
    M950 H1 C"e0heat" T1                            ; create nozzle heater output on e0heat 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"e1temp" Y"thermistor" T100000 B3950   ; configure sensor 2 as thermistor on pin e1temp
    M950 H2 C"e1heat" T2                            ; create nozzle heater output on e1heat and map it to sensor 2
    M307 H2 B0 S1.00                                ; disable bang-bang mode for heater  and set PWM limit
    M143 H2 S280                                    ; set temperature limit for heater 2 to 280C
    
    ; Fans
    M950 F0 C"fan0" Q500                            ; create fan 0 on pin fan0 and set its frequency
    M106 P0 S0 H-1                                  ; set fan 0 value. Thermostatic control is turned off
    M950 F1 C"fan1" Q500                            ; create fan 1 on pin fan1 and set its frequency
    M106 P1 S1 H1:2 T45                             ; set fan 1 value. Thermostatic control is turned on
    
    ; Tools
    M563 P0 S"Right" D0 H1 F0                       ; 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
    M563 P1 S"Left" D1 H2 F0                        ; define tool 1
    G10 P1 X0 Y0 Z0                                 ; set tool 1 axis offsets
    G10 P1 R0 S0                                    ; set initial tool 1 active and standby temperatures to 0C
    
    ; Custom settings are not defined
    M501
    M911 S21 R23 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
    

  • Moderator

    @Veti said in Servo deployed probe on Duet Maestro:

    change to C"^zprobe.in"

    Veti suggested that, but you still have

    @Blacksheep99 said in Servo deployed probe on Duet Maestro:

    C"^!zprobe.in"



  • @Phaedrux said in Servo deployed probe on Duet Maestro:

    @Veti said in Servo deployed probe on Duet Maestro:

    change to C"^zprobe.in"

    Veti suggested that, but you still have

    @Blacksheep99 said in Servo deployed probe on Duet Maestro:

    C"^!zprobe.in"

    I tried it but when i then test G30 it fails immediately and tells me the probe is already triggered. Is this in relation to the G31 P500?


  • Moderator

    As I'm not familiar with this probe we might have to wait for Veti to weigh in as I'm not sure why it would be always detecting as triggered or never detecting as triggered.



  • @Phaedrux Can I just ask clarification on two things. H for Dive height. I have this set to 150 which is the height of the build volume. My reasoning is that the Z needs to raise 150 to meet the print heads but should stop when it triggers the probe?

    Trigger height, is this the height of the probe above the nozzles when contact is made?

    Thanks for helping, i really appreciate it

    FYI. Retracted is 1000 (red box), deployed is 0 (grey background)


  • Moderator

    That's pretty excessive for dive height. As I mentioned before, the dive height should be just slightly more than your trigger height. So if your probe triggers when the nozzle is 3mm above the bed G31 Z3), you'd want you dive height to be at least 4mm for example (M558 H4).


  • Moderator

    @Blacksheep99 said in Servo deployed probe on Duet Maestro:

    FYI. Retracted is 1000 (red box), deployed is 0 (grey background)

    I'm not familiar enough with the probe to say if that is normal or not. I would have guessed that it should stay as untriggered regardless of deploy or retract status and only shown triggered when actually pushed up to break the optical beam.



  • @Phaedrux said in Servo deployed probe on Duet Maestro:

    @Blacksheep99 said in Servo deployed probe on Duet Maestro:

    FYI. Retracted is 1000 (red box), deployed is 0 (grey background)

    I'm not familiar enough with the probe to say if that is normal or not. I would have guessed that it should stay as untriggered regardless of deploy or retract status and only shown triggered when actually pushed up to break the optical beam.

    That logic makes sense. The way it looks to operate is that when retracted it is breaking the end stop beam (essentially triggered) but one deployed it is not and hence the state changes. One the probe is touched it causes the flag to break the beam and state changes to triggered.



  • When I home X,Y,Z are all 0,0,0 on the dashboard. Setting a low dive height only moves the bed up that height when I run G30. I should be aiming for the tip of the nozzles to be 0 for Z surely? Would this explain the issue?


  • Moderator

    The triggered status really only matters when doing the G30. So perhaps your probe isn't getting deployed early enough? When exactly are you getting the probe is triggered at start of probing move error?

    What do you have in your homeall now? Remember that you are in control of the deploy and retract state now, which is a bit different than the BLTouch which automates that.

    For homing and dive height you can also in control of how the print head is positioned before probing. If you need to raise the Z axis a bit to ensure that the probe has room you can do that in your homeall. It's already common to raise it a bit for clearance for X Y to home. Normally you'd only want to raise it just slightly more than the dive height to ensure there is clearance for the pin to drop.



  • look at the homeall script i posted

    you need to run a M401 before the G30 and run a M402 afterwards.

    I'm not familiar enough with the probe to say if that is normal or not. I would have guessed that it should stay as untriggered regardless of deploy or retract status and only shown triggered when actually pushed up to break the optical beam.

    the probe is always triggerd in the retracted state. this is a good thing because if you forget to deploy or there is a problem it does not cause damage as it is triggered immediately



  • @Veti said in Servo deployed probe on Duet Maestro:

    look at the homeall script i posted

    you need to run a M401 before the G30 and run a M402 afterwards.

    I'm not familiar enough with the probe to say if that is normal or not. I would have guessed that it should stay as untriggered regardless of deploy or retract status and only shown triggered when actually pushed up to break the optical beam.

    the probe is always triggerd in the retracted state. this is a good thing because if you forget to deploy or there is a problem it does not cause damage as it is triggered immediately

    So sorry to clarify things but I'm changing a few things.

    I've done as you originally said and removed the inverted pin in the config.g for zprobe it now reports 1000 (red).

    ; Z-Probe
    M574 Z1 S1 										; Set endstops controlled by probe
    M950 S0 C"^zprobe.mod" 							; create servo pin 0 for BLTouch
    M558 P8 C"^zprobe.in" H150 F900 T6000 			; Set Z probe type to switch and the dive height + speeds
    G31 P50 X-50 Y-8 Z1.5 							;Set Z probe trigger value, offset and trigger height
    M557 X15:265 Y15:135 S20                        ; define mesh grid
    

    My home all

    G91                     ; relative positioning
    G1 H2 Z5 F6000          ; lift Z relative to current position
    G1 H1 X-285 Y-155 F1800 ; move quickly to X and Y axis endstops and stop there (first pass)
    G1 H2 X5 Y5 F6000       ; go back a few mm
    G1 H1 X-285 Y-155 F360  ; move slowly to X and Y axis endstops once more (second pass)
    G1 H1 Z-155 F360        ; move Z down stopping at the endstop
    G90                     ; absolute positioning
    M402
    G92 Z0                  ; set Z position to axis minimum (you may want to adjust this)
    

    When you say run M401 then G30 are you talking via the console to test its function? I just tried that and it reversed the bed down hitting the end stop and kept trying to go, I had to hit stop.


  • Moderator

    Your homeall isn't using the probe at all at this point, still just the endstop. Trying to control the probing manually isn't going to work very well. Better to script it out in the homing file at this point.

    If you want to continue to use the Z endstop, that's fine. Here's what I would add.

    M402 ; retract the pin just incase
    G91                     ; relative positioning
    G1 H2 Z5 F6000          ; lift Z relative to current position
    G1 H1 X-285 Y-155 F1800 ; move quickly to X and Y axis endstops and stop there (first pass)
    G1 X5 Y5 F6000       ; go back a few mm
    G1 H1 X-285 Y-155 F360  ; move slowly to X and Y axis endstops once more (second pass)
    G1 H1 Z-155 F360        ; move Z down stopping at the endstop
    G90                     ; absolute positioning
    G1 X105 Y150 Z5 F6000 ; move probe into position at bed center
    M401 ; deploy the probe
    G30 ; probe the bed
    M402 ; retract probe
    G1 X10 Y10 Z10 ; return to parked position
    


  • @Phaedrux said in Servo deployed probe on Duet Maestro:

    Your homeall isn't using the probe at all at this point, still just the endstop. Trying to control the probing manually isn't going to work very well. Better to script it out in the homing file at this point.

    If you want to continue to use the Z endstop, that's fine. Here's what I would add.

    M402 ; retract the pin just incase
    G91                     ; relative positioning
    G1 H2 Z5 F6000          ; lift Z relative to current position
    G1 H1 X-285 Y-155 F1800 ; move quickly to X and Y axis endstops and stop there (first pass)
    G1 X5 Y5 F6000       ; go back a few mm
    G1 H1 X-285 Y-155 F360  ; move slowly to X and Y axis endstops once more (second pass)
    G1 H1 Z-155 F360        ; move Z down stopping at the endstop
    G90                     ; absolute positioning
    G1 X105 Y150 Z5 F6000 ; move probe into position at bed center
    M401 ; deploy the probe
    G30 ; probe the bed
    M402 ; retract probe
    G1 X10 Y10 Z10 ; return to parked position
    

    I feel stupid as the logic doesn't fit with my understanding. Home for the bed should be as far away from the nozzle as possible to my mind?

    I've just tried your homeall and I get the probe already triggered message.

    G28
    Error: Z probe already triggered at start of probing move
    

    Why do I need the G30 at all in the homeall? It's homeall just to park the head and bed out of the way?

    When I run a print that's when the printer should probe the bed shouldn't it? I thought this was G29 though.



  • try a G4 P500 after the M401

    this will wait 500msec for the probe to deploy



  • @Veti said in Servo deployed probe on Duet Maestro:

    G4 P500

    Probe deploys okay now with no error however the bed goes down not up towards the print head. have to hit stop


  • Moderator

    Home is where the endstop is. You have a Z min endstop defined, so to trigger it, the nozzle must go to the bed.

    Most basically G30 is how the probe is used to find the bed surface. It lets the firmware know where the bed is in relation to the nozzle, much the same way as the endstop, except that it's mobile in X and Y, so it can be used for other things as well such as creating a heightmap of the bed surface to adjust for.

    Usually when you have a probe you don't use a Z endstop at all unless you want to use a Z max endstop for trying to recover after a power loss.

    @Blacksheep99 said in Servo deployed probe on Duet Maestro:

    however the bed goes down not up towards the print head. have to hit stop

    I think your z axis is backwards. Your conception of homing away from the bed has confused you.

    Can you post a photo of your bed?
    Where is the Z endstop located?
    Z- should make the bed and nozzle move closer together
    Z+ should make them go farther apart.



  • @Blacksheep99 said in Servo deployed probe on Duet Maestro:

    Probe deploys okay now with no error however the bed goes down not up towards the print head. have to hit stop

    have you made sure that you z movement is correct?



  • @Phaedrux said in Servo deployed probe on Duet Maestro:

    Home is where the endstop is. You have a Z min endstop defined, so to trigger it, the nozzle must go to the bed.

    Most basically G30 is how the probe is used to find the bed surface. It lets the firmware know where the bed is in relation to the nozzle, much the same way as the endstop, except that it's mobile in X and Y, so it can be used for other things as well such as creating a heightmap of the bed surface to adjust for.

    Usually when you have a probe you don't use a Z endstop at all unless you want to use a Z max endstop for trying to recover after a power loss.

    @Blacksheep99 said in Servo deployed probe on Duet Maestro:

    however the bed goes down not up towards the print head. have to hit stop

    I think your z axis is backwards. Your conception of homing away from the bed has confused you.

    Can you post a photo of your bed?
    Where is the Z endstop located?
    Z- should make the bed and nozzle move closer together
    Z+ should make them go farther apart.

    Okay I think the problem is between the printer and the PC! I had it in my head that +Z should move the bed towards the head not the other way around.

    I'm using the Z switch for home as that is how the printer was built. I'm trying to repair it.



  • @Blacksheep99 said in Servo deployed probe on Duet Maestro:

    I'm using the Z switch for home as that is how the printer was built. I'm trying to repair it.

    with a z probe you dont need the switch anymore



  • @Veti said in Servo deployed probe on Duet Maestro:

    @Blacksheep99 said in Servo deployed probe on Duet Maestro:

    I'm using the Z switch for home as that is how the printer was built. I'm trying to repair it.

    with a z probe you dont need the switch anymore

    Okay, great so disconnect it and redefine things in my config.g? I noticed the first line of your zprobe commands had a line to define Z Endstops by zprobe, this is what you are referring to then?


  • Moderator

    Ok, that should help things a bit. Change the direction of rotation for the Z axis driver in your config.g with the M569 command

    https://duet3d.dozuki.com/Wiki/Gcode#Section_M569_Set_motor_driver_direction_enable_polarity_and_step_pulse_timing

    The endstop switch could be repurposed for a Z max endstop switch for using in power loss recovery. See what I mean here:

    https://duet3d.dozuki.com/Guide/Ender+3+Pro+and+Duet+Maestro+Guide+Part+5:+Upgrades/54#s212



  • you dont need to disconnect it. you can leave it conected if you want.

    just you need to adjust your homeall and homez to use the probe instead of the endstop.
    like you have done in the homeall.


Log in to reply