Mesh Bed Compensation with inductive probe
-
Hello, I'm very new to this. I have built a custom Cartesian printer and have it working great. I'm now trying to understand Mesh Bed Compensation and how it works. I have an inductive probe installed and calibrated per the duet setup guide. I have found my probe trigger height and have placed it in the G31 after the Z0.601. I can run a Mesh Bead probe from my Duet Panel and get the height map loaded and saved. That all seems to work great. I have place G29 S1 in my start gcode in my slicer software right after G28 home all
When I run a new slicer program to print I get DWC showing it loaded and I can see it moving the Z axes during printing.
The problem is it's not at Zero or just above, so the Nozzle is not near the table. It's like the probe is off by 2 or 3 mm from the table. I can baby step it down sometimes and get it to work.
I believe I might be missing some G code or M codes in my Home all and Homez or my Bed file.
Do I need G30 to set the Z 0 before the print?
I have included my config and Homing files.
Thank you for the help. Please remember I'n new at this so something simple to you is not to me.
; Configuration file for Duet 3 (firmware version 3)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool v3.1.4 on Wed Nov 04 2020 17:27:13 GMT-0600 (Central Standard Time); General preferences
G90 ; send absolute coordinates...
M83 ; ...but relative extruder moves
M550 P"Duet 3" ; set printer name; Drives
M569 P0.0 S0 ; physical drive 0.0 goes forwards
M569 P0.2 S1 ; physical drive 0.2 goes forwards
M569 P0.3 S0 ; physical drive 0.3 goes backwards
M569 P0.5 S0 ; physical drive 0.5 goes forwards
M569 P0.4 S0 ; physical drive 0.4 goes backwards
M569 P0.1 S0 ; physical drive 0.1 goes forwards
M584 X0.0 Y0.2 Z0.3 E0.5:0.4:0.1 ; set drive mapping
M350 X16 Y16 Z16 E16:16:16 I1 ; configure microstepping with interpolation
M92 X64.05 Y64.05 Z800.00 E400.00:800.00:65.00 ; set steps per mm
M566 X300.00 Y300.00 Z24.00 E300.00:24.00:300.00 ; set maximum instantaneous speed changes (mm/min)
M203 X18000.00 Y18000.00 Z300.00 E1200.00:300.00:18000.00 ; set maximum speeds (mm/min)
M201 X700.00 Y700.00 Z100.00 E250.00:100.00:700.00 ; set accelerations (mm/s^2)
M906 X2800 Y2800 Z2800 E800:2800:2800 I50 ; 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 X625 Y711 Z515 S0 ; set axis maxima; Endstops
M574 X1 S1 P"io1.in+io2.in" ; configure active-high endstop for low end on X via pin io1.in
M574 Y1 S1 P"io3.in" ; configure active-high endstop for low end on Y via pin io2.in
M574 Z1 S1 P"io4.in+io5.in" ; configure active-high endstop for low end on Z via pin io4.in; Z-Probe
M558 P5 C"!^io7.in" H5 F520 T7200 ; set Z probe type to switch and the dive height + speeds
G31 P1000 X-2 Y23 Z0.601 ; set Z probe trigger value, offset and trigger height
M557 X10:580 Y35:650 S40 ; define mesh grid; Heaters
M308 S0 P"temp0" Y"thermistor" T100000 B3950 ; configure sensor 0 as thermistor on pin temp0
M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0
M307 H0 B1 S1.5 ; enable bang-bang mode for the bed heater and set PWM limit
M140 H0 ; map heated bed to heater 0
M143 H0 S150 ; set temperature limit for heater 0 to 150C
M308 S1 P"temp1" Y"thermistor" T500000 B4723 C1.19622e-7 ; configure sensor 1 as thermistor on pin temp1
M950 H1 C"out1" T1 ; create nozzle heater output on out1 and map it to sensor 1
M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
M143 H1 S450 ; set temperature limit for heater 1 to 450C; Fans
M950 F0 C"out7" Q500 ; create fan 0 on pin out7 and set its frequency
M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off
M950 F1 C"out8" Q500 ; create fan 1 on pin out8 and set its frequency
M106 P1 S1 H1 T50 ; set fan 1 value. Thermostatic control is turned onM563 P0 D0 H1 FO ; 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; Custom settings
M584 X0:1 Y2 Z3:4 E5 ; assign stepper motor channels
M376 H10; Miscellaneous
M575 P1 S1 B57600 ; enable support for PanelDue
M501 ; load saved parameters from non-volatile memory
M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
M591 D0 P2 C" io8.in" S1 ; filament switch High when filament present
M591 D0 ; display filament sensor parameters for extruder drive 0
T0 ; select first tool; homeall.g
; called to home all axes
;
; generated by RepRapFirmware Configuration Tool v3.1.4 on Sun Nov 08 2020 13:19:14 GMT-0600 (Central Standard Time)
G91 ; relative positioning
G1 H2 Z5 F7200 ; lift Z relative to current position
G1 H1 X-640 Y-716 F7200 ; move quickly to X and Y axis endstops and stop there (first pass)
G1 H2 X5 Y5 F7200 ; go back a few mm
G1 H1 X-640 Y-716 F120 ; move slowly to X and Y axis endstops once more (second pass)
G1 H1 Z-545 F120 ; move Z down stopping at the endstop
G90 ; absolute positioning
G92 Z0 ; set Z position to axis minimum (you may want to adjust this); Uncomment the following lines to lift Z after probing
;G91 ; relative positioning
;G1 Z5 F120 ; lift Z relative to current position
;G90 ; absolute positioning; homez.g
; called to home the Z axis
;
; generated by RepRapFirmware Configuration Tool v3.1.4 on Sun Nov 08 2020 13:19:14 GMT-0600 (Central Standard Time)
G91 ; relative positioning
G1 H2 Z5 F7200 ; lift Z relative to current position
G1 H1 Z-545 F7200 ; move Z down until the endstop is triggered
G92 Z0 ; set Z position to axis minimum (you may want to adjust this); Uncomment the following lines to lift Z after probing
;G91 ; relative positioning
;G1 Z5 F120 ; lift Z relative to current position
;G90 ; absolute positioning; bed.g
; called to perform automatic bed compensation via G32
;
; generated by RepRapFirmware Configuration Tool v3.1.4 on Sun Nov 08 2020 13:19:14 GMT-0600 (Central Standard Time)
M561 ; clear any bed transform
G29 ; probe the bed and enable compensationcode_text
-
Hi,
Notice in your homeall.g and homez.g files there is a G92 Z0.
That is telling the firmware that the current actual Z position is Z=0. But that is only true if your Z endstop switch triggers at exactly Z=0.
Have you adjusted your Z endstop switch so that is true?
On my printer the Z endstop switch actually triggers a bit above zero. For purposes of this discussion lets say it actually triggers at Z=1.
So instead of G92 Z0 I would have G92 Z1 - that puts the firmware Z position in sync with the actual Z position.
Aside from that you need to use your Z probe to set the Z=0 datum at the following times:
- before creating the height map
- before loading the height map
To set the Z=0 datum you use a single G30 command.
But before doing that you need to use a G1 command to position the Z probe at a suitable XY position - which is usually the center of the bed.
Whenever you set the Z=0 datum you ALWAYS use the same XY position.
I create a macro to do this so I am assured of using the same XY position every time.
The X and Y min/max values of my bed are -150 and 150, so the center of the bed is at X=0 Y=0.
To move the probe that position I have to take into account the XY offsets of my Z probe which are X0 and Y-25.
So my set Z=0 datum macro looks like:
G90
G91 X0 Y25
G30Hope that helps
Frederick
-
Sounds like you did stuff right, you don't need G30, G30 simply tells the system to perform one probe. The previous poster is moving to the centre of his bed and probing he just has a macro to get there. I don't understand the G92 Z1 bit - G92 Z0 tells the system that wherever the nozzle is now in space that is Z=0. It is from that point that everything gets referenced for Z - no idea what G92 Z1 would do beyond telling the printer that the current nozzle position is exactly 1mm above the bed - pretty dangerous command if it is actually closer.
The nozzle shouldn't be at zero ever unless you deliberately put it there. The first height you see in status when laying down the first layer should be whatever your first layer height is - so what is it showing ?
You absolutely that the printer is correctly configured in the slicer - no Z offsets etc, absolutely sure that layer 1 isn't actually at 2.15 or something - the print is on the slicer bed when you slice it not elevated? - can you run preview in your slicer to see at what layer stuff appears.
Look for the first G1 Z in your print gcode - what does it say ? for a first layer of 0.15 the first G1 Z should be G1 Z0.150 or similar depending on your slicer.
Sorry if this all sounds a little basic but going for the complex first isn't always the best approach - if the printer can mesh level successfully and you seem to have a good trigger height I don't think it is the printer.
edit : Do not put G92 Z0 in ANY of your homing files - I think this is your problem.
You do not set Z using G92 when probing you use G30. G30 sets Z to the trigger height when it probes. You have no G30 ....
I think your homeall.g is messed up - there's no Z in there, your homez.g is also messed up -
This is my homez.g
; homez.g ; called to home the Z axis G91 ; relative mode G1 H2 Z4 F200 ; raise head 4mm to ensure it is above the Z probe trigger height G90 ; back to absolute mode G1 X152 Y152 F3000 ; 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
my Homeall.g
; homeall.g ; called to home all axes ; G91 ; relative positioning G1 H1 X-320 F1500 ; coarse home X G1 X4 F360 ; move away from the X endstop G1 H1 X-10 F250 ; fine home X G1 H1 Y-320 F1500 ; coarse home Y G1 Y4 F360 ; move away from the Yendstop G1 H1 Y-10 F250 ; fine home Y G1 H2 Z4 F200 ; raise head 4mm to ensure it is above the Z probe trigger height G90 ; absolute positioning G1 X167 Y152 F2500 ; 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
-
Thank you guy's. I have been busy the last few days and have not had the time to look at the printer. I will take this and see what I can do. Thank you for the examples that helps me considerably on this.
I will report back soon.
Thank you
-
Guys It's working great now. Thank you so much.
Removed the G92 Z0. Then adjusted the trigger point to get rid of the baby steps and it did great.
I have one other question I have dual Z motors and right now I set level with the dual end stops I have on each side. This works fine. My question is How would I take advantage of Auto bed leveling or do I really need it at this point.
Thank you again
Darrin
-
@Work-Horse-XL said in Mesh Bed Compensation with inductive probe:
I have one other question I have dual Z motors and right now I set level with the dual end stops I have on each side. This works fine. My question is How would I take advantage of Auto bed leveling or do I really need it at this point.
How are the two Z steppers connected to the board?
The configuration only shows drive mapping of Z0.3.
Frederick
-
@Work-Horse-XL said in Mesh Bed Compensation with inductive probe:
; Custom settings
M584 X0:1 Y2 Z3:4 E5 ; assign stepper motor channels
M376 H10Your M584 command must come earlier in config.g. Currently you have two of them. Replace the first one with your second.
https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M584_Set_drive_mapping
-
Other than a mesh bed level every now an then I don't bother, you are limited to what you can do automatically anyhow depending on your bed mounts. Unless you use a kinematic mount the mount points are likely to be pretty rigid so offsetting the steppers could lead to binding. Once it is as level as you can get it mechanically it shouldn't change unless you abuse the machine / move it around etc - all depends how rigid things are, the more rigid you make it the more accurate things need to be.
The mesh bed level works slightly differently and attempts to compensate for bed inconsistencies - got to confess though I'm not entirely sure how Dave implements it.
-
@Phaedrux Thank you Phaedrux is the M376 H10 in the correct location?
-
Yeah that one doesn't matter. I just included it for positional context in our file.
-
You likely can use auto bed leveling.
Since you have dual Z endstops can we assume the you home the bed without any issues?
If the Z homing is working well are the endstops adjusted to get the best bed leveling when homing?
Frederick
-
@fcwilt Z stepper are on plug 3 and 4 driver output on the Duet 3 board.
-
@fcwilt Yes the dual end stops works very well. The more I think about it, it's best like it is. This is a very ridged large plat form printer. Moving the Z independently is likely going to bind things or could. It now seems to be working really good. Just did a small print and I'm happy with the results.
I know it will have more issues as it's newly built, and it has been a struggle getting to this point.
Thank you very much for the help.
-
@Work-Horse-XL said in Mesh Bed Compensation with inductive probe:
Moving the Z independently is likely going to bind things or could.
Keep in mind that if the Z probing used for auto leveling determines the bed is level the Z steppers will not be activated.
If the bed was very slightly off level then the Z steppers would only make tiny adjustments.
Frederick