SparkFun ProDriver Hookup Guide a learn.sparkfun.com tutorial

Available online at: http://sfe.io/t1200

Contents

Introduction

The SparkFun ProDriver utilizes 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.

SparkFun ProDriver - Stepper Motor Driver (TC78H670FTG)

SparkFun ProDriver - Stepper Motor Driver (TC78H670FTG)

ROB-16836
$19.95

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 does need 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 that are available as well (click button below to toggle options).

Recommended Parts
SparkFun RedBoard Qwiic

SparkFun RedBoard Qwiic

DEV-15123
$19.95
10
USB micro-B Cable - 6 Foot

USB micro-B Cable - 6 Foot

CAB-10215
$4.95
13
Stepper Motor - 68 oz.in (400 steps/rev)

Stepper Motor - 68 oz.in (400 steps/rev)

ROB-10846
$17.95
16
Wall Adapter Power Supply - 5VDC, 2A (Barrel Jack)

Wall Adapter Power Supply - 5VDC, 2A (Barrel Jack)

TOL-15312
$5.95
2
SparkFun ProDriver - Stepper Motor Driver (TC78H670FTG)

SparkFun ProDriver - Stepper Motor Driver (TC78H670FTG)

ROB-16836
$19.95
Jumper Wires Premium 6" M/M Pack of 10

Jumper Wires Premium 6" M/M Pack of 10

PRT-08431
$3.95
2
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.

Arduino Pro Mini 328 - 5V/16MHz

Arduino Pro Mini 328 - 5V/16MHz

DEV-11113
$9.95
134
Arduino Pro Mini 328 - 3.3V/8MHz

Arduino Pro Mini 328 - 3.3V/8MHz

DEV-11114
$9.95
49
SparkFun Artemis Module - Low Power Machine Learning BLE Cortex-M4F

SparkFun Artemis Module - Low Power Machine Learning BLE Cortex-M4F

WRL-15484
$8.95
SparkFun RedBoard Artemis Nano

SparkFun RedBoard Artemis Nano

DEV-15443
$14.95
5
Pro Micro - 5V/16MHz

Pro Micro - 5V/16MHz

DEV-12640
$17.95
79
Arduino Uno - R3

Arduino Uno - R3

DEV-11021
$22.95
136
SparkFun Qwiic Pro Micro - USB-C (ATmega32U4)

SparkFun Qwiic Pro Micro - USB-C (ATmega32U4)

DEV-15795
$19.95
4
SparkFun AST-CAN485 Dev Board

SparkFun AST-CAN485 Dev Board

DEV-14483
$44.95
6
Wiring

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

Hook-Up Wire - Assortment (Solid Core, 22 AWG)

Hook-Up Wire - Assortment (Solid Core, 22 AWG)

PRT-11367
$19.95
35
Jumper Wires Premium 6" M/M Pack of 100

Jumper Wires Premium 6" M/M Pack of 100

PRT-10897
$24.95
6
Jumper Wires - Connected 6" (M/M, 20 pack)

Jumper Wires - Connected 6" (M/M, 20 pack)

PRT-12795
$1.95
2
Jumper Wires Standard 7" M/M - 30 AWG (30 Pack)

Jumper Wires Standard 7" M/M - 30 AWG (30 Pack)

PRT-11026
$2.25
20
Jumper Wires Premium 6" M/M - 20 AWG (10 Pack)

Jumper Wires Premium 6" M/M - 20 AWG (10 Pack)

PRT-11709
$5.95
2
Hook-up Wire - Black (22 AWG)

Hook-up Wire - Black (22 AWG)

PRT-08022
$2.50
1
Hook-up Wire - Red (22 AWG)

Hook-up Wire - Red (22 AWG)

PRT-08023
$2.50
1
Hook-up Wire - Yellow (22 AWG)

Hook-up Wire - Yellow (22 AWG)

PRT-08024
$2.50
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.

Stepper Motor with Cable

Stepper Motor with Cable

ROB-09238
$15.95
20
Stepper Motor - 68 oz.in (400 steps/rev)

Stepper Motor - 68 oz.in (400 steps/rev)

ROB-10846
$17.95
16
Stepper Motor - 125 oz.in (200 steps/rev, 600mm Wire)

Stepper Motor - 125 oz.in (200 steps/rev, 600mm Wire)

ROB-13656
$30.95
3
Small Stepper Motor

Small Stepper Motor

ROB-10551
$7.95
8
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.

Wall Adapter Power Supply - 12VDC, 600mA (Barrel Jack)

Wall Adapter Power Supply - 12VDC, 600mA (Barrel Jack)

TOL-15313
$5.95
Power Supply - 5V, 4A

Power Supply - 5V, 4A

TOL-15352
$12.95
Wall Adapter Power Supply - 9VDC, 650mA (Barrel Jack)

Wall Adapter Power Supply - 9VDC, 650mA (Barrel Jack)

TOL-15314
$5.95
1
SparkFun ATX Power Connector Breakout Kit - 12V/5V (4-pin)

SparkFun ATX Power Connector Breakout Kit - 12V/5V (4-pin)

KIT-15701
$17.95
3
Mean Well LED Switching Power Supply - 5VDC, 5A

Mean Well LED Switching Power Supply - 5VDC, 5A

TOL-14601
$14.95
Mean Well Switching Power Supply - 12VDC, 12.5A

Mean Well Switching Power Supply - 12VDC, 12.5A

TOL-16266
$24.95
Power Supply - 60W, 12V

Power Supply - 60W, 12V

TOL-14934
$21.95
1
Mean Well Slim Wall-Mounted Power Adapter 54W - 12V, 4.5A

Mean Well Slim Wall-Mounted Power Adapter 54W - 12V, 4.5A

TOL-15340
$36.95

Soldering Accessories

Although the ProDriver is intended to be solderless, if you would like to modify the jumpers or solder the wiring, you will need soldering equipment and/or a hobby knife.

Solder Lead Free - 100-gram Spool

Solder Lead Free - 100-gram Spool

TOL-09325
$8.95
7
Chip Quik No-Clean Flux Pen  - 10mL

Chip Quik No-Clean Flux Pen - 10mL

TOL-14579
$7.95
4
Weller WLC100 Soldering Station

Weller WLC100 Soldering Station

TOL-14228
$67.95
2
Hobby Knife

Hobby Knife

TOL-09200
$2.95
2

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

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.

board dimensions
SparkFun ProDriver board dimensions. (Click to enlarge)

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:

power block
The available power connections and status LED on the ProDriver. (Click to enlarge)

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

Barrel Jack Extension Cable - M-F (6 ft)

Barrel Jack Extension Cable - M-F (6 ft)

COM-11707
$1.95
Barrel Jack Power Switch - M-F (3")

Barrel Jack Power Switch - M-F (3")

COM-11705
$2.50
Barrel Jack Extension Cable - M-F (3 ft)

Barrel Jack Extension Cable - M-F (3 ft)

COM-11706
$1.75

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

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.

power LED
LED jumper

The power LED and LED jumper on the ProDriver. (Click to enlarge)

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.

3V3 pin
The 3V3 PTH pin on the ProDriver. (Click to enlarge)

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.

power protection jumpers
The D1 BP and PTC BP jumpers on the ProDriver. (Click to enlarge)

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 hassel.)

power LED
LED jumper

The control and motor connections on the ProDriver. (Click to enlarge)

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.
  2. Make sure you are inserting the wire between the jaws. This should be fairly obvious; however, we have found overconfidence to be an Achilles' heel, in this case.

latching mechanism
The latching mechanism. (Click to enlarge)

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 hassel.)

control pins
The input control connections on the ProDriver. (Click to enlarge)

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

Pin Name Label Description Operating Something
Ground Reference GND Ground (i.e. the 0V reference) 0V
Standby STBY This pin is used to either place the motor driver in standby or initiate one of the control methods.
  • Low: Motor driver is in standby; and the motor is released from any of the control methods.
  • High: On the up edge, 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.
0 to 3.3V (Default: Low or 0V)
Enable EN When the motor driver is configured for clock-in stepping, this pin is used to enable the motor output ON or OFF.
  • Low: Motor is off; all of the H-Bridge MOSFETs turn off and become high impedance (Hi-Z).
  • High: Motor is on; after the VM reaches the target voltage and becomes stable.
0 to 3.3V (Default: Low or 0V)
Error Detection Flag Output ERR If a thermal shutdown (TSD), over current (ISD), or motor load open (OPD) error, is triggerd, the pin output is pulled low. Under a normal operating status, the level of ERR pin is equal to the EN control voltage from outside. The error flag can be released by reconnecting the VM power or by setting the device to standby.
  • Low: An error has been detected/triggered.
  • High: Operation status is normal.
0 to 3.3V
MODE0
UP-DW (Clock-in)
S_DATA (Serial)
MODE0 MODE0: Utilized to configure the conrol method of the motor driver, when the standby pin is released. Based upon that control method, the pin will then function as one of the following inputs:
  • Serial Communication: Serial Data Input (S_DATA)
    • In serial mode, this line contains the serial data commands in a 32-bit format. After the serial setting is configured, the output is updated with the timing of the LATCH signal.
  • Clock-in Stepping (*Variable Mode Only): Step Mode Setting Input (UP-DW)
    • Low: Change step mode to high resolution
    • High: Change step mode to Low resolution
0 to 3.3V (Default: High or 3.3V)
MODE1
SET_EN (Clock-in)
LATCH (Serial)
MODE1 MODE1: Utilized to configure the conrol method of the motor driver, when the standby pin is released. Based upon that control method, the pin will then function as one of the following inputs:
  • Serial Communication: Latch Enable Pin (LATCH)
    • In serial mode, this line indicates the end of a data command.
  • Clock-in Stepping: Step Mode- Setting Enable Pin (SET_EN)
    • Low: Voids changes to the step size resolution setting.
    • High: Allow changes to the step size resolution setting. (Only available for Variable Mode)
0 to 3.3V (Default: High or 3.3V)
MODE2
CLK (Clock-in)
S_CLK (Serial)
MODE2 MODE2: Utilized to configure the conrol method of the motor driver, when the standby pin is released. Based upon that control method, the pin will then function as one of the following inputs:
  • Serial Communication: Serial Clock Input Pin (S_CLK)
    • In serial mode, this line contains the clock signal for serial data commands.
  • Clock-in Stepping: Step Clock Input Pin (CLK)
    • Up-Edge: Shifts the electrical angle by a single step (size).
    • Down-Edge: N/A
0 to 3.3V (Default: High or 3.3V)
MODE3
CW-CCW (Clock-in)
MODE3 MODE3: Utilized to configure the conrol method of the motor driver, when the standby pin is released. The pin will then, only function as an input for clock-in stepping:
  • Clock-in Stepping: Current Direction Setup Pin (CW-CCW)
    • Low: Counter-clockwise operation (CCW)
    • High: Clockwise operation (CCW)
0 to 3.3V (Default: High or 3.3V)
3.3V Reference 3V3 Connected to the 3.3V output of the LM117 voltage regulator, which is powered by the motor power supply input. 3.3V
Current Threshold Reference VREF Connected to the 10 kΩ potentiometer that controls the maximum drive current to the stepper motor coils. Iout (max) = 1.1 × Vref (V) 0 to 1.8 V
⚡ 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.

outout channels
The output motor driver channels on the ProDriver. (Click to enlarge)

Pin Name Label Description
Positive "A" Channel Output A+ The "A" channel motor output (+) pin
Negative "A" Channel Output A- The "A" channel motor output (-) pin
Positive "B" Channel Output B+ The "B" channel motor output (+) pin
Negative "B" Channel Output B- The "B" channel motor output (-) pin
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.

Motors and Selecting the Right One

December 12, 2013

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.

TC78H670FTG IC
The Toshiba TC78H670FTG stepper motor driver IC on the ProDriver. (Click to enlarge)

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 matierals (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.

Characteristic Description
Motor Power Supply Voltage: 2.5 to 16.0V
Output Current: 2.0A (max)
Control Methods:
  • Clock-in Stepping
  • Serial Communication
Clock Frequency:
  • Clock-in Stepping: up to 400kHz
  • Serial Communication: 1 to 15MHz
Step Size Resolution:
Discrete Steps
  • Full step
  • Half step
Micro-Steps
  • 1/4 step
  • 1/8 step
  • 1/16 step
  • 1/32 step
  • 1/64 step
  • 1/128 step
Error Detection Functions:
  • Thermal Shutdown (TSD)
  • Over-current Shutdown (ISD)
  • Motor Load Open (OPD)
  • Under Voltage Lockout (UVLO)

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.

application for en/err pin
The EN/ERR pin application from the datasheet. (Click to enlarge)

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.

en/err pin connections
The motor enable control switch and the connected EN and ERR pins. (Click to enlarge)

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.

enable motor output settings
The EN pin functionality from the datasheet. (Click to enlarge)

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.

motor switch
The motor enable control switch connected to the EN pin. (Click to enlarge)

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.

control method configuration
The configuration settings for the control methods, when the standby pin is set HIGH. Pulled from the datasheet. (Click to enlarge)

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:

(*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 settings
The step resolution configuration settings for the clock-in method, from the datasheet. (Click to enlarge)

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.

clock-in stepping
The MODE3 (CLK) and MODE2 (CW-CCW) pin functionality for clock-in stepping, from the datasheet. (Click to enlarge)

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.

step size resolution control
The MODE1 (SET_EN) and MODE0 (UP-DW) pin functionality for transitioning the step size resolution during clock-in stepping, from the datasheet. (Click to enlarge)

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.

pot and vref pin
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:

hardware equation

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:

software equation

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.

chopping frequency resistor table
A table with the resistor values used to modify the OSCM oscillation and chopping frequency, from the datasheet. (Click to enlarge)

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 cuttin the OSCM BP jumper and soldering a resistor to the provided OSCM PTH connections.

OSCM adjustment
The OSCM BP jumoer and OSCM PTH points on the ProDriver. (Click to enlarge)

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.

thermal plane
The thermal ground planes on the bottom of the ProDriver. (Click to enlarge)

Hardware Assembly

Power Connection

Users should connect the recommended wall adapter, power supply to the DC barrel jack on the ProDriver. REMEMBER to disconnect the power before connecting/disconnecting your motor.

power connection
The power connected to the ProDriver. (Click to enlarge)

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 the SparkFun RedBoard to the ProDriver with some jumper wires.

microcontroller connections
The SparkFun RedBoard connected to the ProDriver. (Click to enlarge)

ProDriver Control Pins STBY EN MODE0 MODE1 MODE2 MODE3 ERR
RedBoard Pins D8 D7 D6 D5 D4 D3 D2
Note: Don't forget to ground loop the ProDriver to the RedBoard as illustrated in the image above.

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.

motor connection
A stepper motor connected to the ProDriver. (Click to enlarge)

ProDriver Output Channels A+ A- B+ B-
Stepper Motor Wires Black Green Red Blue

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

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.

Motor Coil Diagram
Coil wire diagram from the datasheet our NEMA 16 Stepper Motor with Cable. (Click to enlarge)

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.

Single ProDriver

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

standard setup
The SparkFun RedBoard connected to a ProDriver and stepper motor. (Click to enlarge)

Multiple ProDrivers

For users interested in utilizing multiple ProDrivers, we have provided an additional Arduino example for hooking up two ProDrivers in parallel. Use the table and image below to hookup the SparkFun RedBoard to the two ProDrivers with some jumper wires.

stacked Prodriver
The SparkFun RedBoard connected to two ProDrivers, stacked together. (Click to enlarge)

ProDriver (1) Control Pins STBY EN MODE0 MODE1 MODE2 MODE3 ERR
ProDriver (2) Control Pins STBY EN MODE0 MODE1 MODE2 MODE3 ERR
RedBoard Pins D8 D7 D6 D5 D9 D4 D3 D2
Note: By connecting the ProDrivers 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.

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 sensor object (such as myProDriver) without arguments.

PRODRIVER myProDriver;


Functions

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

Arduino Examples

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

standard setup
The SparkFun RedBoard connected to a ProDriver and stepper motor. (Click to enlarge)

Example 1: Basic Motor Control

The first example in the Arduino library is perfect for demonstrating the basic functionality of the 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.

example 1 demo
Operation of the ProDriver utilizing the Example1_Basic example code.

Example 8: Serial Control - Multiple Motors

Example 8 demonstrates the operation of multiple ProDrivers 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.

example 8 demo
Operation of the ProDriver 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.

Resources and Going Further

For more on the SparkFun ProDriver (TC78H670FTG), check out the links below:

For more motor control tutorial, check out the links below:

Shapeoko Coaster Project

A step-by-step guide to cutting and engraving a coaster with the Shapeoko.

Ardumoto Kit Hookup Guide

Learn how to assemble and drive DC motors using the v2.0 Ardumoto Shield.

ESP32 Thing Power Control Shield Hookup Guide

This tutorial shows you how to get started with the ESP32 Thing Power Control Shield.

Wireless RC Robot with Arduino and XBees

In this tutorial, we will expand on the SIK for RedBot to control the robot wirelessly with XBee radios! We'll explore a different microcontroller and wirelessly control the RedBot at a distance.

SparkFun ESP32 DMX to LED Shield

Learn how to utilize your DMX to LED Shield in a variety of different ways.

Wireless Gesture Controlled Robot

Control the RedBot wirelessly based on the movement of your hand using an accelerometer, Arduino, and XBees!

Tinker Kit Circuit Guide

This guide takes you through the basics of building 11 different circuits with the SparkFun Tinker Kit and how to program them using the Arduino IDE.
New!

Red Hat Co.Lab Robotic hand kit curriculum guide

Hookup guide for Red Hat Robotic Hand kit

Or check out this blog post for inspiration

Solar Cooking with Maximum Efficiency

September 8, 2020

learn.sparkfun.com | CC BY-SA 3.0 | SparkFun Electronics | Niwot, Colorado