Creative Commons images are CC BY-NC-SA 3.0


added to your
shopping cart

In stock 65 in stock
34.95 1+ units
31.46 10+ units
27.96 100+ units

Description: This AutoDriver makes it easy to put the L6470 Stepper Driver (a.k.a "dSPIN") to work in your project. Simply connect your motors and your SPI-capable microcontroller and get steppin'!

STMicro's L6470 is a 3A, 8-45V bipolar stepper motor driver. It has built-in overcurrent detection, undervoltage detection, overtemperature detection, stall detection, a 5-bit ADC, and a switch input that can be used for either user jog control or as a hard stop function. As if that weren't enough, it also features microstepping support (up to 128 microsteps per full step) and PWM drive voltage limiting.

Unlike most stepper motor drivers, the dSPIN is controlled over an SPI link. It has an on-board 16MHz oscillator which allows it to autonomously execute movement commands. That means no more counting steps in your code! It also supports customized acceleration and deceleration profiles to prevent jerky starts and stops. On-board registers track current speed and location.

The logic supply voltage supports both 3.3V and 5V I/O levels.
  • Supports up to 128 Microsteps per Full Step
  • Over-Temperature Detect
  • Over-Current Detect
  • Under-Voltage Detect
  • PWM Drive-Voltage Limiting
  • SPI Controlled
  • On-Board Oscillator and Speed/Location Registers
  • Stall Detection
  • 5-bit ADC

Replaces: BOB-10859

Comments 65 comments

  • wow!

    It looks exactly like a board I designed few months back with the only difference that my board contains 3 L6470

  • Hey everyone, Just used this board, worked fine until I wanted to measure coil voltage during motion. I must have wired something comletely wrong… Anyway, I replaced the 3V3 regulator on my attached STM32F0-DISCOVERY. Now it seems the L6470 internal regulator is dead. I get 270mV when measureing the VREG pin havin attached 24V at motor +/-. Tried to use 5V external (resoldered jumper) from Discovery board, but this just shuts down the regulator on Discovery.

    Is the L6470 completely broken then? Will try to replace the L6470 IC. Any other suggestions? Thanks in advance.

    • So what I’ve done is replacing the L6470. It seemed to work, but then I realised the smooth motion was gone. I see opnly rectangles on the scope and the motor keeps bumping and shaking around. Communication works flawlessly. The charge pump diodes seem to be in shape, according to what I could measure. Could there be some other thing that is to be repaired/replaced for propper functioning?

  • Hi guys! Can I use it with 1/8 microstepping bipolar motor?!

  • I’m using the Autodriver with a NEMA 17, 1.8A Stepper and the standard arduino example. The stepper starts to move only when I lower the KVAL values to < 20, which was a little strange, but .. ok. But I can not get the microstepping option to work. Whatever command I send to the motor, it doesnt make a difference in motion and is not smooth at all. And hints, anyone?

    • Ok for those interested: setting the microstepping mode “manually” with the

      boardA.setParam(STEP_MODE, STEP_SEL_1);

      command fixed that issue. The “configStepMode()” function didnt work for some reason.

  • I’m having a little problem. It seems that I have followed every instruction on the example document yet I unable to get any motor to react. In fact, there are no indications on the board to express that it is receiving any data or power. The wires are set just as the example. Initially, I began with an Arduino Mega 2360 but switched to a red board. Afterward another failure at using the AutoDriver, I switched to an Arduino Uno which, of course, yielded same response. Last resort, I soldered another AutoDriver and try other examples online and held same results.

    Is there anyway anyone can clarify the example better? Or better yet, is there anyone who has video that can clarify how to use AutoDriver? Because nothing I do seems to be working and I’m a little concerned.

  • Can this product be used to control unipolar steppers? Or is there another product for Arduino recommended for this purpose? hanks!

    • I think I figured this out. My steppers are of the six-wire variety so it appears that I should be able to use them. My ignorance….

      Another question - I need a solution that is very low RFI, because I am building an automatic antenna tuner unit. I can shield the motor wires in braid, so that should be no problem. I have had problems in the past with 2-wire serial interfaces generating massive RFI, however. I had to get rid of the wired controller for my garage door openers because they were so noisy. Ironically, the wireless controllers produce much less RF than the wired ones! I have not used SPI before. Can I expect it to be a problem?

  • I just love how easy it is to control stepper motors with this driver and a Arduino. using the goHome function and getPos really helps. However, it’s worth noting that the AutoDriver library is configured for Arduino Uno and other Arduino boards that uses SPI on pin 10, 11 and so on. When using a Arduino Mega, you can go to AutoDriver.cpp and change the hardcoded pins in the SPI config function to 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS).

  • A couple of quick questions. Everytime I reset my arduino I need to disconnect and reconnect the motor power supply for the motors to spin, is this expected? Also, is this board capable of getting this stepper motor up to 2000rpm? I have a phidgets board that can get it up to that speed but I’ve only been able to get it up to 350-400 rpm so far with this board.

  • I have a question and please try to clarify the answer for me urgently.

    In your PCB layout this is the output pin which carries the 3A, I can see clearly that the width of the pcb is wider to stand that 3A current passing through, but at the same time I noticed that there is a thin width connecting between the output pin itself and the wider width. Won’t that affect on the performance of the board and act as a fuse which won’t be able to withstand that 3A ?


    • Not really. The short length of that section of the trace will keep the power dissipation there low.

      You’ll run into heat dissipation issues on the chip itself long before that trace becomes a problem.

  • Hello, I think there is a problem with the setPos & setMark function in the AutoDriver library. Whenever I try set a negative position using the setPos command the getPos returns -1 when I read it back. It looks like they are handled as standard unsigned param when they are 2’s comp numbers and should be handled similar to the goTo function.

    – Thanks!

  • I hooked up L6470 to an Arduino UNO, with one Nema 17, powered. I can see chatter on the SPI, clock, mosi, etc. but nothing ever comes back from L6470. I am using the sample hookup from, using one motor. Constructor with no busy pin AutoDriver boardA(10, 6). Pulling my hair out. Any suggestions on how I can check if my AutoDriver is alive? Does anyone have a sample wiring diagram with a sketch I can run as a sanity check?

    • Try connecting the reset pin on the AutoDriver to pin 6 on the Arduino. That’s missing from the diagram, and I’ll get it added ASAP.

      Past that, what I usually do is query the CONFIG register; that register will (after power up) always return the same value (0x2E88, I think) and that can be used to check for signs of life from the AutoDriver.

      • I have the L6470 hooked up to an Uno and successfully send it dSPIN_Move commands, dSPIN_GoHome() and adjust acceleration, which are all very useful. Config register confirms communication on start up but I can not get dSPIN_ABS_POS command to give me a location.

        Using the original dSPIN_example code the position returned from the driver was 0 and after updating to the new example code posted on github now i get 1 despite the command dSPIN_Move(FWD, 25600).

        Has anyone had success getting the driver to return a correct position value?

  • I’m using this driver to run a stepper that’s connected to a physical arm that spins around. I’d like to detect whether or not the arm is bearing any weight. I don’t want the motor to stop or anything like that, I’d just like to know how hard the motor is working to spin the arm. I though I could do this by measuring how much current the stepper is drawing. The L6470 measures the current draw for its overcurrent detection, but I can’t figure out if/how to read the actual current draw. Any help is greatly appreciated. Thanks !

  • Quick question (I hope). Is it possible to connect 12 of these, each with a 2A (NEMA 23 size) stepper onto a single Arduino board? E.g. Arduino Mega, since I guess you need one select pin pr. autodriver board (12 pins excl. the SPI ones)? and a +24Amp power supply running it?

    • There are no physical limitations preventing this; however, you may find that, as currently configured, the Mega won’t be able to drive the SPI lines to all 24 boards at once.

      You also may find that an Arduino of any flavor doesn’t have enough processing power to usefully drive 24 motors, even with offloading the motion control to the AutoDriver board.

      • but couldn’t it be possible to daisy-chain the autodrivers, requiring only one SS pin? But thanks for the pointers! However, we’re only using twelve stepper motors - so I hope we can do it with a Arduino Yún (if it’s possible to daisy-chain)

        • Yes, daisy-chaining and using one SS pin will work; you lose the option of ribbon cables, but that may not be a big deal.

  • Hi, I am learning the L6470.But I do not know how to set the parameters like KVAL_RUN,KVAL_HOLD,KVAL_ACC,and so on. In oder to meet my own motor, I have used the dspin evaluation tool to calculate the parameters.but it didn’t meet.How can I set them? Thanks!

  • Bought several of these to work with a Raspberry Pi, and after some fiddling using the dSPIN_raspi-master code was able to make it work driving a Nema 23 stepper, but the speed range only works in the 800-1200 range - anything slower stops suddenly, anything faster slips. Suggestions on how to tweak appreciated. Microstepping does work. Was able to get a cross-compiler environment set up in Eclipse as well as the onboard compiler. SAFETY NOTE!! I tried using the settings in the AutoDriver library - when I switched the overcurrent bridge function from enable to disabled (as it is in the AutoDriver library), a slow speed setting smoked the driver board, and destroyed my Raspberry Pi. DO NOT override the safety overcurrent shutdown features! The board runs hot enough as it is - setting the overcurrent shutdowns much past 4000mah is dicey at best, unless you have a good heat sink.


  • Anyone else having problems with “INPUT_PULLUP not declared in this scope”?

    AutoDriver.cpp: In member function ‘void AutoDriver::SPIConfig()’: AutoDriver.cpp:35: error: ‘INPUT_PULLUP’ was not declared in this scope

    Thats what I get. Any help would be appreciated

    • Try updating your Arduino IDE. “INPUT_PULLUP” was added as a pin option in a recent version (1.0.4, I think), and you’re probably using an older version than that.

      I suggest 1.0.5.

      • I do have the Arduino IDE’s latest version… I’m also using the Mac IDE… I switched to Windows and my code compiles… but now I find that the pulses being generated to the steppers are too big and the ‘break’ pulses are too slow. This makes the steppers miss steps at certain speeds.

        • You should probably contact our tech support. They can help figure out what’s going on with a longer discussion.

          • I did too…. I’m assuming they’re too busy because I sent emails last week and only got one answer back saying they’ll look into it

  • I’m having problems with this device. I can communicate with it successfully, read and set parameters, status registers, etc..

    When I issue run command and speed 100, it works perfectly. The problem is that move command doesn’t work. Motor starts to behave weirdly. Start to spin up to crazy speeds without respecting max speed limit. What is happening?

    Is anyone experiencing those kinds of problems. I’ve tried two of the circuits that have arrived, and they both behave the same.

    • Contact tech support and see if they can help. This isn’t a behavior I’ve ever observed. Perhaps one of the settings isn’t quite right?

  • Big issue: we buyed all the steppers and drivers to build a multiaxis moco but: When trying to run very slowly, the rotation is not regular. The motor makes a very short stop every 128 steps, resulting in a shaking moove. The instruction we use is dSPIN_Run(FWD, 91). At higher speeds, the stop is still there but perceptible in a vibration. Any idea?

    • This is not a behavior I’ve seen; perhaps it’s a code issue? Are you using the busy flag or pin to make sure that you’re not sending repeated commands before prior commands have completed?

  • What’s the preferred way to run your stepper with direction, steps, AND speed with this? run(dir, stepsPerSec) move(dir, position) goToPos(dir, position) Using move() works great for moving the correct number of steps, but no speed control except with setMaxSpeed(). Using ABS_POS with run() doesn’t seem as robust. Also, I think run() doesn’t wait for the Arduino, while the others do.

    On a side note: Direction seems redundant to me. Why not just a positive or negative steps number?

    Any suggestions?

    • The lack of speed control with the move() command is inherent to the chip itself; it’s not a library limitation.

      Implicitly waiting for the Arduino is not a desired behavior, as that limits the ability of the device to multitask. That’s why there’s a busy checking function.

      Finally, regarding the redundancy of the direction flag: that again ties back to the modality of the chip. The chip expects a direction flag and an unsigned steps value. I simply propagated that through to the library interface.

      • Thanks for the response!! Basic use of this driver is awesome, the ability to set the KVALs are great, it also steps so smooth! I’m so close to finishing my project, but I am having some trouble in 2 areas: When using run() there is a need to check ABS_POS for when to stop, but I haven’t gotten ABS_POS to work correctly with an Uno (even with the sample file unadulterated) as it restarts the count after 128. I have read about others' problems with this too. Is there a fix? Second, is there a way to use move() with a slower speed than 15.25 steps/sec? It seems the only way to set the speed of move() is with MaxSpeed() and the lower range of that is 15.25 s/sec. There is a MinSpeed() but I haven’t figured out if/how that works with move(). Any additional help would be tremendous.

        • The bottom end of Max Speed is another chip-enforced value; there’s not much to be done there.

          I’ve been trying to duplicate the ABS_POS problem that others have reported, and haven’t been able to do so with the latest version of the library. Have you updated the library?

          • I thought I was using the latest library. Hmm , , , How do I tell if I’ve got the most recent version?

            • Well, your best bet is probably just to download the GitHub repo and replace what you have. The changes were minor but significant.


  • Looks like a nice controller. Industrial products with similar capability cost $100 or more. Hard to believe that people can complain about a $34 price tag.

    Two comments: I have not tried one of these boards but I have purchased three for a new project. It took me some time to realize that although the Dspin chip has “micro-stepping”, it only stops on full steps. I wish that was clearer on this page.

    It is unclear how to initially set the Kval parameters for a particular motor. This equation is in the data sheet:KVAL = ((KVAL_X + BEMF _COMP)× VSCOMP×K _ THERM)×microstep

    I still don’t see how to relate a motors current rating to the KVAL setting!

    Seems like the only way is figure the voltage (VOUT = VS ⋅KVAL) and use Ohms law to figure the current based on the winding resistance.

    Seems like folks are likely to smoke their motors without knowing a specific way to come up with the right setting.

    I’ll make a spreadsheet to come up with the four Kval parameters then try it out on a couple of motors.

    Anyone else figured this out? Thanks, Craig

    • Cyrus, I am stumped by the KVAL settings as well (RUN, ACC, DEC, and HOLD). Does anyone know what are the range of values that these settings accept?

      • RTFM (palm to forehead) These are values that are working for me on a generic NEMA1.7 stepper the values are from 0 to 255 for each: (see next reply…)

        • RunKVAL(255);    0=doesn't run, 255=high torque 100 for most, 255 for 128 microstepping
          AccKVAL(100);    Higher number for lower setAcc value (not jittery on accelerations)
          DecKVAL(200);    Higher number for lower setDec value (not jittery on decelerations)
          HoldKVAL(255);   255=no hold, 0=almost locked
  • I am noob with arduino and the stepper driver. I am trying to drive a small micro-tensile stage for testing small metallic samples. The stepper motor is a 24 V, 2a/phase motor. The basic question i have is that the autodriver has a 7A max output. Can I use it with my stepper motor and if so, is it as simple as changing the over-current detect setting.

  • The layout makes it tricky to use an Uno’s SPI pins. Wouldn’t it make sense for this board to be a shield if it doesn’t comply with the standard Arduino SPI pinout?

    • Not everybody is using it with an Arduino.

      That said, maybe a cheap shield to allow this to interface with an Arduino more easily wouldn’t be a bad thing…

  • Hi Techsupport Team, We ran into problems reading ABS_POS on Arduinio Board.. maybe you already know about this problem It seems to be the 8th Bit from the 22 bits Position register is always Low other reset.. All the other functions are working good but of course I don´t be able to read the Position values correctly

    In Order to find the solution i´ve tried following:

    1. I tested all the possible solutions (taked from: that other users have suggested with any succes.
    2. I tried to implement new methods of the Autodrive library ( in the old Arduino code and it has not worked
    3. I Consulted/Posted on the ST microelectronics Forum about my Problem but I could not find a solution (You will see that other custumers experimented the same issue even with the evaluation board EVAL6470H).

    Im need to ask if you could reproduce this error in your labs, it looks as many costumers have experimented the same situation. We need to be shure that your code works or we need to find other Hardware options at right time.

    Thanks !

    • This exact problem plagued me for a few days, till I nailed it!

      Ha … SPI bus has the properties of CLOCK POLARITY and CLOCK PHASE. I was writing my own drivers - running on Freescale 56F805 - for the DSpin L6470, and from reviewing the ST datasheet - came to the conclusion that Data clocking was to happen on the LEADING EDGE of the CLOCK signal, and CLOCK was ACTIVE-HIGH.

      Only when I came to implement the item Get_Abs_Pos - I found that the 8th bit in all three bytes returned was missing (reads zero - always). (PS many would say SEVENTH Bit, counting from zero …). Then realised ALL BYTES returned from DSpin missing the highest bit, always. Sure makes your Config and Status registers look strange! After a bit of pfaffing about - revisited the Clk phase and polarity setting in my micro, tried the three remaining combos of Phase and Polarity, found that these are the SPI settings that work:

      clk phase = TRAILING EDGE clk polarity = ACTIVE LOW

      in order to implement this on your Arduino or whatever, look to the hardware manual for SPI port registers.

      Very surprising that Sparkfun has released a ‘library’ with this very glaring error - only kills some users though?

      • The Arduino SPI reference ( doesn’t explain if clk phase TRAILING EDGE is a 1 or 0, similarly with the clk polarity (although I assume ACTIVE LOW would be 0?) So, which mode should it be set to? MODE0, MODE1, MODE2, MODE3 (MODE3 is where the dSPIN_support file sets it).

        I have tried all of the them, but none of them fix the ABS_POS values. It still starts over after getting to 128. So, maybe the Mode is a problem, but it’s not the only problem!

        On an Arduino Uno, how do I get the ABS_POS value to return a correct value?

      • And clearly - if you are bitbanging your SPI, do it as per above post.

        And a hint for everyone - this L6470 DSpin chip talks nonsense until the MOTOR is POWERED !!

  • Mine just arrived today. Nice job with the dedicated tutorial page! It might be cool to screen the text in just one direction.

  • That is a huge smd capacitor

  • This might be a stupid question, but could I run a ‘normal’ small DC motor with this? Like the Dual Motor GearBox ? Those little motors can draw quite a bit of power and the H-Bridge Motor Driver doesn’t seem to work well under load.

  • I realize the L6470 is $5, but $35 for this is kind of steep considering it takes at least 3 of these to start having any kind of serious fun ;-)

  • The Autodriver Library and Github links are 404.

    • Sorry about that! We had the wrong permissions on the GitHub repo, and should have the library link fixed shortly.

  • These appear to be daisy-chainable, except that CS is not connected per the datasheet example. Please recommend a method for addressing modules in the chain after the first.

    • There is a CS pad available outside the 2x3 header. It means one extra wire per board, but it was the best idea I could come up with that allows the majority of signals to daisy chain.

      • I thoroughly read the datasheet and saw the obvious intent with the board to provide daisy-chaining, but didn’t notice the entirely alternate wiring shown in the schematic. Per the datasheet, this board could have had a single 5x2 header in, and a single 5x2 header out, with no extra one-wires. It will work, but the daisy-chaining could be greatly simplified by conforming to the datasheet. :( (first-ever frowny face @ sparkfun)

        From AutoDriverSupport.cpp - // SPIXfer()…A very important // note regarding chip select- holding the CS line low results in data being // shifted THROUGH the chip, not into it. To latch data, CS must be released // after each byte. I can’t find a reference to this in the datasheet, which // is AWESOME, and I’ve personally discovered it at least twice."

        This was intentional and expected behavior per the datasheet: Page 37: CS lines should all be tied together; MISO should return to CPU from last driver in chain Page 54: NOP = 0x00

        To command the n-th driver in the chain: 1) Hold CS 2) Transmit (CommandForNthModule + (NOP * (n - 1))) 3) Release CS

        • Yes, there are two major connection techniques with this part: Parallel and chained

          The way it is currently wired lends itself to be a parallel connected device, so that all of the SPI inputs (SDI) are ganged and all of the SPI outputs (SDO) are ganged, and the CS signal is used to select the desired device.

          The other approach wires the previous chip SPI SDO into the next chip’s SDI. I have used this in a design, also ganging together the SCK, CS, FLAG, and BUSY lines. It works well to save pins, but can get clogged up if there are a lot of movement commands flying around very quickly.

          A few recommendations I would make if there were a rev:

          It should be pretty straightforward to use jumpers to select between parallel and daisy chained configurations, if other people care about that approach.

          The ADC resistors are set for Vs of 16.5V MAX. At 45V, ADC_IN would be over 8V with R4 fully shorted. The given absolute max for that pin is 3.6V. I’m not sure what to do with this one, but the board doesn’t appear to include a trim pot anyway, leaving this pin biased to ground. Since this is an unused feature, it might be nice if the ADC bias resistors were through hole so that you can source your own resistors to implement motor supply voltage compensation that’s described in the datasheet section 7.5 . Yes it is possible to use a trimpot for this too, but blowing out the pin seems to be a severe gotcha if you install it…

          I would get rid of the OSCIN connection. I’m not sure why you would use it, and if you stop the clock signal to this part while it’s operating [I’ve heard that] it may cause the otherwise excellent over-current protection to stop working.

          This is a complex part but a really nice one! Thanks for continuing to put great parts out there!

Related Products