






How Does The MR Angle Click Board™ Work?
the MR Angle Click Board™ as its foundation uses the KMZ60, a high precision sensor for magnetic angle measurement from NXP Semiconductors. The integrated MR sensor element, a sensitive magnetic field sensor, employs the MR effect of thin-film permalloy. The sensor contains two parallel supplied Wheatstone bridges, which enclose a sensitive angle of 45 degrees. A rotating magnetic field in the surface parallel to the chip (x-y plane) will deliver two independent sinusoidal output signals, one following a cosine and the second following a sine function. It also comes with a Power-Down mode to enable or disable the device and a possibility for the temperature coefficient of the sensor amplitude to be compensated.
The MR Angle Click Board™ communicates with MCU through the SPI serial interface using the MCP3204, a 12-bit 4-channel A/D converter from Microchip. The output sine and cosine signals from the KMZ60 are wired as pseudo-differential input signals to the MCP3204. The MCP3204 samples both channels of the sensor simultaneously using an SPI interface, allowing access to both channels on one data line. Besides, it possesses additional functionality routed on two GPIO pins, such as Power-Down mode and temperature compensation.
The KMZ60 can be used as specified with temperature compensation of the MR sensor signal. Pin TCE is used to enable the temperature compensation, routed on the RST pin of the mikroBUS™ socket (connected to the ground if no temperature compensation is required). The output signal amplitude will decrease with increasing temperature related to the temperature compensation of the MR sensor. The Power-Down feature labelled as PDN and routed on the PWM pin of the mikroBUS™ socket switches the device into Power-Down mode and sets the sine and cosine outputs in a high impedance state to avoid current consumption.
The MR Angle Click Board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to properly use the SPI communication lines. However, the 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.
SPECIFICATIONS
Type | Magnetic |
Applications | Can be used for rotor position detection for BLDC motors and Electronic Power Steering (EPS) applications, steering angle measurement, window wiper position detection, and general contactless angular measurement (e.g., throttle valves or actuators). |
On-board modules | KMZ60 - high precision sensor for magnetic angle measurement from NXP Semiconductors |
Key Features | High precision sensor for magnetic angle measurement, temperature compensated output signal amplitude, Power-Down mode to enable or disable the device, integrated instrumentation amplifier, fully automotive qualified, and more. |
Interface | SPI |
Compatibility | mikroBUS |
Click board size | M (42.9 x 25.4 mm) |
Input Voltage | 3.3V or 5V |
PINOUT DIAGRAM
This table shows how the pinout of the MR Angle Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | ![]() |
Pin | Notes | |||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | PDN | Power-Down Mode | |
Temperature Compensation | TCE | 2 | RST | INT | 15 | NC | |
SPI Chip Select | CS | 3 | CS | RX | 14 | NC | |
SPI Clock | SCK | 4 | SCK | TX | 13 | NC | |
SPI Data OUT | SDO | 5 | MISO | SCL | 12 | NC | |
SPI Data IN | SDI | 6 | MOSI | SDA | 11 | NC | |
Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | 5V | Power Supply |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
JP1 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
MR ANGLE CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | - | 5 | V |
Rotation Angle | 0 | - | 360 | deg |
Resolution | - | 12 | - | bits |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the MR Angle Click Board™ as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
The package can be downloaded/installed directly from NECTO Studio The package Manager (recommended), downloaded from our LibStock™ or found on mikroE Github account.
Library Description
This library contains API for the MR Angle Click Board™ driver.
Key Functions
mrangle_cfg_setup
- Config Object Initialization function.mrangle_init
- Initialization function.mrangle_default_cfg
- Click Default Configuration function.
Example Description
This library contains API for the MR Angle Click Board™ driver. This demo application shows an example of angle measurement.
void application_init ( void ) { log_cfg_t log_cfg; /**< Logger config object. */ mrangle_cfg_t mrangle_cfg; /**< Click config object. */ // Logger initialization. LOG_MAP_USB_UART( log_cfg ); log_cfg.level = LOG_LEVEL_DEBUG; log_cfg.baud = 115200; log_init( &logger, &log_cfg ); log_printf( &logger, "rn" ); log_info( &logger, " Application Init " ); // Click initialization. mrangle_cfg_setup( &mrangle_cfg ); MRANGLE_MAP_MIKROBUS( mrangle_cfg, MIKROBUS_1 ); err_t init_flag = mrangle_init( &mrangle, &mrangle_cfg ); if ( init_flag == SPI_MASTER_ERROR ) { log_error( &logger, " Application Init Error. " ); log_info( &logger, " Please, run program again... " ); for ( ; ; ); } mrangle_default_cfg ( &mrangle ); log_info( &logger, " Application Task " ); log_printf( &logger, "-------------------------rn" ); Delay_ms( 1000 ); }
The full application code, and ready to use projects can be installed directly from NECTO Studio The 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.MrAngle
Additional Notes and Information
Depending on the development board you are using, you may need USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The MR Angle 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.
MR Angle Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.