Hi again Ray,
I'm glad to see you've got the common ground between power supplies, the Arduino and driver board.
I re-read the datasheet for the motor you have, and the thing that stands out is that the motor is rated at only 2.8 volts! [1] As we know, you can use a higher voltage, however then it becomes essential that you set the correct limit for the current.
Follow the procedure from the video: Connect the power and ground, then adjust the voltage between the ground and the vref pot by clipping the positive probe to a small, metal screwdriver (and the negative probe to the ground connection) while you adjust the voltage by turning the pot. Set the voltage to 0.75V or less.
In order to test the motor, connect the RESET and SLEEP pins to your Arduino Vcc as shown in your latest schematic. For testing purposes, do not connect the ENABLE pin to pin 13 [2] or anything else - it's pulled high by the board, so the motor will run. Don't connect anything to M0, M1, M2, or FAULT. Once you put your circuit together you can reconnect them as needed.
For the operating voltage, I would suggest that you use as low a voltage as possible. The driver board requires a minimum of 8.2 volts, so I would not hook it right up to 20 to 24 volts - this is to get the maximum RPMs out of the board, and you don't need that to test it. My test sketch (from my earlier post) uses the PWM frequency of 490Hz. My first try would be to hook it up to batteries that give you 9 to 12 volts only, as this will spin the motor under no load just fine.
Don't turn the motor power on yet, [3] until you connect the motor wires to the driver board:
Hook up the motor wires: be sure that B1 and B2 go to one coil, and A1 and A2 go to the other coil. You can tell which wires are on the same coil because there will be 1.4 ohms between those wires. A wire from one coil will be electrically not connected (infinite ohms) to the wires on the other coil. According to the datasheet, black and green are one coil, while red and blue are the other coil, but test this with your meter.
Connect the Arduino to the USB, and load the sketch below (also in reply 18 - do not use the sketch from your first post in this thread.) Connect power to the motor and watch the motor spin.
const byte stepPin = 9; // connect STEP on driver to pin 9 on Uno
const byte dirPin = 8; // connect DIR on driver to pin 8 on Uno
void setup() {
pinMode(stepPin, OUTPUT);
pinMode(dirPin, OUTPUT);
digitalWrite(dirPin, LOW); // send LOW to DIR on driver
analogWrite(stepPin,1); // send 490 Hz, 8us pulses to STEP on driver
}
void loop() { // no need to do anything, analogWrite() does it all
}
NOTES:
[1] There are driver boards that are explicitly for low voltage motors. I use the similar DRV8834 board from Pololu to drive my own low voltage motors. Your board will do fine, but you MUST set the correct current limit!
[2] Pin 13 is usually connected to an internal LED. The LED is flashed during startup of the Arduino board, so this may cause some problems with the driver. I suggest using another pin.
[3] Never connect or disconnect the motor while the driver's power is connected. Also be sure to put a large electrolytic or tantalum capacitor between the VMOT pin and GND, right next to the board. Not doing these steps can damage the driver board.