Planche à clic Angle 7
Planche à clic Angle 7
Key Features
- Mesure d'angle sans contact, fiabilité et durabilité maximales, positions de démarrage et d'arrêt simples et programmables par l'utilisateur via l'interface I2C, signal de sortie haute résolution, grande flexibilité sur l'excursion angulaire, sortie sélectionnable, etc.
- Basé sur le capteur de position magnétique rotatif AS5600 d'AMS AG
- Peut être utilisé pour les potentiomètres sans contact, les boutons sans contact, les servos RC et d'autres solutions de mesure de position angulaire
- mikroBUS : interfaces I2C, analogiques et PWM
La carte Click Board™ Angle 7 est une carte complémentaire compacte qui détecte la position angulaire absolue d'un aimant permanent. Cette carte est équipée de l'AS5600, un capteur de position magnétique rotatif programmable à effet Hall avec une sortie analogique ou PWM 12 bits haute résolution d'AMS AG. Basé sur la technologie Hall planaire, ce capteur mesure la composante orthogonale de la densité de flux (Bz) d'un aimant externe tout en rejetant les champs magnétiques parasites. La plage par défaut de la sortie est de 18 à 360 degrés, où la résolution complète de l'appareil peut être appliquée à une plage plus petite en programmant un angle nul (position de départ) et un angle maximal (position d'arrêt) via l'interface I2C utilisée pour la configuration et la programmation utilisateur des paramètres non volatils. Cette carte Click™ convient aux potentiomètres sans contact, aux boutons sans contact, aux servos RC et à d'autres solutions de mesure de position angulaire.
La carte Click Board™ Angle 7 est prise en charge par une bibliothèque compatible mikroSDK, qui comprend des fonctions qui simplifient le développement logiciel. Cette carte Click Board™ est un produit entièrement testé, prêt à être utilisé sur un système équipé du socket mikroBUS™.
Remarque : le Click Board n'inclut pas l'aimant, le support ni le bouton de commande. Ceci est présenté à titre d'exemple d'application.
How Does The Angle 7 Click Board™ Work?
The Angle 7 Click Board™ as its foundation uses the AS5600, an easy to program magnetic rotary position sensor with a high-resolution 12-bit analog or PWM output from AMS AG. The AS5600 is a Hall-based rotary magnetic position sensor using planar sensors that convert the magnetic field component perpendicular to the surface of the chip into a voltage. It measures the absolute angle of a diametric-magnetized on-axis magnet while at the same time rejecting stray magnetic fields. By default, the output represents a range from 18 to 360 degrees. It is also possible to define a smaller range to the output by programming a zero angle (start position) and a maximum angle (stop position).
The signals coming from internal Hall sensors are first amplified and filtered before their conversion by the ADC and then processed by the hardwired CORDIC block to compute the angle and magnitude of the magnetic field vector. The intensity of the magnetic field is used by the automatic gain control (AGC) to adjust the amplification level to compensate for temperature and magnetic field variations. After that, the output stage uses the angle value provided by the CORDIC algorithm. The user can choose between an analog output representing the angle as a ratiometric linear absolute value and a digital PWM-encoded output representing the angle as the pulse width. The selection can be made by positioning the SMD jumper labelled as OUT SEL in an appropriate position marked as AN or INT.
The Angle 7 Click Board™ communicates with MCU using the standard I2C 2-Wire interface with a maximum clock frequency of 1MHz, fully adjustable through software registers. Also, the DIR SEL jumper allows users to select the polarity of the output relative to rotation direction by positioning the SMD jumper in an appropriate position marked as CW or CCW allowing clockwise or counterclockwise rotation. A unique addition to this board is a position for a rotary magnet holder designed to be used alongside a magnetic rotary position sensor allowing fast prototyping and quick measurements during development.
The Angle 7 Click Board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. Both mikroBUS™ power rails have protection in the form of diode MAX40200, controllable through an EN pin on the mikroBUS™ socket to prevent any unwanted back voltage. This way, it is allowed for both 3.3V and 5V capable MCUs to use the communication lines properly. 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.
NOTE: In the case of using a logic level of 5V, it is necessary first to remove the resistor R6 and only then switch the VCC jumper to the 5V position.
SPECIFICATIONS
Type | Magnetic |
Applications | Can be used for contactless potentiometers, contactless knobs, RC servos, and other angular position measurement solutions |
On-board modules | AS5600 - rotary magnetic position sensor from ams AG |
Key Features | Contactless angle measurement, highest reliability and durability, simple user-programmable start and stop positions over the I2C Interface, high-resolution output signal, great flexibility on angular excursion, selectable output, and more |
Interface | Analog,I2C,PWM |
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 on the Angle 7 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
Analog Signal | AN | 1 | AN | PWM | 16 | NC | |
NC | 2 | RST | INT | 15 | INT | PWM Signal | |
NC | 3 | CS | RX | 14 | NC | ||
NC | 4 | SCK | TX | 13 | NC | ||
NC | 5 | MISO | SCL | 12 | SCL | I2C Clock | |
NC | 6 | MOSI | SDA | 11 | SDA | I2C Data | |
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 |
JP2 | OUT SEL | Left | Analog/PWM Output Selection AN/INT: Left position AN, Right position INT |
JP3 | DIR SEL | Left | Direction Polarity Selection CW/CCW: Left position CW, Right position CCW |
R6 | R6 | Populated | Power Management Jumper |
ANGLE 7 CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | - | 5 | V |
Angle Measurement Range | 18 | - | 360 | deg |
Resolution | - | 12 | - | bit |
Operating Temperature Range | -40 | +25 | +120 | °C |
Software Support
We provide a library for the Angle 7 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 Angle 7 Click Board™ driver.
Key functions
-
angle7_get_status
This function reads the status data. -
angle7_get_angle
This function reads the calculated angle in degrees. -
angle7_get_magnitude
This function reads the magnitude data.
Example Description
This example demonstrates the use of the Angle 7 Click Board™ by reading and displaying the magnet's angular position in degrees and analog voltage output as well as the magnet's status and magnitude.
void application_task ( void )
{
float voltage, raw_angle, angle;
uint16_t magnitude;
uint8_t status;
if ( ADC_ERROR != angle7_read_an_pin_voltage ( &angle7, &voltage ) )
{
log_printf( &logger, " AN voltage: %.3f Vrn", voltage );
}
if ( ANGLE7_OK == angle7_get_angle ( &angle7, &angle ) )
{
log_printf ( &logger, " Angle: %.2f Degreesrn", angle );
}
if ( ANGLE7_OK == angle7_get_magnitude ( &angle7, &magnitude ) )
{
log_printf ( &logger, " Magnitude: %urn", magnitude );
}
if ( ANGLE7_OK == angle7_get_status ( &angle7, &status ) )
{
log_printf ( &logger, " Status:" );
if ( status & ANGLE7_STATUS_MAGNET_DETECTED )
{
log_printf ( &logger, " Magnet Detected rn Magnet Strength:" );
if ( status & ANGLE7_STATUS_MAGNET_TOO_STRONG )
{
log_printf ( &logger, " Too Strong rnn" );
}
else if ( status & ANGLE7_STATUS_MAGNET_TOO_WEAK )
{
log_printf ( &logger, " Too Weak rnn" );
}
else
{
log_printf ( &logger, " Good rnn" );
}
}
else
{
log_printf ( &logger, " Magnet Not Detected rnn" );
}
}
Delay_ms ( 100 );
}
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.Angle7
Additional Notes and Information
Depending on the development board you are using, you may need a USB UART Click Board™, 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
The Angle 7 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.
Software Support
We provide a library for the Angle 7 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 Angle 7 Click Board™ driver.
Key functions
-
angle7_get_status
This function reads the status data. -
angle7_get_angle
This function reads the calculated angle in degrees. -
angle7_get_magnitude
This function reads the magnitude data.
Example Description
This example demonstrates the use of the Angle 7 Click Board™ by reading and displaying the magnet's angular position in degrees and analog voltage output as well as the magnet's status and magnitude.
void application_task ( void )
{
float voltage, raw_angle, angle;
uint16_t magnitude;
uint8_t status;
if ( ADC_ERROR != angle7_read_an_pin_voltage ( &angle7, &voltage ) )
{
log_printf( &logger, " AN voltage: %.3f Vrn", voltage );
}
if ( ANGLE7_OK == angle7_get_angle ( &angle7, &angle ) )
{
log_printf ( &logger, " Angle: %.2f Degreesrn", angle );
}
if ( ANGLE7_OK == angle7_get_magnitude ( &angle7, &magnitude ) )
{
log_printf ( &logger, " Magnitude: %urn", magnitude );
}
if ( ANGLE7_OK == angle7_get_status ( &angle7, &status ) )
{
log_printf ( &logger, " Status:" );
if ( status & ANGLE7_STATUS_MAGNET_DETECTED )
{
log_printf ( &logger, " Magnet Detected rn Magnet Strength:" );
if ( status & ANGLE7_STATUS_MAGNET_TOO_STRONG )
{
log_printf ( &logger, " Too Strong rnn" );
}
else if ( status & ANGLE7_STATUS_MAGNET_TOO_WEAK )
{
log_printf ( &logger, " Too Weak rnn" );
}
else
{
log_printf ( &logger, " Good rnn" );
}
}
else
{
log_printf ( &logger, " Magnet Not Detected rnn" );
}
}
Delay_ms ( 100 );
}
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.Angle7
Additional Notes and Information
Depending on the development board you are using, you may need a USB UART Click Board™, 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
The Angle 7 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.
Planche à clic Angle 7
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.