Adaptive steps on stepper motor
I got this bright idea to try making stepper motor go faster. So I can make my 3D printer go faster. However, the experiment that I did shows that it is not a good idea.
This is not a professional experiment in any way, it's more for my peace of mind.
The setup was setting stepper motor with TMC2209 and turning it exact number of steps with 1/8 microstep mode and 1/64 microstep mode. The idea was that 1/8 because it takes bigger steps it will go faster. However, turns out it's not the case.

Here is the video that shows what I mean by all this. The difference between 1/8 and 1/64 steps is about 1 frame of that video.

CODE:
Difference between 1/8 and 1/64 is just changing digitalWrite(MS2_PIN, LOW) to digitalWrite(MS2_PIN, HIGH), and adjusting max speed * 64, and moveTo steps * 64.
#define STEP_PIN 7
#define DIR_PIN 5
#define MS1_PIN 9
#define MS2_PIN 10
#define MS3_PIN 11
AccelStepper stepper(AccelStepper::DRIVER, STEP_PIN, DIR_PIN);
void setup() {
pinMode(MS1_PIN, OUTPUT);
pinMode(MS2_PIN, OUTPUT);
pinMode(MS3_PIN, OUTPUT);
digitalWrite(MS1_PIN, LOW);
digitalWrite(MS2_PIN, LOW);
digitalWrite(MS3_PIN, LOW);
stepper.setMaxSpeed(2000);
stepper.setAcceleration(100000);
stepper.moveTo(1600); // Move 1600 steps once
}
void loop() {
stepper.run();
} ```