How does it work?
Stepper 15 Click, uses the DRV8889A, an integrated motor-driver solution for bipolar stepper motors from Texas Instruments. The DRV8889A integrates two N-channel power MOSFET H-bridges (disabled by default after Power-Up), integrated current sense and regulation circuitry, and a microstepping indexer. It can be powered with a supply voltage from 4.5 to 45V, providing an output current up to 2.4A peak, 1.5A full-scale, or 1.1A RMS.
The DRV8889A uses an integrated current-sense architecture which eliminates the need for two external power sense resistors. This architecture removes the power dissipated in the sense resistors using a current mirror approach and using the internal power MOSFETs for current sensing. It also includes an integrated torque DAC that allows the controller to scale the output current through a full-duplex, 4-wire synchronous SPI interface without needing to scale the voltage reference. The torque DAC allows the controller to save system power by decreasing the motor current consumption when high output torque is not required.
A simple STEP/DIR interface allows an external MCU to manage the direction and step rate of the stepper motor. The internal indexer can execute high-accuracy microstepping without requiring the MCU to handle the winding current level. The indexer is capable of the whole step, half step, and 1/4, 1/8, 1/16, 1/32, 1/64, 1/128, and 1/256 microstepping. Also, a noncircular half stepping mode is available for increased torque output at higher motor RPM in addition to a standard half stepping mode.
Unlike the STEP pin controlled by the PWM pin from the mikroBUS™ socket, other pins from the DRV8889A such as Sleep mode selection, fault indicator, direction selection, and device disable pin are controlled through a well-known 8bit I/O expander, the PCA9538 from NXP Semiconductor using the standard I2C 2-Wire interface with a maximum frequency of 400kHz. The PCA9538 also uses RST and INT pins from the mikroBUS™ socket as a hardware reset and interrupt function.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. It allows for both 3.3V and 5V capable MCUs to use the communication lines properly. Additionally, there is a possibility for stepper motor driver power supply selection via jumper labeled as VM SEL to supply the DRV8889A from an external input terminal in the range from 4.5 to 45V or with a 5V from mikroBUS™ power rail.
Specifications
Type
Stepper
Applications
Can be used for driving motors in any application that demands a precise and safe step motor driver.
On-board modules
DRV8889A – integrated motor-driver solution for bipolar stepper motors from Texas Instruments
Key Features
Qualified for automotive, up to 1/256 microstepping, integrated current sense, various protection features, and more.
Interface
I2C,SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V,External
Pinout diagram
This table shows how the pinout on Stepper 15 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 |
JP1 | VM SEL | Right | DRV8889A Power Supply Selection Vext/5V: Left position Vext, Right position 5V |
JP2 | VCC SEL | Right | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
Stepper 15 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage VCC | 3.3 | – | 5 | V |
Supply Voltage Vext | 4.5 | – | 45 | V |
Maximum Output Current | – | – | 1.5 | A |
Step Resolution | 1/256 | – | 1 | μstep |
Operating Temperature Range | -40 | +25 | +125 | °C |
Software Support
We provide a library for the Stepper 15 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on mikroE github account.
Library Description
This library contains API for Stepper 15 Click driver.
Key functions:
stepper15_make_one_step
– Stepper 15 make one step function.stepper15_set_direction
– Stepper 15 set direction function.stepper15_step_by_angle
– Stepper 15 step by angle function.
Examples description
The application is composed of three sections :
void application_task ( void ) { log_printf( &logger, "---------------------------------rn" ); log_printf( &logger, " Clockwise motion rn" ); log_printf( &logger, " Angle of rotation : 90 degrees rn" ); log_printf( &logger, " Step speed : 85 %% rn" ); stepper15_set_direction ( &stepper15, STEPPER15_DIRECTION_CLOCKWISE ); stepper15_step_by_angle( &stepper15, step_speed - 15, 90, step_360 ); Delay_ms( 2000 ); log_printf( &logger, "---------------------------------rn" ); log_printf( &logger, " Counterclockwise motion rn" ); log_printf( &logger, " Angle of rotation : 180 degrees rn" ); log_printf( &logger, " Step speed : 85 %% rn" ); stepper15_set_direction ( &stepper15, STEPPER15_DIRECTION_COUNTERCLOCKWISE ); stepper15_step_by_angle( &stepper15, step_speed - 15, 180, step_360 ); Delay_ms( 2000 ); log_printf( &logger, "---------------------------------rn" ); log_printf( &logger, " Clockwise motion rn" ); log_printf( &logger, " Angle of rotation : 270 degrees rn" ); log_printf( &logger, " Step speed : 90 %% rn" ); stepper15_set_direction ( &stepper15, STEPPER15_DIRECTION_CLOCKWISE ); stepper15_step_by_angle( &stepper15, step_speed - 10, 270, step_360 ); Delay_ms( 2000 ); log_printf( &logger, "---------------------------------rn" ); log_printf( &logger, " Counterclockwise motion rn" ); log_printf( &logger, " Angle of rotation : 360 degrees rn" ); log_printf( &logger, " Step speed : 100 %% rn" ); stepper15_set_direction ( &stepper15, STEPPER15_DIRECTION_COUNTERCLOCKWISE ); stepper15_step_by_angle( &stepper15, step_speed, 360, step_360 ); Delay_ms( 2000 ); log_printf( &logger, "---------------------------------rn" ); log_printf( &logger, " Clockwise motion rn" ); log_printf( &logger, " Angle of rotation : 360 degrees rn" ); log_printf( &logger, " Step speed : 100 %% rn" ); stepper15_set_direction ( &stepper15, STEPPER15_DIRECTION_CLOCKWISE ); stepper15_step_by_angle( &stepper15, step_speed, 360, step_360 ); Delay_ms( 2000 ); }
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on mikroE github account.
Other mikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Stepper15
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.