sparkfun MAG3110 Скачать руководство пользователя страница 2

Through Hole Soldering (And Hot Tips on Soldering Headers!)
Bi-Directional Logic Converter Hookup Guide
Binary
Interrupts
Magnetic Fields

Hardware Overview

MAG3110 Details:

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

Pull-up Resistors

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.

Pin Functions

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.

Symbol

Description

VCC

Supply Voltage (1.95V to 3.6V)

GND

Must be connected to ground

SDA

Serial Data pin for I C Communication

SCL

Serial Clock pin for I C Communication

INT

Interrupt pin -- high when new data is ready

You may notice there is one last pin – the INT pin. This stands for 

INT

errupt. 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 (I C) or Serial libraries use interrupts and it conflicts with this. If you are using a different platform, it may work better.

Hardware Assembly

2

2

2

Содержание MAG3110

Страница 1: ...r You may want to use something like this 3 3V Low Dropout Regulator LDO For the rest of the items you will need see the wish list below SparkFun Logic Level Converter Bi Directional BOB 12009 If you...

Страница 2: ...upply Voltage 1 95V to 3 6V GND Must be connected to ground SDA Serial Data pin for I C Communication SCL Serial Clock pin for I C Communication INT Interrupt pin high when new data is ready You may n...

Страница 3: ...SCL Leonard Micro 2 SDA 3 SCL Due 20 SDA 21 SCL SDA1 SCL1 SparkFun MAG3110 Library SparkFun has created a library to make it easier to get readings from the MAG3110 sensor It also has code to calibra...

Страница 4: ...lk to the MAG3110 When initialized the magnetometer is set to standby mode with all offsets set to 0 To put the magnetometer in active mode and start sampling simply write mag start You can check whet...

Страница 5: ...n microTeslas Serial print X Serial print xf Serial print Y Serial print yf Serial print Z Serial println zf Serial println A few functions to point out from the example above mag setDR_OS This functi...

Страница 6: ...0 Triggered You can also do triggered measurements while in active mode This is more advanced and is covered in the datasheet Calibration All these functions are great but what if you need to find a p...

Страница 7: ...e calibration earlier by calling mag exitCalMode Please note that the calibration may be offset if you do not calibrate enough If you have not calibrated the MAG3110 calling mag readHeading will only...

Страница 8: ...library allows You can use an accelerometer in conjunction with this device to create a tilt compensated compass SparkFun has a variety of accelerometers available including the ADXL345 To get you sta...

Отзывы: