Driving a high(er) amperage stepper motor w/ raspberry pi

step-class

Steppers

When planning a motion control system, we pick the motors first. Here’s are the specs on the motor I plan to use for a new kinetic piece:

  1. Faceplate/mounting size: NEMA 23
  2. Electrical characteristics: 4.2V, 3A, and 1.4R
    1. If you only have two, you can get the third via Ohm’s law.
    2. The Amperage rating is the one we really care about.
  3. Holding torque: 305 oz
    1. What the motor can resist when attached to that much weight via 1″ diameter pulley.
  4. Resolution: 200 S/R
    1. How many steps per revolution
  5. Number of wires: 8
    1. Most steppers are Unipolar. Bipolar motors have four wires.
    2. Unipolar wires can be driven bipolar-style with the right controller. This will result in a higher effective holding torque.
    3. Note that certain wiring schemes, like 2-phase parallel bipolar (see link page 11), will consume twice the listed amperage.

Motor Controller

My motor is rated at 3A, so our controller must be able to provide that much current. Some drivers will list their “peak” capacity, but we’re only interested in RMS, or “root mean square.” RMS is equivalent to the Amps/Phase rating that your motor should have printed on the side.

Counterintuitively, our controller should operate at a higher voltage rating compared to the motor. A “chopper driver” will use the difference to give the motor quick pulses of high voltage, only to cut out before causing any damage. This process allows you to milk more performance from your motor.

After a lot of searching, I almost picked up the Sparkfun Autodriver. At the last moment, however, I switched to the EVAL6470H. This board is based on the same chip (the 3A RMS L6470), but comes preassembled. I was also interested to note that there were many more discrete components when compared to the Sparkfun product, leading me to wonder if they had skimped on their design. It doesn’t hurt that Arrow offers free overnight shipping either.

Both the EVAL board and Autodriver are controlled via SPI. I’m new to that communication spec, but I gather it consumes just a couple GPIO pins. Sparkfun has a library, but it’s intended for Arduino, and I need the image display capability of the Raspberry Pi. Luckily, there are some ports out there on Github.

Power Supply

Our power supply must be able to handle the RMS Amperage draw of the motor, plus some overhead for good luck. The supplied voltage must fall within the range listed on the motor controller.

Working Prototype

Head on over to this repo and follow my instructions. I’m starting out with a slightly smaller 2.1A motor and a 12V supply. Now to start working on the application!

2 thoughts on “Driving a high(er) amperage stepper motor w/ raspberry pi

  1. phooky

    Looks like if you wire this motor in a serial bipolar configuration, you get a touch more torque at a lower amperage (425 oz/in @ 2.12A).

    My standby for power supplies is MPJA, which has a good selection and often has some pretty beefy PSUs on sale.

    I’ve never tried these drivers; looking forward to seeing how they work out!

    1. Taylor Post author

      Thanks for the tips! I’ve got the system up and running using your suggestions. I’ve updated the post to include a walkthrough of all the wiring, software, etc. Will check out MPJA for a supply as well.

      I really like this chip so far; instead of coding behavior from the ground up, you just tell the motor where to go, and the L6470 takes care of acceleration, deceleration, and all the other complexities that we would otherwise have to worry about. Let me know if you try one out on a future project.