How does it work?
Stepper 8 Click can be used with bipolar step motor, coils should be connected to the onboard screw terminals. There are two terminals, used to connect each of the step motor coils. The third connector is used to connect an external voltage, ranging from 2.5V to 16V, depending on the used motor voltage requirements and current of 2A. The maximum output current may be further limited in view of thermal considerations, depending on ambient temperature and board conditions. It should be noted that without a valid external voltage connected to this terminal, the motor will not work.
Stepper 8 Click can operate a bipolar stepper motor in full, half, quarter, 1/8, 1/16, 1/32, 1/64, 1/128 step operation. Thanks to internal safety features, such as thermal shutdown (TSD), over current (ISD), motor load open (OPD) and under voltage lockout(UVLO), this Click board™ is perfectly suited for rapid development of various stepper motor applications.
This TC78H670FTG integrated driver offers a simple interface, featuring a set of pins used to control the functions of the step motor. Since the number of pins exceeds the available mikroBUS™ general purpose pins, an additional port expander IC is used, exposing a 2-wire I2C interface for the communication with the host MCU. The port expander IC is the PCA9538, an 8-bit port expander with the I2C interface.
The MODE0-3 pins can be selected Serial mode or CLK-IN mode. The control mode is set up by the input state of the MODE0-3 pins after releasing standby mode. Under the serial mode, it performs setting and motor control in the following 32 bit format using SPI on mikroBUS™. For the motor control, each current value is set in the serial setting, and the output is updated to the set current value at the timing of the LATCH signal. More information about using Serial mode or CLK-IN mode can be find in TC78H670FTG datasheet.
To allow both Serial mode or CLK-IN mode on mikroBUS™ a TC7WH157 two channel multiplexer from Toshiba is used. Selection is done using I2C communication with PCA9538 port expander and changing state of SELECT pins on multiplexers.
Specifications
Type
Stepper
Applications
Security cameras, portable printers, handheld scanners, pico-projectors, smartphones and many more
On-board modules
TC78H670FTG
Key Features
Advanced Current Detection System, Built-in Dual H Bridges, Low on-resistance, Multi error detect functions
Interface
GPIO,I2C,SPI
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 8 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 |
JP2 | VCC SEL | Left | Logic level voltage selection: left position 3V3, right position 5V |
JP1 | VM | Right | Power supply selection: left position – External supply, right position – On-board supply |
JP3, JP4 | ADDR SEL | Right | Slave address selection: left position 1, right position 0 |
VR1 | VR1 | – | Current threshold reference adjustment trimmer |
Stepper 8 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 2.5 | – | 16 | V |
Output Current | 0 | – | 2 | A |
fOSCM | 656 | 1266 | 3290 | kHz |
fchop | 41 | 79 | 206 | kHz |
Software Support
We provide a library for the Stepper 8 Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions that enables the usage of the Stepper 10 Click board. It initializes and defines the I2C driver and drivers that allow full control of the device to the user.
Key functions:
void stepper8_motor_start( void )
– Start Movementvoid stepper8_motor_stop ( void
– Stop Movementvoid stepper8_process ( void )
– Stepper State Machine
Examples description
The application is composed of three sections :
- System Initialization – Initializes all GPIO pins found on Stepper 8 Click.
- Application Initialization – Initializes driver, stepper control, maximum and minimum speed, acceleration ratio and motor work mode.
- Application Task – Starting motor according to a predefined configuration.
void application_task ( ) { uint8_t status; stepper8_motor_start( ); status = stepper8_get_run_status( ); while ( status == 1 ) { status = stepper8_get_run_status( ); stepper8_process( ); } stepper8_motor_stop( ); Delay_ms( 2000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- UART library
- I2C library
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.