How does it work?
Angle 8 Click as its foundation uses the MA782GGU, a low-power angle sensor with integrated wake-up angle detection from Monolithic Power Systems. It allows users to read angle position information and detect the speed or direction of magnet rotation. With its power cycling ability, the MA782GGU can be optimized for applications that require low average power. Fast data acquisition and processing provides accurate angle measurement at an applied magnetic field of 60mT. 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 MA782GGU features magnetic field strength detection with configurable thresholds to sense the magnet position relative to the sensor for certain functions (e.g. sensing the axial movements or for diagnostics). On-chip non-volatile memory stores configuration parameters, including the reference zero angle position, the power cycling parameters, the filter window affecting the output resolution, and magnetic field detection thresholds.
The Angle 8 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. This Click board™ uses the Enable pin labeled as EN and routed to the CS pin of the mikroBUS™ socket to optimize power consumption, used for its power ON/OFF purposes. It has three power modes: Active, Idle, and Automatic sampling cycle (ASC). By combining these three power modes, the MA782GGU can be operated in different ways. In ASC mode, the MA782GGU switches between Active and Idle mode. The selection can be made by positioning SMD jumper labeled as ASC SEL to an appropriate position marked as 0 or 1.
Besides this pins, it also uses two indicators, new data and data valid indicators labeled as ND and DV routed to the AN and RST pins of the mikroBUS™ socket. In ASC mode, the ND signal indicates when new data is ready to be read, or if the displacement exceeds the defined threshold, while the DV signal indicates the stabilization of the digital filter. It also has the magnetic flag used to indicate when the sensor position’s magnetic field is out of range, defined by the lower magnetic field thresholds, routed on the INT pin of the mikroBUS™ socket labeled as 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 for general-purpose angle measurements, in embedded motion control applications, as a power/speed control trigger solution, and more
On-board modules
MA782GGU – low-power angle sensor with integrated wake-up angle detection from Monolithic Power Systems
Key Features
Fast data acquisition, SPI serial interface, magnetic field strength detection, angle detection interrupt to wake-up the system, supported both end-of-shaft and off-axis, and many more
Interface
SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on Angle 8 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 | ASC SEL | Left | Automatic Sampling Cycle Mode Selection 0/1: Left position 0, Right position 1 |
Angle 8 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Magnetic Filed Detection Range | 30 | 60 | – | mT |
Magnetic Field Detection Accuracy | – | 5 | – | mT |
Resolution | 8 | – | 12 | bit |
Operating Temperature Range | -40 | +25 | +125 | °C |
Software Support
We provide a library for the Angle 8 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 8 Click driver.
Key functions
-
angle8_get_nd_pin
This function returns the new data ready (ND) pin logic state. -
angle8_set_cycle_time
This function sets the sensor cycle time (measurement rate) in milliseconds. -
angle8_read_angle
This function reads raw angle data and converts it to degrees.
Example Description
This example demonstrates the use of Angle 8 Click board™ by reading and displaying the magnet’s angular position in degrees.
void application_task ( void )
{
if ( angle8_get_nd_pin ( &angle8 ) )
{
float angle = 0;
if ( ANGLE8_OK == angle8_read_angle ( &angle8, &angle ) )
{
log_printf ( &logger, " Angle: %.2f Deg rnn", angle );
}
}
}
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.Angle8
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.