How does it work?
Stepper 18 Click as its foundation uses the DRV8426, an integrated motor-driver solution for bipolar stepper motors with integrated current sense, 1/256 microstepping, STEP/DIR interface, and smart-tune technology Texas Instruments. It provides the maximum integration by integrating two N-channel power MOSFET H-bridges, current sense resistors and regulation circuitry, and a microstepping indexer capable of driving up to 1.5A full-scale output current.
Stepper motor drivers need to re-circulate the winding current by implementing several decay modes, like slow decay, mixed decay, and fast decay. The DRV8426 comes with smart-tune decay modes, representing a decay mechanism that automatically adjusts for optimal current regulation performance agnostic of voltage, motor speed, variation, and aging effects. Along with this automatic smart-tune, DRV8426 also provides the traditional decay modes like slow-mixed and mixed decay.
The voltage at the VREF pin adjusts the current regulation set-point obtained by the MCP4726, a 12-bit digital-to-analog converter from Microchip. Thus, the digital value is converted to the appropriate voltage level (VCC) proportional to the received 12-bit number. The MCP4726 also integrates EEPROM for storing DAC register and configuration bit values and communicates with the MCU through the I2C 2-Wire interface supporting Standard (100 kHz), Fast (400 kHz), and High-Speed (3.4 MHz) I2C modes.
In addition to I2C communication, the Stepper 18 Click also communicates with MCU using several GPIO pins. A simple STEP/DIR interface, labeled as STP and DIR routed to the PWM and AN pins on the mikroBUS™ socket, allows MCU to manage the direction and step rate of the stepper motor. The internal microstepping indexer can execute high-accuracy microstepping without requiring the MCU to handle the winding current level. The indexer can achieve full step, half step, 1/4, 1/8, 1/16, 1/32, 1/64, 1/128, and 1/256 microstepping through the M0 and M1 pins routed to the onboard SMD switch. Also, high microstepping contributes to significant audible noise reduction and smooth motion.
The Enable pin, labeled as EN and routed to the CS pin of the mikroBUS™ socket, optimizes power consumption and is used for power ON/OFF purposes. All circuits, including the interface pins, are inactive in this state, and the DRV8426 is in the form of minimum power consumption. Also, a low-power Sleep feature is included, routed to the RST pin of the mikroBUS™ socket alongside fault-interrupt feature routed to the INT pin of the mikroBUS™ socket. The Sleep Mode allows the system to save power when not actively driving the motor.
This Click board™ supports an external power supply for the motor, which can be connected to the input terminal labeled as VM and should be within the range of 4.5V to 33V, while the stepper motor coils can be connected to the terminals labeled as A1, B2, B1, and A2.
This Click board™ can be operated only with a 3.3V logic voltage level. Therefore, the board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used, as a reference, for further development.
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
DRV8426 – an integrated motor-driver solution for bipolar stepper motors with integrated current sense, 1/256 microstepping, STEP/DIR interface, and smart-tune technology Texas Instruments
Key Features
Microstepping stepper motor driver (STEP/DIR interface), integrated current sense functionality, smart-tune decay technology, protection features, and more.
Interface
GPIO,I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V,External
Pinout diagram
This table shows how the pinout on Stepper 18 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 |
SW1 | – | Down | Step Mode Selection |
Stepper 18 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage VCC | – | 3.3 | – | V |
External Supply Voltage VM | 4.5 | – | 33 | V |
Motor Full-Scale Current | – | – | 1.5 | A |
Operating Temperature Range | -40 | +25 | +125 | °C |
Software Support
We provide a library for the Stepper 18 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 18 Click driver.
Key functions:
stepper18_cfg_setup
– Config Object Initialization function.stepper18_init
– Initialization function.stepper18_default_cfg
– Click Default Configuration function.
Examples description
This example showcases the device’s ability to control the motor. It initializes the device for control and moves the motor in two directions in a variety of speeds for 360 degrees.
The demo application is composed of two sections :
void application_task ( void ) { static uint8_t direction = 0; log_printf( &logger, "> Move 360deg in CW direction.rn" ); stepper18_move_motor_angle( &stepper18, 360, STEPPER18_STEP_RES_FULL, STEPPER18_SPEED_MEDIUM ); direction = !direction; stepper18_set_dir( &stepper18, direction ); Delay_ms( 500 ); log_printf( &logger, "> Move 180deg in CCW direction.rn" ); stepper18_move_motor_angle( &stepper18, 180, STEPPER18_STEP_RES_FULL, STEPPER18_SPEED_SLOW ); Delay_ms( 1000 ); log_printf( &logger, "> Move 180deg in CCW direcion.rn" ); stepper18_move_motor_angle( &stepper18, 180, STEPPER18_STEP_RES_FULL, STEPPER18_SPEED_FAST ); direction = !direction; stepper18_set_dir( &stepper18, direction ); 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.Stepper18
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.