Welcome! Log In Create A New Profile

Advanced

Marlin Weirdness, and a fix

Posted by rq3 
rq3
Marlin Weirdness, and a fix
August 05, 2021 06:00PM
I've been using a home-brew piezo sensor firmly glued under the bed on my delta for several months. It works very well. Very rarely on an M48 probe repeatability test, it would skip a few motor steps, and the same might happen during delta calibration and bed leveling.

The bed on my delta is very securely fastened to the frame, and quite some time ago I took pains to ensure that the bed could expand and contract from temperature changes. I did this by re-machining the washers under the bed to get rid of manufactured burrs, and re-installing them with silicone grease. This helped tremendously with bed warping and bowing, but the bed was still rigid in the Z axis, and I still got the occasional stepper skip when the nozzle was in contact with the bed.

It occured to me yesterday to replace the aluminum washers with 70 durometer "O" rings, and also isolate the mounting screws from the bed with very small (005) "O" rings, all greased with silicone. The bed now has a very small amount of Z axis compliance, and I can move the bed about 1mm in the x and y axes by hand.

All of the occassional motor skipping has gone away. All of it. I wondered why?

Digging into the Marlin cpp files reveals that apparently there is a 2 count buffer in the motion routines. Even if Marlin has the pin interrupt functionality enabled, it can, and will, continue motor motion for 2 microsteps AFTER an end stop has been triggered. The initial trigger point is saved and used, but if multiple probes are enabled (as mine were), if the motor skips, the next data points are also averaged in to the result. This is especially fatal during a delta calibration, where the loss of even one microstep leads to rapidly accumulating errors in the delta kinematics calculations.

$2 worth of "O" rings and 30 minutes of my time has fixed this issue, giving a few microns of compliance to the bed. Just enough to prevent any loss of motor steps during the two step buffer period when the nozzle is in contact with the bed.

Note that this is not an issue during printing, but only when you are telling Marlin to actually probe the bed with the nozzle, as during calibration and leveling with a piezo probe like mine.
Although it "may" account for a lot of the "ringing" issues from Marlin. Sometimes the stepper doesn't stop when told to, but one or two microsteps later. I don't know that this is true, and am not a saavy enough coder to decipher the ins-and-outs of Marlin.

Edited 4 time(s). Last edit at 08/05/2021 06:29PM by rq3.
Sorry, only registered users may post in this forum.

Click here to login