Doodle3D / WiFi-Box

The Doodle3D WiFi-Box for wireless 3D-printing
GNU General Public License v3.0
3 stars 1 forks source link

Nozzle bumps into printbed when incorrect startcode is used for Ultimaker 2 series. #21

Closed companje closed 7 years ago

companje commented 7 years ago

By default the 'Ultimaker (original)' printer is selected on the WiFi-Box. When an Ultimaker 2, 2+, 2go, 2 Extended etc is connected you need actively select this printer type in the Doodle3D settings. When you forget to do that it uses the wrong startgcode, causing the nozzle to bump into the glassplate / printbed.

Default Doodle3D startcode for Ultimaker and other Marlin based printers:

;Generated with Doodle3D (default)
M109 S{printingTemp} ;set target temperature 
{if heatedBed}M190 S{printingBedTemp} ;set target bed temperature
G21 ;metric values
G91 ;relative positioning
M107 ;start with the fan off
G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops
G1 Z15 F9000 ;move the platform down 15mm
G92 E0 ;zero the extruded length
G1 F200 E10 ;extrude 10mm of feed stock
G92 E0 ;zero the extruded length again
G92 E0 ;zero the extruded length again
G1 F9000
G90 ;absolute positioning
M117 Printing Doodle...   ;display message (20 characters to clear whole screen)

The problem is caused by the fact that the homing Z-position of the Ultimaker 2 series is on the bottom and for the Original and many other printers on the top. The G91 in the startcode sets the coordinate system to relative positioning. When after homing G1 Z15 is performed in relative mode the platform goes down even though it is already at the lowest point for the Ultimaker 2 series. It has no endstop-switch on the bottom so unhappy sounds are to be heared. The printer has no idea what happened and just continues resulting into bumping with the nozzle into the glassplate.

The solution seems to be to move the G91 code to just after the G1 Z15.

;Generated with Doodle3D (default)
M109 S{printingTemp} ;set target temperature 
{if heatedBed}M190 S{printingBedTemp} ;set target bed temperature
G21 ;metric values
M107 ;start with the fan off
G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops
G1 Z15 F9000 ;move the platform down 15mm
G92 E0 ;zero the extruded length
G91 ;relative positioning
G1 F200 E10 ;extrude 10mm of feed stock
G92 E0 ;zero the extruded length again
G92 E0 ;zero the extruded length again
G1 F9000
G90 ;absolute positioning
M117 Printing Doodle...   ;display message (20 characters to clear whole screen)
peteruithoven commented 7 years ago

Interesting. This is tested on Ultimaker Originals and Ultimaker 2's? Good to know that in a lot of cases existing users will not "get" this updated start gcode since they already saved the existing start gcode as an override. I'm not sure, but maybe even switching printer types could have triggered such a save.

Otherwise we'd need to override it in the post-install, but that would mean people that have actively customised their gcode they would lose this.