Authored by Torbjørn Ludvigsen 👷

Smart Stepper VS Mechaduino Precision Movement Test


Mechaduino Firmware's rounding errors are large enough to have a big effect on Hangprinter auto calibration.


Sent gcode commands are indented with >>>. Answers from Marlin are indented with Ans:. Everything is in chronological order. Some gcodes and answers have been removed for brevity.

Before the first gcode command cited below, the machine is freshly started. All counters in both Mechaduino, Smart Step, and Marlin are zeroed. C- and D-motors were not connected during the testing, so disregard the trailing zeros. Data point explanation: [A-value, B-value, zero, zero],

>>> g6 s2 a3000 b3000 f10000
>>> m114 s1
Ans: [3007.85, 3000.00, 0.00, 0.00],

Here we told Marlin to step A- and B-motors such that A-lines and B-lines both get 3000 mm longer. The s2 parameter tells Marlin to remember the new line lengths (and therefore do correct buildup compensation). We then made Marlin ask Mechaduino and Smart Stepper about the angle of their respective motor shafts. Marlin used these angles to compute the line length those angles correspond to. Smart Stepper reported an angle that matches perfectly with the 3000 mm motion we told it to do earlier. Mechaduino oddly reports an angle corresponding to a 3007.85 movement.

>>> g6 s2 a-3000 b-3000 f10000
>>> m114 s1
Ans: [-0.01, -0.00, 0.00, 0.00],

Here we told Marlin to step the motors back to the startup position. Both Smart Stepper and Mechaduino stops extremely close to 0, like they should. This shows that Mechaduino's error is probably not an accumulating one.

After this experiment, I wanted to exclude errors inside the Marlin firmware. I therefore switched the motors so that Smart Step became motor A, and Mechaduino became motor B. Next section starts with all counters fresh again, in all firmwares.

>>> g6 s2 a3000 b3000 f10000
>>> m114 s1
Ans: [3000.00, 3007.81, 0.00, 0.00],

A very similar error now shows up on the B-motor, which is now the Mechaduino. Given the size of this error, we should expect to see the auto-calibration work noticably better when using data collected from Smart Stepper Firmware.

Don't Throw Away Your Mechaduino Hardware

Smart Stepper documentation says that it's possible to use Smart Stepper Firmware on Mechaduino Hardware. We expect Mechaduino Firmware to be the culprit in this experiment, not the Mechaduino Hardware. We therefore think Smart Stepper Firmware running on Mechaduino would also give correct data points.

--- tobben

PS! Source for the three firmwares that were interacting in the above test:

Pronterface log 2.22 KB
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment