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 (71589 times)
  3. Network Ethernet Library (56988 times)
  4. USB Device Library (47330 times)
  5. Network WiFi Library (43006 times)
  6. FT800 Library (42297 times)
  7. GSM click (29776 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 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.17

mikroSDK Library: 2.0.0.0

Category: Power Switch

Downloaded: 145 times

Not followed.

License: MIT license  

Current Limit Click is a compact add-on board that contains a low-voltage, P-channel MOSFET power switch intended for high-side load switching applications. This board features the MAX890L, a low-resistance power switch with the adjustable, accurate current limit system, and thermal shutdown from Maxim Integrated.

No Abuse Reported

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

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

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

  • mikroSDK Library 1.0.0.0
  • Comments (0)

mikroSDK Library Blog


Current Limit Click

Current Limit Click is a compact add-on board that contains a low-voltage, P-channel MOSFET power switch intended for high-side load switching applications. This board features the MAX890L, a low-resistance power switch with the adjustable, accurate current limit system, and thermal shutdown from Maxim Integrated.

currentlimit_click.png

Click Product page


Click library

  • Author : Stefan Ilic
  • Date : Jul 2021.
  • Type : SPI type

Software Support

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

Standard key functions :

  • currentlimit_cfg_setup Config Object Initialization function.

    void currentlimit_cfg_setup ( currentlimit_cfg_t *cfg );
  • currentlimit_init Initialization function.

    err_t currentlimit_init ( currentlimit_t *ctx, currentlimit_cfg_t *cfg );

Example key functions :

  • currentlimit_dev_enable Device enable function.

    void currentlimit_dev_enable ( currentlimit_t *ctx, uint8_t state );
  • currentlimit_set_limit Set Current With Predefined Values Limit function.

    void currentlimit_set_limit ( currentlimit_t *ctx, uint8_t lim_val );
  • currentlimit_set_limit_calc Set Calculated Current Limit function.

    void currentlimit_set_limit_calc ( currentlimit_t *ctx, float lim_val );

Example Description

This example shows capabilities of Current Limit Click board.

The demo application is composed of two sections :

Application Init

Initalizes SPI driver and enables the device.


void application_init ( void ) {
    log_cfg_t log_cfg;  /**< Logger config object. */
    currentlimit_cfg_t currentlimit_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.

    currentlimit_cfg_setup( &currentlimit_cfg );
    CURRENTLIMIT_MAP_MIKROBUS( currentlimit_cfg, MIKROBUS_1 );
    err_t init_flag  = currentlimit_init( &currentlimit, &currentlimit_cfg );
    if ( SPI_MASTER_ERROR == init_flag ) {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }

    currentlimit_dev_enable( &currentlimit, CURRENTLIMIT_ENABLE );
    log_printf( &logger, "    Click  Enabled!    \r\n" );
    log_printf( &logger, "-----------------------\r\n" );
    Delay_ms ( 100 );
    log_info( &logger, " Application Task " );
    display_settings( );
}

Application Task

Reading users input from USART terminal and using it as an index for an array of pre-calculated values that define current limit level.


void application_task ( void ) {
    char inx;
    if ( log_read( &logger, &inx, 1 ) != CURRENTLIMIT_ERROR ) {
        if ( inx >= '1' && inx <= '8' ) {
            currentlimit_set_limit( &currentlimit, lim_val[ inx - 49 ] );
            log_printf( &logger, " Selected mode %d, \r\n Current limit is %d mA \r\n", ( uint16_t ) inx - 48, lim_data[ inx - 49 ] );
            log_printf( &logger, "- - - - - - - - - - - - - - - \r\n" );
        } else { 
            log_printf( &logger, "- - - - - - - - - - - - - - - \r\n" );
            log_printf( &logger, " Data not in range! \r\n" );
            log_printf( &logger, "- - - - - - - - - - - - - - - \r\n" );
            display_settings( );
        }
    }
}

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

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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.


ALSO FROM THIS AUTHOR

3D Hall 6 Click

0

3D Hall 6 Click is a very accurate, magnetic field sensing Click board™, used to measure the intensity of the magnetic field across three perpendicular axes.

[Learn More]

eFuse 4 Click

0

eFuse 4 Click is a compact add-on board with a power path protection solution that limits circuit currents and voltages to safe levels during fault conditions. This board features the TPS25940, an eFuse power switch with reverse current blocking from Texas Instruments. The TPS25940 features a full suite of protection and monitoring functions, including a DevSleep™ mode that supports compliance with the SATA™ Device Sleep standard. The wide operating range from 2.7V to 18V allows control of many popular DC bus voltages. The additional potentiometer sets the overload and short-circuit current limit of the TPS25940, while the additional header allows external current monitoring.

[Learn More]

Silent Step 4 Click

0

Silent Step 4 Click is a compact add-on board representing a completely integrated step motor driver solution. This board features the TMC2240, a smart integrated stepper driver from Analog Devices. The driver is based on a 256 micro-steps built-in indexer, two fully integrated H-Bridges, and non-dissipative integrated current sensing (ICS). The two H-Bridges can drive motors of up to 36V and 3A at max.

[Learn More]