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 (139245 times)
  2. FAT32 Library (71743 times)
  3. Network Ethernet Library (57115 times)
  4. USB Device Library (47428 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28073 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

VCP Monitor 6 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.2

mikroSDK Library: 2.0.0.0

Category: Measurements

Downloaded: 32 times

Not followed.

License: MIT license  

VCP Monitor 6 Click is a compact add-on board designed for precise digital power monitoring applications. This board features the INA780A, a 16-bit I2C-output digital power monitor with EZShunt™ technology from Texas Instruments. Capable of measuring currents up to 20A and supporting voltages up to 85V, it accurately monitors current, voltage, and temperature, calculating power, energy, and charge. Programmable registers allow for fine-tuning measurement precision, supporting continuous and triggered operation modes.

No Abuse Reported

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

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

Do you want to report abuse regarding "VCP Monitor 6 Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


VCP Monitor 6 Click

VCP Monitor 6 Click is a compact add-on board designed for precise digital power monitoring applications. This board features the INA780A, a 16-bit I2C-output digital power monitor with EZShunt™ technology from Texas Instruments. Capable of measuring currents up to 20A and supporting voltages up to 85V, it accurately monitors current, voltage, and temperature, calculating power, energy, and charge. Programmable registers allow for fine-tuning measurement precision, supporting continuous and triggered operation modes.

vcpmonitor6_click.png

Click Product page


Click library

  • Author : Nenad Filipovic
  • Date : Feb 2024.
  • Type : I2C type

Software Support

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

Standard key functions :

  • vcpmonitor6_cfg_setup Config Object Initialization function.

    void vcpmonitor6_cfg_setup ( vcpmonitor6_cfg_t *cfg );
  • vcpmonitor6_init Initialization function.

    err_t vcpmonitor6_init ( vcpmonitor6_t *ctx, vcpmonitor6_cfg_t *cfg );
  • vcpmonitor6_default_cfg Click Default Configuration function.

    err_t vcpmonitor6_default_cfg ( vcpmonitor6_t *ctx );

Example key functions :

  • vcpmonitor6_get_bus_voltage This function reads the BUS voltage output measurement in volts [V] by using the I2C serial interface.

    err_t vcpmonitor6_get_bus_voltage ( vcpmonitor6_t *ctx, float *voltage );
  • vcpmonitor6_get_current This function reads the current measurement result in milliamperes [mA] by using the I2C serial interface.

    err_t vcpmonitor6_get_current ( vcpmonitor6_t *ctx, float *current );
  • vcpmonitor6_get_power This function reads the power measurement result in watts [W] by using the I2C serial interface.

    err_t vcpmonitor6_get_power ( vcpmonitor6_t *ctx, float *power );

Example Description

This library contains API for the VCP Monitor 6 Click driver for measurements of the voltage, current, power, energy, charge, and die temperature.

The demo application is composed of two sections :

Application Init

The initialization of the I2C module and log UART. After driver initialization, the app sets the default configuration.

void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    vcpmonitor6_cfg_t vcpmonitor6_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.
    vcpmonitor6_cfg_setup( &vcpmonitor6_cfg );
    VCPMONITOR6_MAP_MIKROBUS( vcpmonitor6_cfg, MIKROBUS_1 );
    if ( I2C_MASTER_ERROR == vcpmonitor6_init( &vcpmonitor6, &vcpmonitor6_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( VCPMONITOR6_ERROR == vcpmonitor6_default_cfg ( &vcpmonitor6 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

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

Application Task

The demo application reads and displays the results of the input bus voltage, current, power, energy, charge accumulation measurements, and die temperature. Results are being sent to the UART Terminal, where you can track their changes.

void application_task ( void ) 
{
    float app_buf = 0;
    if ( VCPMONITOR6_OK == vcpmonitor6_get_bus_voltage( &vcpmonitor6, &app_buf ) )
    {
        log_printf( &logger, " Voltage: %.2f [V]\r\n", app_buf );
        Delay_ms ( 50 );
    }

    if ( VCPMONITOR6_OK == vcpmonitor6_get_current( &vcpmonitor6, &app_buf ) )
    {
        log_printf( &logger, " Current: %.2f [mA]\r\n", app_buf );
        Delay_ms ( 50 );
    }

    if ( VCPMONITOR6_OK == vcpmonitor6_get_power( &vcpmonitor6, &app_buf ) )
    {
        log_printf( &logger, " Power: %.2f [W]\r\n", app_buf );
        Delay_ms ( 50 );
    }

    if ( VCPMONITOR6_OK == vcpmonitor6_get_energy( &vcpmonitor6, &app_buf ) )
    {
        log_printf( &logger, " Energy: %.2f [kJ]\r\n", app_buf );
        Delay_ms ( 50 );
    }

    if ( VCPMONITOR6_OK == vcpmonitor6_get_charge( &vcpmonitor6, &app_buf ) )
    {
        log_printf( &logger, " Charge: %.2f [C]\r\n", app_buf );
        Delay_ms ( 50 );
    }

    if ( VCPMONITOR6_OK == vcpmonitor6_get_temperature( &vcpmonitor6, &app_buf ) )
    {
        log_printf( &logger, " Temperature: %.2f [degC]\r\n", app_buf );
        Delay_ms ( 50 );
    }
    log_printf( &logger, " ----------------------------\r\n" );
    Delay_ms ( 1000 );
    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.VCPMonitor6

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

BLE 8 Click

0

BLE 8 Click is fully embedded stand-alone Bluetooth 5.0 Energy connectivity module, equipped with the ANNA-B112, an ultra-small, high-performing, standalone Bluetooth low energy module for easy integration of Bluetooth low energy connectivity (BLE) into various electronic devices. This module combines a high-performance Arm® Cortex®-M4 CPU microprocessor with FPU, and state-of-the-art power performance. Reliable and easy to use, BLE 8 Click is a perfect solution for development of various IoT applications, smart home applications, BLE enabled toys, advanced robotics, and other similar applications.

[Learn More]

Water Detect 2 Click

0

Water Detect 2 Click is a compact add-on board that can detect the presence/flow of a liquid in a clear tube. This board features the OPB350L250, a tube liquid sensor from TT Electronics. Water Detect 2 Click has multiple output states and can recognize fluid present, no fluid present, and no tube present. This sensor excepts 1/4” tubing (6.3mm) as an outside diameter of the clear tubes, regardless of the direction of the liquid’s flow.

[Learn More]

Magnetic Rotary 5 Click

0

Magnetic Rotary 5 Click is a compact add-on board for accurate magnet-position sensing. This board features the AS5134, a contactless magnetic rotary encoder from ams AG for accurate angular measurement over a full turn of 360º. It is designed to provide accurate angle measurements with a simple two-pole magnet rotating over the center of the chip, featuring an integrated Hall element, analog front end, and digital signal processing. Offering a high resolution of 8.5 bits, which equates to 360 positions per revolution, it is also capable of high-speed performance, with a maximum RPM of 76875. It can accommodate a wide range of magnetic fields, from 20 to 80mT. It also has an onboard header for incremental and commutation signals of their respective A/B/I and U/V/W signals and pins for Daisy Chain Mode and OTP programming.

[Learn More]