# Title: Magneto 12 Click Board™ ## Description: 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 ## Product type: Click Board ## Vendor: Mikroelektronika d.o.o. ## Tags: Allegro Microsystems, Click Board, Magnetic Field, Sensor ## Price range: 15.4 - 15.4 GBP ## Link: https://thedebugstore.com/products/mikroe-4991-magneto-12-click-board-uk ## Compare-at price range: 22.0 - 22.0 GBP ## Options - Title: Default Title ## Collections - [New Products](https://thedebugstore.com/a/llms/collections/new-products-debug-store) - [Mikroelektronika d.o.o. (MikroE)](https://thedebugstore.com/a/llms/collections/mikroelektronika-catalogue-uk) - [Allegro MicroSystems Device Support: Development Boards & Tools](https://thedebugstore.com/a/llms/collections/allegro-microsystems-device-support-uk) - [Sensor Click Boards™](https://thedebugstore.com/a/llms/collections/sensor-click-boards-catalogue) - [MikroE Click Boards™](https://thedebugstore.com/a/llms/collections/mikroe-click-boards-catalogue-uk) - [Click Boards™ Summer Sale](https://thedebugstore.com/a/llms/collections/inventory-sale) - [MikroE Sale](https://thedebugstore.com/a/llms/collections/mikroe-sale) - [MIKROE Stock](https://thedebugstore.com/a/llms/collections/mikroe-products-in-stock-sale) ## Variants - Default Title, SKU: MIKROE-4991, Available: yes, Inventory: 1 ## Metafields - title_tag: MikroE Magneto 12 Click Board™ (MIKROE-4991) - description_tag: 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. Available from Debug Store UK. - badge:
- widget: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.
| 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 |
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 |
| 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 |
| 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 |
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.
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.
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:
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.
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.
- attachments: [{"download_file":[{"download_file":"Magneto 12 Click Board™ Schematic"}],"download_filetype":[{"download_filetype":"pdf"}]},{"download_file":[{"download_file":"Allegro Microsystems A31315 Magnetic Position Sensor Datasheet"}],"download_filetype":[{"download_filetype":"pdf"}]},{"download_file":[{"download_file":"Microchip 12-bit ADC Datasheet"}],"download_filetype_ext":[{"download_filetype_ext":"pdf"}]}] - mpn: MIKROE-4991 - mpn: MIKROE-4991 - custom_label_0: Click Board - google_product_category: Electronics - condition: new - custom_product: false - key_feature_2: 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 - key_feature_3: Based on the A31315 - magnetic position sensor from Allegro Microsystems - key_feature_4: Can be used for position sensing applications in automotive, industrial, and consumer applications - key_feature_5: mikroBUS: I2C and Analogue Interfaces - device_vendor: Allegro MicroSystems - device_type: A31315LOLATR-XY-S-AR-10 - warranty: 12 months - brand: MikroE - manufacturer: Mikroelektronika d.o.o. - target_keyword: Magneto 12 Click Board - brands: gid://shopify/Metaobject/56256004319 - breadcrumbs: ["gid://shopify/Collection/447955239135","gid://shopify/Collection/241680580797","gid://shopify/Collection/241545969853"] - customhs_code: 847330 - detailed_description: {"type":"root","children":[{"type":"heading","level":3,"children":[{"type":"text","value":"How Does The Magneto 12 Click Board™ Work?"}]},{"type":"paragraph","children":[{"type":"text","value":"The "},{"type":"text","value":"Magneto 12 Click Board™","bold":true,"italic":true},{"type":"text","value":" 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."}]},{"type":"paragraph","children":[{"type":"text","value":""}]},{"type":"paragraph","children":[{"type":"text","value":"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."}]},{"type":"paragraph","children":[{"type":"text","value":"The "},{"type":"text","value":"Magneto 12 Click Board™","bold":true},{"type":"text","value":" 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."}]},{"type":"paragraph","children":[{"type":"text","value":"The "},{"type":"text","value":"Magneto 12 Click Board™","bold":true},{"type":"text","value":" 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."}]},{"type":"heading","level":3,"children":[{"type":"text","value":"SPECIFICATIONS"}]},{"type":"paragraph","children":[{"type":"text","value":"Type\nMagnetic\nApplications\nThe Magneto 12 Click Board™ can be used for position sensing applications in automotive, industrial, and consumer applications\nOn-board modules\nA31315 - magnetic position sensor from Allegro Microsystems\nKey Features\nHighly 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\nInterface\nAnalog,I2C\nCompatibility\nmikroBUS\nClick board size\nS (28.6 x 25.4 mm)\nInput Voltage\n5V"}]},{"type":"heading","level":3,"children":[{"type":"text","value":"PINOUT DIAGRAM"}]},{"type":"paragraph","children":[{"type":"text","value":"This table shows how the pinout of the "},{"type":"text","value":"Magneto 12 Click Board™","bold":true},{"type":"text","value":" corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns)."}]},{"type":"paragraph","children":[{"type":"text","value":"Notes\nPin\nPin\nNotes\nAnalog Signal\nAN\n1\nAN\nPWM\n16\nNC\nNC\n2\nRST\nINT\n15\nNC\nNC\n3\nCS\nRX\n14\nNC\nNC\n4\nSCK\nTX\n13\nNC\nNC\n5\nMISO\nSCL\n12\nSCL\nI2C Clock\nNC\n6\nMOSI\nSDA\n11\nSDA\nI2C Data\nNC\n7\n3.3V\n5V\n10\n5V\nPower Supply\nGround\nGND\n8\nGND\nGND\n9\nGND\nGround"}]},{"type":"heading","level":3,"children":[{"type":"text","value":"ONBOARD SETTINGS AND INDICATORS"}]},{"type":"paragraph","children":[{"type":"text","value":"Label\nName\nDefault\nDescription\nLD1\nPWR\n-\nPower LED Indicator\nJP1\nADC SEL\nRight\nOutput Voltage A/D Selection AN/ADC: Left position AN, Right position ADC"}]},{"type":"heading","level":3,"children":[{"type":"text","value":"MAGNETO 12 CLICK ELECTRICAL SPECIFICATIONS"}]},{"type":"paragraph","children":[{"type":"text","value":"Description\nMin\nTyp\nMax\nUnit\nSupply Voltage\n-\n5\n-\nV\nMaximum Magnetic Flux Density\n-\n-\n1000\nG\nRotation Angle Range\n0\n-\n360\ndeg\nResolution\n-\n12\n-\nbit\nOperating Temperature Range\n-40\n+25\n+120\n°C"}]},{"type":"heading","level":3,"children":[{"type":"text","value":" "}]}]} - summary: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.