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 (139244 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

ISO ADC Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.4

mikroSDK Library: 2.0.0.0

Category: ADC

Downloaded: 29 times

Not followed.

License: MIT license  

The ISO ADC Click is add-on board current-shunt measurement device with isolated delta-sigma modulator. This Click board™ is based on AMC1204BDWR provide a single-chip solution for measuring the small signal of a shunt resistor across an isolated barrier from Texas Instruments. ISO ADC Click contains shunt resistor, these types of resistors are typically used to sense currents in motor control inverters, green energy generation systems, and other industrial applications.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "ISO ADC Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "ISO ADC Click" changes.

Do you want to report abuse regarding "ISO ADC Click".

  • mikroSDK Library 1.0.0.0
  • Comments (0)

mikroSDK Library Blog


ISO ADC Click

The ISO ADC Click is add-on board current-shunt measurement device with isolated delta-sigma modulator. This Click board™ is based on AMC1204BDWR provide a single-chip solution for measuring the small signal of a shunt resistor across an isolated barrier from Texas Instruments. ISO ADC Click contains shunt resistor, these types of resistors are typically used to sense currents in motor control inverters, green energy generation systems, and other industrial applications.

isoadc_click.png

Click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Feb 2024.
  • Type : SPI type

Software Support

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

Standard key functions :

  • isoadc_cfg_setup Config Object Initialization function.

    void isoadc_cfg_setup ( isoadc_cfg_t *cfg );
  • isoadc_init Initialization function.

    err_t isoadc_init ( isoadc_t *ctx, isoadc_cfg_t *cfg );

Example key functions :

  • isoadc_read_voltage This function reads a raw ADC in ISOADC_ADC_NUM_AVERAGES number of samples and converts it to a shunt voltage in millivolts.

    err_t isoadc_read_voltage ( isoadc_t *ctx, float *voltage );
  • isoadc_get_current This function converts a shunt voltage input to a load current in milliampers.

    float isoadc_get_current ( float voltage );
  • isoadc_get_power This function converts a shunt voltage input to electrical power in watts.

    float isoadc_get_power ( isoadc_t *ctx, float voltage );

Example Description

This example demonstrates the use of ISO ADC Click board by reading the shunt voltage, current, and power.

The demo application is composed of two sections :

Application Init

Initializes the driver and sets the external voltage reference.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    isoadc_cfg_t isoadc_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.
    isoadc_cfg_setup( &isoadc_cfg );
    ISOADC_MAP_MIKROBUS( isoadc_cfg, MIKROBUS_1 );
    if ( SPI_MASTER_ERROR == isoadc_init( &isoadc, &isoadc_cfg ) )
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    isoadc_set_vext ( &isoadc, ISOADC_VEXT_5V );

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

Application Task

Reads a 10 samples of a shunt voltage measurement, then averages and calculates the current and power from it. All data is displayed on the USB UART.

void application_task ( void )
{
    float voltage = 0;
    float avg_voltage = 0;
    uint16_t avg_cnt = 0; 

    log_printf( &logger, " --- MEASUREMENT IN PROGRESS ---\r\n" );
    log_info( &logger, "Keep the load and power supply stable during the measurement process\r\n" );

    while ( avg_cnt < ISOADC_VOLTAGE_NUM_AVERAGES )
    {
        if ( ISOADC_OK == isoadc_read_voltage ( &isoadc, &voltage ) )
        {
            avg_voltage += voltage;
            avg_cnt++;
        }
    }
    voltage = avg_voltage / ISOADC_VOLTAGE_NUM_AVERAGES;
    log_printf( &logger, " Shunt Voltage: %.1f mV\r\n", voltage );
    log_printf( &logger, " Current: %.3f mA\r\n", isoadc_get_current ( voltage ) );
    log_printf( &logger, " Power: %.3f W\r\n", isoadc_get_power ( &isoadc, voltage ) );
    log_printf( &logger, "-------------------------\r\n\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.ISOADC

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

9DOF 3 click

5

9DOF 3 Click introduces the BMX055, a small-scale absolute orientation sensor in the class of low-noise 9-axis measurement units, from Bosch Sensortec. It comprises the full functionality of a triaxial, low-g acceleration sensor, a triaxial angular rate sensor and a triaxial geomagnetic sensor.

[Learn More]

Charger 3 Click

0

Charger 3 Click is a compact add-on board that represents a standalone battery charger with thermal regulation. This board features the TP4056, a complete constant-current/constant-voltage linear charger for single-cell lithium-ion batteries from NanJing Top Power ASIC Corp.

[Learn More]

Temp-Log 7 Click

0

Temp-Log 7 Click is a compact add-on board used to measure and record the temperature of an environment over time. This board features the TMP1826, a high-accuracy, 1-Wire® compatible digital output temperature sensor from Texas Instruments with integrated 2-kbit EEPROM. It supports a wide operating temperature range from –20°C to +85°C with its high accuracy of ±0.1°C (typical)/±0.3°C (maximum) and comes with a factory-programmed 64-bit unique identification number for addressing and NIST traceability. Besides a programmable alarm function that outputs an interrupt signal to the MCU when a specific temperature event occurs, it also has three digital I/O pins configurable for general purposes or to identify the device's position on a shared bus.

[Learn More]