TOP Contributors

  1. MIKROE (2656 codes)
  2. Alcides Ramos (353 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136785 times)
  2. FAT32 Library (69980 times)
  3. Network Ethernet Library (55951 times)
  4. USB Device Library (46274 times)
  5. Network WiFi Library (41889 times)
  6. FT800 Library (41184 times)
  7. GSM click (28988 times)
  8. PID Library (26420 times)
  9. mikroSDK (26374 times)
  10. microSD click (25382 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

Balancer 2 click

Rating:

5

Author: MIKROE

Last Updated: 2020-04-15

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Battery Charger

Downloaded: 1927 times

Not followed.

License: MIT license  

Balancer 2 Click 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.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Balancer 2 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Balancer 2 click" changes.

Do you want to report abuse regarding "Balancer 2 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

Balancer 2 Click

Balancer 2 Click

Native view of the Balancer 2 Click board.

View full image
Balancer 2 Click

Balancer 2 Click

Front and back view of the Balancer 2 Click board.

View full image

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 communication
  • float balancer2_get_batttery_lvl ( uint8_t bat_num ) - Get specific battery capcitive lvl
  • uint16_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 );
}

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 clickUSB 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.

ALSO FROM THIS AUTHOR

DAC 8 click

0

DAC 8 Click is a compact add-on board that contains a fully-featured, general-purpose voltage-output digital-to-analog converter.

[Learn More]

BIG 7-SEG R click

0

BIG 7-SEG R click is what you need if you want to add a seven-segment LED display to your project. This click features an SC10-21SRWA 7-segment display. Communication between the MCU and the SC10-21SRWA display is established via serial-IN, parallel-OUT shift register 74HC595 IC.

[Learn More]

RTK Rover click

0

RTK Rover Click is a compact add-on board that enhances the precision of position data derived from compatible RTK Base Station. This board features Quectel’s LG69TAMMD, a dual-band multi-constellation GNSS module featuring a high-performance and high-reliability positioning engine. This module facilitates a fast and precise GNSS positioning capability for centimeter-level accuracy, featuring the fifth generation of STMicroelectronics® positioning receiver platform with 80 tracking and four fast acquisition channels. It supports up to 3 concurrent global constellations (GPS/QZSS, Galileo, and BDS) alongside NMEA 0183/RTCM 3.x protocol and commonly used UART interface.

[Learn More]