Stepper Motor stops working!!

Hey Arduino friends!

I am driving a stepper motor used in a thermal printer. I used a DRV8825 for this. I was working and everything was fine, but just when I started printing, it stopped working:(

however it gets hot and drives current but doesn't turn anymore. can anyone tell me why?

all answers are appreciated

thanks again everyone

You need to post your program and your wiring diagram.

When you say "just when I started printing" was there a change to the program? If so, post the original working version as well as the changed version.

Have you checked very carefully for a loose connection?

Be VERY CAREFUL never to disconnect the wires between the motor and the stepper driver while the driver is powered up. The driver will be instantly destroyed.

...R
Stepper Motor Basics
Simple Stepper Code

To make it easy for people to help you please modify your post and use the code button </>
codeButton.png

so your code 
looks like this

and is easy to copy to a text editor. See How to use the Forum

Your code is too long for me to study quickly without copying to my text editor. The text editor shows line numbers, identifies matching brackets and allows me to search for things like all instances of a particular variable or function.

Also please use the AutoFormat tool to indent your code consistently for easier reading.

And what is in the attached PDF file? If it your program code then please just attach your .ino file. If it is am image then please see this Simple Image Guide

...R

however it gets hot and drives current but doesn't turn anymore. can anyone tell me why?

My guess, without seeing your wiring diagram, is that you are trying to drive the motor too fast. That is a typical symptom of trying to drive it too fast or getting the wiring wrong.

If you go back to the original code does that still work?

ALAA72:
Hey Robin2! thanks for your reply!

here is my code

The first program in Reply #3 is not complete and I have no idea what is missing.

Have you tried the program in the link I gave you in Reply #1? Simple Stepper Code

...R

when I go back to the original program it doesn't work:(

Which suggests you have got a faulty connection, are you using solderless bread board, they are notorious for that.
Or you have burned something out, like the ceramic capacitors on the motor drive because you did not have any bulk decoupling on the system.

You slow a motor down by increasing the time between steps. But if your original code does not work then you have a hardware malfunction.

ALAA72:
no Robin2, I haven't tried it yet, but the first code in reply#3 worked for me quit well before I upload the second code.

your code is very similar to mine, except mine doesn't turn any Leds on.

I hope you will find that the way I have named the variables in my program makes it clearer how a stepper motor is controlled. Also it deliberately runs the motor at a low speed.

...R

ALAA72:
dear Grumpy_Mike
do you say that the driver or somewhere in the circuit is broken even though I say that the motor tries to turn but it just wiggles and the stops?

If the code that used to work now no longer works then yes something is broken. To think that the software that used to work and now no longer works is the fault of the software is just silly, software does not act like that.

Your code is too long for me to study quickly without copying to my text editor.
:::
And what is in the attached PDF file?

I'm missing something - I can't see any code or the PDF anywhere in the thread...
What's going on ?

ALAA72:
Hey Arduino friends!

I am driving a stepper motor used in a thermal printer. I used a DRV8825 for this. I was working and everything was fine, but just when I started printing, it stopped working:(

however it gets hot and drives current but doesn't turn anymore. can anyone tell me why?

all answers are appreciated

thanks again everyone

Make sure you got a digital pin devoted to the SLEEP pin on the 8825, and when your code isn't actually moving the motor, put that thing to sleep... it will solve your over heating problems.