TOP Contributors

  1. MIKROE (2779 codes)
  2. Alcides Ramos (376 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 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 (139559 times)
  2. FAT32 Library (72040 times)
  3. Network Ethernet Library (57254 times)
  4. USB Device Library (47607 times)
  5. Network WiFi Library (43219 times)
  6. FT800 Library (42551 times)
  7. GSM click (29930 times)
  8. mikroSDK (28292 times)
  9. PID Library (26930 times)
  10. microSD click (26309 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

Hall Current 21 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-11-12

Package Version: 2.1.0.1

mikroSDK Library: 2.0.0.0

Category: Current sensor

Downloaded: 12 times

Not followed.

License: MIT license  

Hall Current 21 Click is a compact add-on board designed for precise current measurement across a wide frequency range, ideal for fast and accurate monitoring applications. This board features the ACS37030, a galvanically-isolated current sensor from Allegro Microsystems. It provides bidirectional current sensing with a range of ±65A and a sensitivity of 20.3mV/A, offering high isolation of 3500VRMS and a working voltage of up to 840VRMS. It also features low noise and a wide operating bandwidth, making it suitable for high-speed switching current and control loop monitoring. This Click board™ is perfect for power supplies in servers, data centers, and solar DC-DC converters.

No Abuse Reported

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

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

Do you want to report abuse regarding "Hall Current 21 Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


Hall Current 21 Click

Hall Current 21 Click is a compact add-on board designed for precise current measurement across a wide frequency range, ideal for fast and accurate monitoring applications. This board features the ACS37030, a galvanically-isolated current sensor from Allegro Microsystems. It provides bidirectional current sensing with a range of ±65A and a sensitivity of 20.3mV/A, offering high isolation of 3500VRMS and a working voltage of up to 840VRMS. It also features low noise and a wide operating bandwidth, making it suitable for high-speed switching current and control loop monitoring. This Click board™ is perfect for power supplies in servers, data centers, and solar DC-DC converters.

hallcurrent21_click.png

Click Product page


Click library

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

Software Support

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

Standard key functions :

  • hallcurrent21_cfg_setup Config Object Initialization function.

    void hallcurrent21_cfg_setup ( hallcurrent21_cfg_t *cfg );
  • hallcurrent21_init Initialization function.

    err_t hallcurrent21_init ( hallcurrent21_t *ctx, hallcurrent21_cfg_t *cfg );

Example key functions :

  • hallcurrent21_read_voltage_avg This function reads a desired number of ADC samples and calculates the average voltage level of the selected input channel.

    err_t hallcurrent21_read_voltage_avg ( hallcurrent21_t *ctx, uint8_t channel, uint16_t num_conv, float *voltage_avg );
  • hallcurrent21_calib_resolution This function reads the sensor voltage reference and calibrates the data resolution at a known load current.

    err_t hallcurrent21_calib_resolution ( hallcurrent21_t *ctx, float calib_current );
  • hallcurrent21_read_current This function reads the input current level [A].

    err_t hallcurrent21_read_current ( hallcurrent21_t *ctx, float *current );

Example Description

This example demonstrates the use of Hall Current 21 Click board by reading and displaying the input current measurements.

The demo application is composed of two sections :

Application Init

Initializes the driver and calibrates the data resolution at 3A load current.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    hallcurrent21_cfg_t hallcurrent21_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.
    hallcurrent21_cfg_setup( &hallcurrent21_cfg );
    HALLCURRENT21_MAP_MIKROBUS( hallcurrent21_cfg, MIKROBUS_1 );
    if ( SPI_MASTER_ERROR == hallcurrent21_init( &hallcurrent21, &hallcurrent21_cfg ) )
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    log_printf( &logger, " Calibrating data resolution in 5 seconds...\r\n" );
    log_printf( &logger, " Keep the load current set at %.1fA during the calibration process.\r\n", 
                HALLCURRENT21_CALIBRATING_CURRENT );
    for ( uint8_t cnt = 5; cnt > 0; cnt-- )
    {
        log_printf( &logger, " %u\r\n", ( uint16_t ) cnt );
        Delay_ms ( 1000 );
    }
    if ( HALLCURRENT21_ERROR == hallcurrent21_calib_resolution ( &hallcurrent21, 
                                                                 HALLCURRENT21_CALIBRATING_CURRENT ) )
    {
        log_error( &logger, " Calibrate resolution." );
        for ( ; ; );
    }
    log_printf( &logger, " Data resolution calibration DONE.\r\n" );

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

Application Task

Reads the input current measurements and displays the results on the USB UART approximately once per second.

void application_task ( void )
{
    float current = 0;
    if ( HALLCURRENT21_OK == hallcurrent21_read_current ( &hallcurrent21, &current ) ) 
    {
        log_printf( &logger, " Current : %.1f A\r\n\n", current );
        Delay_ms ( 1000 );
    }
}

Note

The measurement range is approximately: +/- 65A.

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

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

Moisture click

5

Moisture click is a Click board that can be used to easily detect a moisture level of the skin, by simply touching the sensitive surface of the PCB.

[Learn More]

DALI 2 click

5

DALI 2 click offers a simple and reliable interface to DALI and DALI 2 communication bus, making it possible to dive into the world of intelligent lighting.

[Learn More]

LightHz click - Example

5

This project demonstrates working with TSL230RD.
Pulses from TSL230BR are counted using RB0/INT interrupt on rising edge on pin RB0 of PIC18F45K22 MCU. Timer1 generates interrupt after 1/4 second for calculating frequency.

[Learn More]