How does it work?
LIN Hall 2 Click is based on the TMAG5253, a low-power linear Hall-effect sensor from Texas Instruments. This device uses a ratiometric architecture to eliminate errors from VCC tolerance, as the external analog-to-digital converter (ADC) uses the same VCC for its reference. Additionally, the device features magnet temperature compensation for NdFeB and Ferrite to counteract the magnetic sensitivity drifts across a wide temperature range. It fully integrates the signal conditioning, temperature compensation circuits, mechanical stress cancellation, and output driver. The TMAG5253 is sensitive to the magnetic field component perpendicular to the sensor’s top side. It also has a bipolar sensitivity where the north and south magnetic poles produce unique output voltages.
LIN Hall 2 Click uses an analog-to-digital converter (ADC) of the host MCU to read the analog values of the TMAG5253. The enable EN pin allows you to put the device in an ultra-low power (nA) mode when needed.
This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. Also, it comes equipped with a library containing functions and an example code that can be used as a reference for further development.
Specifications
Type
Magnetic
Applications
Can be used for the development of highly accurate rotary and linear position detection in automotive and industrial applications
On-board modules
TMAG5253 – low-power linear Hall-effect sensor from Texas Instruments
Key Features
Low power consumption, low-noise output, ratiometric analog output proportional to VCC, fast power-on time, wide magnetic sensitivity range, sensitivity compensation to support temperature drift for Neodymium magnet, and more
Interface
Analog
Feature
ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on LIN Hall 2 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
LIN Hall 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Magnetic Sensitivity Range | -80 | – | +80 | mT |
Software Support
We provide a library for the LIN Hall 2 Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for LIN Hall 2 Click driver.
Key functions
-
linhall2_read_an_pin_voltage
LIN Hall 2 read AN pin voltage level function. -
linhal2_set_en_pin
LIN Hall 2 set EN pin state function. -
linhal2_get_flux_density
LIN Hall 2 read flux density function.
Example Description
This is an example which demonstrates the use of LIN Hall 2 Click board by measuring magnetic field density and showing it in mT as well as detecting the orientation of the magnet.
void application_task ( void )
{
float mag_flux = 0;
if ( LINHALL2_OK == linhal2_get_flux_density ( &linhall2, &mag_flux ) )
{
log_printf( &logger, " Magnetic flux density: %.3f[mT]rn", mag_flux );
if ( 0 < mag_flux )
{
log_printf( &logger, " Magnetic field oriented South rnn" );
}
else
{
log_printf( &logger, " Magnetic field oriented North rnn" );
}
Delay_ms( 1000 );
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.LINHall2
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 MIKROE compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MIKROE Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.