How does it work?
Stepper 9 Click is based on the TB67S581FNG, a two-phase bipolar stepping motor driver designed to control one bipolar stepping motor from Toshiba Semiconductor. The TB67S581FNG supports a PWM constant-current control drive and incorporates low on-resistance DMOS FETs, delivering a 2A maximum current. It can also provide a motor output voltage rating of around 40V and has integrated protection mechanisms such as over-current, over-temperature, and under-voltage lockout for error detection (red LO LED indicator). It supports full-step to 1/32 steps resolution for less motor noise and smoother control, with a built-in regulator that allows the motor to be driven by a single power supply.
The current value in the PWM constant-current mode is set by the reference voltage obtained by the MCP1501, a high-precision voltage regulator. Also, the current threshold point of the TB67S581FNG, alongside MCP1501, can be set manually using an onboard trimmer labeled VREF. The TB67S581FNG supports various step resolution configurations through its control signals. These signals, like step resolution settings, sleep mode, or LO/MO indicators, are controlled through the PCA9538A port expander, which establishes communication with the MCU via the I2C serial interface. In addition to this digital way of setting, these functions can also be selected manually via a multifunctional switch by selecting a particular switch (1,2,3 – Step Resolution Setting; 4 – Decay Mode Control). The PCA9538A also allows choosing the least significant bit (LSB) of its I2C slave address by positioning SMD jumpers labeled as ADDR SEL to an appropriate position marked as 0 and 1, alongside its interrupt feature routed to the INT pin of the mikroBUS™ socket.
The CLK clock signal, routed to the default PWM position on the mikroBUS™ socket, shifts the current step and electrical angle of the motor with its every up-edge, while the Enable pin, labeled as EN and routed to the default CS position, controls the state of the output A and B stepping motor drive channels. Besides, all circuits can be stopped using the Sleep function and thus enable power saving mode. A simple DIR pin routed to the default AN position on the mikroBUS™ socket allows MCU to manage the direction of the stepper motor (clockwise or counterclockwise) while the RST pin initializes an electrical angle in the internal counter to set an initial position. Achieving an initial electrical angle position is indicated via onboard orange LED labeled as MO.
The Stepper 9 Click supports an external power supply for the TB67S581FNG, which can be connected to the input terminal labeled as VM and should be within the range of 8.2V to 44V, while the stepper motor coils can be connected to the terminals labeled as B+, B-, A-, and A+.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Stepper
Applications
Can be used for small stepping motors in various applications such as consumer electronics and industrial equipment
On-board modules
TB67S581FNG – two-phase bipolar stepping motor driver from Toshiba Semiconductor
Key Features
Low power consumption, capable of controlling one bipolar stepping motor, PWM controlled constant-current drive, operational in full, half, quarter, 1/8, 1/16, and 1/32 step resolutions, selectable decay mode, anomaly detection functions, and more
Interface
GPIO,I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on Stepper 9 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
LD2 | MO | – | Electric Angle Initial Position LED Indicator |
LD3 | LO | – | Error LED Indicator |
JP1 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
JP2-JP3 | ADDR SEL | Left | I2C Address Selection 0/1: Left position 0, Right position 1 |
SW1 | POS 1-2-3 | Middle | Step Resolution Setting Switch |
SW1 | POS 4 | Middle | Mixed Decay Control Switch |
VR1 | VREF | – | Current Threshold Trimmer |
Stepper 9 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage VCC | 3.3 | – | 5 | V |
External Supply Voltage VM | 8.2 | 24 | 44 | V |
Maximum Output Voltage | – | – | 50 | V |
Maximum Output Current | – | – | 2 | A |
Maximum Step Clock Frequency | – | – | 250 | kHz |
Software Support
We provide a library for the Stepper 9 Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for Stepper 9 Click driver.
Key functions
-
stepper9_set_direction
This function sets the motor direction by setting the DIR pin logic state. -
stepper9_drive_motor
This function drives the motor for the specific number of steps at the selected speed. -
stepper9_set_step_mode
This function sets the step mode resolution settings.
Example Description
This example demonstrates the use of the Stepper 9 Click board™ by driving the motor in both directions for a desired number of steps.
void application_task ( void )
{
log_printf ( &logger, " Move 200 full steps clockwise rnn" );
stepper9_set_step_mode ( &stepper9, STEPPER9_MODE_FULL_STEP );
stepper9_set_direction ( &stepper9, STEPPER9_DIR_CW );
stepper9_drive_motor ( &stepper9, 200, STEPPER9_SPEED_FAST );
Delay_ms ( 2000 );
log_printf ( &logger, " Move 400 quarter steps counter-clockwise rnn" );
stepper9_set_step_mode ( &stepper9, STEPPER9_MODE_QUARTER_STEP );
stepper9_set_direction ( &stepper9, STEPPER9_DIR_CCW );
stepper9_drive_motor ( &stepper9, 400, STEPPER9_SPEED_VERY_FAST );
Delay_ms ( 2000 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Stepper9
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MIKROE compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MIKROE Software Development Kit, that needs to be downloaded from the LibStock and installed for the compiler you are using to ensure proper operation of mikroSDK compliant Click board™ demo applications.
For more information about mikroSDK, visit the official page.