TOP Contributors

  1. MIKROE (2658 codes)
  2. Alcides Ramos (355 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 (136935 times)
  2. FAT32 Library (70057 times)
  3. Network Ethernet Library (56013 times)
  4. USB Device Library (46328 times)
  5. Network WiFi Library (41936 times)
  6. FT800 Library (41261 times)
  7. GSM click (29046 times)
  8. mikroSDK (26454 times)
  9. PID Library (26435 times)
  10. microSD click (25391 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

Charger 6 click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.14

mikroSDK Library: 2.0.0.0

Category: Battery Charger

Downloaded: 143 times

Not followed.

License: MIT license  

Charger 6 Click is a compact add-on board that represents a single-cell battery charger. This board features the BQ25601, an I2C controlled battery charger for high input voltage and narrow voltage DC power path management from Texas Instruments. This buck charger supports USB, and it’s optimized for USB voltage input. The low impedance power path optimizes switch-mode operation efficiency, reduces battery charging time, and extends battery life during discharge. It also has a programmable current limiting, allowing it to use an external power supply rated up to 13.5V. This Click board™ is suitable as a Li-Ion and Li-polymer battery charger for portable devices and accessories, power tools, and more.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Charger 6 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Charger 6 click" changes.

Do you want to report abuse regarding "Charger 6 click".

  • Information
  • Comments (0)

mikroSDK Library Blog


Charger 6 click

Charger 6 Click is a compact add-on board that represents a single-cell battery charger. This board features the BQ25601, an I2C controlled battery charger for high input voltage and narrow voltage DC power path management from Texas Instruments. This buck charger supports USB, and it’s optimized for USB voltage input. The low impedance power path optimizes switch-mode operation efficiency, reduces battery charging time, and extends battery life during discharge. It also has a programmable current limiting, allowing it to use an external power supply rated up to 13.5V. This Click board™ is suitable as a Li-Ion and Li-polymer battery charger for portable devices and accessories, power tools, and more.

charger6_click.png

click Product page


Click library

  • Author : Nenad Filipovic
  • Date : Feb 2021.
  • Type : I2C type

Software Support

We provide a library for the Charger6 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on mikroE github account.

Library Description

This library contains API for Charger6 Click driver.

Standard key functions :

  • charger6_cfg_setup Config Object Initialization function.

    void charger6_cfg_setup ( charger6_cfg_t *cfg );
  • charger6_init Initialization function.

    CHARGER6_RETVAL charger6_init ( charger6_t *ctx, charger6_cfg_t *cfg );
  • charger6_default_cfg Click Default Configuration function.

    void charger6_default_cfg ( charger6_t *ctx );

Example key functions :

  • charger6_set_system_minimum_voltage Charger 6 set system minimum voltage function.

    err_t charger6_set_system_minimum_voltage ( charger6_t *ctx, uint16_t sys_min_voltage );
  • charger6_set_fast_charge_current Charger 6 set fast charge current function.

    err_t charger6_set_fast_charge_current ( charger6_t *ctx, uint16_t fast_chg_current );
  • charger6_get_status Charger 6 get status function.

    err_t charger6_get_status ( charger6_t *ctx, charger6_status_t *chg_status );

Example Description

This library contains API for the Charger 6 Click driver. The library contains drivers to enable/disable battery charging, set current limit, set system min voltage, set fast charge current, set charge voltage, etc.

The demo application is composed of two sections :

Application Init

Initializes I2C driver and set default configuration: input current limit set to 500 mA, system minimum voltage to 3500 mV, fast charge current set to 360 mA, charge voltage to 4112 mV and enable battery charging.


void application_init ( void ) {
    log_cfg_t log_cfg;            /**< Logger config object. */
    charger6_cfg_t charger6_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.

    charger6_cfg_setup( &charger6_cfg );
    CHARGER6_MAP_MIKROBUS( charger6_cfg, MIKROBUS_1 );
    err_t init_flag = charger6_init( &charger6, &charger6_cfg );
    if ( init_flag == I2C_MASTER_ERROR ) {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }

    charger6_default_cfg ( &charger6 );
    log_info( &logger, " Application Task " );
    Delay_ms ( 1000 );

    log_printf( &logger, "-------------------------------\r\n" );
    log_printf( &logger, " Set Current Limit   :  500 mA \r\n" );
    charger6_set_input_current_limit( &charger6, 500 );
    Delay_ms ( 100 );

    log_printf( &logger, " Set Sys Min Voltage : 3500 mV \r\n" );
    charger6_set_system_minimum_voltage( &charger6, 3500 );
    Delay_ms ( 100 );

    log_printf( &logger, " Set Fast Chg Current:  360 mA \r\n" );
    charger6_set_fast_charge_current( &charger6, 360 );
    Delay_ms ( 100 );

    log_printf( &logger, " Set Charge Voltage  : 4112 mV \r\n" );
    charger6_set_charge_voltage( &charger6, 4112 );
    Delay_ms ( 100 );

    log_printf( &logger, " >> Enable Battery Charging << \r\n" );
    charger6_enable_battery_charging( &charger6 );
    Delay_ms ( 1000 );

    log_printf( &logger, "-------------------------------\r\n" );
    log_printf( &logger, "       >>>   Status   <<<      \r\n" );
    log_printf( &logger, "-------------------------------\r\n" );
}

Application Task

This example monitors the operation of the Charger 6 Click and all its charging states.

  • The user can observe information such as charging status, selected mode,
  • charging current value, and the momentary value
  • of the supply voltage relative to the battery voltage.
  • Results are being sent to the Usart Terminal where you can track their changes.

void application_task ( void ) {
    charger6_get_status( &charger6, &chg_status );
    Delay_ms ( 100 );

    display_power_good_status( );
    Delay_ms ( 100 );

    display_chrg_status( );
    Delay_ms ( 100 );

    display_bat_status( );
    Delay_ms ( 100 );

    display_chrg_fault_status( );
    Delay_ms ( 100 );

    display_vsys_status( );
    log_printf( &logger, "-------------------------------\r\n" );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
}

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on mikroE github account.

Other mikroE Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.Charger6

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. UART terminal is available in all Mikroelektronika compilers.


ALSO FROM THIS AUTHOR

Pressure 5 click

5

Pressure 5 click is a barometric pressure measurement Click board, which features the BMP388, an accurate absolute barometric pressure sensor.

[Learn More]

Bluetooth Switch

1

This example demonstrates wireless Bluetooth switch control, using clicker2 for STM32, Bluetooth click board and Android smart phone.

[Learn More]

Compass 5 click

0

Compass 5 Click is a compact add-on board that contains a 3-axis magnetometer device suitable for compass application. This board features the AK09918C, a 3-axis electronic compass with high sensitive Hall sensor technology from AKM Semiconductor.

[Learn More]