Stepper Motor not acting right

I just bought a stepper motor that is capable of the rpm's I need: 42STH38 NEMA-17 Bipolar Stepper with 5.18:1 Gearbox 42STH38-1684B - 1.8 Degree - 1.68A Stepper - 5.18:1 Gearbox - 3325_0 at Phidgets

...and a motor control board: Adafruit Motorshield v2 for Arduino Overview | Adafruit Motor Shield V2 | Adafruit Learning System

And no matter how I connect the wires, if it works at all it does this: - YouTube

I've tried using two different 12v power supplies as well. What am I missing?

  #include <Wire.h>                                         // Pin communications via I2C.
  #include <Adafruit_MotorShield.h>                         // Adafruit Stepper/DC Motor library.
  #include "utility/Adafruit_MS_PWMServoDriver.h"           // Adafruit Servo Driver library.

  Adafruit_MotorShield AFMS = Adafruit_MotorShield();       // Create the Adafruit_MotorShield object.
  Adafruit_StepperMotor *myMotor = AFMS.getStepper(200, 2); // Create the Stepper Motor object for 200 steps/rev to M3/M4.

// =======================================================
void setup() {

  AFMS.begin();                                             // Connect to the Adafruit_MotorShield Controller.

} // --- End Setup.

// =======================================================
void loop() {

  myMotor->setSpeed(100);
  myMotor->step(1000, FORWARD, SINGLE);
  delay(1000);
  myMotor->release();

  while(1){
  }

} // --- End Loop.

I think that motor shield is really meant for DC motors and it seems only to be capable of 1.2amps whereas the motor requires 1.7 amps.

You should use a specialized stepper motor driver - a Pololu DRV8825 would probably be OK, but it might be marginal at 1.7amps and need a heat sink and cooling fan. A driver using a TB6560 chip can provide more current.

Specialized stepper drivers allow the motor to be driven with a much higher voltage because they can limit the current to protect the motor.

These links may be useful
Stepper Motor Basics
Simple Stepper Code

...R

Your low impedance stepper (1.7 ohms) cannot be driven properly by a DC motor driver, certainly
not without very poor performance and much overheating of the driver.

It needs a current-controlling chopper driver like the DRV8825. If you want fast performance somehting like
24V or 36V supply is mandated.

Just to clarify, this board is designed to operate two 5V 'hobby' servos as well as up to 4 bi-directional DC motors or up to 2 stepper motors (unipolar or bipolar) with single coil, double coil, interleaved or micro-stepping.

It is limited to 1.2A per channel current capability, although, you can draw up to 3A peak for approx 20ms at a time. Apparently "per channel" refers to each motor rather than "per coil". Correct?

One of the power supplies that I used is a 12v 5A switching supply, and the other is a bench power supply set to 12v (can deliver up to 30v) with a max of 10A. When I used the bench supply the amperage draw bounced erratically from 1.3A to 2.8A, finally settling in at 2.5A, for what it's worth.

One thing that I failed to mention in the original post is that the motor acts this way regardless of whether I set the motor speed to 10, 1 or 100.

I scanned the Stepper Motor Basics that you referenced. Basically the same info provided on the Adafruit site which I read thoroughly before embarking on this adventure.

I would like to try out the test code you provided. How do I wire that? I am suspecting that it requires a driver that I don't have.

Thanks.

I repeat myself:

Your low impedance stepper (1.7 ohms) cannot be driven properly by a DC motor driver

Its a low impedance stepper - do not use it with that motor shield, you will burn the shield out rapidly,
or even the motor windings.

You need a chopper driver that controls current, not a voltage controlling motor shield, for a low impedance
stepper.

Current control is essential for any NEMA sized stepper motor if you want it to move faster than 100 rpm or so. The
supply voltage should be much higher than the product of the motor's winding resistance and current.

For instance a lot of 3D printers use similar motors from a 24V voltage supply via DRV8825 driver modules.

If you were wondering you can drive a high-impedance stepper, slowly, with such a motor shield, but we are
talking 10 to 50 ohms for the windings, nothing as low as 1.7 ohms. However the speed is very limited
and you don't have microstepping so vibration can be problematic too.

OK, that makes sense. I think I'm getting the picture.