Intermediate
30 min

Create USB management and charging solution with LTC3553 and TM4C129ENCPDT

Recharge and thrive

Charger 18 Click with Fusion for Tiva v8

Published May 14, 2023

Click board™

Charger 18 Click

Dev. board

Fusion for Tiva v8

Compiler

NECTO Studio

MCU

TM4C129ENCPDT

Don't wait for your battery to run out - choose a fast-charging battery charger and stay powered up all day

A

A

Hardware Overview

How does it work?

Charger 18 Click is based on the LTC3553, a micropower multifunction power management integrated circuit (PMIC) for portable Li-Ion/Polymer battery-based applications from Analog Devices. It combines a USB-compatible PowerPath manager with automatic load prioritization delivering up to 400mA battery charge current from a 5V USB input. The device’s ‘instant-on’ operation ensures immediate system load power when a USB supply is available, even with a fully discharged battery. Alongside a stand-alone battery charger, it has a high-efficiency synchronous 200mA buck regulator and a 150mA low dropout linear regulator available on the onboard connectors. This Click board™ has an input current limit selection allowing the user to select between 100mA and 500mA input current limit. The choice can be made by appropriately positioning the SMD jumper labeled ISET SEL. Besides ISET, it also possesses SEQ SEL jumper selection determining which regulator is enabled before the other. The first-regulator power-up selection is made by positioning this SMD jumper to an appropriate position

marked as BUCK or LDO. On the other hand, the BON and LDO pins routed to the AN and PWM pins on the mikroBUS™ socket enable the buck and LDO regulators by setting these pins to a high logic state. Alongside these pins, the LTC3553 also includes a pushbutton input to control the two regulators and system reset - an onboard pushbutton labeled ON, also routed to the RST pin on the mikroBUS™, representing the Regulator Ignition button. Pressing the button causes an STA interrupt, informing the MCU that this event has occurred. These regulators are also related to a Standby Mode, selectable through an SMD jumper labeled as ISET SEL. When this jumper is placed ON, the buck and the LDO regulator quiescent current is reduced to low levels while maintaining output voltage regulation. The buck regulator is limited to a 10mA maximum load current in this mode, and the LDO regulator’s response to line and load transients is slower. As already mentioned in the text, this Click board™ communicates with MCU using several GPIO pins. With the IEN pin routed to the CS pin on the

mikroBUS™ socket pulled high, the LTC3553 enters Suspend mode to comply with the USB specification. In this mode, the power path between USB and VOUT is put in a high impedance state to reduce the USB input current. This Click board™ also comes with a blue LED labeled CHARGING for the battery charging state. An NTC function is also available for temperature-qualified charging. The temperature monitoring feature is selectable via an NTC SEL jumper, where the user can choose between external or internal monitoring modes. A negative temperature coefficient (NTC) thermistor input for the battery temperature monitor is provided for the external mode. This Click board™ can only be operated with a 5V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used as a reference for further development.

charger-18-click-hardware-overview

Features overview

Development board

Fusion for TIVA v8 is a development board specially designed for the needs of rapid development of embedded applications. It supports a wide range of microcontrollers, such as different 32-bit ARM® Cortex®-M based MCUs from Texas Instruments, regardless of their number of pins, and a broad set of unique functions, such as the first-ever embedded debugger/programmer over a WiFi network. The development board is well organized and designed so that the end-user has all the necessary elements, such as switches, buttons, indicators, connectors, and others, in one place. Thanks to innovative manufacturing technology, Fusion for TIVA v8 provides a fluid and immersive working experience, allowing access

anywhere and under any circumstances at any time. Each part of the Fusion for TIVA v8 development board contains the components necessary for the most efficient operation of the same board. An advanced integrated CODEGRIP programmer/debugger module offers many valuable programming/debugging options, including support for JTAG, SWD, and SWO Trace (Single Wire Output)), and seamless integration with the Mikroe software environment. Besides, it also includes a clean and regulated power supply module for the development board. It can use a wide range of external power sources, including a battery, an external 12V power supply, and a power source via the USB Type-C (USB-C) connector.

Communication options such as USB-UART, USB HOST/DEVICE, CAN (on the MCU card, if supported), and Ethernet is also included. In addition, it also has the well-established mikroBUS™ standard, a standardized socket for the MCU card (SiBRAIN standard), and two display options for the TFT board line of products and character-based LCD. Fusion for TIVA v8 is an integral part of the Mikroe ecosystem for rapid development. Natively supported by Mikroe software tools, it covers many aspects of prototyping and development thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.

Fusion for Tiva v8 horizontal image

Microcontroller Overview

MCU Card / MCU

default

Type

8th Generation

Architecture

ARM Cortex-M4

MCU Memory (KB)

1024

Silicon Vendor

Texas Instruments

Pin count

128

RAM (Bytes)

262144

You complete me!

Accessories

Li-Polymer Battery is the ideal solution for devices that demand a dependable and long-lasting power supply while emphasizing mobility. Its compatibility with mikromedia boards ensures easy integration without additional modifications. With a voltage output of 3.7V, the battery meets the standard requirements of many electronic devices. Additionally, boasting a capacity of 2000mAh, it can store a substantial amount of energy, providing sustained power for extended periods. This feature minimizes the need for frequent recharging or replacement. Overall, the Li-Polymer Battery is a reliable and autonomous power source, ideally suited for devices requiring a stable and enduring energy solution. You can find a more extensive choice of Li-Polymer batteries in our offer.

Charger 18 Click accessories image

Used MCU Pins

mikroBUS™ mapper

Buck Enable
PD0
AN
Regulator Ignition
PK3
RST
Suspend Mode
PH0
CS
NC
NC
SCK
NC
NC
MISO
NC
NC
MOSI
NC
NC
3.3V
Ground
GND
GND
LDO Enable
PL4
PWM
Pushbutton Status
PQ4
INT
NC
NC
TX
NC
NC
RX
NC
NC
SCL
NC
NC
SDA
Power Supply
5V
5V
Ground
GND
GND
1

Take a closer look

Click board™ Schematic

Charger 18 Click Schematic schematic

Step by step

Project assembly

Fusion for PIC v8 front image hardware assembly

Start by selecting your development board and Click board™. Begin with the Fusion for Tiva v8 as your development board.

Fusion for PIC v8 front image hardware assembly
GNSS2 Click front image hardware assembly
SiBRAIN for PIC32MZ1024EFK144 front image hardware assembly
GNSS2 Click complete accessories setup image hardware assembly
v8 SiBRAIN Access MB 1 - upright/background hardware assembly
Necto image step 2 hardware assembly
Necto image step 3 hardware assembly
Necto image step 4 hardware assembly
NECTO Compiler Selection Step Image hardware assembly
NECTO Output Selection Step Image hardware assembly
Necto image step 6 hardware assembly
Necto image step 7 hardware assembly
Necto image step 8 hardware assembly
Necto image step 9 hardware assembly
Necto image step 10 hardware assembly
Necto PreFlash Image hardware assembly

Track your results in real time

Application Output

1. Application Output - In Debug mode, the 'Application Output' window enables real-time data monitoring, offering direct insight into execution results. Ensure proper data display by configuring the environment correctly using the provided tutorial.

2. UART Terminal - Use the UART Terminal to monitor data transmission via a USB to UART converter, allowing direct communication between the Click board™ and your development system. Configure the baud rate and other serial settings according to your project's requirements to ensure proper functionality. For step-by-step setup instructions, refer to the provided tutorial.

3. Plot Output - The Plot feature offers a powerful way to visualize real-time sensor data, enabling trend analysis, debugging, and comparison of multiple data points. To set it up correctly, follow the provided tutorial, which includes a step-by-step example of using the Plot feature to display Click board™ readings. To use the Plot feature in your code, use the function: plot(*insert_graph_name*, variable_name);. This is a general format, and it is up to the user to replace 'insert_graph_name' with the actual graph name and 'variable_name' with the parameter to be displayed.

Software Support

Library Description

This library contains API for Charger 18 Click driver.

Key functions:

  • charger18_buck_controlThis function controls the buck regulator and enables the state of the Charger 18 Click board™.

  • charger18_ldo_controlThis function controls the low dropout (LDO) regulator to enable the state of the Charger 18 Click board™.

  • charger18_suspend_control This function controls the suspend charging mode state of the Charger 18 Click board™.

Open Source

Code example

The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.

/*!
 * @file main.c
 * @brief Charger 18 Click 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.
 *
 * ## 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.
 *
 * @author Stefan Filipovic
 *
 */

#include "board.h"
#include "log.h"
#include "charger18.h"

static charger18_t charger18;   /**< Charger 18 Click driver object. */
static log_t logger;    /**< Logger object. */

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 " );
}

void application_task ( void ) 
{
    charger18_suspend_control( &charger18, CHARGER18_CONTROL_DISABLE );
    log_printf( &logger, " CHARGER : ON\r\n" );
    Delay_ms( 10000 );
    charger18_suspend_control( &charger18, CHARGER18_CONTROL_ENABLE );
    log_printf( &logger, " CHARGER : OFF\r\n" );
    Delay_ms( 3000 );
    charger18_buck_control( &charger18, CHARGER18_CONTROL_ENABLE );
    log_printf( &logger, " BUCK    : ON\r\n" );
    Delay_ms( 3000 );
    charger18_buck_control( &charger18, CHARGER18_CONTROL_DISABLE );
    log_printf( &logger, " BUCK    : OFF\r\n" );
    Delay_ms( 3000 );
    charger18_ldo_control( &charger18, CHARGER18_CONTROL_ENABLE );
    log_printf( &logger, " LDO     : ON\r\n" );
    Delay_ms( 3000 );
    charger18_ldo_control( &charger18, CHARGER18_CONTROL_DISABLE );
    log_printf( &logger, " LDO     : OFF\r\n\n" );
    Delay_ms( 3000 );
}

void main ( void ) 
{
    application_init( );

    for ( ; ; ) 
    {
        application_task( );
    }
}

// ------------------------------------------------------------------------ END

Additional Support

Resources

Love this project?

'Buy This Kit' button takes you directly to the shopping cart where you can easily add or remove products.