Precision Piezo & Duet + DBOT



  • I seem to be having an issue with my sensor. The Piezo sensor is giving me a reading in the web console and it seems to be tuned to the touch.

    I am running G32 to kick of the probing and when I do the probe, even though it is reading in the web console does not stop the bed. Just smashes into it and keeps going. I have tuned the sensor, getting readings but for the life of me cannot figure out why the probing is not working correctly.

    Here is my config.g and bed.g. Any help would be greatly appreciated.

    [[language]]
    ; CoreXY sample config file for dc42 Duet firmware by Haga. Please use with care. Some of the settings needs to be changed to work with your printer. Read the duetWiki!
    ;*** https://duet3d.com/wiki/Duet_Wifi_Wiki
    
    ; Communication and general
    M111 S1                             ; Debug off
    M550 PDBotCoreXY                    ; Machine name (P + anything you like)
    M551 Preprap                        ; Machine password (used for FTP connections)
    M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xED ; MAC Address - If you have more than one Duet on your network, they must all have different MAC addresses, so change the last digits
    M552 S1           					; Enable WiFi
    M555 P2                             ; Set output to look like Marlin
    ;M575 P1 B57600 S1                  ; Comms parameters for PanelDue
    M667 S1                    			; set CoreXY mode
    
    ; Machine configuration
    M569 P0 S0               			; Drive 0 goes forwards (change to S0 to reverse it)
    M569 P1 S1              			; Drive 1 goes forwards. (Change if motor goes wrong way. Or just turn the motor connection 180 degrees around..) 
    M569 P2 S0                			; Drive 2 goes forwards z
    M569 P3 S1                			; Drive 3 goes forwards 0
    M569 P4 S1                			; Drive 4 goes forwards
    
    M574 X1 Y2 S0            			; set endstop configuration (X1 is at MIN end. Y2 is at MAX end. (active high switch = S1, active low switch= S0)
    M574 Z2 S1            				; set endstop configuration (X1 is at MIN end. Y2 is at MAX end. (active high switch = S1, active low switch= S0)
    
    M350 X16 Y16 Z16 E16 I1             ; Set 16x microstepping with interpolation
    
    M92 X100 Y100 Z400            		; Set axis steps/mm. Check that the printer really move as much as you tell it. Not more and not less.
    M92 E138.4:138.4            		; Set extruder steps/mm. Change this to match your extruder.
    
    M906 X800 Y800 Z800 E800            ; Set motor currents (mA). Increase if motor is to weak. Lower if motor gets too hot. 800-1000 is good for most.
    
    M201 X1500 Y1500 Z300 E4000         ; Accelerations (mm/s^2). The acceleration, speed and jerk is a setting you can alter to try making the printer to print as nice as possible.. 
    M203 X15000 Y15000 Z300 E1500       ; Maximum speeds (mm/min)
    M566 X600 Y600 Z24 E300             ; Maximum jerk speeds mm/minute
    
    M208 X300 Y200 Z300            		; set axis maxima (adjust to suit your machine)
    M208 X0 Y0 Z0 S1                    ; set axis minima (adjust to make X=0 and Y=0 the edges of the bed)
    
    G21                                 ; Work in millimetres
    G90                                 ; Send absolute coordinates...
    M83                                 ; ...but relative extruder moves
    
    ; Z probe
    M558 P1 F500 X0 Y0 Z0                   	; Analog Z probe, also used for homing the Z axis
    G31 X0 Y0 Z0 P20                   	; Set the probe height and threshold (put your own values here)
    ; The following M557 commands are not needed if you are using a bed.g file to perform bed compensation
    ;*** Adjust the XY coordinates in the following M557 commands to suit your build and the position of the Z probe
    ;M557 P0 X30 Y-25                     ; Four... 
    ;M557 P1 X30 Y-155                    ; ...probe points...
    ;M557 P2 X250 Y-125                   ; ...for bed...
    ;M557 P3 X250 Y-25                    ; ...levelling
    ;M557 P4 X150 Y-95                    ; 5th probe point for levelling
    
    ; Thermistors and heaters
    
    ;*** You can use S and B parameters to define the parameters of the thermistors you are using. Standard 100k thermistor from E3d is 4388 or 4725.
    M305 P0 T100000 B4388 R4700 H0 L0   		; Put your own H and/or L values here to set the bed thermistor ADC correction
    M305 P1 T100000 B4388 R4700 H0 L0   		; Put your own H and/or L values here to set the first nozzle thermistor ADC correction
    ;M305 P2 T100000 B4388 R4700 H0 L0  		; Put your own H and/or L values here to set the second nozzle thermistor ADC correction
    
    ;***Choose if you want to use the M301 or the autotune results and M307 command. Don't use both.
    M301 H1 P10 I0.10 D100 T0.50 S1.0  		    ;PID settings for extruder 0 (no need for M301 if using M307)
    ;M301 H2 P10 I0.10 D100 T0.50 S1.0   		;PID settings for extruder 1
    
    M570 S120                					;Increase to allow extra heating time if needed
    
    ;***Use for autotune. Comment out M301 if you do.
    ;M307 H0 A142 C293.5 D5.4 B0 				;Autotune result for bed
    ;M307 H1 A588.5 C242.9 D6.7 B0				;Autotuen result for first nozzle
    
    ; Fans
    M106 P1 T45 H1	; enable thermostatic mode for fan 1 at temp 45 degrees. Fan turns on when P1(extruder 1) is above 45 degrees.
    
    ; Tool definition
    M563 P1 D0 H1                       ; Define tool 0
    G10 P1 S0 R0                        ; Set tool 0 operating and standby temperatures
    
    ;*** If you have a dual-nozzle build, un-comment the following 3 lines
    ;M563 P0 D1 H2                      ; Define tool 1
    ;G10 P0 S0 R0                       ; Set tool 1 operating and standby temperatures
    
    ;*** If you are using axis compensation, put the figures in the following command
    M556 S78 X0 Y0 Z0                   ; Axis compensation here
    M208 S1 Z0			; set minimum Z
    M501								; Load Config-Override.g that is created using M500
    T0                                  ; select first hot end
    
    ```Bed.g
    

    [[language]]
    ; Auto calibration routine for delta printers
    ; Before running this, you should have set up your zprobe Z offset to suit your build, in the G31 command in config.g.

    M561 ; clear any bed transform, otherwise homing may be at the wrong height
    G31 X0 Y0 ; don't want any probe offset for this
    G28 ; home the printer

    ;*** Remove the following line if your Z probe does not need to be deployed
    ;M98 Pdeployprobe.g

    ; The first time the mechanical probe is used after deployment, it gives slightly different results.
    ; So do an extra dummy probe here. The value stored gets overwritten later. You can remove this if you use an IR probe.
    G30 P0 X0 Y0 Z99999

    ; Probe the bed and do 6- or 7-factor auto calibration
    G30 P0 X45 Y45 Z-99999 ; top left
    G30 P1 X10 Y190 Z-99999 ; top right
    G30 P2 X190 Y190 Z-99999 ; bottom right
    G30 P3 X190 Y10 Z-99999 ; bottom left
    G30 P4 X100 Y100 Z-99999 S0 ; centre, and calibrate

    ;*** Remove the following line if your Z probe does not need to be retracted
    ;M98 Pretractprobe.g

    G1 X0 Y0 Z150 F15000 ; get the head out of the way of the bed



  • Hi official support is via reprap forum thread but this is about setting up RRF, so let's do this here and I'll link to it.

    ; Z probe
    M558 P1 F500 X0 Y0 Z0 ; Analog Z probe, also used for homing the Z axis
    G31 X0 Y0 Z0 P20

    So you can use P1 (analogue) but you need to set Z1 if you want to use it as an endstop. Add I0 just to ensure it works as active high.
    Add R0.2 to allow a short pause between probings.

    Eg. M558 P1 I0 R0.2 X0 Y0 Z1

    Also in G31 you need P700 which is the threshold. You might lower this for improved sensitivity or increase it if you get false triggers when moving from one probe point to another.

    Eg. G31 XO YO Z-0.1 P700

    Don't go for head crashes, send G30 with the nozzle well above the bed and tap the nozzle upwards with a tool if it stops reliably 3 times then try it on the bed.

    Once that's working adding a tiny z offset by entering z-0.1(0.1-0.3 typically) will ensure your nozzle to be gap is perfect. Measure the offset by doing G30, then manually jog up and back down till you grip a piece of paper, the z value shown is the offset.

    I also get quite far using digital mode

    M558 P5 I0 R0.2 X0 Y0 Z1
    G31 X0 Y0 Z-0.1 P10

    In this mode it's on or off, P10 is debounce signal which definitely helps.



  • Thanks DJ for taking the time.

    Immediately worked. Stops nicely.

    Couple Questions.

    The gap of Z-0.1 that pushes the bed higher up. Not sure I quite understand that?

    Is G32 the correct code to use for the first run and should I run it from config on every start up or before every print?

    Lastly, in my homez.g should I do multi-points or just one in the middle of the bed?



  • Update:

    I tried G30 - Works like a charm.
    I tried G32 - Didn't recognize.

    Going to investigate.



  • @interwebsdesigner:

    Thanks DJ for taking the time.

    Immediately worked. Stops nicely.

    Couple Questions.

    The gap of Z-0.1 that pushes the bed higher up. Not sure I quite understand that?

    Is G32 the correct code to use for the first run and should I run it from config on every start up or before every print?

    Lastly, in my homez.g should I do multi-points or just one in the middle of the bed?

    The gap - so if you had a sensor with a trigger point above the bed say inductive or IR you'd do the paper test and subtract the z height at trigger from the amount you jogged down and enter that as z+3 for example. This sensor effectively triggers below the bed, in that the assembly has to push the nozzle down into the bed to trigger. Its tiny so -0.1mm usually does it.

    G30 is the right code for z home using a probe and I'd do it at bed centre. Then presuming its a cartesian /corexy I'd run mesh bed levelling G29. There's a good section on the wiki about setting that up.

    Use a macro to lower acceleration to 100 on x and y, low on z depending on your z axis mechanism, with low jerk. Just whilst probing, thengo back to normal speed.



  • Major kudos for the help. I just ran my first mesh map. The sensor is working great… my bed is screwed from the mapping but damn. This is great.

    Thank you!



  • You're Welcome.


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.