TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (91 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 (139266 times)
  2. FAT32 Library (71754 times)
  3. Network Ethernet Library (57128 times)
  4. USB Device Library (47432 times)
  5. Network WiFi Library (43092 times)
  6. FT800 Library (42408 times)
  7. GSM click (29835 times)
  8. mikroSDK (28101 times)
  9. PID Library (26886 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

IR Grid 4 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.2

mikroSDK Library: 2.0.0.0

Category: Temperature & humidity

Downloaded: 18 times

Not followed.

License: MIT license  

IR Grid 4 Click is a compact add-on board for high-precision, non-contact temperature measurement and thermal imaging. This board is based on the MLX90641, a fully calibrated thermal IR array from Melexis. It captures temperature data across a 16x12 matrix (192 pixels) and accurately measures temperatures from -40°C to +300°C with a typical accuracy of 1°C. The board supports the innovative 'Click Snap' feature, allowing the sensor area to be detached for flexible positioning.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "IR Grid 4 Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "IR Grid 4 Click" changes.

Do you want to report abuse regarding "IR Grid 4 Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


IR Grid 4 Click

IR Grid 4 Click is a compact add-on board for high-precision, non-contact temperature measurement and thermal imaging. This board is based on the MLX90641, a fully calibrated thermal IR array from Melexis. It captures temperature data across a 16x12 matrix (192 pixels) and accurately measures temperatures from -40°C to +300°C with a typical accuracy of 1°C. The board supports the innovative 'Click Snap' feature, allowing the sensor area to be detached for flexible positioning.

irgrid4_click.png

Click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Jul 2024.
  • Type : I2C type

Software Support

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

Standard key functions :

  • irgrid4_cfg_setup Config Object Initialization function.

    void irgrid4_cfg_setup ( irgrid4_cfg_t *cfg );
  • irgrid4_init Initialization function.

    err_t irgrid4_init ( irgrid4_t *ctx, irgrid4_cfg_t *cfg );
  • irgrid4_default_cfg Click Default Configuration function.

    err_t irgrid4_default_cfg ( irgrid4_t *ctx );

Example key functions :

  • irgrid4_get_measurement This function reads the RAM frame data and calculates ambient temperature and a 16x12 IR grid object temperature.

    err_t irgrid4_get_measurement ( irgrid4_t *ctx, float *t_amb, float *t_obj );
  • irgrid4_set_refresh_rate This function sets the IR data refresh rate.

    err_t irgrid4_set_refresh_rate ( irgrid4_t *ctx, uint8_t refresh_rate );
  • irgrid4_enable_led1 This function enables the LED1.

    void irgrid4_enable_led1 ( irgrid4_t *ctx );

Example Description

This example demonstrates the use of IR Grid 4 Click by reading and displaying the ambient and object temperature measurements in a 16x12 pixels grid format.

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. */
    irgrid4_cfg_t irgrid4_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.
    irgrid4_cfg_setup( &irgrid4_cfg );
    IRGRID4_MAP_MIKROBUS( irgrid4_cfg, MIKROBUS_1 );
    if ( I2C_MASTER_ERROR == irgrid4_init( &irgrid4, &irgrid4_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( IRGRID4_ERROR == irgrid4_default_cfg ( &irgrid4 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

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

Application Task

Reads the ambient and object temperature measurements every 500ms and displays the results on the USB UART in a form of a 16x12 pixels grid.

void application_task ( void )
{
    float image[ 192 ] = { 0 };
    float ambient_temp = 0;
    if ( IRGRID4_OK == irgrid4_get_measurement ( &irgrid4, &ambient_temp, image ) )
    {
        log_printf( &logger, " Ambient temperature: %.2f degC\r\n", ambient_temp );
        log_printf( &logger, "--- Object temperature image ---\r\n" );
        for ( uint8_t pixel_cnt = 0; pixel_cnt < 192; pixel_cnt++ ) 
        {
            log_printf( &logger, "%.2f", image[ pixel_cnt ] );
            if ( 15 == ( pixel_cnt % 16 ) ) 
            {
                log_printf( &logger, "\r\n" );
            }
            else 
            {
                log_printf( &logger, " | " );
            }
        }
        log_printf( &logger, "--------------------------------\r\n" );
    }
}

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

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

SPI Isolator 2 Click

0

SPI Isolator 2 Click is a compact add-on board that contains a digital isolator optimized for a serial peripheral interface. This board features the ISO7741, a high-performance quad-channel digital isolator with a double capacitive silicon dioxide insulation barrier capable of galvanic isolation up to 5000Vrms from Texas Instruments. The ISO7741 provides high electromagnetic immunity and low emissions at low power consumption while isolating digital I/Os. It has three forward and one reverse-direction channel with enable pins that can be used to put the respective outputs in Hi-Z state. This Click board™ provides a simple, compact solution for isolated SPI data communication.

[Learn More]

Thermo 7 Click

0

Thermo 7 Click is a Click board™ equipped with the sensor IC, which can digitize temperature measurements between -55°C and +125°C so that the temperature measurement data can be processed by the host MCU.

[Learn More]

Thermo J click

5

Thermo J click is a temperature measurement click board™, which uses a thermocouple type-J probe, connected to a PPC-SMP-J onboard connector. The active part of the Thermo J click is MCP9600 by Microchip - a thermocouple EMF to temperature converter, with 1.5°C of maximum accuracy.

[Learn More]