Sunday, March 22, 2020

Testing UMMD's XY Optical Endstops

Something Strange

We had a MarkForged printer demo at the Milwaukee Makerspace last year.  The print they demoed had the extruder rehoming in X and Y at every layer. I noticed that the machine had optical endstops and that the print quality was very good, even with re-homing, something I would not have expected.

I'm not sure why they would re-home at every layer change. Unless the printer skips steps during printing, which should never happen in a well adjusted and configured printer, there should be no need to re-home between layers. Maybe it has something to do with the cost of their filament. Re-homing might save having to print sacrificial objects when they are small and you want to maintain print quality. Re-homing between layers would slow down the process and allow the print to cool between layers.

I never tried re-homing when UMMD had snap-switch endstops- it seemed likely to result in poor print quality because I would not expect the snap-switches to be especially precise.  Errors as small as a few 10s of microns should be pretty obvious in print surfaces.

New Endstops, New Tests

I recently converted UMMD from snap-switches to optical endstops, mostly because they light up when the endstop has been triggered and I like not having to look at the controller when I'm setting up the machine. I also expected that they would be higher precision than the snap switches- they certainly have much lower hysteresis.  

Today I tested that idea by copying the MarkForged technique. I set up two identical prints, one that homes the machine only at the start of the print and the other homing at every layer change (in PrusaSlicer, go to Printer Settings > Custom G-Code > After Layer Change G-Code and enter G28 X Y which re-homes the X and Y axes after the bed drops for a layer change).

UMMD test print- rehoming X and Y with each layer change from Mark Rehorst on Vimeo.

I ran the prints and to my great surprise, they came out essentially identical.  There's just a tiny bit of stringing in the print that re-homes at every layer, otherwise, they look identical.  See for yourself:

First, the standard prints:

Now the prints that were re-homed at every layer change:

This makes me wish I had tested re-homing when UMMD still had snap-switch endstops.

The standard print took about an hour and the re-homed print took 1:42, a drastic increase in the print time.  Needless to say, I won't be using this technique all the time, but I might try it the next time I need to print some very small parts that would ordinarily require printing multiple copies and/or a sacrificial object.

This type of precision would allow restarting an interrupted print, assuming you could somehow store the XY coordinates of the fail point.

UPDATE 3/26/20

I did some digging at the MarkForged website and found this:
"The Mark Two is capable of detecting dislocations and will stop itself from wasting material or potentially damaging itself by aborting a dislocated print."

This leads me to believe that the re-homing on each layer may be done for the purpose of detecting a shifted print. The controller always knows the coordinates of the extruder carriage, assuming everything is working normally. So if it re-homes, it knows exactly how far the X and Y axes have to go to bump the endstops. If it moves the extruder carriage toward the endstops and one of them triggers early or late, the extruder carriage did not end the last layer where it was supposed to, meaning that the print has shifted and it's time to stop printing.  

The cost for the hardware to implement this is miniscule- my endstops cost about $3 each. The real cost is the increased print time required to do all that re-homing. If you assume re-homing adds about 20 seconds per layer, and there are 5 layers per mm, that's about 100 seconds per mm height of the print.  If your print is 150 mm tall, that's 15,000 seconds added, or about 4 hours and 10 minutes!  Ouch!

If you were printing expensive materials, like MarkForged's carbon fiber stuff, or PEEK, etc., it might be worth the extra time to ensure that material doesn't get wasted on shifted prints.

I hope that the feature can be turned off...

... or maybe I'm wrong and that isn't the purpose of rehoming at every layer...

Coming soon: test Z-axis precision with the new optical endstop.

Note: the photos were taken with my Samsung NX500 camera and a Canon New FD 50mm macro lens and adapter.


  1. A re-home every 10/50/100 layers to check for drift is however interesting!

    1. True- you don't have to do it on every layer change, and doing it every 5th or 10th layer would still prevent most material waste without adding too much print time.

  2. great idea, Ive been plagued by layer shifts.. will try this

    1. Layer shifts are a problem that needs to be solved, not bandaged over with something like rehoming on each layer (which probably wouldn't solve the problem anyway). Check all the usual things- mechanical problems, speed/acceleration/jerk settings, motor current, motor cables and connectors, etc.


Leave comments or a questions here and I'll try to post a response as soon as I can.