Microstepping pros/cons
-
M350 X128 I100 ; Set 128x microstepping without interpolation
After seeing your example I'm guessing I should be specifying it for XYZ axis'?
That's correct, you are currently only increasing microstepping for the X motor. Also the I parameter should be 0 or 1.
-
Putting my hand up to help improve Wiki's if you are open to me calling you occasionally to clarify things?
-
As far as the motor itself is concerned, there's absolutely no disadvantage to finer microstepping. No loss of torque, no change in heat production, no downside whatsoever. It simply vibrates less when the step position changes, because each incremental movement is smaller. So it's quieter and motion is smoother.
The driver also typically doesn't care, as long as you don't get into really extreme territory like if the pulse times and direction change delays get so short that it can't pick them up. Drivers with crummy chopper algorithms like the 8825 can miss some very fine low-current microsteps, which puts ripples into the print. It may be visually more appealing to have coarser evenly-spaced microsteps than very fine microsteps with repeating error ripples. But the 2660 shouldn't have that kind of issue, because it uses an adaptive chopper algorithm that monitors for missed microsteps and adjusts the decay times accordingly.
The controller is really the main limit for microstepping. You don't want to bog down the processor with step generation. I don't know what the ARM M4F in the Duet Wifi is capable of yet, but Repetier on an 84mhz ARM M3 can handle 80 khz and Smoothie can do, err, I think 100 khz or so with its slightly faster 120 mhz ARM M3.
At higher speeds, when the motor is inductance-limited and isn't actually reaching its target current, microstepping no longer adds any value whatsoever. You actually end up with slightly more torque at high speeds with full or half stepping. But you probably shouldn't be running 3d printers at that kind of speed.
-
I ran some timing tests on the 1.14 firmware. With just one axis motor moving, the Duet WiFi step pulse rate tops out at 240kHz. With all 3 motors moving at the same speed (e.g. pure Z movement on a delta), the step pulse rate tops out at 130KHz. However, these figures do not allow for anything else happening at the same time, so you should aim to keep the step frequencies well below these values.
It has just occurred to me that I can optimise the case of multiple motors moving at the same rate a little. I will implement this in the next release.
-
Remind me, do you have step doubling implemented? That's a fairly straightforward solution that ends up acting much like dynamic microstepping.
-
Yes, the firmware switches to 2, 4 or 8x stepping when the frequency gets high enough. In my timing tests I could see on the oscilloscope that it was running at 8x.
-
So, it's doing 8x pulsing to get to 130 khz? That's rather surprising.
-
The firmware currently switches to double stepping when the interval between step pulses falls below 70us. Then quad stepping if the average interval falls below 35us, and octal stepping below 17.5us. That figure was based on measurements using the wired Duet, and should probably be reduced for the Duet WiFi with its faster processor.
The main purpose of going to double etc. stepping is to reduce the number of delta movement calculations when the firmware is configured for a delta printer. Each delta calculation involves the calculation of the square root of a 60-bit number, so it is quite expensive in CPU time. Bear in mind that delta movement in RepRapFirmware does not use segmentation - except that when it switches to double etc. stepping I guess you could call that micro-segmentation.
In the next release, I'll probably reduce the 70us somewhat for delta movements in the Duet WiFi build, and use an even smaller value for Cartesian movements.
-
I just made a few more optimisations to the step pulse generation. For non delta moves, the maximum step rate for 3 motors moving simultaneously has risen from 130kHz to 166kHz per motor (so about 500kHz total step pulse rate) , For just one motor moving, it is up from 240 to 280kHz.
The experimental binary is at https://dl.dropboxusercontent.com/u/19369680/DuetWiFiFirmware.bin,
-
Fantastic news. Are you seeing improvements due to the on-board FPU? These figures are approaching the performance specs of some rather pricey CNC controllers (KFLOP, to be exact), this is very exciting.