TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (351 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 (136657 times)
  2. FAT32 Library (69888 times)
  3. Network Ethernet Library (55914 times)
  4. USB Device Library (46246 times)
  5. Network WiFi Library (41881 times)
  6. FT800 Library (41120 times)
  7. GSM click (28970 times)
  8. PID Library (26405 times)
  9. mikroSDK (26338 times)
  10. microSD click (25349 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

Buck 20 click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.5

mikroSDK Library: 2.0.0.0

Category: Buck

Downloaded: 31 times

Not followed.

License: MIT license  

Buck 20 Click is a compact add-on board that contains a DC-DC power converter that steps down the voltage from its input to its output. This board features the MP2316, a fully-integrated, high-efficiency, synchronous, step-down switch-mode converter from Monolithic Power Systems (MPS). The MP2316 achieves 3A continuous output current over a wide input supply range from 4V to 19V. It has excellent load and line regulation and can operate efficiently over a vast output voltage load range. The MP2316 also offers advanced protection features such as undervoltage, overcurrent, and short-circuit detections.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Buck 20 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Buck 20 click" changes.

Do you want to report abuse regarding "Buck 20 click".

  • Information
  • Comments (0)

mikroSDK Library Blog


Buck 20 click

Buck 20 Click is a compact add-on board that contains a DC-DC power converter that steps down the voltage from its input to its output. This board features the MP2316, a fully-integrated, high-efficiency, synchronous, step-down switch-mode converter from Monolithic Power Systems (MPS). The MP2316 achieves 3A continuous output current over a wide input supply range from 4V to 19V. It has excellent load and line regulation and can operate efficiently over a vast output voltage load range. The MP2316 also offers advanced protection features such as undervoltage, overcurrent, and short-circuit detections.

buck20_click.png

click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Dec 2022.
  • Type : SPI type

Software Support

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

Standard key functions :

  • buck20_cfg_setup Config Object Initialization function.

    void buck20_cfg_setup ( buck20_cfg_t *cfg );
  • buck20_init Initialization function.

    err_t buck20_init ( buck20_t *ctx, buck20_cfg_t *cfg );

Example key functions :

  • buck20_set_wiper_1 This function sets wiper 1 to desired value.

    err_t buck20_set_wiper_1 ( buck20_t *ctx, uint16_t data_in );
  • buck20_enable_device This function enables the buck device by setting the RST pin to high logic state.

    void buck20_enable_device ( buck20_t *ctx );
  • buck20_disable_device This function disables the buck device by setting the RST pin to low logic state.

    void buck20_disable_device ( buck20_t *ctx );

Example Description

This example demonstrates the use of Buck 20 click by changing the output voltage.

The demo application is composed of two sections :

Application Init

Initializes the driver and enables the device.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    buck20_cfg_t buck20_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.
    buck20_cfg_setup( &buck20_cfg );
    BUCK20_MAP_MIKROBUS( buck20_cfg, MIKROBUS_1 );
    if ( SPI_MASTER_ERROR == buck20_init( &buck20, &buck20_cfg ) )
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }
    buck20_set_wiper_1 ( &buck20, BUCK20_WIPER_ZERO_SCALE );
    buck20_enable_device ( &buck20 );
    log_info( &logger, " Application Task " );
}

Application Task

Changes the output voltage every 3 seconds and displays on the USB UART the digipot wiper position, as well as an approximate buck R1 and voltage output.

void application_task ( void )
{
    static uint16_t digipot_wiper = BUCK20_WIPER_ZERO_SCALE;
    float buck_r1_kohm, buck_vout;
    if ( BUCK20_OK == buck20_set_wiper_1 ( &buck20, digipot_wiper ) )
    {
        buck_r1_kohm = BUCK20_RESISTOR_R6_KOHM + 
                       ( float ) ( BUCK20_DIGIPOT_MAX_KOHM * digipot_wiper ) / BUCK20_WIPER_FULL_SCALE;
        buck_vout = BUCK20_BUCK_VREF + ( buck_r1_kohm * BUCK20_BUCK_VREF ) / BUCK20_BUCK_R2_KOHM;
        log_printf( &logger, " Digipot wiper position: %u\r\n", digipot_wiper );
        log_printf( &logger, " Approximate R1 (Digipot+R6): %.2f kOhm\r\n", buck_r1_kohm );
        log_printf( &logger, " Approximate buck voltage output: %.2f V\r\n\n", buck_vout );
        digipot_wiper += 50;
        if ( digipot_wiper > BUCK20_WIPER_FULL_SCALE )
        {
            digipot_wiper = BUCK20_WIPER_ZERO_SCALE;
        }
    }
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
}

Note

An approximate buck R1 and VOUT values do not have to be 100% accurate for all wiper settings but they are a good reference point. VOUT ranges from ~1.3V to ~5V, and it is the most accurate around 3.3V since all passive components are set for that output.

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.Buck20

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

SWI EEPROM click

0

SWI EEPROM Click is a compact add-on board that provides a highly reliable memory solution. This board features the AT21CS01, a single-wire serial EEPROM with a unique, factory-programmed 64-bit serial number from Microchip Technology. The AT21CS01 has an ultra-high write endurance capability allowing more than one million cycles for each memory location to meet the requirements for today's high-write endurance applications. It is internally as 128 words of 8 bits each with achieved communication through a single I/O pin with Standard-Speed and High-Speed mode options. Also, it offers a security register with a factory-programmed serial number, which makes it the easiest way to add identification to various accessories and consumables.

[Learn More]

LR IoT click

0

LR IoT Click is a compact add-on board that contains a long-range LoRa transceiver. This board features Semtech Corporation’s LR1110, an ultra-low power platform integrating a LoRa® transceiver, multi-constellation GNSS, and passive WiFi AP MAC address scanner. Alongside its sub-GHz capabilities, the LR1110 also has a multi-band front-end capable of receiving 802.11b/g/n WiFi Access Point MAC addresses and GNSS (GPS, BeiDou, geostationary) satellite raw data befitting geo-positioning purposes. The acquired information is then transmitted using an LPWAN network to a geolocation server, which analyzes it and correlates the position with data from a geolocation database, enabling a unique balance between low power and performance.

[Learn More]

LTE IoT 11 click

0

LTE IoT 11 Click is a compact add-on board with an optimized global coverage module, as it supports a comprehensive set of bands required for global deployment. This board features the TX62-W, a global MTC module from Thales. It delivers global LTE-M, NB-IoT (NB1 and NB2) connectivity from a single SKU, and it is the first Thales product to adopt a revolutionary “Things” footprint. Besides, it integrates an embedded GNSS multi-constellation, state-of-the-art secure services, and more.

[Learn More]