Driving Big Stepper Motors with Arduino

CNC & Machining Workshop
Driving Big Stepper Motors with Arduino


Any stepper motor is great, but the big ones are amazingly impressive. There are numerous stepper drivers dedicated for use with Arduino, but they are generally limited to Nema 17 and Nema 23. Luckily, using larger steppers (Nema 34 in this instance) with Arduino is still easy. Large steppers give you an amazing combination of precision, control and torque that can be useful for anything from home automation to DIY CNC machines. In these two videos, we walk through the setup of the motor, driver, and Arduino.

Part 1: Test Code, Increase the Load

In this video we test code from three different Arduino programs to drive the large NEMA 34 stepper, then increase the load on the shaft to see how the stepper handles the additional weight.

YouTube player

Part 2: Fabricate a Steel Plate

In the next video, we fabricate a test plate in the machine shop to test the motor speed and responsiveness, experimenting with what works and doesn’t. We machine a 0.75″ hole in a ~7LB, 15″ 1/4 inch steel plate, then turn a bushing which will let us secure the plate to the stepper D-shaft.

YouTube player

Circuit, BOM and Code

How to Wire the Circuit

  • microstepping driver ST-M5045
  • Pul+ goes to +5V
  • Pul- goes to Arduino Pin 9
  • Dir+ goes to +5V
  • Dir- goes to to Arduino Pin 8
  • Enable+ to nothing
  • Enable- to nothing

Bill of Materials

  • Arduino
  • 24V power supply
  • ST-M5045 microstepping driver
  • breadboard
  • jumpers
  • Nema 34 motor (but really any stepper that’s correctly sized for the driver)

Code Examples

DownloadDownload the Arduino Sketches
The Nema34_Arduino code examples include using a potentiometer to control the speed as well as a program to test how quickly the motor can stop. Both programs use the AccelStepper Arduino library.

I’m no expert on this subject matter and am anticipating (hoping!) others may have comments with even better hardware or software tips and tricks — but in the meantime there doesn’t seem to be much content on YouTube on driving large steppers with Arduinos, and I’ve had quite a few email inquiries about it, so here it is!

Discuss this article with the rest of the community on our Discord server!
John Saunders

About NYC CNC: In 2005, John was struggling to bring a product to market. Hoping a basic knowledge of machining would help make prototypes and communicate with machine shops, he bought a small milling machine. Almost ten years later, he now runs NYC CNC, where he loves working with customers and machines for job-shop work, design-for-manufacturing and product development. A largely self-taught machinist, he shares many of his endeavors on his successful YouTube channel which focuses on home shop manufacturing. For more information, see www.nyccnc.com.

View more articles by John Saunders