magneticrotary6 2.0.0.0
|
Magnetic Rotary 6 Click is a compact add-on board for accurate magnet-position sensing. This board features the AS5247U, an SPI-configurable high-resolution dual rotary position sensor for fast absolute angle measurement over a full 360-degree range from ams AG. The AS5047D is equipped with revolutionary integrated dynamic angle error compensation (DAECâ„¢) with almost 0 latency and offers a robust design that suppresses the influence of any homogenous external stray magnetic field. It also comes with onboard headers reserved for incremental and commutation signals of their respective A/B/I and U/V/W signals, with a maximum resolution of 16384 steps / 4096 pulses per revolution, alongside embedded self-diagnostics features.
We provide a library for the Magnetic Rotary 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.
This library contains API for Magnetic Rotary 6 Click driver.
magneticrotary6_cfg_setup
Config Object Initialization function. magneticrotary6_init
Initialization function. magneticrotary6_default_cfg
Click Default Configuration function. magneticrotary6_write_register
This function writes a desired data to the selected register of a desired sensor die by using SPI serial interface. magneticrotary6_get_angle
This function reads the absolute position raw data of a desired sensor die and converts it to degrees (Angle). magneticrotary6_set_direction
This function sets the rotation direction of a desired sensor die. This example demonstrates the use of Magnetic Rotary 6 click board by reading and displaying the magnet's angular position in degrees measured by the bottom and top sensor dies.
The demo application is composed of two sections :
Initializes the driver and performs the click default configuration which sets the magnet rotation direction for the bottom die to clockwise and for the top die to counter-clockwise.
Reads the magnet's angular position from both sensor dies in degrees every 100ms and displays the results on the USB UART.
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:
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.