TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 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 (139263 times)
  2. FAT32 Library (71752 times)
  3. Network Ethernet Library (57128 times)
  4. USB Device Library (47431 times)
  5. Network WiFi Library (43092 times)
  6. FT800 Library (42407 times)
  7. GSM click (29835 times)
  8. mikroSDK (28080 times)
  9. PID Library (26886 times)
  10. microSD click (26198 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 9 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.5

mikroSDK Library: 2.0.0.0

Category: Power Switch

Downloaded: 68 times

Not followed.

License: MIT license  

Current Limit 9 Click is a compact add-on board representing a current-limiting solution for your application. This board features the NPS4053, a load switch with a precision adjustable current limit from Nexperia. It is a 5.5V, 55mΩ load switch that allows precise adjustment of the current limit in a range of 110mA up to 2.5A while preserving the constant current during the current limiting.

No Abuse Reported

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

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

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

  • Information
  • Comments (0)

mikroSDK Library Blog


Current Limit 9 Click

Current Limit 9 Click is a compact add-on board representing a current-limiting solution for your application. This board features the NPS4053, a load switch with a precision adjustable current limit from Nexperia. It is a 5.5V, 55mΩ load switch that allows precise adjustment of the current limit in a range of 110mA up to 2.5A while preserving the constant current during the current limiting.

currentlimit9_click.png

Click Product page


Click library

  • Author : Nenad Filipovic
  • Date : Oct 2023.
  • Type : I2C type

Software Support

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

Standard key functions :

  • currentlimit9_cfg_setup Config Object Initialization function.

    void currentlimit9_cfg_setup ( currentlimit9_cfg_t *cfg );
  • currentlimit9_init Initialization function.

    err_t currentlimit9_init ( currentlimit9_t *ctx, currentlimit9_cfg_t *cfg );
  • currentlimit9_default_cfg Click Default Configuration function.

    err_t currentlimit9_default_cfg ( currentlimit9_t *ctx );

Example key functions :

  • currentlimit9_set_limit This function sets the desired current limit threshold using the I2C serial interface.

    err_t currentlimit9_set_limit ( currentlimit9_t *ctx, currentlimit9_limit_t current_limit );
  • currentlimit9_get_fault This function gets the state of the fault flag to indicate overcurrent, overtemperature, or reverse-voltage conditions.

    uint8_t currentlimit9_get_fault ( currentlimit9_t *ctx );
  • currentlimit9_enable This function turns on the power switch and enables the internal MOSFET.

    void currentlimit9_enable ( currentlimit9_t *ctx );

Example Description

This library contains API for the Current Limit 9 Click driver. This driver provides the functions to set the current limiting conditions in order to provide the threshold of the fault conditions.

The demo application is composed of two sections :

Application Init

Initialization of I2C module and log UART. After driver initialization, the app executes a default configuration and sets the current limit threshold of 460 mA.

void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    currentlimit9_cfg_t currentlimit9_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.
    currentlimit9_cfg_setup( &currentlimit9_cfg );
    CURRENTLIMIT9_MAP_MIKROBUS( currentlimit9_cfg, MIKROBUS_1 );
    if ( I2C_MASTER_ERROR == currentlimit9_init( &currentlimit9, &currentlimit9_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( CURRENTLIMIT9_ERROR == currentlimit9_default_cfg ( &currentlimit9 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

    if ( CURRENTLIMIT9_ERROR == currentlimit9_set_limit( &currentlimit9, CURRENTLIMIT9_LIMIT_0_46_A ) )
    {
        log_error( &logger, " Current limit threshold." );
        for ( ; ; );
    }

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

Application Task

This example demonstrates the use of the Current Limit 9 Click board. The demo application checks the fault flag for overcurrent conditions. Results are being sent to the UART Terminal, where you can track their changes.

void application_task ( void ) 
{
    if ( CURRENTLIMIT9_FAULT_FLAG == currentlimit9_get_fault( &currentlimit9 ) )
    {
        log_printf( &logger, "Fault flag: Overcurrent\r\n" );
    }
    else
    {
        log_printf( &logger, " Current limit is 460 mA\r\n" );
    }
    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.CurrentLimit9

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

Brushless 12 Click

0

Brushless 12 Click is a compact add-on board suitable for controlling BLDC motors with any MCU. This board features the L6235, DMOS fully integrated 3-phase motor driver with overcurrent protection from STMicroelectronics.

[Learn More]

LED Driver 12 Click

0

LED Driver 12 Click is a compact add-on board that simplifies the control of multiple LEDs. This board features the PCA9532, a 16-bit I2C-configurable I/O expander optimized for dimming LEDs in 256 discrete Red/Green/Blue (RGB) steps from NXP Semiconductors. The PCA9532 offers high efficiency, supporting up to 16 LED channels and delivering a maximum of up to 25mA of LED current per channel. It contains an internal oscillator with two user-programmable blink rates and duty cycles coupled to the output PWM. Any bits not used for controlling the LEDs can be used for GPIO expansion, which provides a simple solution when additional I/O is needed for some sensors, push-buttons, or alarm monitoring. This Click board™ is suitable for color mixing and backlight application for amusement products, LED status signalization, home automation projects, and many more.

[Learn More]

Pressure 23 07BA Click

0

Pressure 23 Click - 07BA is a compact add-on board for accurate and reliable absolute pressure and temperature measurements in harsh environments. This board features the MS5849-07BA, an ultra-compact, chlorine-resistant sensor from TE Connectivity that delivers 24-bit resolution data via I2C or SPI interfaces. It operates within pressure ranges of 0.4 to 7 bar, features a chlorine-resistant gel coating, and measures temperatures from -20 to +85°C. The sensor's grounded metal ring provides robust protection and secure O-ring mounting, while the flexible communication options allow for optimized performance.

[Learn More]