How does it work?
3D Hall 11 Click as its foundation uses the TMAG5273, a 3D linear Hall-effect sensor used to detect the strength of a magnetic field in all three dimensions (X, Y, and Z axes) in a range up to ±40mT or ±80mT from Texas Instruments. A precision analog signal chain and an integrated 12-bit ADC enable high accuracy and low drift magnetic field measurements while supporting a sampling of up to 20kSPS. It also has an integrated temperature sensor available for multiple system functions, such as thermal budget check or temperature compensation calculation for a given magnetic field. The output signals (raw X, Y, and Z magnetic data and temperature data) are accessible through the I2C interface.
This Click board™ can be configured to various power options, including Wake-Up and Sleep mode, optimizing system power consumption. Also, an integrated angle calculation engine (CORDIC) provides complete 360° angular position information for both on-axis and off-axis angle measurement topologies, performed via two user-selected magnetic axes. It also features magnetic gain and offset correction to mitigate the impact of system mechanical error sources.
3D Hall 11 Click communicates with MCU using the standard I2C 2-Wire interface with a maximum clock frequency of 1MHz to enable any combination of magnetic axes and temperature measurements. Besides a dedicated interrupt pin, the INT pin of the mikroBUS™ socket act as a system interrupt during low power Wake-Up and Sleep mode and can also be used by an MCU to trigger a new sensor conversion.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VIO SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the communication lines properly. However, the Click board™ comes equipped with a library that contains easy-to-use functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Magnetic
Applications
Can be used for a wide range of industrial and personal electronics applications
On-board modules
TMAG5273 – linear 3D Hall-effect sensor from Texas Instruments
Key Features
Low power consumption, configurable power modes, selectable linear magnetic range at X, Y, or Z axis, interrupt signal, integrated angle CORDIC calculation with gain and offset adjustment, 20kSPS single axis conversion rate, I2C interface, built-in temperature sensor, and more
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on 3D Hall 11 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 |
JP1 | VIO SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
3D Hall 11 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Operating Magnetic Range | ±40 | – | ±80 | mT |
Sample Rate | – | – | 20 | kSPS |
Resolution | – | 12 | – | bit |
Operating Temperature Range | -40 | +25 | +120 | °C |
Software Support
We provide a library for the 3D Hall 11 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 3D Hall 11 Click driver.
Key functions
-
c3dhall11_write_register
This function writes a desired data to the selected register by using I2C serial interface. -
c3dhall11_read_register
This function reads data from the selected register. -
c3dhall11_read_data
This function reads new data which consists of X, Y, and Z axis values in mT, and temperature in Celsius. It also reads the angle in Degrees between X and Y by default, and magnitude data as well.
Example Description
This example demonstrates the use of 3D Hall 11 Click board™ by reading the magnetic flux density from 3 axes, and the angle and magnitude between X and Y axes as well as the sensor internal temperature.
void application_task ( void )
{
c3dhall11_data_t sensor_data;
if ( C3DHALL11_OK == c3dhall11_read_data ( &c3dhall11, &sensor_data ) )
{
log_printf( &logger, " X-axis: %.1f mTrn", sensor_data.x_axis );
log_printf( &logger, " Y-axis: %.1f mTrn", sensor_data.y_axis );
log_printf( &logger, " Z-axis: %.1f mTrn", sensor_data.z_axis );
log_printf( &logger, " Angle: %.1f Degreesrn", sensor_data.angle );
log_printf( &logger, " Magnitude: %urn", ( uint16_t ) sensor_data.magnitude );
log_printf( &logger, " Temperature: %.2f Celsiusrnn", sensor_data.temperature );
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.3DHall11
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.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika 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.