Navigation

    Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Precision Piezo z probes guide for duet users reference

    Third-party add-ons
    38
    144
    27130
    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.
    • DjDemonD
      DjDemonD last edited by

      If you have a Precision Piezo Z-Probe and want to connect it to your duet wifi/ethernet board here's how to do it. Tuning and other aspects of the probe's operation are dealt with in the manuals at http://www.precisionpiezo.co.uk/documents

      Electrical connection:
      The Piezo20 module or Universal Z-Probe Kit PCB comes with a standard DuPont 3 pin endstop cable attached with correct wiring at the piezo pcb. The other end has three wires red (VCC), black (GND) and green/blue (SIG/TRG). A 4 pin DuPont connector housing is supplied.

      Insert the red wire at one end of this housing, ensure the crimp is inserted so the spring clip retains it in the housing. Leave a gap of one pin, then connect black, then green/blue. Insert the plug into the duet z probe connector with the red wire end facing toward the long expansion socket and the green/blue SIG wire facing towards the end of the duet board with the LEDs and sd card slot.

      Config.g

      You need to define a probe there are two options:
      Analogue:
      This enables you to adjust the fine sensitivity of the probe on the fly, the coarse sensitivity is adjusted from the pcb. If using a Piezo20 module the signal must be NO (active high) and therefore use the I0 parameter. If using universal kit PCB you can set up the PCB with a NO - active high (I0) or NC - active low (I1) signal. It's your choice but NC -active low offers failsafe operation.

      Add
      M558 P1 I0(or I1) R0.4 F300 X0 Y0 Z0
      (analogue mode, NO/NC, delay, speed, not used as axis endstop)

      And

      G31 X0 Y0 Z-0.1 P600
      (X, Y, Z offsets, sensitivity/threshold)

      To reduce mechanical noise from the frame or axis vibration, the R parameter is the delay before probing in seconds, set a longer delay if the probe triggers before contacting the bed.

      Probing speed F parameter (in mm/min). A value from 300-420 is recommended. Slower can give more accuracy but too slow may not trigger, as the probe generates a signal on a change (compression or flexing in the piezo disc.

      The z probe analogue value is from 0 to 1000. If you get a lot of false triggering increase this value, a firmer bed contact will be needed to trigger. This value can be seen on Duet Web Control in the "z-probe" box. It is normal for this value to bounce around during head movement and printing moves, its only required for it to be stable just before and during probing dives.

      Digital:
      which is simpler and works as it would on an 8 bit board.

      Add
      M558 P5 I0( or I1) R0. 4 F300 X0 Y0 Z0
      (digital mode, NO/NC, delay, speed, not used as axis endstop)

      and
      G31 X0 Y0 Z-0.1 P100
      (X, Y, Z offsets, debounce interval)

      The debounce interval in ms smoothes the signal.

      Please note as of RRF version 1.20 you can use M558 P8 instead (other parameters are the same) which is a digital probe but without filtering or smoothing of the signal. This increases accuracy, as it takes less time to react to a trigger.

      The Z offset accounts for the compliance in the sensor and is usually -0.1mm as effectively the trigger point is just below the bed (this is opposite with inductive/IR sensors which trigger above the bed). If you have to babystep your first layer lower by 0.1mm, for example, then reverse the sign and add it to your G31 offset or vice versa if you have to babystep higher subtract the value from G31. Example, G31 Z-0.1 is set in config.g, probe/level/home/calibrate then print, if you babystep up 0.1mm then subtract 0.1mm from G31 Z change the value in config.g, power cycle/reset the machine, when your print finishes and you are ready for consistent first layers from now on.

      Simon. Precision Piezo Z-Probe Technology
      www.precisionpiezo.co.uk
      PT1000 cartridge sensors NOW IN, just attach to your Duet board directly!

      1 Reply Last reply Reply Quote 2
      • McAdam
        McAdam last edited by

        @DjDemonD

        Thanks for the guide. I will be installing my kit this week - would you recommend config in digital or analog?
        I'm unaware of the benefits of each so wondering what you use since you're one of the minds behind this all…

        1 Reply Last reply Reply Quote 0
        • DjDemonD
          DjDemonD last edited by

          I use digital its simpler but relies more on having the tuning of the piezo sensor system right. For Piezo20 read made units I've done this for you, digital is best. You can still monitor analogue "ripples" as the analogue value will still change in DWC/Paneldue as the probe moves around.

          If you've built one, especially if the design is a novel one, analogue gives you another layer of fine tuning which might help to get the most out of a design where the "tuning window" is very narrow.

          Simon. Precision Piezo Z-Probe Technology
          www.precisionpiezo.co.uk
          PT1000 cartridge sensors NOW IN, just attach to your Duet board directly!

          1 Reply Last reply Reply Quote 0
          • zerogee
            zerogee last edited by

            @DjDemonD

            I like this guide..thx but i do have a question. in this section:

            M558 P1 I0(or I1) R0.4 F300 X0 Y0 Z0
            (analogue mode, NO/NC, delay, speed, not used as axis endstop)

            shouldn't it be Z1, as the probe is used as an endstop for z axes?

            -curtis

            1 Reply Last reply Reply Quote 0
            • DjDemonD
              DjDemonD last edited by

              Depends. I have a corexy with a mechanical z max endstop switch at the bottom of the machine. I home x y and then z to the mech switch. Then I heat the bed to 1st layer temp, then nozzle to 130 then move to be centre, z=10 and do G30. This sets the fine z point.

              So in this case I'm not using my probe as z endstop.

              Simon. Precision Piezo Z-Probe Technology
              www.precisionpiezo.co.uk
              PT1000 cartridge sensors NOW IN, just attach to your Duet board directly!

              1 Reply Last reply Reply Quote 0
              • krzaku
                krzaku last edited by

                Can the 3-piezo under-heatbed setup be directly attached to the silicone heater? And wont the heat damage the piezo speakers? The temperature is quite high, up to 140 degrees.

                1 Reply Last reply Reply Quote 0
                • McAdam
                  McAdam last edited by

                  @Zerogee
                  I have the system set up without setting the probe as a Z Endstop and without a mechanical Z Endswitch.

                  My homez and homeall config files jsut contain the following:

                  G91
                  G1 Z5 F6000
                  G90
                  G1 Y10 X10 F6000
                  G30
                  G1 Z2
                  G1 Y0 X0 F6000
                  G1 Z0.05

                  In my start gcode I tell the printer to heat the nozzle to 130c then home the axis, then heat the nozzle to the desired temp:
                  M572 D0 S0.01
                  M190 S[bed0_temperature];
                  M109 S130;
                  G28 ; home axes
                  M109 S[extruder0_temperature];

                  This works perfectly for me, as the G30 will set the Z to 0 when its triggered.

                  1 Reply Last reply Reply Quote 0
                  • DjDemonD
                    DjDemonD last edited by

                    @krzaku:

                    Can the 3-piezo under-heatbed setup be directly attached to the silicone heater? And wont the heat damage the piezo speakers? The temperature is quite high, up to 140 degrees.

                    No that won't work. The way I do it is make bed mounts which contain the Piezos and attach your bed to the mounts. I've tried using mounts which just support the bed at the sides, and mounts with screws to attach the bed to which are also adjustable. The Piezos can take a little temperature rise but not more than 60 degrees C approximately.

                    Here's something to you started https://www.thingiverse.com/thing:2461746

                    Simon. Precision Piezo Z-Probe Technology
                    www.precisionpiezo.co.uk
                    PT1000 cartridge sensors NOW IN, just attach to your Duet board directly!

                    1 Reply Last reply Reply Quote 0
                    • krzaku
                      krzaku last edited by

                      I think there's something wrong with the link you posted.

                      1 Reply Last reply Reply Quote 0
                      • DjDemonD
                        DjDemonD last edited by

                        Nope opens thingiverse to my design for a possible underbed piezo mount.

                        Simon. Precision Piezo Z-Probe Technology
                        www.precisionpiezo.co.uk
                        PT1000 cartridge sensors NOW IN, just attach to your Duet board directly!

                        1 Reply Last reply Reply Quote 0
                        • krzaku
                          krzaku last edited by

                          Shows a 404 error for me.

                          1 Reply Last reply Reply Quote 0
                          • whosrdaddy
                            whosrdaddy last edited by

                            @krzaku:

                            Shows a 404 error for me.

                            +1, link doesn't work

                            1 Reply Last reply Reply Quote 0
                            • DjDemonD
                              DjDemonD last edited by

                              That's weird when I click it it loads the page I linked to maybe because it's cached on my phone.

                              Try this https://www.thingiverse.com/DjDemonD/designs

                              It's about the 4th or 5th one down.

                              Simon. Precision Piezo Z-Probe Technology
                              www.precisionpiezo.co.uk
                              PT1000 cartridge sensors NOW IN, just attach to your Duet board directly!

                              1 Reply Last reply Reply Quote 0
                              • SuperJETT
                                SuperJETT last edited by

                                I've had no luck getting mine to act as a z endstop and may be confused what I need to do.

                                On my corexy I have a mechanical z switch and have the piezo on my Titan Aero bracket (my own design, flexes/lights the led easily).

                                What do I need to do, do away with the switch and just use the piezo for endstop and mesh bed leveling or some combination?

                                Custom CoreXY at home with Duet Wifi, Hemera

                                1 Reply Last reply Reply Quote 0
                                • whosrdaddy
                                  whosrdaddy last edited by

                                  Yes no switch need, use the probe for homing.

                                  1 Reply Last reply Reply Quote 0
                                  • DjDemonD
                                    DjDemonD last edited by

                                    So home x, then home y, move to bed centre and send G30.

                                    That should do it.

                                    The only time this is not going to just work is if the motion required to bring nozzle and bed into contact is triggering the probe. If so lower acceleration and jerk for Z, and make sure you are using the R parameter in M558, such as M558 R0.4 to allow the frame/axis to settle before probing.

                                    Also make sure M558 has X0 Y0 Z1 in it which means probe is used for homing Z. Although probably not necessary, as you can instead change your homez.g and probably your homeall.g file, to have the move to bed centre and G30 commands instead of the G1 S1 xxxx commands you would have been using before.

                                    Simon. Precision Piezo Z-Probe Technology
                                    www.precisionpiezo.co.uk
                                    PT1000 cartridge sensors NOW IN, just attach to your Duet board directly!

                                    1 Reply Last reply Reply Quote 0
                                    • SuperJETT
                                      SuperJETT last edited by

                                      Ah, now I finally figured it out after some confidence from your post. I had it all configured but when I was issuing G30 earlier after already doing it once, I'd get Error: Z probe was not triggered during probing move which means I needed to override the Z position.

                                      Custom CoreXY at home with Duet Wifi, Hemera

                                      1 Reply Last reply Reply Quote 0
                                      • SuperJETT
                                        SuperJETT last edited by

                                        A bit of interest.
                                        https://www.facebook.com/groups/makerbot/permalink/1442086032575563/

                                        Thanks DJ for helping me out so quickly.

                                        Now I just have to implement it into my printing.

                                        Custom CoreXY at home with Duet Wifi, Hemera

                                        1 Reply Last reply Reply Quote 0
                                        • Lakko
                                          Lakko last edited by

                                          Hi,
                                          I have a D-BOT coreXY (30x30x30cm), i've purchased the precise piezo last week and it is on its way.
                                          While i'm waiting for it i want to prepare the firmware.
                                          So in Z probe section of config.g i've put the digital code:

                                          M558 P5 I0 R0.4 F300 X0 Y0 Z1        ; Digital Z probe, also used for homing the Z axis
                                          G31 X0 Y0 Z-0.1 P100				 ; Set the probe height
                                          
                                          

                                          i would like to use the piezo also for the z home in z min so i put "Z1 in M558".

                                          These are my homez.g and homeall.g:

                                          ;**********************************
                                          ;homeall.g
                                          ;homing using a x-MIN, Y-MAX and z-MIN endstops
                                          ;**********************************
                                          
                                          G91                       ; relative mode
                                          G1 Z4 F400 	          ; lowers bed 4mm to avoid dragging nozzle over the bed
                                          G1 S1 X-340 Y340 F2000    ; move 340/340mm in -X (x endstop is MIN) and +Y(y endstop is MAX)
                                          G1 S1 X-340               ; course home X
                                          G1 S1 Y340                ; course home Y
                                          G1 X4 Y-4 F500             ; move away from the endstops
                                          G1 S1 X-10                ; fine home X
                                          G1 S1 Y10                ; fine home Y
                                          
                                          G1 Z4 F200                ; lowers bed 4mm to avoid dragging nozzle over the bed
                                          G90                       ; back to absolute mode
                                          G1 X150 Y150 F4000        ; put head over the centre of the bed, or wherever you want to probe
                                          G30                       ; probe
                                          G91                       ; relative mode
                                          G1 Z4 F50                 ; move slowly 4mm in the +Z direction
                                          G90                       ; back to absolute mode
                                          G30                       ; probe
                                          
                                          
                                          ;**********************************
                                          ; homez.g
                                          ;homing using a z-MIN endstop
                                          ;**********************************
                                          
                                          G91                       ; relative mode
                                          G1 Z4 F200                ; lowers bed 4mm to avoid dragging nozzle over the bed
                                          G90                       ; back to absolute mode
                                          G1 X150 Y150 F4000        ; put head over the centre of the bed, or wherever you want to probe
                                          G30                       ; probe
                                          G91                       ; relative mode
                                          G1 Z4 F50                 ; move slowly 4mm in the +Z direction
                                          G90                       ; back to absolute mode
                                          G30                       ; probe
                                          
                                          

                                          and in my starting code i put this to perform the bed leveling/compensation:

                                          M561                      ; Cancel any existing bed compensation by sending 
                                          M557 X10:290 Y10:290 S40  ; Define the probing grid
                                          G29                       ; Probe the bed and save height map to SD
                                          ;M190 S[70]               ; i don't have a bed heater 
                                          M109 S130          ; set 130 extruder temp
                                          G28                       ; home axes
                                          
                                          

                                          Is this correct or i have to change something?
                                          Any advice and suggestions will be greatly appreciated

                                          1 Reply Last reply Reply Quote 0
                                          • DjDemonD
                                            DjDemonD last edited by

                                            Looks okay to me, but then I'm not so good at just eyeballing it and spotting errors, just use low motor current at first so any crashes just stall the z motor, not do any damage. And tune the piezo carefully, so that a gentle tap up triggers it, and you see the trigger on DWC screen in Z-probe box goes red and says 1000.

                                            The do G30 with nozzle way above the bed, tap up with your finger or a tool, to make sure the firmware registers triggered and reacts to it before trying it on your bed.

                                            Then hit home all and go from there. But I'd say you are well prepared.

                                            Simon. Precision Piezo Z-Probe Technology
                                            www.precisionpiezo.co.uk
                                            PT1000 cartridge sensors NOW IN, just attach to your Duet board directly!

                                            1 Reply Last reply Reply Quote 0
                                            • deckingman
                                              deckingman last edited by

                                              I don't have a Piezo probe so can't comment on your homez.g but your homeall.g file has errors related to homing Y.

                                              I note that the Y end stop is at Y max so the course homing part is fine but after this:
                                              G1 S1 Y340 ; course home Y
                                              you have this:
                                              G1 X4 Y4 F500 ; move away from the endstops
                                              G1 S1 X-10 ; fine home X
                                              G1 S1 Y-10 ; fine home Y

                                              In the first line above you want to move Y away from the end stop but it's already at max (Y=340 from the previous course home) so to move it away from the end stop, you need to move it negative i.e G1 X4 Y-4 F500 (Y minus 4)
                                              Then you have G1 S1 X-10 which is fine but G1 S1 Y-10 is wrong as it'll be moving away from the end stop so it needs to be G1 S1 Y10 (no minus sign).

                                              What will happen if you don't correct this is that course homing will work fine, then fine homing of X will work but after that, Y will move slowly away from the end stop (towards you) and keep going for ever (or at least until something nasty happens).

                                              HTH

                                              Ian
                                              https://somei3deas.wordpress.com/
                                              https://www.youtube.com/c/deckingman/

                                              1 Reply Last reply Reply Quote 0
                                              • Lakko
                                                Lakko last edited by

                                                Ok, thank you! I have edited the homeall.g code.
                                                When the piezo arrive i will edit all the code so it can maybe help someone else and use it for a starter point.

                                                1 Reply Last reply Reply Quote 0
                                                • vbtalent
                                                  vbtalent last edited by

                                                  I'm wanting to replace my Z axis home switch on my CoreXY, Z home's at the top.

                                                  M558 P0 X0 Y0 Z0 H5 F120 T6000
                                                  
                                                  

                                                  I think I need the following in my config.g,

                                                  M558 (P1/P5) I1 R0.4 F300 X0 Y0 Z0
                                                  G31 X0 Y0 Z-0.1 P600
                                                  
                                                  

                                                  I'm using the v2 PCB in a NC configuration. I'm also unclear what the difference is between the analog/digital and what it is used for? Does the board still need to be tuned in a digital usage or is that irrelevant?

                                                  I also am a little confused on the homing sequence. I think I need to home X/Y then move to the center of the bed and run a G30, is this correct?

                                                  Appreciate some help.. thanks.

                                                  ampapa,

                                                  1 Reply Last reply Reply Quote 0
                                                  • DjDemonD
                                                    DjDemonD last edited by

                                                    You need to tune the PCB first whatever method you use this sets up the pcb to trigger when the nozzle is tapped. This sets up the sensor itself. If it's the v2 kit it triggers active low I1 if it's the Piezo20 unit it triggers active high I0 in M558.

                                                    Next step is setup how your printer will use this information.

                                                    Analogue mode (not present on most other lesser 3d printer controllers) allows you to set a threshold, if you are over it the firmware considers the z probe triggered, so you can use M558 P1…... As you have shown. Set the threshold for 500 and see how you go, you can raise it or lower it to change sensitivity. You can see the current value in the Z-probe box on DWC or paneldue.

                                                    You can also make it more or less sensitive on the piezo pcb read the instructions see www.precisionpiezo.co.uk on how to do it as this is not duet/RRF specific but applies to any setup.

                                                    Digital mode P5 is how most other 3d printer controllers run endstops and sensors either on or off. In this mode a change from 0v to more than 1.65v on the z probe signal wire (or 3.3v to less than 1.65v if using active low mode) will be considered a trigger (its probably more complicated than that but that's the gist of it). So use this mode if you prefer (I do). If using P5 then there is no adjustable threshold, as the threshold is fixed, as described above. But you can debounce the signal by filtering it slightly and that's what the G31 Pxxx refers to when P5 mode is chosen in M558. 100ms seems to be the right value.

                                                    There is also a P8 mode on 1.20 firmware which removes filtering and is digital like P5, so that you get more precision, once you have got your system working smoothly using P1 or P5 try it instead, but you'll only notice the improvement when doing sensor testing and using high microstepping.

                                                    Simon. Precision Piezo Z-Probe Technology
                                                    www.precisionpiezo.co.uk
                                                    PT1000 cartridge sensors NOW IN, just attach to your Duet board directly!

                                                    1 Reply Last reply Reply Quote 0
                                                    • vbtalent
                                                      vbtalent last edited by

                                                      Thanks for the quick feedback DjDemon.

                                                      I ran a first test with the unit and it seems to be working correctly.

                                                      https://youtu.be/rqbH40s8HNE

                                                      In my homing files (homez/homeall) what would that look like now, something like the following?

                                                      ORIGINAL homez.g

                                                      G91                ; Relative positioning
                                                      G1 Z-350 S1 F300   ; Move Z down until the switch triggers
                                                      G1 Z2.5 F300
                                                      G1 Z-5 S1 F150     ; Move Z down until the switch triggers
                                                      G1 Z2.5 F150
                                                      G90                ; Back to absolute positioning
                                                      G92 Z2.5           ; Tell the firmware where we ar
                                                      
                                                      

                                                      NEW homez.g

                                                      G91                       ; relative mode
                                                      G1 Z4 F200                ; lowers bed 4mm to avoid dragging nozzle over the bed
                                                      G90                       ; back to absolute mode
                                                      G1 X150 Y150 F4000        ; put head over the centre of the bed, or wherever you want to probe
                                                      G30                       ; probe
                                                      G91                       ; relative mode
                                                      G1 Z4 F50                 ; move slowly 4mm in the +Z direction
                                                      G90                       ; back to absolute mode
                                                      G30                       ; probe
                                                      G1 Z2.5 F150
                                                      G90                ; Back to absolute positioning
                                                      
                                                      

                                                      EDIT

                                                      Just wanted to close the loop on this and post my working Z homing file.

                                                      G91                     ; relative mode
                                                      G1 Z4 F400              ; lowers bed 4mm to avoid dragging nozzle over the bed
                                                      G90                     ; back to absolute mode
                                                      G1 X40 Y265 F4000       ; put head over the center of the bed, or wherever you want to probe
                                                      G30                     ; probe
                                                      G91                     ; relative mode
                                                      G1 Z4 F150              ; move slowly 4mm in the +Z direction
                                                      G90                     ; back to absolute mode
                                                      G30                     ; probe
                                                      G1 Z2.5 F150		;Move Z to 2.5 above the bed
                                                      G90  			;back to absolute
                                                      G1 X0 F4000 		;move to X0
                                                      
                                                      
                                                      1 Reply Last reply Reply Quote 0
                                                      • First post
                                                        Last post
                                                      Unless otherwise noted, all forum content is licensed under CC-BY-SA