Hot A4988

I have an A4988 Green Stepper motor shield hooked up according to the diagram Pololu has on the product page.

It runs fine at low speeds, but when I upload the following code

int led = 12;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);     
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(10);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(10);               // wait for a second
}

It runs normally for about 2 seconds then starts to get sporadic/ moves in both directions. Am I running it to fast? It seems like the motor should be able to run faster.

Also I know that Pololu says the board will get hot, but this board is getting to hot to touch and I fear of damaging it. Is that normal? I am using a 400mA bi-polar stepper motor.

Hi.

It sounds like your A4988 motor driver is overheating. What do you have the current limit set to?

- Zeeshan

Could be “hot”. But also: You do not define the “direction” pin. The direction pin could be detected as “low” or “high” if you don’t drive the signal. If it sometimes is “low” and sometimes “high” your motor will stutter.

OH one more thing. Of course this is derived from the standard blink-a-led example program. But please change the names of the variables:

int step = 12;
int direction = 11;
setup () 
{
  pinMode (direction, OUTPUT);
  digitalWrite (direction, 0);
  pinMode (step, OUTPUT);
}

loop ()
{
  digitalWrite (step, 1);
  delay (100);
  digitalWrite (step, 0);
  delay (100);
}