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 (139251 times)
  2. FAT32 Library (71748 times)
  3. Network Ethernet Library (57120 times)
  4. USB Device Library (47430 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28077 times)
  9. PID Library (26885 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 6 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.8

mikroSDK Library: 2.0.0.0

Category: Current sensor

Downloaded: 139 times

Not followed.

License: MIT license  

Current 6 Click is a compact add-on board providing a precise and accurate current sensing solution. This board features the MAX40080, a fast-response bi-directional current-sense amplifier from Analog Devices. The device features ultra-low 5uV input offset voltage, very-low 0.2% gain error, and includes an analog-to-digital converter with programmable sample rate and 12-bit resolution featuring I2C compatible interface. It also features a wake-up current-threshold and auto-shutdown mode when the I2C is inactive, both designed to minimize power consumption. The current-shunt monitor can measure voltage signals on common-mode voltages ranging from -0.1V (ground sensing) to 36V, independent of the supply voltage. This Click board™ delivers higher performance to industrial control and automation applications, load and power supplies monitoring, telecom equipment, and many more.

No Abuse Reported

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

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

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

  • Information
  • Comments (0)

mikroSDK Library Blog


Current 6 Click

Current 6 Click is a compact add-on board providing a precise and accurate current sensing solution. This board features the MAX40080, a fast-response bi-directional current-sense amplifier from Analog Devices. The device features ultra-low 5uV input offset voltage, very-low 0.2% gain error, and includes an analog-to-digital converter with programmable sample rate and 12-bit resolution featuring I2C compatible interface. It also features a wake-up current-threshold and auto-shutdown mode when the I2C is inactive, both designed to minimize power consumption. The current-shunt monitor can measure voltage signals on common-mode voltages ranging from -0.1V (ground sensing) to 36V, independent of the supply voltage. This Click board™ delivers higher performance to industrial control and automation applications, load and power supplies monitoring, telecom equipment, and many more.

current6_click.png

Click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Nov 2021.
  • Type : I2C type

Software Support

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

Standard key functions :

  • current6_cfg_setup Config Object Initialization function.

    void current6_cfg_setup ( current6_cfg_t *cfg );
  • current6_init Initialization function.

    err_t current6_init ( current6_t *ctx, current6_cfg_t *cfg );
  • current6_default_cfg Click Default Configuration function.

    err_t current6_default_cfg ( current6_t *ctx );

Example key functions :

  • current6_get_alert_pin This function returns the alert pin logic state.

    uint8_t current6_get_alert_pin ( current6_t *ctx );
  • current6_read_data This function reads the input voltage and current measurement values.

    err_t current6_read_data ( current6_t *ctx, float *voltage, float *current );
  • current6_get_status This function reads and clears the status register.

    err_t current6_get_status ( current6_t *ctx, uint16_t *status );

Example Description

This example demonstrates the use of Current 6 Click board by reading the input voltage and current measurements.

The demo application is composed of two sections :

Application Init

Initializes the driver and performs the Click default configuration.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    current6_cfg_t current6_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.
    current6_cfg_setup( &current6_cfg );
    CURRENT6_MAP_MIKROBUS( current6_cfg, MIKROBUS_1 );
    if ( I2C_MASTER_ERROR == current6_init( &current6, &current6_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( CURRENT6_ERROR == current6_default_cfg ( &current6 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

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

Application Task

Waits for the FIFO data interrupt and then reads the measurements of the input voltage and current and displays the results on the USB UART approximately once per second.

void application_task ( void )
{
    if ( current6_get_alert_pin ( &current6 ) )
    {
        uint16_t status;
        if ( CURRENT6_OK == current6_get_status ( &current6, &status ) )
        {
            if ( status & CURRENT6_FIFO_CFG_DATA_OVERFLOW_MASK )
            {
                float voltage, current;
                if ( CURRENT6_OK == current6_read_data ( &current6, &voltage, &current ) )
                {
                    log_printf( &logger, " Voltage: %.3f V\r\n Current: %.3f A\r\n\n", voltage, current );
                }
            }
        }
    }
}

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

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

Proximity 9 Click

0

Proximity 9 Click is a very accurate and reliable proximity sensing (PS) and ambient light sensing (ALS) device, equipped with the VCNL4040, an integrated PS and ALS sensor which features the Filtron™ technology.

[Learn More]

Accel 7 click

5

Accel 7 click is a three-axis acceleration sensing Click board™. It uses the KXTJ3-1057, a 14bit tri-axis digital accelerometer, which can sense the acceleration up to ±16 g. This sensor is built using the proprietary Kionix micromachining technology, which results with a high accuracy and very good noise immunity.

[Learn More]

Stepper 22 Click

0

Stepper 22 Click is a compact add-on board designed for precise motion control of bipolar stepper motors and brushed DC motors. This board features the DRV8711, a bipolar stepper motor gate driver from Texas Instruments, which uses external N-channel MOSFETs to drive motors with up to 5A of output current. The board features a wide range of microstepping options from full-step to 1/256-step, adaptive blanking time, and various current decay modes, ensuring smooth and accurate motor operation. Control is achieved via a standard SPI interface and STEP/DIR inputs, with additional management through an onboard I2C-configurable GPIO expander.

[Learn More]