MAG3110 Magnetometer Hookup Guide
- 3 magnetic field channels
- 1.95V to 3.6V supply voltage
- Full-scale range of ±1000 µT
- Sensitivity of 0.10 µT
- Output data rates up to 80Hz
- I2C Serial Interface
As with other SparkFun breakout boards using I2C, this sensor features on-board pull-up resistors to make getting started quick and easy. However, you may need to disconnect these pull-ups when using other devices on the I2C bus that also have these pull-ups. You can disconnect these by using some solder wick to remove the solder from the pads on the front of the board highlighted in the image below.
The MAG3110 breakout doesn't have many pins, which makes it very easy to hookup! You just need to give it a supply voltage up to 3.6V(VCC), ground (GND), and the I2C bus lines for communication. These are the SDA and SCL pins.
|VCC||Supply Voltage (1.95V to 3.6V)|
|GND||Must be connected to ground|
|SDA||Serial Data pin for I2C Communication|
|SCL||Serial Clock pin for I2C Communication|
|INT||Interrupt pin -- high when new data is ready|
You may notice there is one last pin -- the INT pin. This stands for INTerrupt. Inside the MAG3110 there is a register that can tell you if the sensor has new data for you to read. The INT pin is hard-wired to this register and outputs a logic high when new data is ready. When you read data from the sensor this register is automatically cleared to 0.
While you can just continuously read values from the sensor regardless of whether it's new, this is inefficient both in terms of power and processor cycles. A better way is to trigger reading data when this pin goes high. But if all you want to do is get a reading and don't care about efficiency, then don't worry about connecting this pin!
If you are an advanced user, the INT pin can be setup by using an external interrupt. Note that I found this difficult to achieve without weird results. I believe the Arduino Wire (I2C) or Serial libraries use interrupts and it conflicts with this. If you are using a different platform, it may work better.