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 (139563 times)
  2. FAT32 Library (72041 times)
  3. Network Ethernet Library (57254 times)
  4. USB Device Library (47615 times)
  5. Network WiFi Library (43219 times)
  6. FT800 Library (42563 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 23 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.13

mikroSDK Library: 2.0.0.0

Category: Brushless

Downloaded: 317 times

Not followed.

License: MIT license  

Brushless 23 Click is a compact add-on board suitable for controlling BLDC motors with any MCU. This board features the TC78B011FTG, a three-phase sine-wave PWM pre-driver realized with six external MOSFETs to drive sensorless brushless motors from Toshiba Semiconductor. Some of the main features are a built-in closed-loop speed control function with internal non-volatile memory (NVM) for speed profile setting and the ability to set other features such as rotation direction selection, brake, Standby mode, and others. It also has a wide operating voltage range of 11V to 27V with an output current capacity of 5A and several built-in error detection circuits.

No Abuse Reported

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

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

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

  • Information
  • Comments (0)

mikroSDK Library Blog


Brushless 23 Click

Brushless 23 Click is a compact add-on board suitable for controlling BLDC motors with any MCU. This board features the TC78B011FTG, a three-phase sine-wave PWM pre-driver realized with six external MOSFETs to drive sensorless brushless motors from Toshiba Semiconductor. Some of the main features are a built-in closed-loop speed control function with internal non-volatile memory (NVM) for speed profile setting and the ability to set other features such as rotation direction selection, brake, Standby mode, and others. It also has a wide operating voltage range of 11V to 27V with an output current capacity of 5A and several built-in error detection circuits.

brushless23_click.png

Click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Mar 2022.
  • Type : I2C type

Software Support

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

Standard key functions :

  • brushless23_cfg_setup Config Object Initialization function.

    void brushless23_cfg_setup ( brushless23_cfg_t *cfg );
  • brushless23_init Initialization function.

    err_t brushless23_init ( brushless23_t *ctx, brushless23_cfg_t *cfg );
  • brushless23_default_cfg Click Default Configuration function.

    err_t brushless23_default_cfg ( brushless23_t *ctx );

Example key functions :

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

    err_t brushless23_pwm_set_duty_cycle ( brushless23_t *ctx, float duty_cycle );
  • brushless23_switch_direction This function switches the direction by toggling the DIR pin state.

    void brushless23_switch_direction ( brushless23_t *ctx );
  • brushless23_get_motor_speed This function reads the motor speed in Hz.

    err_t brushless23_get_motor_speed ( brushless23_t *ctx, float *motor_speed_hz );

Example Description

This example demonstrates the use of the Brushless 23 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. */
    brushless23_cfg_t brushless23_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.
    brushless23_cfg_setup( &brushless23_cfg );
    BRUSHLESS23_MAP_MIKROBUS( brushless23_cfg, MIKROBUS_1 );
    if ( I2C_MASTER_ERROR == brushless23_init( &brushless23, &brushless23_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( BRUSHLESS23_ERROR == brushless23_default_cfg ( &brushless23 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

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

Application Task

Controls the motor speed by changing the PWM duty cycle every 2 seconds. The duty cycle ranges from 20% to 80%. 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 = 2;
    static int8_t duty_inc = 1;
    float duty = duty_cnt / 10.0;
    brushless23_pwm_set_duty_cycle ( &brushless23, duty );
    log_printf( &logger, "\r\n Duty cycle: %u%%\r\n", ( uint16_t )( duty_cnt * 10 ) );
    Delay_ms ( 1000 );
    Delay_ms ( 500 );
    float motor_speed_hz = 0;
    if ( BRUSHLESS23_OK == brushless23_get_motor_speed ( &brushless23, &motor_speed_hz ) )
    {
        log_printf( &logger, " Speed: %.1f Hz\r\n", motor_speed_hz );
    }
    duty_cnt += duty_inc;
    if ( duty_cnt > 8 ) 
    {
        duty_cnt = 7;
        duty_inc = -1;
    }
    else if ( duty_cnt < 2 ) 
    {
        duty_cnt = 2;
        duty_inc = 1;
        log_printf( &logger, "\r\n Switch direction\r\n" );
        brushless23_pwm_set_duty_cycle ( &brushless23, BRUSHLESS23_DUTY_CYCLE_MIN_PCT );
        Delay_ms ( 500 );
        brushless23_switch_direction ( &brushless23 );
    }
    Delay_ms ( 500 );
}

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

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

Relay Click

0

Relay Click is a dual relay Click board, which can be operated by the host MCU. This Click board offers an elegant and easy solution for controlling a wide range of high power applications.

[Learn More]

MINI-M4 STM32 Board Examples

0

Examples for MINI-M4 STM32 Board. Provided examples demonstrate working with on-board LEDs and internal USB HID module.

[Learn More]

Qi RX Click

0

Qi RX Click is a compact add-on board made for the purpose of wireless power transfer. This board features the PIC16F15313, a general-purpose 8-bit MCU that makes a flexible, low-cost alternative to the wireless charging solutions based on ASICs from Microchip.

[Learn More]