Stepper Motor Overheating

Hello, everyone. Just purchased my first Arduino a few days ago, and I'm loving it! I'm trying to run a stepper motor and it's over heating. I'm not sure if this is an issue with the code I'm using or the power supply. The motor doesn't actually step (doesn't seem like there's enough power) unless I have the USB and the power supply plugged in. With just the 12v adapter, with a multimeter in series with the VIN on the shield, idle current is .08A - ish, then it spikes to 1.21A when the motor pulses. I imagine this is the problem, what I don't understand is that the data sheet says that it PEAKS at 400mA. Clearly there's something here that I don't understand. I'm an absolute beginner here in the electronics world, so I would not be surprised if it's a very simple problem.

Here's all of the relevant information:

Arduino Mega 2560
Stepper Motor Datasheet: http://www.datasheetarchive.com/dl/Datasheets-SL3/DSASL0049076.pdf
Motor Shield: Motor Shield V1.0 | Seeed Studio Wiki
Power Supply: 12v 500mA

Code:

#include <Stepper.h>
 
int pinI1=8;//define I1 interface
int pinI2=11;//define I2 interface


//7.5 deg / step = 48 steps per revolution
const int stepsPerRevolution = 48;
 
// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8,11,12,13);           
 
void setup() {
  // set the speed at 1rpm:
  myStepper.setSpeed(1);
  // initialize the serial port:
  Serial.begin(9600);
  pinMode(9,OUTPUT);
  pinMode(10,OUTPUT);
  digitalWrite(9,HIGH);
  digitalWrite(10,HIGH);
  digitalWrite(pinI2,HIGH);//turn DC Motor A move clockwise
  digitalWrite(pinI1,LOW);
}
 
void loop() {
  // step one revolution  in one direction:
  Serial.println("clockwise");
  myStepper.step(100);
  delay(1000);
 
  //step one revolution in the other direction:
  Serial.println("counterclockwise");
  myStepper.step(-100);
  delay(1000);
}

Thank you for taking the time to read this, I appreciate any insight you can offer.

Earshel

How have you wired this up?
There are two sorts of stepping motor, bipolar and unipolar do you have yours wired up for the correct type.
Your power supply is not powerfully enough you need it to be at least 1A, the 400mA peak is for one coil, you wil have two coils on at any one time.

And stepper motors don't have current peaks, they draw constant maximum current when
stationary (chopper drivers aside). They are designed to get hot at their full rated current.

MarkT:
And stepper motors don't have current peaks, they draw constant maximum current when
stationary (chopper drivers aside). They are designed to get hot at their full rated current.

How have you wired this up?
There are two sorts of stepping motor, bipolar and unipolar do you have yours wired up for the correct type.
Your power supply is not powerfully enough you need it to be at least 1A, the 400mA peak is for one coil, you wil have two coils on at any one time.

Thank you both for the replies. I only referenced the peak current because it was listed in the datasheet . I've got it wired to the four stepper motor pins on the shield. Based on Can't get bipolar stepper to run... - #4 by dc42 - Motors, Mechanics, Power and CNC - Arduino Forum, the way you determine the required voltage for the motor is current * resistance. I see he's adding about 2v for 'voltage drop'. How is that calculated? I'm going to try using a cell phone charger to do power the board. The motor gets too hot for me to comfortably hold - is this OK? I don't want to damage any of the components, but if the temperature is normal, that's fine.

At first you said the motor was overheating and now you say it is the driver. Which is it?

Grumpy_Mike:
At first you said the motor was overheating and now you say it is the driver. Which is it?

Oops! I'm sorry, I misspoke in my most recent post - it's the motor getting hot. I'm not sure why I called it a drive, heh.

That stepper has a rated current of 400mA and a resistance per phase of 5 ohms. So the maximum voltage you can safely put across each phase continuously is 2.0V, nowhere near the 12V that you are feeding the motor shield with.

That stepper is intended to be used with a chopper-type stepper driver, not a crappy motor shield. Get one of these Pololu - A4988 Stepper Motor Driver Carrier or one of the many clones of it you will find on eBay, and set the potentiometer for 400mA.