How does it work?
Magneto Click is based on the AS5048A, a 360° magnetic Hall sensor system from ams AG, manufactured in a CMOS process and used to measure the magnetic field components perpendicular to the surface of the chip. The integrated Hall sensors are placed around the center of the AS5048A and deliver a voltage representation of the magnetic flux. Through sigma-delta ADC and Digital Signal-Processing (DSP) algorithms, the AS5048A provides accurate high-resolution absolute angular position information of a small, diametrically magnetized (two-pole) standard magnet. The calculation is executed by CORDIC, which calculates the angle and the magnitude of the Hall array signals. DSP also provides information on the magnet movements towards or away from the sensor surface on the z-axis.
The AS5048A is pre-programmed as an SPI interface, with a PWM output signal, available on the INT pin of the mikroBUS™ socket in 12-bit format and provides a 14-bit binary code representing the magnet’s angular position. It uses self-calibration methods to eliminate signal offset and sensitivity drifts. Different magnet diameters and magnetic inputs (NeFeB, SmCo, and alternative magnet materials such as hard ferrites) are possible depending on the system requirements.
Also, the zero magnet position can be programmed through an SPI interface. The AS5048A uses one-time programmable (OTP) fuses for permanent programming of the user settings, with the possible programming verification over a simple digital readout of the OTP content. It should be noted that the sensor tolerates misalignment, air gap variations, temperature variations, and as well external magnetic fields. This robustness and wide temperature range of the AS5048A make it ideal for rotation angle sensing in harsh industrial and medical environments.
This Click board™ can be operated only with a 5V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. However, the Click board™ 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 position sensing applications such as robotic joint position detection, industrial motor position control, and more
On-board modules
AS5048A – 360° magnetic Hall sensor system from ams AG
Key Features
Contactless rotary position sensor over 360°, high reliability, SPI and PWM interface, high presicion and resolution, programmable zero position, immune to external magnetic stray fileds, and more
Interface
PWM,SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
5V
Pinout diagram
This table shows how the pinout on MAGNETO 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 |
MAGNETO Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 5 | – | V |
Magnetic Field Range | 30 | 50 | 70 | mT |
Rotation Angle | 0 | – | 360 | deg |
Resolution | – | 41 | – | bit |
Software Support
We provide a library for the MAGNETO 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 MAGNETO Click driver.
Key functions
-
This function read and returns the value of the state register.
-
This function read the 16-bit data from register then calculate and convert to float angle value from 0deg to 360deg.
Example Description
Example presents precise angle measurements down to 0.05º in 14-bit resolution.
void application_task ( void )
{
angle_value = magneto_calculate_angle( &magneto );
log_printf( &logger, " [ANGLE] : %0.3f rn", angle_value );
Delay_ms ( 2000 );
}
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.Magneto
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.