balancer3 2.0.0.0
Main Page

Balancer 3 click

‍Balancer 3 Click is overvoltage protection device for 2-series cell lithium-ion battery packs that incorporates a high-accuracy precision overvoltage detection circuit and automatic cell imbalance correction.

click Product page


Click library

  • Author : MikroE Team
  • Date : dec 2019.
  • Type : GPIO type

Software Support

We provide a library for the Balancer3 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 form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.

Library Description

‍This library contains API for Balancer3 Click driver.

Standard key functions :

Example key functions :

Examples Description

‍This application is device for 2-series cell lithium-ion battery.

The demo application is composed of two sections :

Application Init

‍Initializes device coummunication and enables cell balancing.

void application_init ( void )
{
log_cfg_t log_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
BALANCER3_MAP_MIKROBUS( cfg, MIKROBUS_1 );
balancer3_init( &balancer3, &cfg );
log_printf( &logger, "* Normal operation - Cell balance enabled *\r\n" );
log_info( &logger, " Application Task " );
}
#define BALANCER3_CELL_BALANCE_EN
Definition balancer3.h:82
#define BALANCER3_MAP_MIKROBUS(cfg, mikrobus)
Definition balancer3.h:65
void application_init(void)
Definition main.c:33

Application Task

‍Checks if overvoltage is occured and disables cell balancing. If overvoltage doesn't occur it enables cell balancing.

void application_task ( void )
{
static uint8_t old_ov_state = 0;
uint8_t ov_state = balancer3_check_overvoltage( &balancer3 );
if ( old_ov_state != ov_state )
{
old_ov_state = ov_state;
if ( BALANCER3_OV_COND_NOT_DETECTED == ov_state )
{
log_printf( &logger, "* Normal operation - Cell balance enabled *\r\n" );
}
else
{
log_printf( &logger, "* Overvoltage condition - Cell balance disabled * \r\n" );
}
}
Delay_ms ( 1 );
}
#define BALANCER3_OV_COND_NOT_DETECTED
Definition balancer3.h:91
#define BALANCER3_CELL_BALANCE_DIS
Definition balancer3.h:83
void application_task(void)
Definition main.c:62

The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.

Other mikroE Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.Balancer3

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. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.