How does it work?
Balancer 2 Click is Click board™ with two separate voltage battery monitoring circuitries, overvoltage supply detection, and automatic cell balancing. Balancer 2 click monitors the voltages on each battery and correct voltage difference. Combined with a LiPo/Li-Ion battery charger, this Click board™ can be used in a wide range of applications that can benefit from reliable and efficient battery charging circuit.
Balancer 2 Click is designed to balance two LiPo/Li-Ion batteries, wired in serial. It contains all needed an analog circuitry, made of two separate blocks, for each battery, which is needed for the described device. Each block consists of one MOSFET, used as a power transistor – Si7858BDP, from Vishay Siliconix. Besides the MOSFET, the circuit also contains transistor needed for automatic gate bias regulation, based on the current running through the shunt resistors (R7 and R17). Each output is also optocoupled, in order to ensure very good reliability of the Click board™, regardless of the external power supply used. For that, EL357N-G photocouplers were used, from Everlight.
Two circuit blocks described above, combined, make the battery cell balancer. Besides that, this Click board™ has protection for the supply voltage. if the supply voltage is higher then 8.4V, the main P-Mosfet is power off and safe battery.
The third part of the Balancer 2 Click is voltage monitoring circuitry, which is based on the MCP3202, Dual Channel 12-Bit A/D Converter with SPI Serial Interface, from Microchip. The cell voltages are brought to the ADC input, through the dedicated voltage dividers, serving to conditionate the voltage signal levels to ADC inputs. That way direct output voltage is achieved, so the user can switch the cell independently based on the voltage parameters read.
The voltage level of the logic section can be selected via VCC SEL jumper, between 3.3V and 5V. This allows for both 3.3V and 5V capable MCUs to use the SPI communication lines properly.
Specifications
Type
Battery charger
Applications
Balancer 2 click can be used for voltage monitor, power tools, battery balancing, portable equipment and instrumentation, to energy storage systems (ESS)
On-board modules
MCP3202, Dual Channel 12-Bit A/D Converter with SPI Serial Interface, from Microchip.
Key Features
Over-voltage protection, optocoupled outputs, independent cell voltage readings
Interface
GPIO,SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on Balancer 2 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | STAT | – | Status LED indicator |
VCC SEL | – | Left | Logic voltage level selection: left position 3.3V, right position 5V |
LD2 | PWR | – | Power LED indicator |
Balancer 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Battery balancing current | – | 250 | – | mA |
Overvoltage Protection accuracy | – | 20 | – | mV |
Input Voltage supply | – | 8.4 | – | V |
Input Current supply | – | 400 | – | mA |
Software Support
We provide a library for the Balancer2 Click 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 fucntion 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
Examples 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 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.
mikroSDK
This 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.
For more information about mikroSDK, visit the official page.