Arduino Motor Shield R3 overheating

I am using a Arduino Motor R3 Shield with ATMega to run a stepper motor. But the shield is heating too much really quickly and the serial monitor and the arduino hangs for a while. I am using the following code and the header files to run the motor. I have substituted the standard stepper library a bit to use it for the shield. As I am new to arduino so please check it for any errors. Thanks in advance.

void stepm(long speed1)
{
mystepper.setSpeed(speed1);
Serial.println(speed1);
mystepper.step(200);
delay(1000);
mystepper.step(-200);
}

stepper_specifications.pdf (61.6 KB)

Steppershield.h (502 Bytes)

Steppershield.cpp (1.91 KB)

Hi, I have a question, i think you use 12V right? This shield gives max 2A per channel. However your stepper uses like 3.4 A @ 12V if i don't miss sth. So it seems that you are overloading your shield.

Better to check current values.

Regards.

The motor is rated at 1.7 amperes/phase with coil resistance 1.7 Ohms/phase. The Arduino Motor R3 Shield is totally inappropriate.

You could use the Pololu DRV8825 driver, but be sure to carefully follow Pololu's instructions and set the current limit to 1.5 amperes/phase or less (it won't handle more than that).