It's time to start utilizing the superior magnetometer, and what better way than to throw it onto an easy-to-use breakout board? The SparkFun MLX90393 Magnetometer Breakout is a triple-axis magnetic sensor board capable of sensing very small fields, while still behaving as one would expect during saturation in larger fields (like a nearby magnet). The MLX90393 breakout can be used as a compass sensor but also works well as a non-contact controller, a flow meter with a magnetic impeller, or a linear actuator position sensor. To make it even easier to to get your readings, all communication is enacted exclusively via I2C, utilizing our handy Qwiic system. However, we still have broken out 0.1"-spaced pins in case you prefer to use a breadboard.
The MLX90393 features a resolution rate of 0.161µT with an operating voltage range of 2.2V to 3.6V at 100µA. This breakout is also equipped with a couple of jumper pads on the back of the board, a set that allows you to change the I2C address as well as one that can put the breakout into SPI mode (if I2C isn't your cup of tea).
Note: The I2C address of the MLX90393 is 0x0C and is jumper selectable to 0x0D, 0x0E, or 0x0F. A multiplexer/Mux is required to communicate to multiple MLX90393 sensors on a single bus. If you need to use more than one MLX90393 sensor consider using the Qwiic Mux Breakout.
The SparkFun Qwiic connect system is an ecosystem of I2C sensors, actuators, shields and cables that make prototyping faster and less prone to error. All Qwiic-enabled boards use a common 1mm pitch, 4-pin JST connector. This reduces the amount of required PCB space, and polarized connections mean you can’t hook it up wrong.
If a board needs code or communicates somehow, you're going to need to know how to program or interface with it. The programming skill is all about communication and code.
Skill Level: Competent - The toolchain for programming is a bit more complex and will examples may not be explicitly provided for you. You will be required to have a fundamental knowledge of programming and be required to provide your own code. You may need to modify existing libraries or code to work with your specific hardware. Sensor and hardware interfaces will be SPI or I2C.
See all skill levels
If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.
Skill Level: Rookie - You may be required to know a bit more about the component, such as orientation, or how to hook it up, in addition to power requirements. You will need to understand polarized components.
See all skill levels
We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.
Based on 1 ratings:
Has anybody actually gotten this to work as a compass? The code samples only plot lines that react to a magnet. It's nice and all but pretty useless for anything else.
Hi there, it sounds like you are looking for technical assistance. Please use the link in the banner above, to get started with posting a topic in our forums. Our technical support team will do their best to assist you.
That being said, my guess is that you may need to modify the code to adjust the gain for the magnetometer readings.
Can this compass be used in PIXHAWK flight controller???
Hi there, it sounds like you are looking for technical assistance. Unfortunately, I am not really familiar with the PIXHAWK software and the supported hardware. This might be a question better directed at PIXHAWK or the PIXHAWK community.
To reach out to the SparkFun community, please use the link in the banner above, to get started with posting a topic in our forums. Our technical support team will do their best to assist you, but this is probably outside the scope of their knowledge as well.
Can you use this reliably for vehicle detection?
Unfortunately, that is not a function of this sensor.