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: 2019-09-11
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Battery Charger
Downloaded: 3108 times
Not followed.
License: MIT license
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.
Do you want to subscribe in order to receive notifications regarding "Balancer 3 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Balancer 3 click" changes.
Do you want to report abuse regarding "Balancer 3 click".
Library Description
This library allows user to perform a control of the Balancer 3 Click board and to check the Overvoltage condition status. This click also can be used for power supply with the voltage range from 6V to 8.4V. For more details check documentation.
Key functions:
void balancer3_gpioDriverInit( T_BALANCER3_P gpioObj )
- This function initializes GPIO driver.void balancer3_enable_cell_balance( uint8_t state )
- This function allows user to enable or disable Cell Balance (cell mismatch correction circuitry).uint8_t balancer3_check_overvoltage_cond( void )
- This function checks the Overvoltage condition.Examples description
The application is composed of three sections :
void applicationTask()
{
rx_dat = UART_Rdy_Ptr();
if (rx_dat != _RX_NOT_READY)
{
rx_dat = UART_Rd_Ptr();
switch (rx_dat)
{
case '0' :
{
balancer3_enable_cell_balance( _BALANCER3_CELL_BALANCE_DIS );
mikrobus_logWrite( "* Cell balance is disabled *", _LOG_LINE );
break;
}
case '1' :
{
balancer3_enable_cell_balance( _BALANCER3_CELL_BALANCE_EN );
mikrobus_logWrite( "* Cell balance is enabled *", _LOG_LINE );
break;
}
case '2' :
{
time_inter = 8000;
break;
}
default :
{
break;
}
}
}
ov_cond = balancer3_check_overvoltage_cond();
if ((time_inter == 8000) || (ov_cond == _BALANCER3_OV_COND_DETECTED))
{
if (ov_cond == _BALANCER3_OV_COND_NOT_DETECTED)
{
mikrobus_logWrite( "* Overvoltage condition is not detected *", _LOG_LINE );
time_inter = 0;
}
else if (time_inter > 2000)
{
mikrobus_logWrite( "* Overvoltage condition is detected *", _LOG_LINE );
time_inter = 0;
}
else
{
time_inter++;
}
}
else
{
time_inter++;
}
Delay_ms( 1 );
}
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.