How does it work?
Angle 6 Click as its foundation uses the MAQ470GQE, 12-bit PWM output angle sensor that detects the absolute angular position of a permanent magnet, typically a diametrically magnetized cylinder on a rotating shaft from Monolithic Power Systems. It allows users to read angle position information and detect the speed or direction of magnet rotation. Fast data acquisition and processing provide accurate angle measurement at speeds from 0 to 60,000rpm. It supports a wide range of magnetic field strengths and spatial configurations, with both end-of-shaft and off-axis (side-shaft mounting), supported configurations.
The MAQ470GQE features magnetic field strength detection with programmable thresholds to allow sensing of the magnet position relative to the sensor to create functions such as the sensing of axial movements or diagnostics. It can operate over a wide magnetic field range from 30mT to 150mT (60mT typical) with 5mT accuracy. Eight magnetic field thresholds are programmable in approximate 15mT steps allowing detection of changes in the distance between the magnet and the sensor. On-chip non-volatile memory provides storage for configuration parameters, including the reference zero angle position and magnetic field detection thresholds.
The magnetic field is detected with integrated Hall devices located in the sensors‘ center. The angle is measured using the Spinaxis™ method, based on phase detection generating a sinusoidal signal with a phase representing the angle of the magnetic field. The angle is then obtained by a time-to-digital converter, representing output from the front-end to the digital conditioning block, which measures the time between the zero-crossing of the sinusoidal signal and the edge of a constant waveform. This output delivers a digital number proportional to the angle of the magnetic field at the rate of 1MHz in a straightforward and open-loop manner.
The Angle 6 Click communicates with MCU using the standard SPI serial interface for angle reading and register programming, which supports SPI Mode 0 and 3 and operates at clock rates up to 25 MHz. It also has the magnetic flags used to indicate when the sensor position’s magnetic field is out of range, defined by the lower and upper magnetic field thresholds, routed on the RST and INT pins of the mikroBUS™ socket labeled as MGH and MGL.
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 as a highly reliable and contactless method to measure various applications’ angles, position, and speed
On-board modules
MAQ470GQE – 12-bit contactless angle sensor with PWM output from Monolithic Power Systems
Key Features
Fast data acquisition, SPI serial interface, magnetic field strength detection, contactless sensing for long life, supported both end-of-shaft and off-axis, and many more
Interface
PWM,SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Supply Voltage
3.3V
Pinout diagram
This table shows how the pinout on Angle 6 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Designator | Name | Default | Description: describe the user + list all options with respective descriptions |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
Angle 6 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Magnetic Filed Detection Range | 30 | 60 | 150 | mT |
Magnetic Field Detection Accuracy | – | 5 | – | mT |
Resolution | – | 12 | – | bit |
Operation Temperature Range | -40 | – | +125 | bit °C |
Software Support
We provide a library for the Angle 6 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 Angle 6 Click driver.
Standard key functions:
-
angle6_cfg_setup
Config Object Initialization function. -
angle6_init
Initialization function. -
angle6_default_cfg
Click Default Configuration function.
Example key functions:
-
angle6_write_register
This function writes a data byte to the selected register by using SPI serial interface. -
angle6_read_register
This function reads a data byte from the selected register by using SPI serial interface. -
angle6_read_angle
This function reads raw angle data and converts it to degrees.
Example Description
This example demonstrates the use of Angle 6 click board by reading and displaying the magnet’s angular position in degrees.
void application_task ( void )
{
float angle = 0;
if ( ANGLE6_OK == angle6_read_angle ( &angle6, &angle ) )
{
log_printf ( &logger, " Angle: %.2f Deg rnn", angle );
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.Angle6
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.