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 14 click

Rating:

0

Author: MIKROE

Last Updated: 2024-07-04

Package Version: 2.1.0.14

mikroSDK Library: 2.0.0.0

Category: Brushless

Downloaded: 165 times

Not followed.

License: MIT license  

Brushless 14 Click is a compact add-on board suitable for controlling BLDC motors with any MCU. This board features the TB67B001FTG, a three-phase, brushless, Hall sensorless driver IC from Toshiba Semiconductor.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Brushless 14 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Brushless 14 click" changes.

Do you want to report abuse regarding "Brushless 14 click".

  • Information
  • Comments (0)

mikroSDK Library Blog


Brushless 14 click

Brushless 14 Click is a compact add-on board suitable for controlling BLDC motors with any MCU. This board features the TB67B001FTG, a three-phase, brushless, Hall sensorless driver IC from Toshiba Semiconductor.

brushless_14_click.png

click Product page


Click library

  • Author : Luka Filipovic
  • Date : Jul 2021.
  • Type : I2C type

Software Support

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

Standard key functions :

  • brushless14_cfg_setup Config Object Initialization function.

    void brushless14_cfg_setup ( brushless14_cfg_t *cfg );
  • brushless14_init Initialization function.

    err_t brushless14_init ( brushless14_t *ctx, brushless14_cfg_t *cfg );
  • brushless14_default_cfg Click Default Configuration function.

    err_t brushless14_default_cfg ( brushless14_t *ctx );

Example key functions :

  • brushless14_set_duty_cycle Sets PWM duty cycle.

    err_t brushless14_set_duty_cycle ( brushless14_t *ctx, float duty_cycle );
  • brushless14_set_la Set lead angle setting input.

    err_t brushless14_set_la ( brushless14_t *ctx, uint16_t m_voltage );
  • brushless14_set_dir Set dirrection pin state.

    void brushless14_set_dir ( brushless14_t *ctx, uint8_t state );

Example Description

This application example showcases ability of the device to control motor, It's speed and rotation direction. Also it gives user ability to change other configuration parameters.

The demo application is composed of two sections :

Application Init

Initialization of communication modules (I2C, PWM, UART) and additional pins (INT, DIR). It reads ID from DAC ic to confirm communcation. Then configures device for control.


void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    brushless14_cfg_t brushless14_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.
    brushless14_cfg_setup( &brushless14_cfg );
    BRUSHLESS14_MAP_MIKROBUS( brushless14_cfg, MIKROBUS_1 );
    err_t init_flag = brushless14_init( &brushless14, &brushless14_cfg );
    if ( I2C_MASTER_ERROR == init_flag ) 
    {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }

    uint16_t data_read = 0;
    brushless14_dac_read( &brushless14, 0x02, &data_read);
    if ( BRUSHLESS14_DAC_ID != data_read )
    {
        log_error( &logger, " Communication. " );
    }

    brushless14_default_cfg ( &brushless14 );

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

Application Task

Drives motor using PWM from 10% duty cycle to 100% and back to 0%. Increment is done by 10% in span of 2 seconds. Whenever application gets to 0% duty cycle it chages direction of rotation.


void application_task ( void ) 
{
    static int8_t duty_cnt = 1;
    static int8_t duty_inc = 1;
    static uint8_t direction = 0;
    float duty = duty_cnt / 10.0;

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

    Delay_ms ( 1000 );
    Delay_ms ( 1000 );

    if ( 10 == duty_cnt ) 
    {
        duty_inc = -1;
    }
    else if ( 0 == duty_cnt ) 
    {
        duty_inc = 1;
        direction = !direction;
        brushless14_set_dir( &brushless14, direction );
    }
    duty_cnt += duty_inc;
}

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

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

Rotary W 2 click

0

Rotary W 2 Click is a compact add-on board that allows you to add a precision input knob to your design. This board features the TLC5925, a low-power 16-channel constant-current LED sink driver from Texas Instruments that, combined with a high-quality rotary encoder from ALPS, the EC12D1564402, allows you to add a precision input knob to your design. It also features an LED ring composed of 16 individual white LEDs that can be used to represent the encoder position more visually.

[Learn More]

LV-32MX v6 Examples

0

Examples for LV-32MX v6 development system

[Learn More]

Multi Stepper TB62269 click

0

Multi Stepper Click is a compact add-on board that contains a bipolar stepper motor driver. This board features the TB62269FTG, PWM method 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 38V with an output current capacity of 1.2A in addition to several built-in error detection circuits.

[Learn More]