Beginner
10 min

Allow your devices to operate seamlessly with the right voltage using LTS3562 and PIC32MZ2048EFM100

Power your world with our high-performance buck converter!

Smart Buck 4 Click with Curiosity PIC32 MZ EF

Published Nov 12, 2023

Click board™

Smart Buck 4 Click

Dev Board

Curiosity PIC32 MZ EF

Compiler

NECTO Studio

MCU

PIC32MZ2048EFM100

Our buck converters are the wizards of smart voltage regulation, bringing sharp performance to your electronic landscape. Experience the power of innovation with a solution designed to meet the dynamic demands of modern technology.

A

A

Hardware Overview

How does it work?

Smart Buck 4 Click is based on the LTS3562, a quad synchronous step-down DC-DC regulator from Analog Devices. The LTS3562 has four independent I2C controllable step-down regulators, two of them with an output current of up to 600mA and two with an output current of up to 400mA. The Type A regulators are externally adjustable and have a programmable feedback voltage of 425mV up to 800mV (R600A, R400A) in 25mV steps. The Type B regulators have a fixed output, and their output voltages can be programmed between 600mV and 3.755V (R600B, R400B) in 25mV steps. The R600A regulator has a Power-on-reset output feature. Both Type A and Type B have separate RUN pins that can be enabled if I2C control is unavailable. The

LTS3562 has several programmable modes in which all four regulators can operate. In Pulse skip mode, an internal latch is set at the start of every 2.25MHz cycle, which turns the main P-channel MOSFET on. In LDO mode, the switching regulators are converted to linear regulators, thus delivering continuous power. This mode gives the LTS3562 a DC option and the lowest possible output noise. In Burst mode, the switching regulator automatically switches between the hysterical control and a fixed-frequency pulse skip operation. The first is automatically switched at light loads, while the latter is switched at heavy loads. In Forced Burst mode, the switching regulators use a constant-current algorithm to control the inductor current, and in this mode, the

output power is limited. The Smart Buck 4 Click uses a standard 2-Wire I2C interface to communicate with the host MCU, supporting speeds up to 400KHz. The LTS3562 is a receive-only device, and the I2C address is fixed and can not be changed. As mentioned, you can manage Type A and Type B regulators with active LOW by a host MCU over the R40 and R60 pins. This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. Also, it comes equipped with a library containing functions and an example code that can be used as a reference for further development.

Smart Buck 4 Click hardware overview image

Features overview

Development board

Curiosity PIC32 MZ EF development board is a fully integrated 32-bit development platform featuring the high-performance PIC32MZ EF Series (PIC32MZ2048EFM) that has a 2MB Flash, 512KB RAM, integrated FPU, Crypto accelerator, and excellent connectivity options. It includes an integrated programmer and debugger, requiring no additional hardware. Users can expand

functionality through MIKROE mikroBUS™ Click™ adapter boards, add Ethernet connectivity with the Microchip PHY daughter board, add WiFi connectivity capability using the Microchip expansions boards, and add audio input and output capability with Microchip audio daughter boards. These boards are fully integrated into PIC32’s powerful software framework, MPLAB Harmony,

which provides a flexible and modular interface to application development a rich set of inter-operable software stacks (TCP-IP, USB), and easy-to-use features. The Curiosity PIC32 MZ EF development board offers expansion capabilities making it an excellent choice for a rapid prototyping board in Connectivity, IOT, and general-purpose applications.

Curiosity PIC32MZ EF double side image

Microcontroller Overview

MCU Card / MCU

default

Architecture

PIC32

MCU Memory (KB)

2048

Silicon Vendor

Microchip

Pin count

100

RAM (Bytes)

524288

Used MCU Pins

mikroBUS™ mapper

NC
NC
AN
R400 Output Enable
RA9
RST
NC
NC
CS
NC
NC
SCK
NC
NC
MISO
NC
NC
MOSI
Power Supply
3.3V
3.3V
Ground
GND
GND
R600 Output Enable
RPE8
PWM
NC
NC
INT
NC
NC
TX
NC
NC
RX
I2C Clock
RPA14
SCL
I2C Data
RPA15
SDA
NC
NC
5V
Ground
GND
GND
1

Take a closer look

Schematic

Smart Buck 4 Click Schematic schematic

Step by step

Project assembly

Curiosity PIC32MZ EF front image hardware assembly

Start by selecting your development board and Click board™. Begin with the Curiosity PIC32 MZ EF as your development board.

Curiosity PIC32MZ EF front image hardware assembly
GNSS2 Click front image hardware assembly
Prog-cut hardware assembly
GNSS2 Click complete accessories setup image hardware assembly
Curiosity PIC32 MZ EF MB 1 Access - upright/background hardware assembly
Necto image step 2 hardware assembly
Necto image step 3 hardware assembly
Necto image step 4 hardware assembly
Necto image step 5 hardware assembly
Necto image step 6 hardware assembly
Curiosity PIC32 MZ EF MCU Step hardware assembly
Necto No Display image step 8 hardware assembly
Necto image step 9 hardware assembly
Necto image step 10 hardware assembly
Debug Image Necto Step hardware assembly

Track your results in real time

Application Output

After loading the code example, pressing the "DEBUG" button builds and programs it on the selected setup.

Application Output Step 1

After programming is completed, a header with buttons for various actions available in the IDE appears. By clicking the green "PLAY "button, we start reading the results achieved with Click board™.

Application Output Step 3

Upon completion of programming, the Application Output tab is automatically opened, where the achieved result can be read. In case of an inability to perform the Debug function, check if a proper connection between the MCU used by the setup and the CODEGRIP programmer has been established. A detailed explanation of the CODEGRIP-board connection can be found in the CODEGRIP User Manual. Please find it in the RESOURCES section.

Application Output Step 4

Software Support

Library Description

This library contains API for Smart Buck 4 Click driver.

Key functions:

  • smartbuck4_en_r40_reg - Smart Buck 4 enable 400A regulator function.

  • smartbuck4_send_command - Smart Buck 4 send command function.

  • smartbuck4_disable_regulators - Smart Buck 4 disable regulators function.

Open Source

Code example

This example can be found in NECTO Studio. Feel free to download the code, or you can copy the code below.

/*!
 * @file main.c
 * @brief Smart Buck 4 Click example
 *
 * # Description
 * This example demonstrates the use of the Smart Buck 4 Click board.
 * This driver provides functions for device configurations 
 * and for the setting of the output voltage.
 *
 * The demo application is composed of two sections :
 *
 * ## Application Init
 * Initialization of I2C module and log UART.
 * After initializing the driver, the default configuration is executed 
 * and the outputs are turned off.
 *
 * ## Application Task
 * Changes the output voltage every 5 seconds, starting from 0.6 V to 3.3V/3.7V  
 * depending on the input voltage.
 *
 * @author Stefan Ilic
 *
 */

#include "board.h"
#include "log.h"
#include "smartbuck4.h"

static smartbuck4_t smartbuck4;
static log_t logger;

#define SMARTBUCK4_MIN_VOLTAGE      600
#define SMARTBUCK4_STEP             25

void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    smartbuck4_cfg_t smartbuck4_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.
    smartbuck4_cfg_setup( &smartbuck4_cfg );
    SMARTBUCK4_MAP_MIKROBUS( smartbuck4_cfg, MIKROBUS_1 );
    if ( I2C_MASTER_ERROR == smartbuck4_init( &smartbuck4, &smartbuck4_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }
    
    if ( SMARTBUCK4_ERROR == smartbuck4_default_cfg ( &smartbuck4 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }
    
    log_info( &logger, " Application Task " );
}

void application_task ( void ) 
{
    for ( uint8_t n_cnt = SMARTBUCK4_REGULATOR_B_600_MV; 
          n_cnt <= SMARTBUCK4_REGULATOR_B_3700_MV; 
          n_cnt += SMARTBUCK4_REGULATOR_B_700_MV )
    {
        err_t error_flag = smartbuck4_send_command( &smartbuck4, SMARTBUCK4_REG_R600B_PROGRAM | 
                                                                 SMARTBUCK4_REG_R400B_PROGRAM | 
                                                                 SMARTBUCK4_REG_LDO_MODE, 
                                                                 SMARTBUCK4_ENABLE_REGULATOR | n_cnt );
        if ( SMARTBUCK4_OK == error_flag )
        {
            log_printf( &logger, " Set output to %d mV. \r\n", 
                        ( SMARTBUCK4_MIN_VOLTAGE + n_cnt * SMARTBUCK4_STEP ) );
        }
        else
        {
            log_error( &logger, " Transmission error occurred." );
            smartbuck4_disable_regulators( &smartbuck4 );
            for ( ; ; );
        }
        Delay_ms( 5000 );
    }
}

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.