TOP Contributors

  1. MIKROE (2779 codes)
  2. Alcides Ramos (376 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 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 (139559 times)
  2. FAT32 Library (72040 times)
  3. Network Ethernet Library (57254 times)
  4. USB Device Library (47607 times)
  5. Network WiFi Library (43219 times)
  6. FT800 Library (42551 times)
  7. GSM click (29930 times)
  8. mikroSDK (28292 times)
  9. PID Library (26930 times)
  10. microSD click (26309 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

Brushless 31 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.2

mikroSDK Library: 2.0.0.0

Category: Brushless

Downloaded: 28 times

Not followed.

License: MIT license  

Brushless 31 Click is a compact add-on board for precise and efficient brushless motor control. This board features the TB6605FTG, a three-phase full sine-wave brushless motor controller from Toshiba Semiconductor. The board features six onboard external N-channel MOSFETs for smooth motor operation, sine-wave PWM driving with 2-phase modulation for high efficiency and low noise, and includes essential functions like dead time, brake, and manual/auto lead-angle control. It supports clockwise and counterclockwise rotation and offers motor lock protection for added safety. Brushless 31 Click is ideal for home appliances, fans, and office equipment applications, where reliable and precise motor control is critical.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Brushless 31 Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Brushless 31 Click" changes.

Do you want to report abuse regarding "Brushless 31 Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


Brushless 31 Click

Brushless 31 Click is a compact add-on board for precise and efficient brushless motor control. This board features the TB6605FTG, a three-phase full sine-wave brushless motor controller from Toshiba Semiconductor. The board features six onboard external N-channel MOSFETs for smooth motor operation, sine-wave PWM driving with 2-phase modulation for high efficiency and low noise, and includes essential functions like dead time, brake, and manual/auto lead-angle control. It supports clockwise and counterclockwise rotation and offers motor lock protection for added safety. Brushless 31 Click is ideal for home appliances, fans, and office equipment applications, where reliable and precise motor control is critical.

brushless31_click.png

Click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Aug 2024.
  • Type : PWM type

Software Support

We provide a library for the Brushless 31 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 Brushless 31 Click driver.

Standard key functions :

  • brushless31_cfg_setup Config Object Initialization function.

    void brushless31_cfg_setup ( brushless31_cfg_t *cfg );
  • brushless31_init Initialization function.

    err_t brushless31_init ( brushless31_t *ctx, brushless31_cfg_t *cfg );
  • brushless31_default_cfg Click Default Configuration function.

    err_t brushless31_default_cfg ( brushless31_t *ctx );

Example key functions :

  • brushless31_set_duty_cycle This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).

    err_t brushless31_set_duty_cycle ( brushless31_t *ctx, float duty_cycle );
  • brushless31_pull_brake This function pulls brake by setting the BRAKE pin to low logic state.

    void brushless31_pull_brake ( brushless31_t *ctx );
  • brushless31_switch_direction This function switches the direction of motor rotation by toggling the DIR pin logic state.

    void brushless31_switch_direction ( brushless31_t *ctx );

Example Description

This example demonstrates the use of the Brushless 31 Click board by driving the motor in both directions at different speeds.

The demo application is composed of two sections :

Application Init

Initializes the driver and performs the Click default configuration.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    brushless31_cfg_t brushless31_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.
    brushless31_cfg_setup( &brushless31_cfg );
    BRUSHLESS31_MAP_MIKROBUS( brushless31_cfg, MIKROBUS_1 );
    if ( PWM_ERROR == brushless31_init( &brushless31, &brushless31_cfg ) )
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( BRUSHLESS31_ERROR == brushless31_default_cfg ( &brushless31 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

    log_info( &logger, " Application Task " );
}

Application Task

Controls the motor speed by changing the PWM duty cycle every 500 milliseconds. The duty cycle ranges from 80% to 0%. At the minimal speed, the motor switches direction. Each step will be logged on the USB UART where you can track the program flow.

void application_task ( void )
{
    static int8_t duty_cnt = 8;
    static int8_t duty_inc = -1;
    float duty = duty_cnt / 10.0;

    brushless31_set_duty_cycle ( &brushless31, duty );
    log_printf( &logger, "> Duty: %d%%\r\n", ( uint16_t )( duty_cnt * 10 ) );

    Delay_ms ( 500 );

    duty_cnt += duty_inc;
    if ( duty_cnt > 8 ) 
    {        
        duty_cnt = 8;
        duty_inc = -1;
        log_printf( &logger, " Pull brake\r\n" );
        brushless31_pull_brake ( &brushless31 );
        Delay_ms ( 1000 );
        log_printf( &logger, " Switch direction\r\n" );
        brushless31_switch_direction ( &brushless31 );
        Delay_ms ( 1000 );
        log_printf( &logger, " Release brake\r\n" );
        brushless31_release_brake ( &brushless31 );
        Delay_ms ( 1000 );
    }
    else if ( duty_cnt < 0 ) 
    {
        duty_cnt = 1;
        duty_inc = 1;
    }
}

Note

This Click board is designed for 5V systems but can also be controlled with 3V3 GPIO lines. Ensure your MCU is 5V tolerant on mikroBUS GPIO lines before turning on the power supply.

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

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

Barometer 9 Click

0

Barometer 9 Click is a compact add-on board ideal for precision activity tracking and indoor navigation/localization. This board features the ENS220, a barometric pressure and temperature sensor from ScioSense

[Learn More]

Thermo 25 Click

0

Thermo 25 Click is a compact add-on board that accurately measures temperature. This board features the TMP127-Q1, a high-precision digital temperature sensor from Texas Instruments. This SPI-configurable factory-calibrated temperature sensor has a high accuracy of 0.8°C, supporting an ambient temperature range from -55°C to 175°C. It features a 14-bit signed temperature resolution (0.03125 °C per LSB) while operating over a supply range.

[Learn More]

LED Driver 18 Click

0

LED Driver 18 Click is a compact add-on board that simplifies the control of multiple LEDs. This board features the TLC5947, a 24-channel LED driver from Texas Instruments. Each channel is individually adjustable with 4096 pulse-width modulated (PWM) steps and has a programmable current value of all channels with a maximum of 30mA of LED current per channel.

[Learn More]