Go Down

Topic: Stepper speed not the same between drivers (Read 434 times) previous topic - next topic


On my power supply, I can see how much A is currently drawn from it. When the motor is running it will only go up to around 0.5 A, even though the motor is a 1.6A motor.
Reread my post #11.  The point of interest is the difference between the two drivers, not the difference
between motor and supply current, that is totally expected.

I cannot seem to change the current supply from the driver to the motor anywhere in the Sparkfun L6470 Autodriver library.
Then you have a question for the Sparkfun forums...
There is a KVAL setting, where it is possible to input voltage regulations, but setting it either to a low value or high does not change anything. Motor is still running quite slow.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


I've spent the day adjusting the Run, Acc, Dec and Hold values, but doesn't really seem to change anything.
The documentation says that the values can be set between 0 and 255. If I set the value at around 200 or higher, the motor won't spin at all. Around 128, it will spin, but still begin to slip quite early. Other values does not seem to change this behavior.

If I ramp up the power supply to around 24V, the system seems to get unstable, although the driver is rated for up to 45V and the motor's datasheet says that it will happily run at 24V. At 24V the motor will sometimes just stop spinning in the middle of a command, even at a speed that I can easily maintain at 12V.

I am so confused with this entire system... :D


Why can't you use the PoStep60-256 throughout?

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....


That was our original plan, but they do not suit the project unfortunately. It works great for testing purposes, but not really for the bigger scale project.

The project is not ruined by the slow turning speed of the Sparkfun driver, but it would be very nice if they could make the motor spin a bit faster :-)

I will continue to experiment with the settings and see if anything will work out. Will post here with my findings :-)

Thanks for your help though! Really appreciate it.


If the current is set correctly and the motor is not behaving with that driver, it sounds like the driver
is fried.  All current-controlling stepper drivers should work roughly the same at the same set current and
microstepping rate.  You are not seeing this.

Did you ever hot plug the motor wires?  This is a really good way to blow up any stepper driver - never
do it, always ensure the motor is connected securely (breadboards aren't great for this), before powering
up.  Any loose connection will arc and send high voltage spikes back at the driver as the windings are
very inductive.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


The driver has terminals soldered on for power and motor connections, so they should be fine. But of course, it is an option that we fried the driver at some point accidentally. I will solder on terminals on a new driver and see if another driver will behave the same way.


Tried to hook up a new Autodriver L6470, but with the same result.

The chip on the driver board does get quite hot, is it an option that it is overheating?


So the problem has stayed with that channel, even with a driver the same as the rest?

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Showing all your connections to the Arduino and power supply.

Can you post a picture of your project so we can your component layout?

Thanks.. Tom... :)
Everything runs on smoke, let the smoke out, it stops running....


Mar 19, 2019, 01:20 pm Last Edit: Mar 19, 2019, 02:03 pm by kranzekage
I have attached a simple drawing and images of the setup below.
The setup is copied from this diagram provided by sparkfun:

But yes, the situation is the same with this new driver, everything else in the setup is identical to before.

Again, really thanks for your help so far!

Here is the setup code, modified a bit from sparkfuns example.

Code: [Select]

// Support functions.
#include <SparkFunAutoDriver.h>

// 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
  boardB.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.setSlewRate(SR_530V_us);   // Upping the edge speed increases torque.
  boardA.setPWMFreq(PWM_DIV_1, 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.setHoldKVAL(32);           // This controls the holding current; keep it low.

And here is the code with the loop function for the arduino, just programmed to spin up the motor and then stop it again after 10 seconds.

Code: [Select]

#include <SparkFunAutoDriver.h>
#include <SPI.h>

// Test sketch for the L6470 AutoDriver library. This program instantiates one
//  AutoDriver board and uses it to play Jonathon Coulton's "Want You Gone" from
//  the Portal 2 soundtrack. In a more general sense, it adds support for playing
//  music with stepper motors. Not all notes can be played, of course- at too high
//  a steps/sec rate, the motors will slip and dogs and cats will live together.

// Create our AutoDriver instance. The parameters are the position in the chain of
//  boards (with board 0 being located at the end of the chain, farthest from the
//  controlling processor), CS pin, and reset pin.
AutoDriver boardA(0, 10, 7);
// add more boards here for additional drivers and motors

void setup()
  // Start by setting up the SPI port and pins. The
  //  Autodriver library does not do this for you!
  pinMode(7, OUTPUT);
  pinMode(MOSI, OUTPUT);
  pinMode(MISO, INPUT);
  pinMode(13, OUTPUT);
  pinMode(10, OUTPUT);
  digitalWrite(10, HIGH);
  digitalWrite(7, LOW);       // This low/high is a reset of the L6470 chip on the
  digitalWrite(7, HIGH);      //  Autodriver board, and is a good thing to do at
                              //  the start of any Autodriver sketch, to be sure
               //  you're starting the Autodriver from a known state.
  Serial.println("setup done");

// loop() waits for a character- any character- and then plays the song.
void loop()
  if (Serial.available() !=0)
    boardA.run(FWD, 1000);


Yet again have you measured the supply current both with the working and non-working drivers?

Are they similar?  If they are very different, they something is definitely wrong.  Perhaps the sparkfun
one is set to the wrong current?
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


Mar 20, 2019, 09:36 am Last Edit: Mar 20, 2019, 09:39 am by TomGeorge
Do you have a gnd connection between the UNO and the Sparkfun board?
I cannot see it in the picture of your project or in your circuit diagram.

What are the SPI connections on the UNO and on the Sparkfun?
Please label ALL connections.

Thanks..  Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

Go Up