Mikroelektronika d.o.o.
Compass 4 Click Board
Compass 4 Click Board
Couldn't load pickup availability
Key Features:
- Full scale range of ±4912 μT, sensitivity of 0.15 µT per LSB, resolution at 16bits, Noise Suppression Filter (NSF)
- The Compass 4 Click Board™ is based on the AK09915, a complete 3-axis magnetic sensor with signal processing from AKM
- Suitable for applications such as electrical compass, position sensing, general magnetic field measurement and more.
- mikroBUS: I2C and SPI Interfaces
The Compass 4 Click Board™ is a compact add-on board that can measure the three-axis magnetic field that is perfect for implementation in applications such as electric compasses. This board features AK09915, a complete 3-axis magnetic sensor with signal processing from AKM. For obtaining the sensor measurement data of the magnetic field, an I2C or SPI protocol can be used. The sensor's main feature is the capability to measure magnetic fields within the full-scale range of ±4912 μT, with a sensitivity of 0.15 µT per LSB, resolution at 16-bits, and built-in Noise Suppression Filter (NSF), enabling high measurement accuracy for electronic compass applications. This Click Board™ is suitable for applications such as an electrical compass, position sensing, general magnetic field measurement, and more.
The Compass 4 Click Board™ is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click Board™ comes as a thoroughly tested product, ready to be used on a system equipped with the mikroBUS™ socket.
![Mikroelektronika d.o.o. MIKROE-4231 Compass 4 Click Board - The Debug Store UK](http://thedebugstore.com/cdn/shop/products/mikroelektronika-d-o-o-click-board-compass-4-click-board-28870031442109.jpg?v=1685094056&width=1445)
![Mikroelektronika d.o.o. MIKROE-4231 Compass 4 Click Board - The Debug Store UK](http://thedebugstore.com/cdn/shop/products/mikroelektronika-d-o-o-click-board-compass-4-click-board-30260610597053.jpg?v=1684994874&width=1445)
![Mikroelektronika d.o.o. MIKROE-4231 Compass 4 Click Board - The Debug Store UK](http://thedebugstore.com/cdn/shop/products/mikroelektronika-d-o-o-click-board-compass-4-click-board-28870031573181.jpg?v=1685100535&width=1445)
![Mikroelektronika d.o.o. MIKROE-4231 Compass 4 Click Board - The Debug Store UK](http://thedebugstore.com/cdn/shop/products/mikroelektronika-d-o-o-click-board-compass-4-click-board-30260585234621.jpg?v=1684994875&width=1445)
![Mikroelektronika d.o.o. MIKROE-4231 Compass 4 Click Board - The Debug Store UK](http://thedebugstore.com/cdn/shop/products/mikroelektronika-d-o-o-click-board-compass-4-click-board-30260584874173.jpg?v=1684994878&width=1445)
![Mikroelektronika d.o.o. MIKROE-4231 Compass 4 Click Board - The Debug Store UK](http://thedebugstore.com/cdn/shop/products/mikroelektronika-d-o-o-click-board-compass-4-click-board-30260584775869.jpg?v=1684995044&width=1445)
![Mikroelektronika d.o.o. MIKROE-4231 Compass 4 Click Board - The Debug Store UK](http://thedebugstore.com/cdn/shop/products/mikroelektronika-d-o-o-click-board-compass-4-click-board-28870031507645.jpg?v=1684995047&width=1445)
How Does The Compass 4 Click Board™ Work?
The Compass 4 Click Board™ is based on the AK09915, a complete 3-axis magnetic sensor with signal processing from AKM. The AK09915 incorporates magnetic sensors for detecting terrestrial magnetism in the X-axis, Y-axis, and Z-axis, a sensor driving circuit, signal amplifier chain, and an arithmetic circuit for processing the signal from each sensor. The output signal of each axis sensor is multiplexed, pre-amplified processed, and digitized by a 16-bit A/D converter (ADC). A three-axis magnetometer can be programmed to measure the magnetic component for each axis, within the full-scale range of ±4912 μT and sensitivity of 0.15 µT per LSB.
The AK09915 has an analog circuit, digital logic, and interface block integrated on a chip. It also supports nine different Operation Modes that can be chosen by setting the appropriate registers. When the Single Measurement Mode is set, the magnetic sensor measurement starts. After magnetic sensor measurement and signal processing is finished, measured magnetic data is stored in measurement data registers, and then the AK09915 transits to Power-Down Mode automatically. On transition to Power-Down Mode, Data Ready (DRDY) bit turns to "1". When any of the measurement data registers are read, the DRDY bit turns to "0". It remains "1" on the transition from Power-Down Mode to another Mode. Data Ready output pin of the AK09915 labeled as the DRY is routed to the INT pin of the mikroBUS™ socket. Besides Data Ready pin, the Compass 4 Click Board™ also has the Reset pin (RST), routed to the appropriate position on the mikroBUS™.
The Compass 4 Click Board™ provides the possibility of using both I2C and SPI interfaces with a maximum frequency of 2.5MHz for I2C and 4MHz for SPI communication. The selection can be performed by positioning SMD jumpers labeled as COMM SEL to an appropriate position. Note that all the jumpers must be placed to the same side, or else the Click board™ may become unresponsive. While the I2C interface is selected, the AK09915 allows the choice of the last two significant bits (LSB) of its I2C slave address. This can be done by using the SMD jumper labeled as ADDR SEL. Depending on the positions of each of the ADDR SEL jumpers, four different addresses can be set.
The Compass 4 Click Board™ is designed to be operated only with a 3.3V logic level. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with different logic levels.
SPECIFICATIONS
Type | Compass, Magnetic |
Applications | Suitable for applications such as electrical compass, position sensing, general magnetic field measurement and more. |
On-board modules | The Compass 4 Click Board™ is based on the AK09915, a complete 3-axis magnetic sensor with signal processing from AKM |
Key Features | Full scale range of ±4912 μT, sensitivity of 0.15 µT per LSB, resolution at 16bits, Noise Suppression Filter (NSF) |
Interface | I2C,SPI |
Compatibility | mikroBUS |
Click board size | S (28.6 x 25.4 mm) |
Input Voltage | 3.3V |
PINOUT DIAGRAM
This table shows how the pinout for the Compass 4 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | ![]() |
Pin | Notes | |||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
Reset | RST | 2 | RST | INT | 15 | DRY | Data Ready Output |
SPI Chip Select | CS | 3 | CS | RX | 14 | NC | |
SPI Clock | SCK | 4 | SCK | TX | 13 | NC | |
SPI Data Out | SDO | 5 | MISO | SCL | 12 | SCL | I2C Clock |
SPI Data In | SDI | 6 | MOSI | SDA | 11 | SDA | I2C Data |
Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | NC | |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
JP1-JP4 | COMM SEL | Left | Communication Interface Selection: Left position SPI, Right position I2C |
JP5-JP6 | ADDR SEL | Left | I2C Address Selection: Left position 0, Right position 1 |
COMPASS 4 CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | -0.3 | 3.3 | 3.6 | V |
Sensitivity | - | 0.15 | - | µT/LSB |
Full scale measurement range | - | ±4912 | - | μT |
Resolution | - | 16 | - | bit |
Operating Temperature Range | -30 | - | +85 | °C |
Software Support
We provide a library for the Compass 4 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library contains a basic functions for using Compass 4 click.
Key Functions
void compass4_configuration ( uint8_t cfg1, uint8_t cfg2 )
- Configuration functionuint8_t compass4_get_axis ( compass4_axis_t *axis )
- Gets XYZ Axis valueuint8_t compass4_get_magnetic_flux ( compass4_flux_t *flux )
- Gets magnetic flux of XYZ axis value
Example Description
The application is composed of three sections :
- System Initialization - Initializes I2C or SPI module and all necessary GPIO pins
- Application Initialization - Initializes driver inti, reset module, configuration module for measurement and cheeks communication with the module.
- Application Task - Reads magnetic flux or x, y, z-axis, and logs data to USB UART every 1 second.
- Note - SPI communication only works when the jumpers for the slave address are at GND.
void application_task ( ) { compass4_flux_t flux; char demo_text[ 20 ]; uint8_t err; err = compass4_get_magnetic_flux( &flux ); if ( err != 0 ) { mikrobus_logWrite( ">> Measurement error ", _LOG_LINE ); } else { mikrobus_logWrite( ">> Magnetic flux data <<", _LOG_LINE ); FloatToStr( flux.x, demo_text ); mikrobus_logWrite( ">> X: ", _LOG_TEXT ); mikrobus_logWrite( demo_text, _LOG_LINE ); FloatToStr( flux.y, demo_text ); mikrobus_logWrite( ">> Y: ", _LOG_TEXT ); mikrobus_logWrite( demo_text, _LOG_LINE ); FloatToStr( flux.z, demo_text ); mikrobus_logWrite( ">> Z: ", _LOG_TEXT ); mikrobus_logWrite( demo_text, _LOG_LINE ); } mikrobus_logWrite( ">>____________________<<", _LOG_LINE ); Delay_ms( 1000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C Library
- SPI Library
- Conversions library
Additional Notes and Information
Depending on the development board you are using, you may need a 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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The Compass 4 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.
Compass 4 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.
![banner Image](http://thedebugstore.com/cdn/shopifycloud/shopify/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_medium.gif)