Close

The idea

A project log for Fixing the Ender 3 V2 Z axis limit sensor bug

Curing the problem of occasional poor Z-homing

robgRobG 06/18/2025 at 18:130 Comments

For quite a while now I've noticed during homing that the microswitch doesn't always trigger at the same point, leaving the head a bit high. (Perhaps this is the reason?) Is it really surprising, given the kind of switch used is really just to detect presence rather than necessarily achieve high precision and repeatability.

So I added this 'optical marker' so I can visually check it before each run starts. By including g-code to raise the head by 8mm after homing, i.e. exactly one rotation, I have a few seconds to check it while the nozzle heats up. 

The pen line is about 0.5mm wide, and I can easily detect an error of one line width by eye, possibly less, which equates to +/-60um or so nozzle height (shaft coupler is 20mm diameter, and screw pitch is 8mm/rotation).

Is 60um accurate enough? For 0.4mm nozzle prints, where the first layer is maybe 200um, then perhaps. But if I want to print small items using a 0.2mm nozzle, say, then the first layer might only be 100um and getting it right might mean maintaining the height to within 25um. This can either be done by directly sensing the gantry height, requiring a sensor precision of 25um, or indirectly off the Z screw. There is just about room for a pin or blade 18mm long, i.e. from the screw central axis, and given the 8mm/turn pitch, a sensor here would only need 177um precision to achieve 25um at the head.

The motherboard driver and its firmware claim to be able to control the stepper to 400 steps/mm, i.e. 2.5um (and there's good evidence that that might actually be achievable), so there's plenty of precision to be had in theory.

THE PLAN then is to fit an optical switch next to the screw, with a blade that breaks the light beam as the screw rotates. Increasing the length of the blade (it's radius) should gain further precision. To overcome the complication of the sensor triggering on every rotation, not just when the head is at zero height, it needs to be wired in series with the existing mechanical switch.

(Insane alternative plan: keep the mechanical switch, but attach it to the gantry and arrange it to hit a screw-mounted blade only when the gantry is at its lowest position. Something for another day perhaps...)

Discussions