TOP Contributors

  1. MIKROE (2779 codes)
  2. Alcides Ramos (376 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 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 (139566 times)
  2. FAT32 Library (72041 times)
  3. Network Ethernet Library (57256 times)
  4. USB Device Library (47615 times)
  5. Network WiFi Library (43219 times)
  6. FT800 Library (42566 times)
  7. GSM click (29930 times)
  8. mikroSDK (28292 times)
  9. PID Library (26933 times)
  10. microSD click (26309 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-10-31

Package Version: 2.1.0.16

mikroSDK Library: 2.0.0.0

Category: Battery Charger

Downloaded: 248 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

6DOF IMU click

1

6DOF IMU click is a mikroBUS add-on board that carries ST’s LSM6D33 IC, which is 6-axis inertial measurement unit comprising a 3-axis gyroscope and a 3-axis accelerometer. The board communicates with the target MCU either through I2C or SPI interfaces (along with an additional INT pin).

[Learn More]

IR Grid 2 click

5

IR Grid 2 click is a thermal imaging sensor. It has an array of 768 very sensitive factory calibrated IR elements (pixels), arranged in 32 rows of 24 pixels.

[Learn More]

AudioAmp 6 Click

0

Audio Amp 6 Click is a mono/subwoofer audio amplifier, capable of delivering up to 18.5W per channel with the 4Ω load. It is based on the TPA3138D2, a class-D integrated amplifier, which utilizes a highly efficient switching scheme.

[Learn More]