TOP Contributors

  1. MIKROE (2784 codes)
  2. Alcides Ramos (385 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 (139845 times)
  2. FAT32 Library (72209 times)
  3. Network Ethernet Library (57392 times)
  4. USB Device Library (47740 times)
  5. Network WiFi Library (43364 times)
  6. FT800 Library (42700 times)
  7. GSM click (29980 times)
  8. mikroSDK (28440 times)
  9. PID Library (26989 times)
  10. microSD click (26398 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 18 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.11

mikroSDK Library: 2.0.0.0

Category: Battery Charger

Downloaded: 196 times

Not followed.

License: MIT license  

Charger 18 Click is a compact add-on board representing a single-cell battery charger. This board features the LTC3553, a micropower, highly integrated power management, and battery charger for single-cell Li-Ion/Polymer battery applications from Analog Devices. Designed specifically for USB applications, it also includes a PowerPath manager with automatic load prioritization and input current limit, a battery charger, and numerous internal protection features. It also indicates a battery charge state, and it comes with a synchronous 200mA buck regulator and a 150mA low dropout linear regulator (LDO).

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Charger 18 Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Charger 18 Click" changes.

Do you want to report abuse regarding "Charger 18 Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


Charger 18 Click

Charger 18 Click is a compact add-on board representing a single-cell battery charger. This board features the LTC3553, a micropower, highly integrated power management, and battery charger for single-cell Li-Ion/Polymer battery applications from Analog Devices. Designed specifically for USB applications, it also includes a PowerPath manager with automatic load prioritization and input current limit, a battery charger, and numerous internal protection features. It also indicates a battery charge state, and it comes with a synchronous 200mA buck regulator and a 150mA low dropout linear regulator (LDO).

charger18_click.png

Click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Dec 2021.
  • Type : GPIO type

Software Support

We provide a library for the Charger 18 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 Charger 18 Click driver.

Standard key functions :

  • charger18_cfg_setup Config Object Initialization function.

    void charger18_cfg_setup ( charger18_cfg_t *cfg );
  • charger18_init Initialization function.

    err_t charger18_init ( charger18_t *ctx, charger18_cfg_t *cfg );

Example key functions :

  • charger18_buck_control This function controls the buck regulator enable state of Charger 18 Click board.

    void charger18_buck_control ( charger18_t *ctx, uint8_t state ); 
  • charger18_ldo_control This function controls the low dropout (LDO) regulator enable state of Charger 18 Click board.

    void charger18_ldo_control ( charger18_t *ctx, uint8_t state );
  • charger18_suspend_control This function controls the suspend charging mode state of Charger 18 Click board.

    void charger18_suspend_control ( charger18_t *ctx, uint8_t state ); 

Example Description

This example demonstrates the use of Charger 18 Click board by controlling the status of the charger as well as the LDO and BUCK regulators.

The demo application is composed of two sections :

Application Init

Initializes the driver and enables the chip with the charger, LDO and BUCK regulators disabled.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    charger18_cfg_t charger18_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.
    charger18_cfg_setup( &charger18_cfg );
    CHARGER18_MAP_MIKROBUS( charger18_cfg, MIKROBUS_1 );
    if ( DIGITAL_OUT_UNSUPPORTED_PIN == charger18_init( &charger18, &charger18_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    charger18_power_control( &charger18, CHARGER18_CONTROL_ENABLE );
    log_printf( &logger, " POWER   : ON\r\n" );
    charger18_suspend_control( &charger18, CHARGER18_CONTROL_ENABLE );
    log_printf( &logger, " CHARGER : OFF\r\n" );
    charger18_buck_control( &charger18, CHARGER18_CONTROL_DISABLE );
    log_printf( &logger, " BUCK    : OFF\r\n" );
    charger18_ldo_control( &charger18, CHARGER18_CONTROL_DISABLE );
    log_printf( &logger, " LDO     : OFF\r\n" );

    log_info( &logger, " Application Task " );
}

Application Task

This function enables the charger, BUCK and LDO in the span of 25 seconds, and displays the status of each feature on the USB UART.

void application_task ( void )
{
    charger18_suspend_control( &charger18, CHARGER18_CONTROL_DISABLE );
    log_printf( &logger, " CHARGER : ON\r\n" );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    charger18_suspend_control( &charger18, CHARGER18_CONTROL_ENABLE );
    log_printf( &logger, " CHARGER : OFF\r\n" );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    charger18_buck_control( &charger18, CHARGER18_CONTROL_ENABLE );
    log_printf( &logger, " BUCK    : ON\r\n" );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    charger18_buck_control( &charger18, CHARGER18_CONTROL_DISABLE );
    log_printf( &logger, " BUCK    : OFF\r\n" );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    charger18_ldo_control( &charger18, CHARGER18_CONTROL_ENABLE );
    log_printf( &logger, " LDO     : ON\r\n" );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    charger18_ldo_control( &charger18, CHARGER18_CONTROL_DISABLE );
    log_printf( &logger, " LDO     : OFF\r\n\n" );
    Delay_ms ( 1000 );
    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.Charger18

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 16 Click

0

Pressure 16 Click is a compact add-on board that contains a board-mount pressure sensor. This board features the WSEN-PADS (2511020213301), a high-precision MEMS-based digital absolute pressure sensor from Würth Elektronik. It has a fully-calibrated 24-bit pressure output to provide accurate atmospheric pressure data with a configurable host interface that supports both I2C and SPI serial communication and with an intelligent on-chip motion-triggered interrupt feature.

[Learn More]

HAPTIC 2 Click

0

HAPTIC 2 Click is a compact add-on board that contains a linear vibration driver. This board features the LC898302AXA, a motor driver dedicated to LRA and ERM applications from ON Semiconductor. Controlled by only one pin, it allows crisp vibration thanks to automatic braking and over-driving feature and ignores the deviation of resonance frequency thanks to auto-tuning function. The original driving waveform will enable you to reduce power consumption, and it is helpful to maintain battery lifetime. This Click board™ is suitable for numerous everyday applications such as indicator systems, game consoles, training equipment/simulators with haptics function, robotics and mechatronics, and many more.

[Learn More]

DMA Library

6

DMA is a powerful module that can autonomosly transfer data from memory to memory, memory to peripheral and peripheral to memory thus freeing up processor to do other tasks. This library provides routines for working with DMA module. A special thank you goes out to our valued associate Milos Markovic who helped in creating this package.

[Learn More]