Engineering Notes

Stepper Motor Drivers: Should You Build or Purchase Them?

Written by Johann Tang | Dec 15, 2023 8:11:48 PM

Drivers provide power and logic to various types of motors and are essential components of any motion control application.  This article explains the pros and cons of building a stepper motor driver versus purchasing one.

Stepper motor drivers are not hard to build; especially if they're open-loop.  However, since the driver affects the torque and accuracy performance of the stepper motor, purchasing a driver from a reputable manufacturer can save a lot of time.

 

Let's look at the entire process of developing your own driver.

First, you have to know what you're doing during product planning.  You and your team need the expertise and knowledge to know how to design your product.  Market research is also done at this stage to help understand the market and determine the best product to launch.  Familiarize yourself with the basics, such as stepper motor operation, demanded features, pricing, and market segments.  For example, are you building a 2-phase, 5-phase, unipolar, or bipolar driver?

After deciding what type of driver to build, you will have to figure out the other details.  What's the size?  What power supply will you require?  What features will you include?  Microstepping?  Vibration suppression?  Without nailing down the details and doing some competitive research, you won't know what price to set.

After you figure out what driver you will build, you'll need to choose a microcontroller/driver IC (integrated circuit).  Common choices include ICs like the A4988 from Allegro, DRV8825 from Texas Instruments, L6470 from STMicroelectronics, or specialized microcontrollers with built-in stepper motor control features.

After you have chosen your driver IC, you'll need to source the other driver components, such as all the Cs (capacitors), Rs (resistors), and Ds (diodes) as shown below as well as the PCB, connectors, pins, and FETs.  Follow the datasheet guidelines for the chosen driver IC to ensure proper connections and compatibility.  Also, refer to the datasheet of the stepper motor for specifications about the motor, such as rated current (A/ph) as well as its wiring diagram.

 

Bipolar stepper motor control diagram using STMicro L6470 IC

 

After you have selected the driver components, it's time to purchase them and build the prototype.

However, the work doesn't stop there.  After you build the prototype driver, the driver needs to be programmed, configured, tested, and troubleshooted if necessary.  Does everything work as intended?  For example, is it outputting the correct amount of A/ph current to the motor?  Is it providing the right responses to the PLC command?  Does the motor maintain its torque and accuracy when microstepping? 

At this stage, the prototype driver is tested with stepper motors to ensure the specifications are met without overheating, the driver functions as expected, and it passes heat generation, EMC, reliability, and abnormal conditions tests.  A lot of fine-tuning can also be done in the testing stage to improve the driver design before releasing it to the market.

 

Method

Self Build

Purchase

Steps
  1. Perform market research
  2. Design circuits and board layout
  3. Source components
  4. Build a prototype driver
  5. Test the prototype driver
  6. Repeat if necessary
  7. If successful, start CAD design
  8. Set up a production line or find a contract manufacturer
  1. Purchase the driver by needs
  2. Test the prototype driver
  3. Start CAD design
  4. Start purchase orders for production builds
⏱️ Time saved None 6 months or more!

 

One of the major differences between building your own driver versus purchasing one is the back EMF measurement process.  Back EMF is generated by a motor in motion and can affect the torque output from the motor, so it's important to understand how much of it is being generated and at what speed.  If you're building your own driver, you will need to measure your back EMF and tune the driver.  If you're purchasing both a motor and a driver from the same manufacturer, then you can skip the back EMF measurement process as no tuning is required.

One way to measure the back EMF is to first connect one of the motor phases to an oscilloscope channel, then set the oscilloscope trigger value to the rising or falling edge of the channel and set the threshold value close to zero (few mV above or below zero), then quickly turn the motor shaft (can also be done by hand in some cases).

 

Measuring back EMF of the stepper motor

 

Back EMF is a counter electromotive force to a motor's output torque.  A large back EMF can lower torque and responsiveness from the motor at certain speeds.  Using the data from the back EMF measurement, we would know at what speed the back EMF occurs the most.  By knowing this speed and back EMF data, the manufacturer can compensate the torque where necessary to improve performance.

 

Torque Compensation Mode

 

Back EMF compensation curve (CVD drivers)

 

Using the back EMF data from the motor, a compensation curve is added to the amplitude of the voltage waveform applied to the motor windings in order to compensate for the back EMF variations during acceleration and deceleration.  The compensation curve is approximated by a stacked with a starting slope (ST_SLP) when the speed is lower than a programmable threshold speed (INT_SPEED) and a fine slope (FN_SLP_ACC and FN_SLP_DEC) when the speed is greater than the threshold speed.  To obtain different current values during acceleration and deceleration, 2 different final slope values (AKA compensation curves) can be programmed.  With this torque compensation mode on our CVD drivers, you can always expect the maximum torque out of the motor.  The CVD drivers also have a variety of functions to help lower different types of vibrations.

Since the torque compensation mode requires advanced design knowledge of the motor and driver, only a manufacturer that designs both the motor and the driver would be capable of offering this type of performance optimization.

 

TIP: Save time by purchasing the motor and driver from the same manufacturer

The evaluation and testing phase is where most companies truly realize the value of purchasing a driver instead of building one.  The whole process of developing and building your own driver can take up to about 6 months or more (depending on type of driver).  This includes circuit design, board design, functional testing, lifetime testing, reliability testing, EMC testing, UL testing, software testing, and trial production.  It can take up to 9 months for the full evaluation to be completed and up to 14 months if considering production design, drawing preparation, circuit board inspection...etc.).

By using both a stepper motor and a driver from the same trusted manufacturer, you can be sure that the pairing will exhibit the best performance in torque, vibration, and noise, and a majority of the time devoted to product development and evaluation can be saved for other tasks.

 

Cost Difference

If you design your own driver, you can save a lot of money.  However, there are many types of other "design" costs that should be considered, such as labor, maintenance, design, evaluation, inspection, troubleshooting, and components management.  These are reasons why purchasing a driver is more expensive.

Based on our research, you can save about $64~$105 building your own driver versus purchasing one.  However, that difference in cost can be decreased by negotiating the price with the manufacturer.  By purchasing both the motors and drivers from the same manufacturer, you can often negotiate a better price.

 

You should design and build drivers yourself IF: You should purchase drivers from a manufacturer IF:
  • You have a qualified team, resources, and time
  • Cost is a concern
  • You have the necessary engineering knowledge
  • The product lifetime is long enough to recover the costs for development
  • You don't have time for driver design
  • The time spent on driver circuit inspection and evaluation can be used on other tasks.
  • You care about guaranteed performance
  • You don't have the resources to support the product

 

Another benefit of purchasing a driver is the variations of the product you can simply select from.

  • High torque 
  • Low vibration/noise
  • Competitively priced
  • More time for machine design and builds
  • Guaranteed motor and driver performance consistency

Guaranteed performance can benefit medical applications such as blood analyzers, sample analyzers, peristaltic pumps, and laboratory instruments like microscopes.  Since they're priced more competitively than our other drivers, our CVD drivers are also often chosen for mass production.

Imagine developing a new driver each time you have a new requirement.  Yikes.

To experience what performance is supposed to be like, try the PKP Series stepper motors with the CVD drivers.

Interested in learning more about the features and types of the CVD drivers?  Read more about them in another article.