How does it work?
AMR Angle 2 Click as its foundation uses the ADA4570, an anisotropic magnetoresistive (AMR) sensor with integrated signal conditioning amplifiers and analog-to-digital converter (ADC) drivers from Analog Devices. It consists of two dies within one package, an AMR sensor, and a fixed gain instrumentation amplifier producing two differential analog outputs that indicate the angular position of the surrounding magnetic field. This amplified differential cosine and sine output signals are delivered with respect to the angle when the magnetic field is rotating in the x-axis and the y-axis (x-y) plane.
The ADA4570 contains two Wheatstone bridges at a relative angle of 45° to one another. A complete rotation of a dipole magnet produces two periods on the sinusoidal outputs, so the magnetic angle calculated from the sine and cosine differential outputs represents the physical orientation of the magnet with respect to the ADA4570 in the 0° to 180° measurement range. Within a homogeneous field in the x-y plane, the output signals of the ADA4570 are independent of the physical placement in the z-direction (air gap).
As mentioned before, alongside the AMR sensor, this Click board™ also contains one high-speed, low-power, serial output successive approximation register (SAR) analog-to-digital converter (ADC), the MAX11122 from Analog Devices. It processes sine and cosine outputs and then forwards them to the MCU via the SPI interface for further processing. Apart from the SPI communication lines, this Click board™ uses several more pins on the mikroBUS™ such as CST and EOC, routed to the PWM and INT pins of the mikroBUS™ socket, representing the signals with which the AD conversion starts and the signal indicating the completion of the conversion itself, respectively.
Also, the ADA4570 has an integrated temperature sensor that provides a voltage ratiometric to the ADA4570 supply voltage at the AN pin of the mikroBUS™ socket used to monitor the system’s operating temperature and provide the reference for further calibration.
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. 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 absolute position measurement (linear and angle), contactless angular measurement and detection, magnetic angular position sensing, actuator control and positioning, and more
On-board modules
ADA4570 – anisotropic magnetoresistive (AMR) sensor from Analog Devices
Key Features
High precision 180° angle sensor, contactless angular measurement, sine and cosine differential outputs, temperature compensated AMR bridge, industrial and automotive temperature range, and more
Interface
Analog,SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on AMR Angle 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 |
AMR Angle 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Rotation Angle | 0 | – | 180 | deg |
Angular Error | – | ±0.1 | – | deg |
Resolution | 12 | – | – | bits |
Operating Temperature Range | -40 | +25 | +150 | °C |
Software Support
We provide a library for the AMR Angle 2 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 AMR Angle 2 Click driver.
Key functions
-
amrangle2_read_angle
This function reads a Vsin and Vcos voltages and converts them to angle in Degrees. -
amrangle2_read_temperature
This function reads a temperature measurements in Celsius. -
amrangle2_read_vsin_vcos
This function reads a voltage of sine and cosine differential signal outputs.
Example Description
This example demonstrates the use of AMR Angle 2 Click board™ by reading and displaying the magnet’s angular position in Degrees and a system temperature in Celsius.
void application_task ( void )
{
float angle, temperature;
if ( AMRANGLE2_OK == amrangle2_read_angle ( &amrangle2, &angle ) )
{
log_printf( &logger, " Angle: %.2f Degreesrn", angle );
}
if ( AMRANGLE2_OK == amrangle2_read_temperature ( &amrangle2, &temperature ) )
{
log_printf( &logger, " Temperature: %.2f Crnn", 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.AMRAngle2
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.