Balancer 2 Click Board
Balancer 2 Click Board
The Balancer 2 Click Board™ is an overvoltage protection device for a 2-series cell lithium-ion battery. Click contains two separate overvoltage battery detection circuits and automatic cell imbalance correction. It can be used for various applications, power tools, portable equipment, and instrumentation, to energy storage systems (ESS), while providing the output voltage at the same time. By utilizing an externally connected power supply, it can charge 2-cell Li-Ion batteries.
The Balancer 2 Click Board™ is supported by the mikroSDK compliant library, which includes functions that simplify software development. The Click Board™ comes as a fully tested product, ready to be used on a system equipped with mikroBUS™.
Software Support
We provide a library for the Balancer 2 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
Library provides control over device pins and SPI comuncation. You can read battery capacity level and it provides functions for generic spi transfer function.
Key Functions
void balancer2_generic_transfer ( uint8_t *tx_buf, uint8_t *rx_buf, uint8_t buf_len )
- Generic function for SPI communicationfloat balancer2_get_batttery_lvl ( uint8_t bat_num )
- Get specific battery capcitive lvluint16_t balancer2_read_adc ( uint8_t cmd_byte )
- Read ADC value from SPI
Example Description
The application is composed of three sections :
- System Initialization - Initialization of SPI module and additional pins
- Application Initialization - Sets reference volatage of device, s ets pins for supply and cells to high
- Application Task - Every 2 seconds logs readings of battery mV lvl
void application_task ( ) { float battery; char demo_str[ 30 ]; battery = balancer2_get_batttery_lvl( BALANCER2_BATT1 ); FloatToStr( battery, demo_str ); mikrobus_logWrite( "Battery 1 : ", _LOG_TEXT ); mikrobus_logWrite( demo_str, _LOG_TEXT ); mikrobus_logWrite( " mV", _LOG_LINE ); battery = balancer2_get_batttery_lvl( BALANCER2_BATT2 ); FloatToStr( battery, demo_str ); mikrobus_logWrite( "Battery 2 : ", _LOG_TEXT ); mikrobus_logWrite( demo_str, _LOG_TEXT ); mikrobus_logWrite( " mV", _LOG_LINE ); battery = balancer2_get_batttery_lvl( BALANCER2_BATT_BOTH ); FloatToStr( battery, demo_str ); mikrobus_logWrite( "Batteries : ", _LOG_TEXT ); mikrobus_logWrite( demo_str, _LOG_TEXT ); mikrobus_logWrite( " mV", _LOG_LINE ); mikrobus_logWrite( "__________________________________________", _LOG_LINE ); Delay_ms( 2000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- SPI
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need a 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.
MIKROSDK
The Balancer 2 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
Balancer 2 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.