My Nema 17 stepper motor and A4988 driver that is connected to a CNC shield are starting to get really hot when not in use. I read that it was because the motor is always running and that I should set my driver to sleep instead.
How do I do that? My thinking is that I'd have to connect the Sleep pin on the A4988 to a digital pin? Then assign that digital pin to high/low depending on if I want it to run or not? If that's the case, how do I even find the pin that I'd need to use on the CNC shield?
The more usual way to cut power to the motor is to use the ENABLE pin. On an A4988 when the ENABLE pin is HIGH the outputs are turned off. The sleep pin is rarely used and may not be easily accessible.
Be aware that the motor won't hold position when the outputs are off and when you re-enable the driver the motor might skip a step in either direction.
It is not unusual for stepper motors to be hot.
Have you correctly adjusted the current limit on the A4988 to match your motor?
...R
I have gone away for a few days after setting up a job on the CNC and come back to no damage or other adverse affects.
To re-iterate Robins advice that if you have set everything up "correctly" hot motors are the norm but will loose position if you drop the enable line unless you use a "closed loop" system with encoders.
If you are using GRBL as the source program there are a couple of options available to you in the form of $1 and $4 or M17 / M18
You could also use homing switches to bring the machine back to home and then it can with the right sender pick back up from the last machining point.
Bob.