magneticrotary5 2.1.0.0
|
Magnetic Rotary 5 Click is a compact add-on board for accurate magnet-position sensing. This board features the AS5134, a contactless magnetic rotary encoder from ams AG for accurate angular measurement over a full turn of 360ยบ. It is designed to provide accurate angle measurements with a simple two-pole magnet rotating over the center of the chip, featuring an integrated Hall element, analog front end, and digital signal processing. Offering a high resolution of 8.5 bits, which equates to 360 positions per revolution, it is also capable of high-speed performance, with a maximum RPM of 76875. It can accommodate a wide range of magnetic fields, from 20 to 80mT. It also has an onboard header for incremental and commutation signals of their respective A/B/I and U/V/W signals and pins for Daisy Chain Mode and OTP programming.
We provide a library for the Magnetic Rotary 5 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 5 Click driver.
magneticrotary5_cfg_setup
Config Object Initialization function. magneticrotary5_init
Initialization function. magneticrotary5_default_cfg
Click Default Configuration function. magneticrotary5_read_angle
This function reads the magnetic angle and automatic gain control (AGC) values measured by the sensor. magneticrotary5_read_mt_cnt
This function reads the multi turn counter value. With each zero transition in any direction, the output of a special counter is incremented or decremented. magneticrotary5_read_voltage
This function reads raw ADC value and converts it to proportional voltage level. This example demonstrates the use of Magnetic Rotary 5 click board by reading and displaying
the magnet angular position as well as the AGC and multi turn counter values.
The demo application is composed of two sections :
Initializes the driver and resets the multi turn counter to zero.
Reads the magnet angular position in degrees as well as the voltage from AN pin which is
proportional to the angular position. Also reads the AGC and multi turn counter values. The results will be displayed on the USB UART every 100ms approximately.
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.