High speed stepper driving: 25k steps per second

Stepper motors are pretty easy to control with a microcontroller. But if you’re looking to run then at a high number of revolutions per second things get tricky pretty quickly. [Uwe’s] been learning about and building stepper drivers for years, and recently he decided to build a high-performance driver based on a MicroChip reference design.

As with the reference design, his board uses a dsPIC33. But instead of using a series of discrete MOSFETS to switch the signals to the motor, he sourced an L298N motor driver. That’s it sticking up next to the large capacitor. When driven hard it needs its own heat sink, which [Uwe] cut from a larger CPU heat sink. During development, he decided to use interrupt-based PWM rather than the hardware PWM offered by the dsPIC. It works, but he would go the other route if doing it again.

For the pedestrian, the video after the break has all the details you need. For those that really want to dive in, [Uwe’s] multi-paged write-up is worth bookmarking.

30 thoughts on “High speed stepper driving: 25k steps per second

  1. I can’t help feeling that it would be a lot less noisy and difficult to just use a normal motor and PWM drive. I would have thought the advantage of steppers is that you can step to a particular point rather than that you can make them go fast. It does look pretty cool though! Nicely done.

    1. with this to go from step lets say 5 to 200,000 instead of making the slow transisiton you can make a fast transition and slow it down ahead so it stops at 200,000
      it has to be slow or else you can skip steps and that can be desastiours if your doing persision work

      its a fine alternative to the harder to use belt and encoder designs (like in inkjets)

      if you want something to simply move fast yeah a motor will do best

      but at 5000 RPM (correct me if my math is wrong) and the persision of 1.2* i dont think u can get much better!

    1. That is most likely because of you configuration, not the motor driver if you are using good drivers. Run the motors as high as a voltage as your drivers will allow. Voltage=speed and current=torque. Limited voltage is limited speed.

  2. Does it have any torque at that speed? It looks like it skip steps by the thousands. He can’t even get to full speed on the second motor at no load.

    The whole purpose of steppers is accuracy in movement, I see no accuracy here at all except for possibly exact RPM’s. Is there a point I’m missing? I always thought stepper speed limitations was on the motor itself and not on the drivers.

    Also, I bet that thing gives tons of back current when it goes from full speed to stop.

    1. I doubt it. The torque fall off is great on steppers. If you want high speed accuracy, use a servo. If you want low speed accuracy, use a servo. Or do as I do and use servos whenever I can.

      25khz in 4 microsteps is only 1875 RPM. Not much. All of my servos will do that. I have some Mitsubishi servos that will do up to 4500 RPM and max resolution of 131,072 steps per rev, current model servos are 262,144 steps per rev.

  3. I do agree with the previous commenters. You can not state a result until you’ve got a feedback to prove it.
    BTW, the heatsink should be turned 90°, otherwise it’s not that efficient.

  4. I love the 298n. I use it for all my stepper projects. It saves board space, has thermal protection, current sense, shutdown mode, breaking and it’s rugged. It’s also impossible to have both transistors on at the same time – using internal logic. The staggered pins prevents easy insertion into a proto board though. It also lacks internal protection diodes that you need.

    1. 298 has a VCEsat total of nearly 5V, with 2A that will give you 10W of heat,

      A mosfet driver has a total RDSon below 1ohm, so less than 2W of heat with the same current.Of course,diodes are inside

      Foreget yesterday chips, would you put Windows 3.1on your new laptop ?
      Chips designers are doing a very good job these days, give them some reward.

  5. I like the Pacman-like sounds that it makes during the ramp-down ; THUMBS UP for using old school drivers like the L29x ;)

    Besides to that I don’t see any use in this thing, because at high rpms the steploss will be unpredictable with minimal load changes…

  6. The trick to fast-stepper-driving is that you will need a current source. Don’t just put 3V over the coil, but put 30V over it and cut down on the voltage if the current comes above what is normal at 3V. (taking that small 3V stepper as an example).

  7. I think what should have been mentioned is that this DSP uses feedback (current) from the stepper in such a way that the driver is in sync with the motor and therefore cannot overstep or miss steps.

    You could (as someone mentioned) just work out the limits and program them into another driver but this design doesn’t need that as it ‘feels’ the limits of the motor in no-load or load conditions. Also other factors such as increasing friction on an aging machine don’t have to be compensated for. It will simply slow down itself.

    The other point that seems to be confusing people is that this is a linear driver and not a digital driver as such. It is using PWM. Yes MOSFET’s could be used but you need complementary pairs to drive bi-polar.

    The torque / speed curves are different between bi-polar and uni-polar.

    If it helps, here is a basic idea of how it works. At the start of a step the current drawn is highest. At the step position the current falls to zero and will then invert. By monitoring the current it can determined when the first moment is that you can make the next step.

    Also by varying the voltage so that there is very little drive as it comes to the step position you reduce the effect of inductance (back EMF) which allows you to step faster rather than waiting for the back EMF to subside.

    I am impressed with this and I am going to try to make it work with low cost 8 Bit PIC chips in assembly code.

Leave a Reply


WordPress.com Logo


Twitter picture


Facebook photo


Google+ photo


Connecting to %s