TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139248 times)
  2. FAT32 Library (71743 times)
  3. Network Ethernet Library (57115 times)
  4. USB Device Library (47428 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28073 times)
  9. PID Library (26885 times)
  10. microSD click (26198 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: 22 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

Brushless 30 Click

0

Brushless 30 Click is a compact add-on board for precise and reliable control of brushless motors. This board features the TB9083FTG, a gate-driver IC from Toshiba Semiconductor, known for its robust performance in automotive environments. It also includes additional header pins for 6 PWM inputs , safety relays and current sense amplifiers. Comprehensive error detection capabilities, as required from automotive devices, are included. Brushless 30 Click is ideal for demanding automotive applications such as electric power steering (EPS), powered brakes, and automotive pumps where high-precision motor control is crucial.

[Learn More]

WiFly click - Example

5

WiFly click is the simplest way to add WiFi to your devices. This click features the well-known RN131 802.11 b/g Wi-Fi module from Microchip. The click communicates with the MCU over UART and runs on a 3.3V power supply. It has an onboard ceramic chip antenna and a connector for an external antenna.

[Learn More]

Thermo K Click

0

THERMO K Click carries the MCP9600 IC from Microchip. Depending on the type of probe it uses the Click can measure temperatures from −200 °C to +1372 °C.

[Learn More]