MAG3110 Magnetometer Hookup Guide
As mentioned before, if you are using this sensor with a 5V Arduino or other microcontroller, you will need to have a logic level converter between the microcontroller and the sensor.
If you are unsure how to hook up a logic level converter, see this guide.
You will also need to step down the supply voltage to a suitable level for this sensor. Some microcontrollers (like the Arduino Micro and SparkFun RedBoard) have built in 3.3V regulators that you can use to power the MAG3110!
As an example, here is how to connect the MAG3110 sensor to a SparkFun RedBoard.
The pins should be connected as follows:
|RedBoard Pin||Logic Converter Pin||MAG3110 Pin|
Here is this circuit laid out on a breadboard:
If you're not using a SparkFun RedBoard, the only pins that will change are the SDA and SCL. For other Arduino boards, SDA and SCL are:
|Uno, Ethernet||A4 (SDA), A5 (SCL)|
|Mega2560||20 (SDA), 21 (SCL)|
|Leonard/Micro||2 (SDA), 3 (SCL)|
|Due||20 (SDA), 21 (SCL), SDA1, SCL1|