DRV 8825 Stepper Motor steps and delay between pulses


I am using a raspberry pi to drive a stepper motor. I have conencted the stepper driver in full step mode. MODE0, MODE1, MODE2 connected to ground.
The data sheet of the driver is here, pololu.com/file/download/drv … e_id=0J590

The code I am using that

for x in range (0,3000)
    GPIO.output(10, HIGH)
   GPIO.output(10, LOW)

The problem is that some times the motor runs smoothly and sometimes it doesnt. After using it about 10 times total in both directions, it heats up, and stops rotating. Then after some time, once it cools down, it starts again once we run the program again. Sometimes, it gets a reverse step too.

I would like to know how the delay between the each pulse is related to speed of rotation. Also, I would like to how I can achieve full steps and what would be the ideal delay for this, as I couldnt understand much from the datasheet as I am a newbie ?

VMOT is connected to 12V supply. The raspberry pi pins gives 3.3v to step and dir pins.

I am using it to control a metal door


From the description of your problem, it sounds like you might not have set the current limit on the DRV8825. If you have not done so already, could you try following the instructions for setting the current limit found under the “Current limiting” section of the DRV8825 Stepper Motor Driver Carrier product page? You should be able to use the equation to calculate what the VREF voltage should be and adjust the potentiometer so you measure the calculated voltage at the VREF via. If you try this and are still having the same problem, could you tell me what stepper motor you are using and what voltage you are measuring at the VREF via?

As for your other questions, the speed at which you send pulses to the STEP pin (i.e. the step rate) determines how fast the stepper motor will rotate. When in full-step mode, each pulse sent to the STEP pin will cause the stepper motor to turn one step. For example, if you use a stepper motor rated for 200 steps per revolution, it should rotate one complete revolution after the DRV8825 received 200 pulses, and the time between the pulses will determine how long it takes for that revolution.

By the way, the link in your post is not working properly; it looks like you might have copy/pasted it in a way that broke the link.