Maker.io main logo

SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide

12

2025-09-09 | By SparkFun Electronics

Microcontrollers Movement Motors Stepper Wire Jumper Wires Drivers / Controllers Arduino

Courtesy of SparkFun

Guide by QCPete, santaimpersonator

Introduction

The SparkFun ProDriver and Mini Stepper Motor Driver utilize the latest TC78H670FTG stepper motor driver from Toshiba. With a full to 1/128 stepping resolution and two different methods for control (serial communication or clock-in stepping) this is a great option for your next project that requires precise motor control.

The advantage of the ProDriver is that it's solderless, out of the box. With the DC barrel jack and latch pins, the board can be easily powered and connected without any soldering. This is great for projects, where users want to easily swap out components in the event of a failure.

The primary disadvantage of this product is its size. Users may face difficulties trying to squeeze this into smaller projects.

The advantage of the Mini Stepper Motor Driver is in its size. The small footprint of the board, allows users to squeeze it into smaller projects and the pin layout is breadboard compatible to simplify prototyping.

Its primary disadvantage, is that users may need to connect an electrolytic capacitor (>50µF is recommended), externally to its VM and GND pins.

Although both communication methods are included in the Arduino library, the serial command has some unique features. The serial communication allows users to precisely control the phase, torque, mixed decay ratio of each coil, and current limit while the motor is in motion. (In contrast, most stepper motor drivers need an external trimpot that is physically adjusted to control the current output limit.)

Required Materials

The SparkFun ProDriver and Mini Stepper Motor Driver require a few additional items for you to get started. At minimum, users will want an Arduino compatible microcontroller with a USB cable, a power supply, some hookup wire or jumper wires, and a stepper motor (*we recommend a 4-wire, bipolar stepper motor to begin with). You may already have a few of these items, including the USB cable, so feel free to modify your cart based on your needs. Additionally, there are also alternative part options that are available as well.

Recommended Parts

ProDriver

Mini Stepper Motor Driver

Note: For prototyping with the Mini Stepper Motor Driver on a breadboard, we have included some header options; however, it is up to the user to determine the most suitable connection for their project. It is also recommended that users connect an electrolytic capacitor (>50µF is recommended), externally to its VM and GND pins.

Soldering Accessories

While the ProDriver is intended to be solderless, users will need soldering equipment to attach wires and/or headers to the Mini Stepper Motor Driver. Additionally, to modify the jumpers on the ProDriver, users will need a hobby knife.

Alternative Parts

Microcontrollers

Here are a few other Arduino compatible microcontrollers. For a full list of options from our catalog, please visit the Arduino microcontroller product category.

Wiring

Here are a few other wiring options. For a full list of options from our catalog, please visit the wire product category.

Headers

While most users may only need headers for the Mini Stepper Motor Driver, they can also be used with the ProDriver.

Stepper Motors

Here are a few other stepper motor options. For a full list of options from our catalog, please visit the stepper motor product category.

Power Supply

Here are a few other power supply options. For a full list of options from our catalog, please visit the power supply and wall adapter product categories.

Power Accessories

Users may find these accessories useful for the Mini Stepper Motor Driver.

Suggested Reading

We will skip over the more fundamental tutorials like Ohm's Law and What is Electricity?. However, below are a few fundamental tutorials that may help users familiarize themselves with various aspects of this board.

  • How to Solder: Through-Hole Soldering: This tutorial covers everything you need to know about through-hole soldering.
  • Serial Communication: Asynchronous serial communication concepts: packets, signal levels, baud rates, UARTs and more!
  • Installing an Arduino Library: How do I install a custom Arduino library? It's easy! This tutorial will go over how to install an Arduino library using the Arduino Library Manager. For libraries not linked with the Arduino IDE, we will also go over manually installing an Arduino library.
  • How to Power a Project: A tutorial to help figure out the power requirements of your project.
  • Working with Wire: How to strip, crimp, and work with wire.
  • Installing Arduino IDE: A step-by-step guide to installing and testing the Arduino software on Windows, Mac, and Linux.
  • Logic Levels: Learn the difference between 3.3V and 5V devices and logic levels.
  • Motors and Selecting the Right One: Learn all about different kinds of motors and how they operate.

Hardware Overview - ProDriver

Board Dimensions

Below, is a basic drawing of the board dimensions and component layout for the SparkFun ProDriver. For more detailed measurements, users should download and open the Eagle files from the GitHub repository or from the Documents tab on the product page.

  • The ProDriver includes four mounting holes that are compatible with 4-40 screws, standoffs, and other related hardware.
  • There are four 5mm latch pin terminals; a 2-pin terminal for power and three 4-pin terminals for the control pins and motor connections.
  • There is a 5.5 x 2.1 mm DC barrel jack as another power connection.
  • All the PTH breakout pins have a .10" spacing for headers or to solder more permanent connections.

SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide SparkFun ProDriver board dimensions.

For more details on the DC barrel jack, 2-pin latch terminal, and 4-pin latch terminal's dimensions, check out the documentation on their respective product pages.

Power

To power the ProDriver, users will need a power supply that has an output of 3.3 - 16V and can source at least 2A. We have provided three different methods for users to connect their power supply to the ProDriver:

  • A 5.5 x 2.1 mm DC barrel jack, which is simple and the easiest to use.
  • A latch pin terminal that is similar to a screw terminal, except toolless.
  • A set of PTH points (VM and GND) for users who wish to, more permanently, solder their power connections.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The available power connections and status LED on the ProDriver.

Users opting to use the DC barrel jack may find some of these accessories useful:

Note: Do not connect or disconnect the motor while the ProDriver is powered; as it may damage the motor driver IC.

Power Status LED

A power LED status indicator is also provided on the ProDriver. The LED turns on once the motor power supply is connected and the attached voltage regulator outputs 3.3V. The LED can be disabled by cutting the LED jumper.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The power LED and LED jumper on the ProDriver.

3.3V PTH Pin

A 3.3V PTH connection is broken out amongst the other pin connections. It is connected to the 3.3V output of the LM117 voltage regulator, which is powered by the motor power supply input.

SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The 3V3 PTH pin on the ProDriver.

Power Protection

The ProDriver includes a safety features to protect the board and power supply. There is a protection diode to prevent reverse current and a thermal fuse to prevent current from being overdrawn.

Note: We have provided bypass jumpers for more advance users to circumvent these safety features; however, we recommend NOT modifying them, unless you absolutely know what you are doing. Users can easily damage or destroy their ProDriver and/or power supply by modifying the jumpers.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The D1 BP and PTC BP jumpers on the ProDriver.

Pin Connections

The ProDriver was designed with latch pins to provide a completely solderless connection to get users up and running faster. We have also broken out those same connections with PTH points, for a more permanent installation. (*These latch pins are great! Just as secure as a screw pin terminal, but without the hassle.)

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The control and motor connections on the ProDriver.

More details on these pins are laid out in the following sections below, excluding the power pins. Details for the 3V3 and VM pins are described in the power section above.

Latch Terminals

When working with the latch terminals, there are two things to keep in mind. These should be fairly obvious, once you take a closer look at the jaws or clamping mechanism:

1. If you look closely at the closed jaws or clamping mechanism, you will notice a small gap. Just like screw terminals, there is a minimum and maximum wire thickness for the jaws to physically clamp onto wires.

  • On some stepper motors, you may need to tin (i.e., add a little solder) the wire leads and thicken the wires just enough to be clamped.

2. Make sure you are inserting the wire between the jaws.

  • Looking to the right end of the picture, below, on the latch partially closed, it should be noted that is possible to accidentally insert a wire above the jaws.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The latching mechanism.

Input Control Pins

The input control pins are used to interface directly with the TC78H670FTG motor driver. The ProDriver was designed with latch pins to provide a completely solderless connection to get users up and running faster. We have also broken out those same connections with PTH, for a more permanent installation. (*These latch pins are great! Just as secure as a screw pin terminal, but without the hassle.)

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The input control connections on the ProDriver.

For more details on the functions of the pins listed below, check out the datasheet for the TC78H670FTG.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide

Note: The 3V3 pin is connected to the 3.3V output of the LM117 voltage regulator, which is powered by the motor power supply input. The 3.3V output is utilized as a supply voltage for the voltage divider that controls the maximum drive current through the VREF pin. The supply voltage is also utilized as an I/O reference voltage through the pull-up resistors connected to the MODE0, MODE1, MODE2, and MODE3 pins.

Note: From the datasheet, the TC78H670FTG is compatible with 3.3 and 5V logic levels on the control pins. The electrical specifications for the input voltage listed at a 5.5V maximum, with a 1.5 and 0.7V threshold on the high and low signals respectively. For more details, check out page 31 of the datasheet and the schematic for the ProDriver.

Output Channel Pins

The output channel pins are used to drive the coils of the stepper motor. The paired outputs are connected to the two H-Bridges of the motor driver.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The output motor driver channels on the ProDriver.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide

Useful Resources on Stepper Motors:

For basic information on stepper motors, users should check out our Motors and Selecting the Right One tutorial. Additionally, we have included a few YouTube videos, below, that help explain the theory of the stepping functionality behind stepper motors. Users who have stepper motors with more than four wires, may also find this article enlightening.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide

Motors and Selecting the Right One:

Learn all about different kinds of motors and how they operate.

An introductory video on stepper motor basics. Video courtesy of LearnEngineering.

An introductory video on stepper motor functionality. Video courtesy of GreatScott!.

A more in-depth video on stepper motor functionality. Video courtesy of Nanotec.

TC78H670FTG Motor Driver

The ProDriver is driven by the Toshiba TC78H670FTG stepper motor driver IC. The TC78H670FTG is a 2-phase stepping motor driver, intended for bipolar stepper motors. The chip features two H-Bridge motor drivers that provide users with step size resolutions ranging from full steps, half steps, and micro-stepping down to a 1/128 of a step. The TC78H670FTG can be controlled with the standard clock-in stepping, but it also has an additional option for serial communication.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The Toshiba TC78H670FTG stepper motor driver IC on the ProDriver.

Some of the advantages to the TC78H670FTG over a simple H-Bridge, include a standby function, selectable mixed decay, error detect flag output, clock- in stepping or serial communication control, software control of the current output, and a minimal parts bill of materials (BOM). The serial command method is especially unique because it allows users to precisely control the phase, torque, current limit and mixed decay ratio of each coil during the motor operation. Additionally, while in most stepper motor driver ICs, an external trimpot is required to set the current limit; however, with the ProDriver, a simple serial command can be utilized to precisely adjust the current limit.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide

Enable/Error Pin Functionality

On the ProDriver the EN and ERR pins are broken out separately; however, these connections are tied to the same pin on the TC78H670FTG, which operates as a control input and output for error flags. A typical application of the EN/ERR pin with a microcontroller is displayed below.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The EN/ERR pin application from the datasheet.

This duality allows the TC78H670FTG to give users control of the power to the motor drive channels; while also providing autonomous functionality to disable its own power, when an error flag is triggered and simultaneously, provide an output indicator on the same pin.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The motor enable control switch and the connected EN and ERR pins.

H-Bridge Power Control

The EN pin controls the ON/OFF operation of the H-Bridges to the motor outputs. When the EN pin is low, all of the H-Bridge MOSFETs turn off and become high impedance (Hi-Z). Likewise, when the EN pin is set high, the motor channel outputs will be driven normally, based on the stepping controls.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The EN pin functionality from the datasheet.

Note: Users should avoiding motor operation during any VM power-on and power-off cycles by setting the EN pin low to disable the motor channel outputs. The EN pin can be set high after the power supply reaches the target voltage and becomes stable.

Motor Enable Switch

We have broken out EN pin control to a DPST switch. The switch allows users to easily disable power to the motor channels without connecting additional hardware.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The motor enable control switch connected to the EN pin.

Error Detection

The TC78H670FTG has a built-in functionality to detect thermal shutdown (TSD), over current (ISD), or motor load open (OPD) connection issues. When these errors are triggered, the ERR pin is pulled low. In a normal operating status, the level of ERR pin is equal to the EN control voltage from outside. After the error is triggered, the error flag can be released by reconnecting the VM power or by setting the device to standby.

Standby Function

The standby pin for the TC78H670FTG, is used to set up the control method for the motor driver. When the standby pin is low, the motor is released from any control methods and is in standby. On the up edge, of when the standby pin is set high, the motor driver is configured for clock-in stepping or serial communication control based on the input state of the MODE0, MODE1, MODE2, and MODE3 pins.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The configuration settings for the control methods, when the standby pin is set HIGH. Pulled from the datasheet.

Control Methods

There are two different communication or control methods for users to interface with the ProDriver. The control method is configured by the input state of the MODE0 - MODE3 pins, when the TC78H670FTG is released from standby mode. The TC78H670FTG features the common clock-in stepping method and a more unique serial communication control.

Serial Communication Control

This method is unique to the TC78H670FTG Toshiba motor driver. The control logic allows users to manipulate registers through serial communication, which provide control over:

  • The motor rotation direction (or polarity)
  • Maximum current output, torque
  • OPD error detection
  • Selectable mixed decay (used to finely tune drive current to the motor)
  • Driving the motor rotation (full steps only)

(*For more details on the configuration options for the available registers, refer to Section 9 of the datasheet.)

Clock-In Stepping Control

This is a standard method for controlling most stepper motor drivers. By default, the ProDriver is configured for clock-in stepping in the fixed mode with a step resolution of 1/128 of a step.

  • Step Resolution Modes

With the clock-in control method, users can set up how the step resolution is configured. TC78H670FTG has the two modes for the step resolution settings, a variable mode and a fixed mode. These modes are also initiated by the input states of the MODE0 - MODE3 pins after releasing the standby pin, when the clock-in control method is configured. Below, is a table from the datasheet of the step resolution settings.

  • Variable Mode: The motor can be started with full step resolution and the step resolution can be changed while the motor is operating.
  • Fixed Mode: Once initiated, the step resolution is configured and maintained during the motor operation.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The step resolution configuration settings for the clock-in method, from the datasheet.

Once clock-in stepping and the step resolution are configured together. The TC78H670FTG awaits for the up-edge of the clock (CLK) signal, for the MODE2 pin, to before it shifts the motor’s electrical angle per step. The MODE3 pin, controls the clockwise/counter-clockwise (CW-CCW) rotation direction of the motor for clock-in stepping.

  • When the MODE3 pin is low, the motor is driven with a counter-clockwise (CCW) operation.
  • Likewise, when the MODE3 pin is high, the motor is driven with a clockwise (CW) operation.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The MODE3 (CLK) and MODE2 (CW-CCW) pin functionality for clock-in stepping, from the datasheet.

Step Resolution Transition

In variable mode, users can transition between different ranges of step size resolutions with the MODE0 and MODE1 pins. To enable the transition between step size resolutions, the MODE1 (SET_EN) pin must be high, when the TC78H670FTG is in variable mode for clock-in stepping. The MODE0 (UP-DW) pin is used to control the direction of the step size transition.

  • When the MODE0 pin is low, the step size resolution is increased to a smaller step size (i.e., from 1/4 to 1/8 of a step).
  • Likewise, when the MODE0 pin is high, the step size resolution is decreased to a larger step size (i.e., from 1/8 to 1/4 of a step).

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The MODE1 (SET_EN) and MODE0 (UP-DW) pin functionality for transitioning the step size resolution during clock-in stepping, from the datasheet.

The transition between step size resolutions occurs, synchronously with the up-edge of the next clock signal. It should also be noted, that the transition can only change the step size resolution one increment at a time (i.e., it takes three clock cycles to transition from a 1/4 step size, down three sizes, to a 1/32 step size resolution).

Maximum Drive Current

The maximum drive current for the ProDriver is limited to 2A (max). However, the peak output current can be controlled with two different methods.

Hardware: The first method controls the drive current through the reference voltage (Vref). The reference voltage, can be configured utilizing the external potentiometer or VREF breakout pin.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The potentiometer and VREF pin that can be utilized to control the maximum drive current.

For the hardware control, the maximum drive current can be calculated with the following equation:

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide

Note: If the stepper motor movements are jittery, try increasing the drive current with the potentiometer.

Software: The second method controls the drive current through software. Utilizing serial communication to the TC78H670FTG, the registers can be configured to limit the maximum drive current. The maximum drive current can be calculated with the following equation, based on the configured registers:

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide

Chopping Current Drive

Chopping is a technique that is used to control the average current per phase, by rapidly switching a relatively high output voltage to the motor coils, on and off. This technique improves the current rise time in the motor and improves the torque at high speeds, while maintaining a high efficiency in the constant current drive.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide A table with the resistor values used to modify the OSCM oscillation and chopping frequency, from the datasheet.

On the TC78H670FTG, the OSCM oscillation frequency (fOSCM) and chopping frequency (fchop) are adjusted with an external resistor (ROSC), connected to the OSCM pin. By default, a 47 kΩ resistor is utilized. However, users can modify the ROSC resistor value by cutting the OSCM BP jumper and soldering a resistor to the provided OSCM PTH connections.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The OSCM BP jumper and OSCM PTH points on the ProDriver.

Heat Sink

There is a thermal ground plane on the bottom of the board available for users to attach a heat sink(s) with some thermal tape, if necessary. However, after several tests by the engineer for this product, we have determined that for most use cases, a heat sink probably won't be necessary.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The thermal ground planes on the bottom of the ProDriver.

Hardware Overview - Mini Stepper Motor Driver

Board Dimensions

Below, are basic drawings of the board dimensions and component layout for the SparkFun Mini Stepper Motor Driver. For more detailed measurements, users should download and open the KiCad files from the GitHub repository or from the Documents tab on the product page. It should be noted that the layout of the PTH breakout pins is compatible with breadboards and that the pins on the edge of the board, have a .10" spacing for headers (or to solder more permanent connections).

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide SparkFun Mini Stepper Motor Driver board dimensions.

Power

Unlike the ProDriver, the Mini Stepper Motor Driver requires two power inputs:

  • 3V3 - Supplies the I/O voltage for the pull-up resistors on the M0 - M3 pins. Additionally, it is connected to a voltage divider that provides the reference voltage (VREF) for the drive current, limitation.
  • VM - Powers the TC78H670FTG motor driver IC and supplies the output power for driving a bipolar stepper motor (or DC motors).

I/O Voltage Level

The 3.3V PTH connection provides the I/O voltage level for the pull-up resistors on the M0 - M3 pins. It is also used for the hardware configuration for the drive current, limitation on the TC78H670FTG.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The 3V3 pin on the Mini Stepper Motor Driver.

Note: While the TC78H670FTG is compatible with I/O voltages from 1.5-5.5V, the voltage divider that is configures the drive current, also utilizes this connection. Therefore, precautionary steps should be taken because the voltage divider provides the reference voltage (VREF), which has a maximum input range of 1.8V and the resistor combination of the voltage divider, was calculated with the assumption that 3.3V would be provided.

Motor

Note: Do not connect or disconnect the motor while the Mini Stepper Motor Driver is powered; as it may damage the motor driver IC.

In order to drive a motor, users will need a power supply with an voltage between 3.3 - 16V and can source at least 2A. Users will connect their power supply to the VM and GND pins on the Mini Stepper Motor Driver.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The VM and GND pins on the Mini Stepper Motor Driver.

Note: For the Mini Stepper Motor Driver, we recommend that users attach an electrolytic capacitor (>50µF) between the VM and GND pins.

Users that have a power supply with a DC barrel jack, may find some of these accessories useful:

Pin Connections

The Mini Stepper Motor Driver was designed with PTH breakout pins in a compact layout that is compatible with breadboards.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The PTH pins on the Mini Stepper Motor Driver.

More details on these pins are laid out in the following sections below, excluding the power pins. Details for the 3V3 and VM pins are described in the power section above.

Input Control Pins

The input control pins are used to interface directly with the TC78H670FTG motor driver. For more details on the functions of the pins listed below, check out the datasheet for the TC78H670FTG.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The input control connections on the Mini Stepper Motor Driver.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide

⚡ Note: From the datasheet, the TC78H670FTG is compatible with 3.3 and 5V logic levels on the control pins. The electrical specifications for the input voltage listed at a 5.5V maximum, with a 1.5 and 0.7V threshold on the high and low signals respectively. For more details, check out page 31 of the datasheet and the schematic for the Mini Stepper Motor Driver.

Note: While the TC78H670FTG is compatible with I/O voltages from 1.5-5.5V, the voltage divider that is configures the drive current, also utilizes this connection. Therefore, precautionary steps should be taken because the voltage divider provides the reference voltage (VREF), which has a maximum input range of 1.8V and the resistor combination of the voltage divider, was calculated with the assumption that 3.3V would be provided.

Output Channel Pins

The output channel pins are used to drive the coils of the stepper motor. The paired outputs are connected to the two H-Bridges of the motor driver.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The output motor driver channels on the Mini Stepper Motor Driver.

Note: Do not connect or disconnect the motor while the Mini Stepper Motor Driver is powered; as it may damage the motor driver IC.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide

Useful Resources on Stepper Motors:

For basic information on stepper motors, users should check out our Motors and Selecting the Right One tutorial. Additionally, we have included a few YouTube videos, below, that help explain the theory of the stepping functionality behind stepper motors. Users who have stepper motors with more than four wires, may also find this article enlightening.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide

Motors and Selecting the Right One:

Learn all about different kinds of motors and how they operate.

An introductory video on stepper motor basics. Video courtesy of LearnEngineering.

An introductory video on stepper motor functionality. Video courtesy of GreatScott!.

A more in-depth video on stepper motor functionality. Video courtesy of Nanotec.

TC78H670FTG Motor Driver

The Mini Stepper Motor Driver operates with the Toshiba TC78H670FTG stepper motor driver. The TC78H670FTG is a 2-phase stepping motor driver, intended for bipolar stepper motors. The chip features two H-Bridge motor drivers that provide users with step size resolutions ranging from full steps, half steps, and micro-stepping down to a 1/128 of a step. The TC78H670FTG can be controlled with the standard clock-in stepping, but it also has an additional option for serial communication.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The Toshiba TC78H670FTG stepper motor driver IC on the Mini Stepper Motor Driver.

Some of the advantages to the TC78H670FTG over a simple H-Bridge, include a standby function, selectable mixed decay, error detect flag output, clock- in stepping or serial communication control, software control of the current output, and a minimal parts bill of materials (BOM). The serial command method is especially unique because it allows users to precisely control the phase, torque, current limit and mixed decay ratio of each coil during the motor operation. Additionally, while in most stepper motor driver ICs, an external trimpot is required to set the current limit; however, with the Mini Stepper Motor Driver, a simple serial command can be utilized to precisely adjust the current limit.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide

Enable/Error Pin Functionality

On the Mini Stepper Motor Driver the EN and ERR pins are broken out separately; however, these connections are tied to the same pin on the TC78H670FTG, which operates as a control input and output for error flags. A typical application of the EN/ERR pin with a microcontroller is displayed below.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The EN/ERR pin application from the datasheet.

This duality allows the TC78H670FTG to give users control of the power to the motor drive channels; while also providing autonomous functionality to disable its own power, when an error flag is triggered and simultaneously, provide an output indicator on the same pin.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The EN and ERR pins on the Mini Stepper Motor Driver.

H-Bridge Power Control

The EN pin controls the ON/OFF operation of the H-Bridges to the motor outputs. When the EN pin is low, all of the H-Bridge MOSFETs turn off and become high impedance (Hi-Z). Likewise, when the EN pin is set high, the motor channel outputs will be driven normally, based on the stepping controls.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The EN pin functionality from the datasheet.

Note: Users should avoiding motor operation during any VM power-on and power-off cycles by setting the EN pin low to disable the motor channel outputs. The EN pin can be set high after the power supply reaches the target voltage and becomes stable.

Error Detection

The TC78H670FTG has a built-in functionality to detect thermal shutdown (TSD), over current (ISD), or motor load open (OPD) connection issues. When these errors are triggered, the ERR pin is pulled low. In a normal operating status, the level of ERR pin is equal to the EN control voltage from outside. After the error is triggered, the error flag can be released by reconnecting the VM power or by setting the device to standby.

Standby Function

The standby pin for the TC78H670FTG, is used to set up the control method for the motor driver. When the standby pin is low, the motor is released from any control methods and is in standby. On the up edge, of when the standby pin is set high, the motor driver is configured for clock-in stepping or serial communication control based on the input state of the M0, M1, M2, and M3 pins.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The configuration settings for the control methods, when the standby pin is set HIGH. Pulled from the datasheet.

Control Methods

There are two different communication or control methods for users to interface with the Mini Stepper Motor Driver. The control method is configured by the input state of the M0 - M3 pins, when the TC78H670FTG is released from standby mode. The TC78H670FTG features the common clock-in stepping method and a more unique serial communication control.

Serial Communication Control

This method is unique to the TC78H670FTG Toshiba motor driver. The control logic allows users to manipulate registers through serial communication, which provide control over:

  • The motor rotation direction (or polarity)
  • Maximum current output, torque
  • OPD error detection
  • Selectable mixed decay (used to finely tune drive current to the motor)
  • Driving the motor rotation (full steps only)

(*For more details on the configuration options for the available registers, refer to Section 9 of the datasheet.)

Clock-In Stepping Control

This is a standard method for controlling most stepper motor drivers. By default, the Mini Stepper Motor Driver is configured for clock-in stepping in the fixed mode with a step resolution of 1/128 of a step.

  • Step Resolution Modes

With the clock-in control method, users can set up how the step resolution is configured. TC78H670FTG has the two modes for the step resolution settings, a variable mode and a fixed mode. These modes are also initiated by the input states of the M0 - M3 pins after releasing the standby pin, when the clock-in control method is configured. Below, is a table from the datasheet of the step resolution settings.

  • Variable Mode: The motor can be started with full step resolution and the step resolution can be changed while the motor is operating.
  • Fixed Mode: Once initiated, the step resolution is configured and maintained during the motor operation.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The step resolution configuration settings for the clock-in method, from the datasheet.

Once clock-in stepping and the step resolution are configured together. The TC78H670FTG awaits for the up-edge of the clock (CLK) signal, for the STEP/M2 pin, to before it shifts the motor’s electrical angle per step. The DIR/M3 pin, controls the clockwise/counter-clockwise (CW-CCW) rotation direction of the motor for clock-in stepping.

  • When the DIR/M3 pin is low, the motor is driven with a counter-clockwise (CCW) operation.
  • Likewise, when the DIR/M3 pin is high, the motor is driven with a clockwise (CW) operation.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The DIR/M3 (CLK) and STEP/M2 (CW-CCW) pin functionality for clock-in stepping, from the datasheet.

Step Resolution Transition

In variable mode, users can transition between different ranges of step size resolutions with the M0 and M1 pins. To enable the transition between step size resolutions, the M1 (SET_EN) pin must be high, when the TC78H670FTG is in variable mode for clock-in stepping. The M0 (UP-DW) pin is used to control the direction of the step size transition.

  • When the M0 pin is low, the step size resolution is increased to a smaller step size (i.e., from 1/4 to 1/8 of a step).
  • Likewise, when the M0 pin is high, the step size resolution is decreased to a larger step size (i.e., from 1/8 to 1/4 of a step).

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The M1 (SET_EN) and M0 (UP-DW) pin functionality for transitioning the step size resolution during clock-in stepping, from the datasheet.

The transition between step size resolutions occurs, synchronously with the up-edge of the next clock signal. It should also be noted, that the transition can only change the step size resolution one increment at a time (i.e., it takes three clock cycles to transition from a 1/4 step size, down three sizes, to a 1/32 step size resolution).

Maximum Drive Current

The maximum drive current for the Mini Stepper Motor Driver is limited to 2A (max). However, the peak output current can be controlled with two different methods.

Hardware: The first method controls the drive current through the reference voltage (Vref). The reference voltage, can be configured utilizing the external potentiometer or VREF breakout pin.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The potentiometer and VREF pin that can be utilized to control the maximum drive current.

For the hardware control, the maximum drive current can be calculated with the following equation:

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide

Note: If the stepper motor movements are jittery, try increasing the drive current with the potentiometer.

Software: The second method controls the drive current through software. Utilizing serial communication to the TC78H670FTG, the registers can be configured to limit the maximum drive current. The maximum drive current can be calculated with the following equation, based on the configured registers:

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide

Chopping Current Drive

Chopping is a technique that is used to control the average current per phase, by rapidly switching a relatively high output voltage to the motor coils, on and off. This technique improves the current rise time in the motor and improves the torque at high speeds, while maintaining a high efficiency in the constant current drive.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide A table with the resistor values used to modify the OSCM oscillation and chopping frequency, from the datasheet.

On the TC78H670FTG, the OSCM oscillation frequency (fOSCM) and chopping frequency (fchop) are adjusted with an external resistor (ROSC), connected to the OSCM pin. On the Mini Stepper Motor Driver, a 47 kΩ resistor is utilized.

Hardware Assembly

Hardware Connections

Latch Terminals

When working with the latch terminals of the ProDriver, users should be aware of the following, about the clamping mechanism:

1. If you look closely at the closed jaws or clamping mechanism, you will notice a small gap. Just like screw terminals, there is a minimum and maximum wire thickness for the jaws to physically clamp onto wires.

  • On some stepper motors, you may need to tin (i.e., add a little solder) the wire leads and thicken the wires just enough to be clamped.

2. Make sure you are inserting the wire between the jaws.

  • Looking to the right end of the picture, below, on the latch partially closed, it should be noted that is possible to accidentally insert a wire above the jaws.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The latching mechanism on the ProDriver.

Headers

When prototyping, users may consider soldering headers to the ProDriver or Mini Stepper Motor Driver. Most users may consider solder headers to the Mini Stepper Motor Driver, as the pin layout is compatible with breadboards.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide Soldering headers to the Mini Stepper Motor Driver.

When connecting Mini Stepper Motor Drivers in parallel, users may find it more convenient to utilize our stackable headers.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide Using stackable headers on the Mini Stepper Motor Driver.

Hookup Wires

For a more permanent connection, user may choose to solder their connections directly to the ProDriver or Mini Stepper Motor Driver.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide Soldering headers to the Mini Stepper Motor Driver.

Power Connections

REMEMBER to disconnect the power before connecting/disconnecting your motor.

On the ProDriver, we recommend one of our wall adapter, power supplies to connect to the DC barrel jack. Otherwise, users can utilize the (VM and GND) PTH or latch pins to attach an external power supply.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The power connected to the ProDriver.

On the Mini Stepper Motor Driver, users can connect an external power supply to the VM and GND PTH pins. When prototyping with a breadboard, we recommend using either the regulated power from a development board or utilizing a barrel jack adapter.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide Powering the Mini Stepper Motor Driver with a RedBoard.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide Powering the Mini Stepper Motor Driver from a DC barrel jack adapter.

Note: For the Mini Stepper Motor Driver, we recommend that users attach an electrolytic capacitor (>50µF) between the VM and GND pins.

Input Control Pin Connections

The input control pins need to be connected to a microcontroller. To utilize the Arduino examples below, without modifying the code, we recommend using the SparkFun RedBoard (Qwiic) as the microcontroller. Use the table and image below to hookup a SparkFun RedBoard to the ProDriver or Mini Stepper Motor Driver with some jumper wires.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide Connecting a SparkFun RedBoard to a ProDriver or Mini Stepper Motor Driver.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide

Note: Don't forget to ground loop the motor driver to the RedBoard as illustrated in the image above.

Parallel Operation: When operating multiple motor drivers in parallel, all of the pin connections to the microcontroller are shared, with the exception of the MODE 1/M1 pin. Each motor driver board requires a separate pin on the microcontroller to operate their MODE 1/M1 pin. (See the example below)

Motor Channel Output Connections

The output channels for the H-Bridges need to be connected to the stepper motor. Users need to hookup the wire pairs for each coil to individual channels. However, the polarity of the connections isn't very important as the direction of the motor rotation can be controlled in software. For the recommended stepper motor, use the table and image below to hookup the motor to the ProDriver or Mini Stepper Motor Driver.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide Connecting a stepper motor to a ProDriver or Mini Stepper Motor Driver.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide

Note: Do not connect or disconnect the motor while the motor driver is powered; as it may damage the TC78H670FTG IC.

Motor Coil Pairs

In order to determine the wire pairs for each coil on their stepper motor, users can refer to the datasheet for the stepper motor. Often, the relevant information is indicated as shown in the diagram below.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide Coil wire diagram from the datasheet our NEMA 16 Stepper Motor with Cable.

For a 4-wire motor, users can alternatively use a multimeter to determine the wire pairs for the coils. This is done by comparing the resistance of one wire and against each of the three remaining wires. Whichever wire shows the lowest resistance against the first wire is the pair mate. The remaining two wires should show similar resistance between the two of them.

Examples

Single Stepper Motor

Utilizing the instructions above, an example of the standard assembly used for most of the examples in the Arduino library, is shown below.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The SparkFun RedBoard connected to a ProDriver and stepper motor.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The SparkFun RedBoard connected to a Mini Stepper Motor Driver and stepper motor.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide

Multiple Stepper Motors

For users interested in utilizing multiple stepper motors, we have provided an additional Arduino example for hooking up two Mini Stepper Motor Driver(s) and/or ProDriver(s) in parallel. Use the table and image below to hookup the SparkFun RedBoard to the two motor drivers with some jumper wires.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide Two ProDrivers

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide Two Mini Stepper Motor Drivers

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide Combination

The SparkFun RedBoard connected to two motor driver boards.

Note: All of the pin connections to the motor drivers are shared, in parallel from the RedBoard; with the exception of the MODE 1/M1 pin. Each motor driver will utilizes a different pin on the RedBoard, for their MODE 1/M1 pin.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide

Note: By connecting the motor drivers in parallel, they will need to be operated sequentially; they cannot be controlled simultaneously.

Arduino Library Overview

Note: This example assumes you are using the latest version of the Arduino IDE on your desktop. If this is your first time using Arduino, please review our tutorial on installing the Arduino IDE. If you have not previously installed an Arduino library, please check out our installation guide.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide

Installing an Arduino Library

How do I install a custom Arduino library? It's easy! This tutorial will go over how to install an Arduino library using the Arduino Library Manager. For libraries not linked with the Arduino IDE, we will also go over manually installing an Arduino library.

We've written a library to easily get setup and control stepper motors with the SparkFun ProDriver. However, before we dive into spinning motors, let's take a closer look at the available functions in the library. You can install this library through the Arduino Library Manager. Search for SparkFun ProDriver TC78H670FTG Arduino Library and you should be able to install the latest version. If you prefer manually downloading the libraries from the GitHub repository, you can grab them here:

Download the SparkFun ProDriver Library (ZIP)

Let's get started by looking at the functions that set up the SparkFun ProDriver:

Class

In the global scope, construct your device object (such as myProDriver) without arguments.

PRODRIVER myProDriver;

Functions

Below, are the available methods, which can be called:

  • .begin() - Initializes the motor driver with basic settings. It also returns false if error is detected (i.e., ERR pin is pulled low by the IC).
  • .pinSetup() - Configures pins as inputs/outputs as needed, and to default settings (disabled, standby) .enable() - Enables power to the motor output channels. .disable() - Disables power to the motor output channels.
  • .controlModeSelect() - This configures the IC into the mode specified by the settings.controlMode variable.
  • .errorStat() - This function checks the status of the ERR output, which is triggered for thermal shutdown (TSD), overcurrent (ISD), or motor load open (OPD) errors.
  • .step(steps, direction, clockDelay) - Utilizes the CLOCKIN mode to step the motor a set amount of steps in a specified direction.
  • .changeStepResolution(resolution) - Used to change the step resolution with clock-in stepping.
  • sendSerialCommand() - With the serial communication method, this function sends a serial command, if one of the settings for the serial control is modified.
    • Note, one of the settings (listed below) must be changed prior to calling this function, for a new command to be sent.
      • settings.phaseA
      • settings.phaseB
      • settings.currentLimA
      • settings.currentLimB
      • settings.torque
      • settings.openDetection
      • settings.mixedDecayA
      • settings.mixedDecayB
      • settings.phasePosition
  • .stepSerial(steps, direction, stepDelay) - Used with the serial communication method, to rotate the motor for a specified number of steps and direction.
    • Note, this function utilizes full steps.
  • stepSerialSingle(direction) - Used with the serial communication method, to rotate the motor with a single step in a specified direction.
  • .setTorque(newTorque) - A wrapper function to set desired torque setting.
    • Note, the changes will not take effect on the motor driver until sendSerialCommand() is called.
    • Valid torque options include the following:
      • PRODRIVER_TRQ_100 (default set in constructor)
      • PRODRIVER_TRQ_75
      • PRODRIVER_TRQ_50
      • PRODRIVER_TRQ_25
  • .setCurrentLimit(currentLimit) - A wrapper function to set desired current limit setting.
    • Note, this applies the current limit on both coils (A and B), is a percentage of VREF, and affected by the torque setting. The changes will not take effect on the motor driver until sendSerialCommand() is called.
      • currentLimit (10-bit value: 0-1023)

Arduino Examples

Note: Most of the examples in the Arduino library will use a standard setup for the ProDriver or Mini Stepper Motor Driver (shown below), with the exception of the Example8_SerialMultiMotor demo code.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The SparkFun RedBoard connected to a ProDriver and stepper motor.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The SparkFun RedBoard connected to a Mini Stepper Motor Driver and stepper motor.

Example 1: Basic Motor Control

The first example in the Arduino library is perfect for demonstrating the basic functionality of the Mini Stepper Motor Driver/ProDriver. In the Arduino IDE, the example file can be found in the File > Examples > SparkFun ProDriver TC78H670FTG Arduino Library > Example1_Basic drop down menu. The example, utilizes the default configuration of the Arduino library and steps the motor utilizing clock-in control.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide Operation of the ProDriver utilizing the Example1_Basic example code.

Example 8: Serial Control - Multiple Motors

Example 8 demonstrates the operation of multiple motor drivers through a parallel connection. In the Arduino IDE, the example file can be found in the File > Examples > SparkFun ProDriver TC78H670FTG Arduino Library > Example8_SerialMultiMotor drop down menu. The example, configures the microcontroller to sequentially operate multiple ProDrivers.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide Operation of two ProDrivers utilizing the Example8_SerialMultiMotor example code.

Troubleshooting

For users looking for technical assistance, click on the link. There you will find, basic troubleshooting tips and instructions to get started with posting a topic in our forums. Our technical support team will do their best to assist you.

Motor Misstep

If users experience a jittery response from their motor or their motor missteps, try increasing the drive current with the potentiometer.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide The potentiometer and VREF pin that can be utilized to control the maximum drive current.

By twisting the potentiometer with a screwdriver, users can configure the total drive current from 0A to 2A.

Image of SparkFun ProDriver and Mini Stepper Motor Driver Hookup Guide Manipulating the potentiometer on the Mini Stepper Motor Driver with a screwdriver.

Resources and Going Further

For more on the SparkFun ProDriver and Mini Stepper Motor Driver (TC78H670FTG), check out the links below:

ProDriver

Mini Stepper Motor Driver

General Information

製造商零件編號 16836
EVAL BOARD FOR TC78H670FTG
SparkFun Electronics
製造商零件編號 25167
MINI STEPPER MOTOR DRIVER
SparkFun Electronics
製造商零件編號 15123
REDBOARD QWIIC ATMEGA328 EVAL BD
SparkFun Electronics
製造商零件編號 10846
STEPPER MOTOR HYBRID BIPOLAR 3V
SparkFun Electronics
製造商零件編號 15312
AC/DC WALL MOUNT ADAPTER 5V 10W
SparkFun Electronics
製造商零件編號 10215
USB MICRO-B CABLE - 6 FOOT
SparkFun Electronics
製造商零件編號 11709
JUMPER M/M 6" 20AWG 10PCS
SparkFun Electronics
製造商零件編號 10288
ADAPT TERM BL 2POS TO 2.1MM JCK
SparkFun Electronics
製造商零件編號 00116
BREAK AWAY HEAD
SparkFun Electronics
製造商零件編號 11417
ARDUINO STACKABLE HEADER KIT - R
SparkFun Electronics
製造商零件編號 12043
BREADBOARD TERM STRIP 1.85X1.38"
SparkFun Electronics
製造商零件編號 09194
JUMPER F TO F/M TO M 6" 100PCS
SparkFun Electronics
製造商零件編號 24063
PINECIL SOLDERING IRON KIT
SparkFun Electronics
製造商零件編號 09325
SOLDER LEAD FREE - 100-GRAM SPOO
SparkFun Electronics
製造商零件編號 CQ4LF
FLUX - NO CLEAN PEN 0.34 OZ
Chip Quik Inc.
製造商零件編號 09200
HOBBY KNIFE
SparkFun Electronics
製造商零件編號 22265
SPARKFUN BEGINNER TOOL KIT
SparkFun Electronics
製造商零件編號 15484
RF TXRX MOD BT TH SMD
SparkFun Electronics
製造商零件編號 11113
ARDUINO PRO MINI 328 5V/16MHZ
SparkFun Electronics
製造商零件編號 11114
ARDUINO PRO MINI 328 3.3V/8MHZ
SparkFun Electronics
製造商零件編號 15795
SPARKFUN QWIIC PRO MICRO - USB-C
SparkFun Electronics
製造商零件編號 12640
PRO MICRO ATMEGA32U4 5V/16MHZ
SparkFun Electronics
製造商零件編號 18158
SPARKFUN REDBOARD PLUS
SparkFun Electronics
製造商零件編號 13664
SAMD21 MINI BREAKOUT ATSAMD21G18
SparkFun Electronics
製造商零件編號 12795
JUMPER WIRE M/M 6" 20COND
SparkFun Electronics
製造商零件編號 11367
HOOK-UP WIRE ASSORT SOLID 22AWG
SparkFun Electronics
製造商零件編號 10897
JUMPER WIRE M/M 6" 100PCS
SparkFun Electronics
製造商零件編號 11026
JUMPER M/M 7" 30AWG 30PCS
SparkFun Electronics
製造商零件編號 08022
HOOK-UP SOLID 22AWG BLACK 25'
SparkFun Electronics
製造商零件編號 08023
HOOK-UP SOLID 22AWG RED 25'
SparkFun Electronics
製造商零件編號 08024
HOOK-UP SOLID 22AWG YELLOW 25'
SparkFun Electronics
製造商零件編號 09238
STEPPER MOTOR HYBRID BIPOLAR 12V
SparkFun Electronics
製造商零件編號 19898
AC/DC WALL MNT ADAPT 5V-15V 45W
SparkFun Electronics
製造商零件編號 15900
LATCH TERMINALS - 5MM PITCH 4POS
SparkFun Electronics
製造商零件編號 11705
BARREL JACK PWR SWITCH FOR 2.1MM
SparkFun Electronics
製造商零件編號 08431
JUMPER WIRE M/M 6" 10PCS
SparkFun Electronics
製造商零件編號 20441
THREE PHASE BRUSHLESS GIMBAL STA
SparkFun Electronics
製造商零件編號 22132
EVAL BOARD FOR TMC6300
SparkFun Electronics
製造商零件編號 09835
BATT HLDR AA 4 CELL BARREL PLUG
SparkFun Electronics
製造商零件編號 15313
AC/DC WALL MNT ADAPTER 12V 7.2W
SparkFun Electronics
Add all DigiKey Parts to Cart
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.