Jittery Motion With 24 volt Nema 23

@TomGeorge Thanks for the link. Turns out the wiring was incorrect. I switched the green and blue wires from the stepper motor and things are working smoothly.

@MarkT Thanks for the help with the calls. I realize now when you call newToNewPosition() you have to wait for the routine to finish before sending another command. While moveTo() allows direct control of the motor.

@jremmington The power supply seems to be working just fine now. Thanks for the tips though.

For anyone else coming across this thread, here is the working code and wiring.

From motor:
Yellow goes to A+
Blue goes to A-
Red goes to B+
Green goes to B-

From motor driver:
PUL+ and DIR+ goes to 5V on Arduino
PUL- goes to pin 7
DIR- goes to pin 6

#include <AccelStepper.h>

const int pulPin = 7;  //PUL- from stepper driver
const int dirPin = 6;  //DIR- from stepper driver

AccelStepper stepper(1, pulPin, dirPin);

void setup() {
  Serial.begin(9600);
  stepper.setCurrentPosition(0);
}

void loop() {

  stepper.run();
  if (Serial.available() > 0) {
    char input = Serial.read();

    if (input == '0') {
      stepper.moveTo(200);
      stepper.setMaxSpeed(200);
      stepper.setAcceleration(150);
    } else if (input == '1') {
      stepper.moveTo(0);
      stepper.setMaxSpeed(200);
      stepper.setAcceleration(150);
    }
  }
}