Hi there.
So, I'm doing a project at the moment, where I need 6 stepper drivers to run 6 stepper motors.
For the project, we are gonna use the Sparkfun L6470 Autodriver to run the motors. The motors are the 667oz-in NEMA-17, like the ones shown in this link: 12V, 1.7A, 667oz-in NEMA-17 Bipolar Stepper Motor - RobotShop
For testing purposes I've got another driver, the PoStep60-256, Stepper Motor Driver - PoStep60-256 6A, 256 microsteps - Polabs
In the PoStep software I can set the motor to run at around 20000 steps/s, which is a suitable speed for the project.
However, when I hook up the motor to the Sparkfun driver, the motor will not run as fast as with the PoStep driver. At some point the motor will begin to skip steps, and not rotate at all, and the speed is definitely slower than with the PoStep driver. The power supplied to both drivers is identical.
So my guess is that somehow the settings for the sparkfun driver are not set correct for some reason. I have just taken the example code from sparkfun's website for the driver.
Setup code below:
// Support functions.
#define NOTE_DIVISOR 2 // My cheesy way of reducing the note frequencies to a range
// that doesn't cause the motor to slip. I could rewrite
// the wantYouGone() function to change the notes, but that
// would be a lot of work.
int stepDir = 1; // Direction flipping bit. Rather than all going one way,
// they change directions. It looks cooler.
// To play a note, we start the motor spinning at the note's frequency in steps/s.
// The run() function automagically calculates the appropriate value to feed to the
// dSPIN part based on the desired steps/s.
void playNote(int note, int duration)
{
if (stepDir == 1) boardA.run(FWD, note/NOTE_DIVISOR);
else boardA.run(REV, note/NOTE_DIVISOR);
delay(duration);
stepDir*=-1;
boardA.softStop();
while (boardA.busyCheck());
}
// This is the configuration function for the two dSPIN parts. Read the inline
// comments for more info.
void dSPINConfig(void)
{
boardA.SPIPortConnect(&SPI); // Before doing anything else, we need to
// tell the object which SPI port to use.
// Some devices may have more than one.
boardA.configSyncPin(BUSY_PIN, 0);// BUSY pin low during operations;
// second paramter ignored.
boardA.configStepMode(STEP_FS); // 0 microsteps per step
boardA.setMaxSpeed(10000); // 10000 steps/s max
boardA.setFullSpeed(10000); // microstep below 10000 steps/s
boardA.setAcc(10000); // accelerate at 10000 steps/s/s
boardA.setDec(10000);
boardA.setSlewRate(SR_530V_us); // Upping the edge speed increases torque.
boardA.setOCThreshold(OC_750mA); // OC threshold 750mA
boardA.setPWMFreq(PWM_DIV_2, PWM_MUL_2); // 31.25kHz PWM freq
boardA.setOCShutdown(OC_SD_DISABLE); // don't shutdown on OC
boardA.setVoltageComp(VS_COMP_DISABLE); // don't compensate for motor V
boardA.setSwitchMode(SW_USER); // Switch is not hard stop
boardA.setOscMode(INT_16MHZ_OSCOUT_16MHZ); // for boardA, we want 16MHz
// internal osc, 16MHz out.
boardA.setAccKVAL(128); // We'll tinker with these later, if needed.
boardA.setDecKVAL(128);
boardA.setRunKVAL(128);
boardA.setHoldKVAL(32); // This controls the holding current; keep it low.
}
I cannot seem to make the sparkfun driver run the motor as fast as the PoStep one, but I need to use the sparkfun one for the project. Does somebody know what I need to chance in the sparkfun driver to make is run as well as the PoStep one?
Cheers!