TOP Contributors

  1. MIKROE (2650 codes)
  2. Alcides Ramos (350 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 (136552 times)
  2. FAT32 Library (69755 times)
  3. Network Ethernet Library (55853 times)
  4. USB Device Library (46193 times)
  5. Network WiFi Library (41813 times)
  6. FT800 Library (41009 times)
  7. GSM click (28930 times)
  8. PID Library (26386 times)
  9. mikroSDK (26296 times)
  10. microSD click (25304 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: 1917 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

ISM click

1

ISM Click is a compact add-on board that contains a complete wireless RF digital data transceiver. This board features the RFM75, a low-power, high-performance 2.4GHz GFSK transceiver from RF Solutions. The RFM75 transceiver is configurable through SPI serial interface and operates with only 3.3V in the worldwide ISM frequency band from 2400MHz up to 2527MHz. The embedded packet processing engines enable their entire operation with a simple MCU as a radio system. Burst mode transmission and up to 2Mbps air data rate make it suitable for applications requiring ultra-low power consumption.

[Learn More]

Multi Stepper TB67S209 click

0

Multi Stepper Click is a compact add-on board that contains a bipolar stepper motor driver. This board features the TB67S209FTG, CLOCK-in controlled bipolar stepping motor driver from Toshiba Semiconductor. It supports a PWM constant-current control drive, selectable mixed decay mode, and allows from full-step up to 1/32 steps resolution for less motor noise and smoother control. It has a wide operating voltage range of 10V to 47V with an output current capacity of 2.8A in addition to several built-in error detection circuits.

[Learn More]

2x2 RGB click

0

2x2 RGB Click is a compact add-on board that contains a matrix of 4 “intelligent” RGB elements, forming a 2x2 display screen. This board features the KTD2052A, a 12-channel RGB LED driver from Kinetic Technologies. It is a fully programmable current regulator for up to four RGB LEDs (12 LEDs in total). The LED matrix consists of four LRTB GFTG, a 6-lead in-line MULTILEDs, from ams OSRAM. The LEDs have a 120-degree viewing angle.

[Learn More]