TOP Contributors

  1. MIKROE (2751 codes)
  2. Alcides Ramos (372 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139059 times)
  2. FAT32 Library (71592 times)
  3. Network Ethernet Library (56989 times)
  4. USB Device Library (47330 times)
  5. Network WiFi Library (43006 times)
  6. FT800 Library (42297 times)
  7. GSM click (29777 times)
  8. mikroSDK (27874 times)
  9. PID Library (26858 times)
  10. microSD click (26129 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

Current Limit 5 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.12

mikroSDK Library: 2.0.0.0

Category: Power Switch

Downloaded: 149 times

Not followed.

License: MIT license  

Current Limit 5 Click is a compact add-on board representing a current-limiting solution. This board features the MIC2099, a current-limit power distribution switch from Microchip Technology. This Click board™ represents a programmable current limit solution with various protection features and fault indication, which operates from a 2.5V to 5.5V input voltage range. Also, the current limit is adjustable from 100mA up to 1.05A programmed through the MCP4561 digital potentiometer. This Click board™ is suitable for applications in portable equipment and condition monitoring or power supplies, protecting them in short circuits or other overload conditions.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Current Limit 5 Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Current Limit 5 Click" changes.

Do you want to report abuse regarding "Current Limit 5 Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


Current Limit 5 Click

Current Limit 5 Click is a compact add-on board representing a current-limiting solution. This board features the MIC2099, a current-limit power distribution switch from Microchip Technology. This Click board™ represents a programmable current limit solution with various protection features and fault indication, which operates from a 2.5V to 5.5V input voltage range. Also, the current limit is adjustable from 100mA up to 1.05A programmed through the MCP4561 digital potentiometer. This Click board™ is suitable for applications in portable equipment and condition monitoring or power supplies, protecting them in short circuits or other overload conditions.

currentlimit5_click.png

Click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Jan 2022.
  • Type : I2C type

Software Support

We provide a library for the Current Limit 5 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 Current Limit 5 Click driver.

Standard key functions :

  • currentlimit5_cfg_setup Config Object Initialization function.

    void currentlimit5_cfg_setup ( currentlimit5_cfg_t *cfg );
  • currentlimit5_init Initialization function.

    err_t currentlimit5_init ( currentlimit5_t *ctx, currentlimit5_cfg_t *cfg );

Example key functions :

  • currentlimit5_set_ilimit This function sets the current limit value by configuring the onboard digital potentiometer.

    err_t currentlimit5_set_ilimit ( currentlimit5_t *ctx, currentlimit5_ilimit_t ilimit );
  • currentlimit5_get_fault_pin This function returns the fault pin logic state.

    uint8_t currentlimit5_get_fault_pin ( currentlimit5_t *ctx );
  • currentlimit5_enable_limit This function enables the current limiting switch.

    void currentlimit5_enable_limit ( currentlimit5_t *ctx );

Example Description

This example demonstrates the use of Current Limit 5 Click board by limiting the current to a certain value and displaying an appropriate message when the current reaches the limit.

The demo application is composed of two sections :

Application Init

Initializes the driver and performs the Click default configuration which sets the current limit to 200mA.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    currentlimit5_cfg_t currentlimit5_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.
    currentlimit5_cfg_setup( &currentlimit5_cfg );
    CURRENTLIMIT5_MAP_MIKROBUS( currentlimit5_cfg, MIKROBUS_1 );
    if ( I2C_MASTER_ERROR == currentlimit5_init( &currentlimit5, &currentlimit5_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( CURRENTLIMIT5_ERROR == currentlimit5_default_cfg ( &currentlimit5 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

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

Application Task

Displays the fault indicator state on the USB UART.

void application_task ( void )
{
    static uint8_t currentlimit_ind = 2;
    if ( currentlimit5_get_fault_pin ( &currentlimit5 ) )
    {
        if ( currentlimit_ind != 0 )
        {
            log_printf ( &logger, " The switch is in normal operation \r\n\n" );
            currentlimit_ind = 0;
        }
    }
    else
    {
        if ( currentlimit_ind != 1 )
        {
            log_printf ( &logger, " The switch is in the current limiting or thermal shutdown operation \r\n\n" );
            currentlimit_ind = 1;
        }
    }
}

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

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

DIGI POT 6 click

5

DIGI POT 6 Click features the MCP41HVX1 family of devices which have dual power rails (analog and digital). The analog power rail allows high voltage on the resistor network terminal pins. The analog voltage range is determined by the V+ and V- voltages.

[Learn More]

SolidSwitch 3 Click

0

SolidSwitch 3 Click is a compact add-on board that contains a load switching device. This board features the BD8LB600FS-C, an automotive eight-channel low-side switch from Rohm Semiconductor. Every switch is controlled via an SPI interface and includes an N-channel MOSFET that supports a maximum current of 1A. The BD8LB600FS-C also has built-in protection circuits, namely the overcurrent, the thermal shutdown, the open-load detection, and the voltage lock-out circuits. Moreover, this device also possesses a diagnostic output function during abnormal detection.

[Learn More]

EEPROM 9 Click

0

EEPROM 9 Click is a compact add-on board with a highly reliable nonvolatile memory solution. This board features the M95P32-I, the 32Mbit electrically erasable programmable memory with enhanced hardware write protection from STMicroelectronics.

[Learn More]