TOP Contributors

  1. MIKROE (2654 codes)
  2. Alcides Ramos (352 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136737 times)
  2. FAT32 Library (69951 times)
  3. Network Ethernet Library (55942 times)
  4. USB Device Library (46267 times)
  5. Network WiFi Library (41886 times)
  6. FT800 Library (41173 times)
  7. GSM click (28983 times)
  8. PID Library (26413 times)
  9. mikroSDK (26361 times)
  10. microSD click (25376 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

Silent Step 2 click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.3

mikroSDK Library: 2.0.0.0

Category: Stepper

Downloaded: 17 times

Not followed.

License: MIT license  

Silent Step 2 Click is a compact add-on board that allows extremely smooth and silent operation of the connected motor. This board features the TMC2130, a high-performance two-phase stepper motor driver from Analog Devices. The driver uses an external motor power supply of 4.75 up to 43V to power a 2-phase stepper motor up to 2A coil current (2.5A peak).

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Silent Step 2 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Silent Step 2 click" changes.

Do you want to report abuse regarding "Silent Step 2 click".

  • Information
  • Comments (0)

mikroSDK Library Blog


Silent Step 2 click

Silent Step 2 Click is a compact add-on board that allows extremely smooth and silent operation of the connected motor. This board features the TMC2130, a high-performance two-phase stepper motor driver from Analog Devices. The driver uses an external motor power supply of 4.75 up to 43V to power a 2-phase stepper motor up to 2A coil current (2.5A peak).

silentstep2_click.png

click Product page


Click library

  • Author : Nenad Filipovic
  • Date : Oct 2023.
  • Type : I2C/SPI type

Software Support

We provide a library for the Silent Step 2 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 Silent Step 2 Click driver.

Standard key functions :

  • silentstep2_cfg_setup Config Object Initialization function.

    void silentstep2_cfg_setup ( silentstep2_cfg_t *cfg );
  • silentstep2_init Initialization function.

    err_t silentstep2_init ( silentstep2_t *ctx, silentstep2_cfg_t *cfg );
  • silentstep2_default_cfg Click Default Configuration function.

    err_t silentstep2_default_cfg ( silentstep2_t *ctx );

Example key functions :

  • silentstep2_rotate_by_angle Silent Step 2 rotates the shaft through a desired angle function.

    err_t silentstep2_rotate_by_angle ( silentstep2_t *ctx, uint8_t step_speed, float angle, uint16_t res_360 );
  • silentstep2_set_direction Silent Step 2 sets the clockwise or counterclockwise direction movement function.

    void silentstep2_set_direction ( silentstep2_t *ctx, uint8_t dir );

Example Description

This example demonstrates the use of Silent Step 2 Click board™ by driving the motor in both directions for a desired rotation angle.

The demo application is composed of two sections :

Application Init

The initialization of I2C and SPI module and log UART. After driver initialization, the app sets the default configuration.

void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    silentstep2_cfg_t silentstep2_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    silentstep2_cfg_setup( &silentstep2_cfg );
    SILENTSTEP2_MAP_MIKROBUS( silentstep2_cfg, MIKROBUS_1 );
    err_t init_flag = silentstep2_init( &silentstep2, &silentstep2_cfg );
    if ( ( I2C_MASTER_ERROR == init_flag ) || ( SPI_MASTER_ERROR == init_flag ) )
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( SILENTSTEP2_ERROR == silentstep2_default_cfg ( &silentstep2 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

    log_info( &logger, " Application Task " );
    log_printf( &logger, "-----------------------------\r\n" );
    Delay_ms ( 100 );
}

Application Task

The application task represents an example that demonstrates the use of the Silent Step 2 Click board™ with which the user can sequentially move the motor. The first part of the sequence executes the clockwise/counterclockwise motor movement for an angle of 90 degrees with a step speed of 50%, all the way to the last sequence of the same movement routine of 360 degree angle with a step speed of 90%. Results are being sent to the UART Terminal, where you can track their changes.

void application_task ( void )
{
    log_printf( &logger, " Clockwise motion\r\n" );
    log_printf( &logger, " Angle of rotation :  90 degrees\r\n" );
    log_printf( &logger, " Step speed        :  50 %%\r\n" );
    silentstep2_set_direction( &silentstep2, SILENTSTEP2_DIRECTION_CLOCKWISE );
    if ( SILENTSTEP2_OK == silentstep2_rotate_by_angle( &silentstep2, 50, 90, SILENTSTEP2_STEP_RES_200 ) )
    {
        log_printf( &logger, "-----------------------------\r\n" );
        Delay_ms ( 1000 );
        Delay_ms ( 1000 );
    }

    log_printf( &logger, " Counterclockwise motion\r\n" );
    log_printf( &logger, " Angle of rotation :  180 deg\r\n" );
    log_printf( &logger, " Step speed        :  50 %%\r\n" );
    silentstep2_set_direction( &silentstep2, SILENTSTEP2_DIRECTION_COUNTERCLOCKWISE );
    if ( SILENTSTEP2_OK == silentstep2_rotate_by_angle( &silentstep2, 50, 180, SILENTSTEP2_STEP_RES_200 ) )
    {
        log_printf( &logger, "-----------------------------\r\n" );
        Delay_ms ( 1000 );
        Delay_ms ( 1000 );
    }

    log_printf( &logger, " Clockwise motion\r\n" );
    log_printf( &logger, " Angle of rotation : 270 deg\r\n" );
    log_printf( &logger, " Step speed        :  50 %% \r\n" );
    silentstep2_set_direction( &silentstep2, SILENTSTEP2_DIRECTION_CLOCKWISE );
    if ( SILENTSTEP2_OK == silentstep2_rotate_by_angle( &silentstep2, 50, 270, SILENTSTEP2_STEP_RES_200 ) )
    {
        log_printf( &logger, "-----------------------------\r\n" );
        Delay_ms ( 1000 );
        Delay_ms ( 1000 );
    }

    log_printf( &logger, " Counterclockwise motion\r\n" );
    log_printf( &logger, " Angle of rotation : 360 deg\r\n" );
    log_printf( &logger, " Step speed        : 90 %%\r\n" );
    silentstep2_set_direction( &silentstep2, SILENTSTEP2_DIRECTION_COUNTERCLOCKWISE );
    if ( SILENTSTEP2_OK == silentstep2_rotate_by_angle( &silentstep2, 90, 360, SILENTSTEP2_STEP_RES_200 ) )
    {
        log_printf( &logger, "-----------------------------\r\n" );
        Delay_ms ( 1000 );
        Delay_ms ( 1000 );
    }

    log_printf( &logger, " Clockwise motion\r\n" );
    log_printf( &logger, " Angle of rotation : 360 deg\r\n" );
    log_printf( &logger, " Step speed        : 90 %% \r\n" );
    silentstep2_set_direction( &silentstep2, SILENTSTEP2_DIRECTION_CLOCKWISE );
    if ( SILENTSTEP2_OK == silentstep2_rotate_by_angle( &silentstep2, 90, 360, SILENTSTEP2_STEP_RES_200 ) )
    {
        log_printf( &logger, "-----------------------------\r\n" );
        Delay_ms ( 1000 );
        Delay_ms ( 1000 );
    }
}

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.SilentStep2

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 MikroElektronika compilers.


ALSO FROM THIS AUTHOR

Button ALARM click

0

Button ALARM Click is a very interesting interactive gadget on a Click board™. It is an integrated capacitive touch sensor display in the form of a button. By utilizing an advanced capacitive touch sensing technology, the CTHS15CIC05ALARM sensor can successfully replace the traditional mechanical button, allowing very simplified yet reliable user interfaces to be developed. Besides the touch detection, this sensor also features a green power symbol icon with backlight, which makes the Click board™ very useful for building various stylized and visually appealing interfaces.

[Learn More]

DAC 7 click

5

DAC 7 Click carries Texas Instruments AD5624R, a low-power four-channel, 12-bit buffered Digital-to-Analog Converter. AD5624R converts digital value to the corresponding voltage level using external voltage reference.

[Learn More]

UWB 2 click

0

UWB 2 Click is a compact add-on board that brings Ultra-Wideband communication to any solution. This board features the DWM3000, an IEEE 802.15-z UWB transceiver module from Qorvo. This module fully aligns with FiRaTM PHY, MAC, and certification development. It uses an integrated UWB antenna to establish wireless communication in UWB channels 5 (6.5GHz) and 9 (8GHz). This Click board™ makes the perfect solution for developing precision real-time location systems (RTLS) using two-way ranging or TDoA schemes in various markets, location-aware wireless sensor networks (WSNs), and more.

[Learn More]