TOP Contributors

  1. MIKROE (2693 codes)
  2. Alcides Ramos (362 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 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 (137949 times)
  2. FAT32 Library (70758 times)
  3. Network Ethernet Library (56444 times)
  4. USB Device Library (46825 times)
  5. Network WiFi Library (42586 times)
  6. FT800 Library (41785 times)
  7. GSM click (29468 times)
  8. mikroSDK (27020 times)
  9. PID Library (26661 times)
  10. microSD click (25797 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-07-04

Package Version: 2.1.0.12

mikroSDK Library: 2.0.0.0

Category: Brushless

Downloaded: 194 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

BUCK 7 click

0

Buck 7 Click is a high-efficiency buck (step-down) DC-DC converter, which can provide digitally adjusted step-down voltage on its output while delivering up to 3.5A of current.

[Learn More]

Multi Stepper TB67S269 click

0

Multi Stepper Click is a compact add-on board that contains a bipolar stepper motor driver. This board features the TB67S269FTG, CLOCK-in controlled bipolar stepping motor driver from Toshiba Semiconductor. It supports a PWM constant-current control drive and allows from full-step up to 1/32 steps resolution for less motor noise and smoother control. It has a wide operating voltage range of 10V to 47V with an output current capacity of 1.4A in addition to several built-in error detection circuits.

[Learn More]

Step Down 6 click

0

Step Down 6 Click is a compact add-on board that converts higher voltages into lower ones. This board features the MPM54304, a quad-output power module from Monolithic Power Systems (MPS). It is a quad-output, DC/DC step-down power module with up to 3A per output on channels 1 and 2 and up to 2A per channels 3 and 4, providing continuous current on all four channels.

[Learn More]