Stepper Motor Angle and Speed Control

Hi !!

I have tried the code now and the changes you did on function abort when joystick is active worked perfect !! :slight_smile:

I adjusted the Vref pot on the A4988 to match the 1.68A stepper i´m using, Vref=1.5x8x0,1 and it is very strong with the 50:1 gear ratio. A bit to slow in fact, the max speed is about 1500 over 1500 it starts losing steps and sounds bad. The lowest speed i can run is about 500, slower it sounds bad.

When uploading new software the enablePin on the a4988 gets low and the motor is active, i measured the current on in one of the coil to 1A, is it a bad thing that the motor is in this state or could i use this function to hold the angle?

I cant get Function 2 and 3 to follow the " const int minSpeed = 500" when Function 2 or 3 is activated the speed is very low and the motor sounds bad.

The A4988 driver may not be the best choice for this motor and application or i´m just jusing it wrong :slight_smile: Maybe this one TMC 2226 vould be a better choice : https://cdn-3d.niceshops.com/upload/file/TMC2226_V1.0_Instruction_Manual.pdf

And once again thank you so much for helping me out!