TOP Contributors

  1. MIKROE (2784 codes)
  2. Alcides Ramos (387 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (120 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 (140168 times)
  2. FAT32 Library (72622 times)
  3. Network Ethernet Library (57644 times)
  4. USB Device Library (47957 times)
  5. Network WiFi Library (43553 times)
  6. FT800 Library (42942 times)
  7. GSM click (30140 times)
  8. mikroSDK (28670 times)
  9. PID Library (27057 times)
  10. microSD click (26552 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

Load Cell 8 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.3

mikroSDK Library: 2.0.0.0

Category: Force

Downloaded: 54 times

Not followed.

License: MIT license  

Load Cell 8 Click is a compact add-on board representing a weigh scale solution. This board features the ZSC31050, an advanced differential sensor signal conditioner from Renesas designed for high-precision signal conditioning in applications requiring detailed sensor-specific corrections. It excels in processing differential sensor signals for various resistive bridge sensors. The ZSC31050 is capable of highly accurate amplification, offering digital compensation of sensor offset, sensitivity, temperature drift, and non-linearity. It supports a broad signal range from 1mV/V to 275mV/V, making its use across industrial, medical, and consumer applications.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Load Cell 8 Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Load Cell 8 Click" changes.

Do you want to report abuse regarding "Load Cell 8 Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


Load Cell 8 Click

Load Cell 8 Click is a compact add-on board representing a weigh scale solution. This board features the ZSC31050, an advanced differential sensor signal conditioner from Renesas designed for high-precision signal conditioning in applications requiring detailed sensor-specific corrections. It excels in processing differential sensor signals for various resistive bridge sensors. The ZSC31050 is capable of highly accurate amplification, offering digital compensation of sensor offset, sensitivity, temperature drift, and non-linearity. It supports a broad signal range from 1mV/V to 275mV/V, making its use across industrial, medical, and consumer applications.

loadcell8_click.png

Click Product page


Click library

  • Author : Stefan Ilic
  • Date : Dec 2023.
  • Type : I2C type

Software Support

We provide a library for the Load Cell 8 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 Load Cell 8 Click driver.

Standard key functions :

  • loadcell8_cfg_setup Config Object Initialization function.

    void loadcell8_cfg_setup ( loadcell8_cfg_t *cfg );
  • loadcell8_init Initialization function.

    err_t loadcell8_init ( loadcell8_t *ctx, loadcell8_cfg_t *cfg );
  • loadcell8_default_cfg Click Default Configuration function.

    err_t loadcell8_default_cfg ( loadcell8_t *ctx );

Example key functions :

  • loadcell8_read_raw_adc This function reads raw ADC value by using I2C serial interface.

    err_t loadcell8_read_raw_adc ( loadcell8_t *ctx, uint32_t *raw_adc );
  • loadcell8_tare_scale This function calculates the cell_data which is the raw ADC readings of the empty container by using I2C serial interface.

    err_t loadcell8_tare_scale ( loadcell8_t *ctx, loadcell8_data_t *cell_data );
  • loadcell8_calibration_weight This function calibrates the weight by calculating the cell_data for the input calibration weight by using I2C serial interface.

    err_t loadcell8_calibration_weight ( loadcell8_t *ctx, uint16_t cal_val, loadcell8_data_t *cell_data );

Example Description

This example demonstrates the use of Load Cell 8 Click by measuring the weight in grams of the goods from the load cell sensor connected to the Click board.

The demo application is composed of two sections :

Application Init

Initializes the driver and reads the tare scale of the empty container, and after that, it calibrates the weight scale with a known calibration weight.


void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    loadcell8_cfg_t loadcell8_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.
    loadcell8_cfg_setup( &loadcell8_cfg );
    LOADCELL8_MAP_MIKROBUS( loadcell8_cfg, MIKROBUS_1 );
    if ( I2C_MASTER_ERROR == loadcell8_init( &loadcell8, &loadcell8_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( LOADCELL8_ERROR == loadcell8_default_cfg ( &loadcell8 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

    log_printf( &logger, " Remove all goods from the scale in the following 5 sec.\r\n" );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );

    log_printf( &logger, " Calculating tare scale...\r\n" );
    if ( LOADCELL8_OK == loadcell8_tare_scale( &loadcell8, &cell_data ) )
    {
        log_printf( &logger, " Tarring complete!\r\n\n" );
    }
    else 
    {
        log_error( &logger, " Calculating tare scale." );
        for ( ; ; );
    }

    log_printf( &logger, " Place a %ug calibration weight on the scale in the following 5 sec.\r\n", 
                ( uint16_t ) LOADCELL8_WEIGHT_100G );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );

    log_printf( &logger, " Calibrating weight...\r\n" );
    if ( LOADCELL8_OK == loadcell8_calibration_weight( &loadcell8, LOADCELL8_WEIGHT_100G, &cell_data ) ) 
    {
        log_printf( &logger, " Calibration complete!\r\n\n" );
    } 
    else 
    {
        log_error( &logger, " Calibrating weight." );
        for ( ; ; );
    }

    log_printf( &logger, " ___________________\r\n" );
    log_printf( &logger, " Start measurements:\r\n" );
    log_printf( &logger, " ___________________\r\n" );
    Delay_ms ( 500 );
}

Application Task

The demo application measures weight and shows the measurement of scales in grams [ g ]. Results are being sent to the Usart Terminal where you can track their changes.

void application_task ( void ) 
{
    float weight_g = 0;
    if ( LOADCELL8_OK == loadcell8_get_weight( &loadcell8, &cell_data, &weight_g ) )
    {
        log_printf( &logger, " Weight : %.2f g \r\n", weight_g );
    }
    Delay_ms ( 100 );
}

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

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

Current Limit 9 Click

0

Current Limit 9 Click is a compact add-on board representing a current-limiting solution for your application. This board features the NPS4053, a load switch with a precision adjustable current limit from Nexperia. It is a 5.5V, 55mΩ load switch that allows precise adjustment of the current limit in a range of 110mA up to 2.5A while preserving the constant current during the current limiting.

[Learn More]

LightRanger 11 Click

0

LightRanger 11 Click is a compact add-on board suitable for range-finding and distance-sensing applications. This board features the VL53L7CX, a time-of-flight 8x8 multizone ranging sensor from STMicroelectronics. It is a fast and accurate multizone distance-ranging sensor width of 90° wide FoV. The multizone-ranging output with either 4x4 or 8x8 separate zones, width multitarget detection, and distance measurement in each zone. As a multizone-ranging device, its range is only up to 350cm.

[Learn More]

Power Monitor 2 Click

0

Power Monitoring 2 Click is a compact add-on board for precise power monitoring of connected load devices. This board features two INA219 12-bit I2C-output digital power monitors from Texas Instruments. This Click board™ monitors current and voltage on two separate power rails - 3.3V and 5V - of an onboard mikroBUS™ socket, providing real-time digital readings of the power consumption of added Click boards™. It supports high-speed I2C communication with configurable I2C addresses and operates at 3.3V and 5V logic levels, which makes it ideal for applications in power management, system diagnostics, and energy optimization in embedded systems.

[Learn More]