Turning table shake when powered

Hi, in my final year project there is a turning table that it turn quart of circle after a moment with a high precision.
i decide to use the enable pin instead of sleep pin , but the motor jitter only one time is when i set the sleep pin to LOW for the first time ,after , the motor work perfectly .

video of the problem : Stepper motor jitter - YouTube

/*Example sketch to control a stepper motor with DRV8825 stepper motor driver AccelStepper library and Arduino. More info: https://www.makerguides.com */
#include <AccelStepper.h>

//Define stepper motor connections
#define dirPin 8
#define stepPin 7
const int sleepPin = 6;
const int enablePin = 4;

//Create stepper object
AccelStepper stepper(1,stepPin,dirPin); //motor interface type must be set to 1 when using a driver.
void setup()
{
  Serial.begin(9600);
  pinMode(enablePin,OUTPUT);
  pinMode(sleepPin,OUTPUT);
  digitalWrite(enablePin,HIGH);
  Serial.println("En was set to  HIGH");
  delay(100);
  digitalWrite(sleepPin,HIGH);
  Serial.println("Slp was set to high");
  delay(100);
  digitalWrite(enablePin,LOW);   // The motore jetter here !!!!!
  Serial.println("EN was set to low");
  delay(100);
  stepper.setMaxSpeed(1000); //maximum steps per second
}

void loop(){ 
    Serial.println("Turn");
   digitalWrite(enablePin,LOW);
  delay(5);
  stepper.setCurrentPosition(0); //set the current position to 0
  while(stepper.currentPosition() != 400)
  {
    stepper.setSpeed(100);
    stepper.runSpeed();
  }
    delay(1000);
   digitalWrite(enablePin,HIGH);
   delay(1000);
}

But sometimes the motor not jitter even though i restart the power !

Don't use either the enable or the sleep pin ?

...R

Are you using microstepping?

Robin2:
Don't use either the enable or the sleep pin ?

...R

I use the enable pin to reduce power consumption by switching it. I have used the sleep pin before instead of the enable pin, but the motor jitter each time sleep mode is disabled

JCA79B:
Are you using microstepping?

Yes,my project need to be accurate.

A stepper motor draws full power in detail in standstill. If you turn off the power, by enable or sleep. it cannot hold its position, and eventually also the microstepping logic is fooled.

You are better off with an additional self-locking gear box and full steps.

aymannox:
I use the enable pin to reduce power consumption by switching it.

Stepper motors are inefficient. There is no easy way round that.

You could try to ensure that it is at a full-step position before disabling the driver - but I would still have my doubts that it would restart at the exact same position EVERY time.

...R

DrDiettrich:
A stepper motor draws full power in detail in standstill. If you turn off the power, by enable or sleep. it cannot hold its position, and eventually also the microstepping logic is fooled.

You are better off with an additional self-locking gear box and full steps.

But the problem appear just when i power on the arduino, and after , the motor work perfectly ، although i switched the enable pin .