# Printer homes to z stop-switch, but presses on heatbed during printing

I have a Prusa i3 that homes properly when you use the menu. After adjusting the bed and homing several times it keeps the head at a reliable distance. However when I try to print from SD card, the printer buries hot end in the heat-bed.

What needs to be adjusted to fix this issue?

gcode from one of the 2 files

M190 S50.000000
M109 S200.000000
;Sliced at: Mon 13-06-2016 15:39:25
;Basic settings: Layer height: 0.2 Walls: 1.2 Fill: 20
;Print time: 3 hours 47 minutes
;Filament used: 11.435m 34.0g
;Filament cost: None
G21        ;metric values
G90        ;absolute positioning
M82        ;set extruder to absolute mode
G28 X0 Y0  ;move X/Y to min endstops
G28 Z0     ;move Z to min endstops
G1 Z15.0 F3000 ;move the platform down 15mm
G92 E0                  ;zero the extruded length
G1 F200 E3              ;extrude 3mm of feed stock
G92 E0                  ;zero the extruded length again
G1 F3000
;Put printing message on LCD screen
M117 Printing...

;Layer count: 446
;LAYER:0
M107
;LAYER:1
M106 S127
G1 F2400 E-4.50000
G0 F3000 X81.474 Y58.603 Z0.300
;TYPE:WALL-INNER
G1 F2400 E0.00000
G1 F2220 X83.063 Y56.456 E0.06663
G1 X84.277 Y55.080 E0.11240
G1 X84.836 Y54.444 E0.13353
G1 X85.799 Y53.476 E0.16759
G1 X86.755 Y52.587 E0.20015
G1 X87.179 Y52.244 E0.21376
G1 X88.836 Y50.911 E0.26680
G1 X89.285 Y50.610 E0.28029

• Can you share the beginning of your g-code (from the beginning until it starts getting into printing moves)? – tjb1 Feb 15 '17 at 12:15

The correlation between the endstop switch -- or sensor -- and the surface of the bed is not known a priori . In your case, there are two possibilities. I'd say the more likely is that your g-code generator is not setting the Z-height offset from the bed correctly. The other is that your bed is tilted, so proper Z-home at one corner does not match the entire bed.

Try this: first manually move the extruder head to all four corners and adjust the bed screws until the separation is identical at all times. Then let your gcode start up -- and don't worry if the extruder depresses the bed during homing, as that doesn't matter. See where the extruder is once the print starts. Adjust the endstop switch up or down to compensate until the print head when printing is just off the surface and the first layer adheres well.

If all that doesn't work, then you may have the wrong printer profile settings in your slicing softwqre.

• I did a leveling and prior to printing it properly stays at height. the gcode came with the printer as a test file from the manufacturer. I tried 2 of their files and with the same result. when it starts printing it mashes down on the switch untill it cant bend it any further. If i manually raise the nozel to the proper height and resume printing it seems to print normally. The other thing i noticed was in my instruction manual there is a z offset option in the marlin firmware but on my machine it does not have that option. the display shows z height as 0 from the beginning and raises. – Kendrick Feb 15 '17 at 21:11
• Bad Gcode "G1 Z15.0 F3000 ;move the platform down 15mm" for some reason the manufacutrer put that in the startup of the profile for the machine in the slicing software as well as all there test prints. – Kendrick Mar 20 '17 at 19:31

You didn't share much details, which is problem with any question. But let me give some recommendations - I have Prusa i3 MK2 1.75mm.

The fact that it homes correctly does not at all mean that your Y axis is OK.

• Verify that PINDA probe's bottom end is maximum 1 millimeter above the extruder head.
• Double check that PINDA probe is correctly screwed and does not wiggle.
• Manually check that the printer does not allow you to toutch heatbed with extruder, follow these steps:
1. Wait for both heatbed and hot end to cool down.
2. Put paper sheet on heatbed
3. Go to Menu - Settings - Move Axis - Z Axis
4. Move the axis down. If hot end toutches and presses on the paper, the calibration is not OK at all.
• Updating your firmware can't hurt if you didn't do it already.