Bed Level with end stops and probe
CthulhuLabs last edited by
So I recently purchased a Sainsmart Coreception CoreXY 3D printer to replace my CR10. It is a very capable machine. I am in the process of converting it to use my Duet Wifi board running RRF3. I have all the base functionality of the printer working properly on the Duet. Now comes the fun part of adding one of the IR Probes and switching out the extruder for my Hemera.
The problem I am currently running into with this is how to handle Z homing / leveling on this printer. One of the few things I do not like about it is that during print removal it is very easy for one side of the heated bed to lower down more than the other by almost an inch. I have wired the two stepper motors to two different stepper drivers and have the independent homing working with the two end switches, which mostly solves this issue but the bed is never back to being level when done.
What I want to do is have Z home first with the end stops to fix the large difference in height from side to side. Then I want to use the IR Probe to fine adjust the heights from side to side. Then I want to use mesh bed compensation to deal with any front to back problems. I am just not sure how to set this up.
Yes this is doable. Please post your config.g, homeall, homez, and bed.g.
In your config.g M574 you need to define the two endstop pins for the z axis.
You would also need a M671 to define the position of your lead screws.
Then in your z homing you would home using the endstops with G1 H1 Z-500, then you would need to call the probe with two G30 calls to points close to the lead screws to get a more precise tilt correction for the bed surface.
Then you could use G29 to map the bed surface if you wish.
CthulhuLabs last edited by
Cool. Was not sure if doing so would cause unforeseen problems. Also I have not wired up the probe yet so my configs are lacking the probing stuff
; Configuration file for Duet WiFi (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.1.4 on Sun Sep 27 2020 21:52:46 GMT-0400 (Eastern Daylight Time) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"Robit" ; set printer name M669 K1 ; select CoreXY mode ; Network M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0 S1 ; X goes backwards M569 P1 S1 ; Y goes backwards M569 P2 S0 ; Z1 goes forwards M569 P3 S0 ; Z2 goes forwards M569 P4 S0 ; E goes backwards M584 X0 Y1 Z2:3 E4 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X80.00 Y80.00 Z1600.00 E381.50 ; set steps per mm M566 X900.00 Y900.00 Z12.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X6000.00 Y6000.00 Z180.00 E1200.00 ; set maximum speeds (mm/min) M201 X500.00 Y500.00 Z20.00 E250.00 ; set accelerations (mm/s^2) M906 X1000 Y1000 Z1000 E800 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 X300 Y300 Z350 S0 ; set axis maxima ; Endstops M574 X2 S1 P"xstop" ; configure active-high endstop for low end on X via pin xstop M574 Y2 S1 P"ystop" ; configure active-high endstop for low end on Y via pin ystop M574 Z1 S1 P"zstop+e0stop" ; configure active-high endstops for low end on Z via pins zstop and e0stop ; Z Lead Screw Positions M671 X-30:330 Y150:150 S0.75 ; Z-Probe ;M558 P1 C"zprobe.in" H5 F120 T6000 ; set Z probe type to unmodulated and the dive height + speeds ;G31 P500 X0 Y0 Z2.5 ; set Z probe trigger value, offset and trigger height ;M557 X15:285 Y15:285 S20 ; define mesh grid ; Heaters M308 S0 P"bedtemp" Y"thermistor" T100000 B4138 ; 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 A131.8 C724.3 D0.3 S1.00 V24.1 B0 ; PID autotuned settings M140 H0 ; map heated bed to heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M308 S1 P"e1temp" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin e1temp M950 H1 C"e1heat" T1 ; create nozzle heater output on e1heat and map it to sensor 1 M307 H1 A398.8 C121.2 D4.9 S1.00 V24.3 B0 ; PID autotuned settings ; Fans M950 F0 C"fan1" Q500 ; create fan 0 on pin fan0 and set its frequency M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned on M950 F1 C"fan0" Q500 ; create fan 1 on pin fan1 and set its frequency M106 P1 S1 H1 T45 ; set fan 1 value. Thermostatic control is turned of ; Tools M563 P0 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 ; Custom settings are not defined ; Miscellaneous 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
; homeall.g ; called to home all axes ; ; generated by RepRapFirmware Configuration Tool v3.1.4 on Wed Sep 30 2020 11:44:13 GMT-0400 (Eastern Daylight Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 X315 F1800 ; move quickly to X axis endstop and stop there (first pass) G1 X-5 F6000 ; go back a few mm G1 H1 X315 F360 ; move slowly to X axis endstop once more (second pass) G1 H1 Y315 F1800 ; move quickly to Y axis endstop and stop there (first pass) G1 Y-5 F6000 ; go back a few mm G1 H1 Y315 F360 ; move slowly to Y axis endstop once more (second pass) G1 H1 Z-355 F360 ; 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 F100 ; 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 Wed Sep 30 2020 11:45:38 GMT-0400 (Eastern Daylight Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 Z-355 F1800 ; 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 F100 ; 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 Sep 27 2020 21:52:46 GMT-0400 (Eastern Daylight Time) M561 ; clear any bed transform G29 ; probe the bed and enable compensation
Well you're already mostly there. Just need the probe setup in config.g, add a G30 in your homeall at bed center to set the Z0 with the probe, then in our bed.g you'd need
G30 P0 X20 Y100 Z-99999 ; probe near a leadscrew, half way along Y axis G30 P1 X180 Y100 Z-99999 S2 ; probe near a leadscrew and calibrate 2 motors
With an additional G30 at the center of the bed at the end.