Improve inventory management through consistent weight tracking
A
A
Hardware Overview
How does it work?
Load Cell 6 Click is based on the MAX11270, a pin-programmable, ultra-low power 24-bit ΣΔ ADC that resolves a very high dynamic range from Analog Devices. The MAX11270 achieves excellent 130dB SNR while dissipating an ultra-low 10mW. It allows users to select a programmable gain amplifier with gain settings between 1x to 128x, unity-gain buffer, or connect signals directly to the delta-sigma sampling network. This ADC can resolve micro-volt level changes to the analog input, making it a good fit for seismic, instrumentation, and ATE applications. The MAX11270 measures differential analog inputs (S+, S-) in buffered, direct connect, or PGA. The default configuration is directly connected, with PGA and input buffers powered down. These optional buffers isolate the signal inputs from the switched capacitor sampling network, which allows the MAX11270 to be used with high-impedance sources without compromising the available
dynamic range. The ADC input range is programmable for unipolar (0 to VREF) ranges set by the reference voltage value obtained by the MAX6126, a 3V high-precision voltage reference, also routed to the E+ terminal. Load Cell 6 Click communicates with MCU through a standard SPI interface that enables high clock speeds up to 5MHz. The MAX11270 is highly configurable via the internal registers, accessed via the SPI interface. It operates in two modes: Conversion mode or Register-Access mode, selected by the command byte. Those registers include PGA gain selection, offset and gain calibration, and a scalable sample rate to optimize performance. It also offers software-selectable output data rates, up to 12.8 kps with no data latency and 64 kps continuous, to optimize data rate and noise. In addition, the Reset pin, routed to the RST pin of the mikroBUS™ socket, is used for a complete reset of all digital functions, resulting in a Power-On reset default
state, while the Data-Ready signal, labeled as RDY and routed to the INT pin of the mikroBUS™ socket, notifies the host MCU when the data is ready. The Sync Reset signal is also used, labeled as SYN, and routed to the PWM pin of the mikroBUS™ socket, which resets both the digital filter and modulator. It also has a GPIO header with two general-purpose pins from the MAX11270, which are user-configurable. Even though this board uses both mikroBUS™ power rails, this Click board™ can only be operated with a 3.3V logic voltage level (5V is used only as a voltage reference power supply). The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. Also, this Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used as a reference for further development.
Features overview
Development board
Clicker 2 for Kinetis is a compact starter development board that brings the flexibility of add-on Click boards™ to your favorite microcontroller, making it a perfect starter kit for implementing your ideas. It comes with an onboard 32-bit ARM Cortex-M4F microcontroller, the MK64FN1M0VDC12 from NXP Semiconductors, two mikroBUS™ sockets for Click board™ connectivity, a USB connector, LED indicators, buttons, a JTAG programmer connector, and two 26-pin headers for interfacing with external electronics. Its compact design with clear and easily recognizable silkscreen markings allows you to build gadgets with unique functionalities and
features quickly. Each part of the Clicker 2 for Kinetis development kit contains the components necessary for the most efficient operation of the same board. In addition to the possibility of choosing the Clicker 2 for Kinetis programming method, using a USB HID mikroBootloader or an external mikroProg connector for Kinetis programmer, the Clicker 2 board also includes a clean and regulated power supply module for the development kit. It provides two ways of board-powering; through the USB Micro-B cable, where onboard voltage regulators provide the appropriate voltage levels to each component on the board, or
using a Li-Polymer battery via an onboard battery connector. All communication methods that mikroBUS™ itself supports are on this board, including the well-established mikroBUS™ socket, reset button, and several user-configurable buttons and LED indicators. Clicker 2 for Kinetis is an integral part of the Mikroe ecosystem, allowing you to create a new application in minutes. Natively supported by Mikroe software tools, it covers many aspects of prototyping thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.
Microcontroller Overview
MCU Card / MCU

Architecture
ARM Cortex-M4
MCU Memory (KB)
1024
Silicon Vendor
NXP
Pin count
121
RAM (Bytes)
262144
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic

Step by step
Project assembly
Track your results in real time
Application Output
1. Application Output - In Debug mode, the 'Application Output' window enables real-time data monitoring, offering direct insight into execution results. Ensure proper data display by configuring the environment correctly using the provided tutorial.

2. UART Terminal - Use the UART Terminal to monitor data transmission via a USB to UART converter, allowing direct communication between the Click board™ and your development system. Configure the baud rate and other serial settings according to your project's requirements to ensure proper functionality. For step-by-step setup instructions, refer to the provided tutorial.

3. Plot Output - The Plot feature offers a powerful way to visualize real-time sensor data, enabling trend analysis, debugging, and comparison of multiple data points. To set it up correctly, follow the provided tutorial, which includes a step-by-step example of using the Plot feature to display Click board™ readings. To use the Plot feature in your code, use the function: plot(*insert_graph_name*, variable_name);. This is a general format, and it is up to the user to replace 'insert_graph_name' with the actual graph name and 'variable_name' with the parameter to be displayed.

Software Support
Library Description
This library contains API for Load Cell 6 Click driver.
Key functions:
loadcell6_get_weight
- Load Cell 6 get weight functionloadcell6_calibration
- Load Cell 6 calibration functionloadcell6_tare
- Load Cell 6 tare the scales function.
Open Source
Code example
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.
/*!
* @file main.c
* @brief LoadCell6 Click example
*
* # Description
* This library contains API for the Load Cell 6 Click driver.
* The library initializes and defines the SPI bus drivers to read status and ADC data.
* The library also includes a function for tare, calibration and weight measurement.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initialization of SPI module and log UART.
* After driver initialization, app performs the power on
* sets tare the scale, calibrate scale and start measurements.
*
* ## Application Task
* This is an example that demonstrates the use of the Load Cell 6 click board™.
* The Load Cell 6 click board™ can be used to measure weight and
* shows the measurement of scales in grams [ g ].
* Results are being sent to the Usart Terminal where you can track their changes.
*
* @author Nenad Filipovic
*
*/
#include "board.h"
#include "log.h"
#include "loadcell6.h"
static loadcell6_t loadcell6;
static log_t logger;
static loadcell6_data_t cell_data;
void application_init ( void )
{
log_cfg_t log_cfg; /**< Logger config object. */
loadcell6_cfg_t loadcell6_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.
loadcell6_cfg_setup( &loadcell6_cfg );
LOADCELL6_MAP_MIKROBUS( loadcell6_cfg, MIKROBUS_1 );
if ( SPI_MASTER_ERROR == loadcell6_init( &loadcell6, &loadcell6_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
if ( LOADCELL6_ERROR == loadcell6_default_cfg( &loadcell6 ) )
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
Delay_ms( 1000 );
log_printf( &logger, "-------------------------\r\n");
log_printf( &logger, " Tare the scale : \r\n");
log_printf( &logger, "- - - - - - - - - - - - -\r\n");
log_printf( &logger, " >> Remove all object << \r\n");
log_printf( &logger, "- - - - - - - - - - - - -\r\n");
log_printf( &logger, " In the following 10 sec \r\n");
log_printf( &logger, " please remove all object\r\n");
log_printf( &logger, " from the scale. \r\n");
Delay_ms( 10000 );
log_printf( &logger, "-------------------------\r\n");
log_printf( &logger, " Start tare scales \r\n");
loadcell6_tare( &loadcell6, &cell_data );
Delay_ms( 500 );
log_printf( &logger, "-------------------------\r\n");
log_printf( &logger, " Tarring is complete \r\n");
log_printf( &logger, "-------------------------\r\n");
log_printf( &logger, " Calibrate Scale : \r\n");
log_printf( &logger, "- - - - - - - - - - - - -\r\n");
log_printf( &logger, " >>> Load etalon <<< \r\n");
log_printf( &logger, "- - - - - - - - - - - - -\r\n");
log_printf( &logger, " In the following 10 sec \r\n");
log_printf( &logger, "place 200g weight etalon\r\n");
log_printf( &logger, " on the scale for \r\n");
log_printf( &logger, " calibration purpose. \r\n");
Delay_ms( 10000 );
log_printf( &logger, "-------------------------\r\n");
log_printf( &logger, " Start calibration \r\n");
if ( LOADCELL6_OK == loadcell6_calibration( &loadcell6, LOADCELL6_WEIGHT_200G, &cell_data ) )
{
log_printf( &logger, "-------------------------\r\n");
log_printf( &logger, " Calibration Done \r\n");
log_printf( &logger, "- - - - - - - - - - - - -\r\n");
log_printf( &logger, " >>> Remove etalon <<< \r\n");
log_printf( &logger, "- - - - - - - - - - - - -\r\n");
log_printf( &logger, " In the following 5 sec \r\n");
log_printf( &logger, " remove 200g weight \r\n");
log_printf( &logger, " etalon on the scale. \r\n");
Delay_ms( 5000 );
}
else
{
log_printf( &logger, "-------------------------\r\n");
log_printf( &logger, " Calibration Error \r\n");
for ( ; ; );
}
log_printf( &logger, "-------------------------\r\n");
log_printf( &logger, " Start measurements : \r\n");
log_printf( &logger, "-------------------------\r\n");
}
void application_task ( void )
{
static float weight_g;
if ( LOADCELL6_OK == loadcell6_get_weight( &loadcell6, &cell_data, &weight_g ) )
{
log_printf(&logger, " Weight : %.2f g\r\n", weight_g );
}
}
void main ( void )
{
application_init( );
for ( ; ; )
{
application_task( );
}
}
// ------------------------------------------------------------------------ END