TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139250 times)
  2. FAT32 Library (71747 times)
  3. Network Ethernet Library (57120 times)
  4. USB Device Library (47430 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28074 times)
  9. PID Library (26885 times)
  10. microSD click (26198 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: 2322 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

Nano Power Click

0

Nano Power Click is a boost (step-up) DC-DC converter Click with extremely high efficiency and very low input voltage, aimed at the low power IoT market and battery-powered sensors and other devices.

[Learn More]

NDIR CO2 Click

0

NDIR CO2 Click is an advanced integrated CO2 gas sensor system, which is able to measure an absolute CO2 concentration, by utilizing the CDM7160 integrated sensor.

[Learn More]

Echo Server

0

The application demonstrates CycloneTCP echo server functionality.

[Learn More]