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]
Rating:
Author: MIKROE
Last Updated: 2024-10-31
Package Version: 2.1.0.8
mikroSDK Library: 2.0.0.0
Category: Brushless
Downloaded: 122 times
Not followed.
License: MIT license
Brushless 24 Click is a compact add-on board that controls brushless DC (BLDC) motors with any MCU. This board features the DRV10866, a 3- phase sensorless motor driver from Texas Instruments with integrated power MOSFETs with current drive capability up to 800mA peak. The DRV10866 implements a 150° commutation (sensorless BEMF control scheme) for a 3-phase motor alongside a synchronous rectification mode of operation that achieves increased efficiency for motor driver applications. Besides choosing the motor speed and a wide operating voltage range of up to 5V, it also has several built-in protection circuits, such as undervoltage, lock detection, voltage surge protection, and overtemperature.
Do you want to subscribe in order to receive notifications regarding "Brushless 24 Click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Brushless 24 Click" changes.
Do you want to report abuse regarding "Brushless 24 Click".
DOWNLOAD LINK | RELATED COMPILER | CONTAINS |
---|---|---|
5091_brushless_24_cli.zip [439.88KB] | mikroC AI for ARM GCC for ARM Clang for ARM mikroC AI for PIC mikroC AI for PIC32 XC32 GCC for RISC-V Clang for RISC-V mikroC AI for AVR mikroC AI for dsPIC XC16 |
|
Brushless 24 Click is a compact add-on board that controls brushless DC (BLDC) motors with any MCU. This board features the DRV10866, a 3- phase sensorless motor driver from Texas Instruments with integrated power MOSFETs with current drive capability up to 800mA peak. The DRV10866 implements a 150° commutation (sensorless BEMF control scheme) for a 3-phase motor alongside a synchronous rectification mode of operation that achieves increased efficiency for motor driver applications. Besides choosing the motor speed and a wide operating voltage range of up to 5V, it also has several built-in protection circuits, such as undervoltage, lock detection, voltage surge protection, and overtemperature.
We provide a library for the Brushless 24 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.
This library contains API for Brushless 24 Click driver.
brushless24_cfg_setup
Config Object Initialization function.
void brushless24_cfg_setup ( brushless24_cfg_t *cfg );
brushless24_init
Initialization function.
err_t brushless24_init ( brushless24_t *ctx, brushless24_cfg_t *cfg );
brushless24_default_cfg
Click Default Configuration function.
err_t brushless24_default_cfg ( brushless24_t *ctx );
brushless24_set_duty_cycle
Brushless 24 sets PWM duty cycle.
err_t brushless24_set_duty_cycle ( brushless24_t *ctx, float duty_cycle );
brushless24_pwm_start
Brushless 24 start PWM module.
err_t brushless24_pwm_start ( brushless24_t *ctx );
brushless24_get_int_state
Brushless 24 get INT pin state.
uint8_t brushless24_get_int_state ( brushless24_t *ctx );
This application is a schowcase of controlling speed of brushless motor using Brushless 24 Click.
The demo application is composed of two sections :
Initialization of LOG, PWM module and additional pins.
void application_init ( void )
{
log_cfg_t log_cfg; /**< Logger config object. */
brushless24_cfg_t brushless24_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.
brushless24_cfg_setup( &brushless24_cfg );
BRUSHLESS24_MAP_MIKROBUS( brushless24_cfg, MIKROBUS_1 );
if ( PWM_ERROR == brushless24_init( &brushless24, &brushless24_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
if ( BRUSHLESS24_ERROR == brushless24_default_cfg ( &brushless24 ) )
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
log_info( &logger, " Application Task " );
}
In a span of second changes duty cycle from 0 to 100% which is changing speed of the motor.
void application_task ( void )
{
static int8_t duty_cnt = 1;
static int8_t duty_inc = 1;
float duty = duty_cnt / 10.0;
brushless24_set_duty_cycle ( &brushless24, duty );
log_printf( &logger, "> Duty: %d%%\r\n", ( uint16_t )( duty_cnt * 10 ) );
Delay_ms ( 1000 );
if ( 10 == duty_cnt )
{
duty_inc = -1;
}
else if ( 0 == duty_cnt )
{
duty_inc = 1;
}
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:
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.