Magneto 12 Click Board
Magneto 12 Click Board
Key Features
- Highly accurate 360° and short stroke (360°) rotary applications, detects two out of three magnetic field components, ratiometric analog output, high reliability, possibility of signal processing in analogue and digital form, and more
- Based on the A31315 - magnetic position sensor from Allegro Microsystems
- Can be used for position sensing applications in automotive, industrial, and consumer applications
- mikroBUS: I2C and Analogue Interfaces
Overview
The Magneto 12 Click Board™ is a compact add-on board that contains an accurate and reliable magnetic sensing device. This board features the A31315, a magnetic position sensor designed for on- and off-axis rotary and linear stroke position measurement from Allegro Microsystems. This sensor integrates vertical and planar Hall-effect elements with precision temperature-compensating circuitry to detect two out of three magnetic field components (X and Y). Using configurable signal processing (the user is allowed to process the output signal in analog or digital form), linearization and angle calculation allows the A31315 to accurately resolve the absolute rotary (full 360° and short-stroke <360°) or linear position of a moving magnetic target. This Click board™ is suitable for position sensing applications in automotive, industrial, and consumer applications.
The Magneto 12 Click Board™ is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
How Does The Magneto 12 Click Board™ Work?
The Magneto 12 Click Board™ as its foundation uses the A31315, a magnetic position sensor from Allegro Microsystems. This sensor integrates vertical and planar Hall-effect elements with precision temperature-compensating circuitry to detect two out of three magnetic field components (X and Y). Using configurable signal processing, linearization, and angle calculation allows the A31315 to accurately resolve the absolute rotary (full 360° and short-stroke <360°) or linear position of a moving magnetic target.
The A31315 features a ratiometric analog interface to output the angle between the two factory-selected axes (X and Y). When using the analog mode of the A31315, the capacitance is provided for the stability of the output. A load resistor R4 also provides a known diagnostic state in a line break or device tri-state event. A series resistor R5 can be placed (default resistor value is 0Ω) before the capacitance C2 to create a low-pass filter for additional filtering and lower noise. However, caution should be taken, as this could also reduce the operating output voltage based on the ratio of the filter resistor and the load resistance.
The Magneto 12 Click Board™ possesses two ways to communicate with the MCU. The analog output signal of the A31315 can be converted to a digital value using MCP3221, a successive approximation A/D converter with a 12-bit resolution from Microchip using a 2-wire I2C compatible interface, or can be sent directly to an analog pin of the mikroBUS™ socket labelled as AN. The MCP3221 provides one single-ended input with low power consumption, a low maximum conversion current, and a Standby current of 250μA and 1μA, respectively. Data can be transferred at rates of up to 100kbit/s in the Standard and 400kbit/s in the Fast Mode. Selection can be performed by onboard SMD jumper labelled as ADC SEL, setting it to an appropriate position marked as AN and ADC.
The Magneto 12 Click Board™ can be operated only with a 5V 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 | The Magneto 12 Click Board™ can be used for position sensing applications in automotive, industrial, and consumer applications |
On-board modules | A31315 - magnetic position sensor from Allegro Microsystems |
Key Features | Highly accurate 360° and short stroke (360°) rotary applications, detects two out of three magnetic field components, ratiometric analog output, high reliability, possibility of signal processing in analog and digital form, and more |
Interface | Analog,I2C |
Compatibility | mikroBUS |
Click board size | S (28.6 x 25.4 mm) |
Input Voltage | 5V |
PINOUT DIAGRAM
This table shows how the pinout of the Magneto 12 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 | NC | ||
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 | |
NC | 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 | ADC SEL | Right | Output Voltage A/D Selection AN/ADC: Left position AN, Right position ADC |
MAGNETO 12 CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | - | 5 | - | V |
Maximum Magnetic Flux Density | - | - | 1000 | G |
Rotation Angle Range | 0 | - | 360 | deg |
Resolution | - | 12 | - | bit |
Operating Temperature Range | -40 | +25 | +120 | °C |
Software Support
We provide a library for the Magneto 12 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 Magneto 12 Click Board™ driver.
Key functions
-
magneto12_read_voltage
This function reads raw ADC value and converts it to proportional voltage level. -
magneto12_set_vref
This function sets the voltage reference for Magneto 12 click driver. -
magneto12_read_angle
This function reads the sensor output voltage and converts it to angular position in degrees.
Example Description
This example demonstrates the use of the Magneto 12 Click Board™ by reading and displaying the magnet's angular position in degrees.
void application_task ( void )
{
float angle = 0;
if ( MAGNETO12_OK == magneto12_read_angle ( &magneto12, &angle ) )
{
log_printf( &logger, " Angle: %.2f degreesrnn", angle );
}
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.Magneto12
Additional Notes and Information
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
The Magneto 12 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 Magneto 12 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 Magneto 12 Click Board™ driver.
Key functions
-
magneto12_read_voltage
This function reads raw ADC value and converts it to proportional voltage level. -
magneto12_set_vref
This function sets the voltage reference for Magneto 12 click driver. -
magneto12_read_angle
This function reads the sensor output voltage and converts it to angular position in degrees.
Example Description
This example demonstrates the use of the Magneto 12 Click Board™ by reading and displaying the magnet's angular position in degrees.
void application_task ( void )
{
float angle = 0;
if ( MAGNETO12_OK == magneto12_read_angle ( &magneto12, &angle ) )
{
log_printf( &logger, " Angle: %.2f degreesrnn", angle );
}
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.Magneto12
Additional Notes and Information
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
The Magneto 12 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.
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.