Using L6470 AutoDriver with Arduino UNO to run a Stepper Motor

Hi!
Per the ‘subject’, I’m trying to run a Stepper Motor (Type 42SHD0218-300NK 161015 10070030) with UNO and L6470 AutoDriver from Sparkfun. For power supply to L6470 Autodriver board, I’m using Lavolta DC Power Supply BPS-305 at 10V/1Amp. I followed their connectivity charts and generated the following code based on tips I got from online videos and the example codes under L6470AutoDriver library. However, I’m new to this. I’m not getting the motor movement and am getting the following error. How do i figure out what am I doing wrong? Any suggestions/ideas?

Attachments: 1) connectivity diagram given on Sparkfun webpage
2) L6470 AutoDriver board detailing connections
3) Photo of my circuit
4) a different connectivity diagram between UNO and AutoDriver board that a Sparkfun tech forwarded me.
------After comparing connectivity diagrams in 1 and 4 I’m only more confused.

CODE:
#include <SPI.h>
#include <SparkFunAutoDriver.h>
#include <SparkFundSPINConstants.h>
#define NOTE_DIVISOR 2
int stepDir = 1;
String name = “”;
unsigned long temp;
boolean tempBool;
byte tempByte;
float tempFloat;
int tempInt;
int tempInt2;
boolean pass = true;
void resetDev(); //it will reset all previous values;;;
//Equivalent to toggling the reset pin

AutoDriver boardA(0, 12, 8, 10);

void boardConfig() {
boardA.SPIPortConnect(&SPI); //AutodriverBoardName.SPIPortConnect(&SPI);
boardA.configSyncPin(BUSY_PIN, 0); //void configSyncPin(byte BUSY_PIN, byte 0); //byte pinFunc, byte syncSteps
boardA.configSyncPin(SYNC_PIN, SYNC_64FS); //void configSyncPin(byte SYNC_PIN, byte SYNC_64FS); //byte pinFunc, byte syncSteps
boardA.configStepMode(STEP_FS_128); //void configStepMode(byte STEP_FS_128); //stepMode
boardA.setMaxSpeed(128); //stepsPerSecond
boardA.setMinSpeed(64); //stepsPerSecond
boardA.setFullSpeed(128); //stepsPerSecond
boardA.setAcc(25000); //stepsPerSecondPerSecond
boardA.setDec(5000); //stepsPerSecondPerSecond
boardA.setOCThreshold(OC_3000mA); //threshold
boardA.setPWMFreq(int PWM_DIV_3, int PWM_MUL_1); //int divisor, int multiplier
boardA.setSlewRate(SR_290V_us); //slewRate
boardA.setOCShutdown(OC_SD_ENABLE); //OCShutdown
boardA.setOscMode(INT_16MHZ_OSCOUT_16MHZ); //oscillatorMode
// advanced settings …from spark fun code lines
boardA.setVoltageComp(VS_COMP_DISABLE); // vsCompMode
boardA.setSwitchMode(SW_HARD_STOP); //switchMode
boardA.setAccKVAL(60); //kvalInput
boardA.setDecKVAL(50); //kvalInput
boardA.setRunKVAL(40); //kvalInput
boardA.setHoldKVAL(30); //kvalInput
boardA.setLoSpdOpt(false); //enable; boolean, false == default
}

void setup() {
Serial.begin(9600);
SPI.begin();
Serial.println(“Hello world”);
// Start by setting up the SPI port and pins. Autodriver library does not do this for you!
pinMode(8, OUTPUT); //pinMode(RESET, OUTPUT);
pinMode(11, OUTPUT); //pinMode(MOSI, OUTPUT);
pinMode(12, INPUT); //pinMode(MISO, INPUT); //MISO=CS
pinMode(13, OUTPUT); //pinMode(SCK, OUTPUT);
pinMode(10, OUTPUT); //pinMode(BUSY, OUTPUT);
digitalWrite(10, HIGH); //BUSY
digitalWrite(8, LOW); //RESET // This low/high is a reset of the L6470 chip on the Autodriver
digitalWrite(8, HIGH); //RESET// board, to be sure you’re starting from a known state.
SPI.setDataMode(SPI_MODE3);
boardConfig();
}

void loop() {

boardA.run(FWD, 128); //dir, stepsPerSec
Serial.println(“Done playing!”);
boardA.move(FWD, 1000); //dir, numSteps
boardA.goToDir(FWD, 1000);
// Position Operations
boardA.getPos();
boardA.resetPos();
//boardA.setMark(newMark)
//boardA.setPos(newPos)
//boardA.goTo(pos)
boardA.goHome();
// Basic operations
boardA.busyCheck();
boardA.softStop();
boardA.hardStop();
boardA.softHiZ();
boardA.hardHiZ();

// Advanced Motion Operations
boardA.stepClock(FWD);
boardA.goUntil(RESET_ABSPOS, FWD, 128); //byte action, byte dir, float stepsPerSec
boardA.releaseSw(RESET_ABSPOS, FWD); //byte action, byte dir

}

ERROR MESSAGE:

Sketch uses 28244 bytes (18%) of program storage space. Maximum is 155648 bytes.
Starting download script…
Flashing is taking longer than expected
Try pressing MASTER_RESET button
ERROR: Timed out waiting for Arduino 101 on /dev/cu.usbmodem1411
ERROR: Timed out waiting for Arduino 101 on /dev/cu.usbmodem1411

processing.app.SerialException: Error opening serial port ‘/dev/cu.usbmodem1411’.
at processing.app.Serial.(Serial.java:125)
at processing.app.Serial.(Serial.java:66)
at processing.app.SerialMonitor$3.(SerialMonitor.java:93)
at processing.app.SerialMonitor.open(SerialMonitor.java:93)
at processing.app.AbstractMonitor.resume(AbstractMonitor.java:110)
at processing.app.Editor.resumeOrCloseSerialMonitor(Editor.java:2240)
at processing.app.Editor.access$2400(Editor.java:77)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2218)
at java.lang.Thread.run(Thread.java:745)
Caused by: jssc.SerialPortException: Port name - /dev/cu.usbmodem1411; Method name - openPort(); Exception type - Port not found.
at jssc.SerialPort.openPort(SerialPort.java:167)
at processing.app.Serial.(Serial.java:114)
… 8 more
Error opening serial port ‘/dev/cu.usbmodem1411’.

IMG_3903.JPG

IMG_3902.JPG

Screen Shot 2017-03-02 at 5.04.44 PM.png

I know it's been 4 wks, but...

I'm still trying to figure out the autodriver board myself, but your error looks like the configuration on the PC is wrong - either the Uno isn't connected or when you connected it it reconfigured itself to a different port. Check the configuration in the IDE (I'm not at the computer with the IDE on it right now so I don't remember where it is) to be sure it's talking to the Uno.

Hope it helps.

Mike.