TOP Contributors

  1. MIKROE (2650 codes)
  2. Alcides Ramos (350 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 (136556 times)
  2. FAT32 Library (69760 times)
  3. Network Ethernet Library (55856 times)
  4. USB Device Library (46198 times)
  5. Network WiFi Library (41818 times)
  6. FT800 Library (41023 times)
  7. GSM click (28933 times)
  8. PID Library (26386 times)
  9. mikroSDK (26297 times)
  10. microSD click (25307 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-04-03

Package Version: 2.1.0.11

mikroSDK Library: 2.0.0.0

Category: Brushless

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

LSM303AGR click

0

LSM303AGR click is a magnetometer and accelerometer device, capable of sensing both the magnetic and gravitational field along three orthogonal axes. It uses the LSM303AGR from STMicroelectronics, an integrated MEMS IC with plenty of features that allow accurate and reliable sensing, even in presence of foreign objects made of iron and similar materials that exhibit ferromagnetic behavior. An extensive interrupt engine can be programmed to generate an interrupt signal for free-falling events, motion detection, and magnetic field detection. The Click board™ can sense the magnetic field in the range of ±50 G (gauss) and ±2g, ±4g, ±8g, and ±16g selectable ranges for the full-scale acceleration detection (gravity force).

[Learn More]

Microwave 2 click

0

Microwave 2 click is an accurate and reliable short to medium range motion detection Click board™, based on a Doppler radar principle.

[Learn More]

GNSS 3 Click

5

GNSS3 click carries SIMCom’s SIM33ELA standalone GNSS module with an integrated antenna (and a connector for an external one).

[Learn More]