Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Adafruit NXP 9 DoF: Examples, Pinouts, and Specs

Image of Adafruit NXP 9 DoF
Cirkit Designer LogoDesign with Adafruit NXP 9 DoF in Cirkit Designer

Introduction

The Adafruit NXP 9 DoF is a compact, high-performance motion tracking module that combines three of the most important sensors for determining orientation and motion: a 3-axis accelerometer, a 3-axis magnetometer, and a 3-axis gyroscope. This sensor module is designed for easy integration with microcontrollers such as the Arduino UNO and uses the I2C communication protocol for data transfer. Common applications include orientation sensing in drones and mobile devices, motion tracking in virtual reality systems, and navigation assistance in robotics.

Explore Projects Built with Adafruit NXP 9 DoF

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Battery-Powered Robotic Car with Raspberry Pi Pico and L298N Motor Driver
Image of sma sci-oly: A project utilizing Adafruit NXP 9 DoF in a practical application
This circuit is a motor control system using a Raspberry Pi Pico to interface with an L298N motor driver and two DG01D-E motors. It also includes an Adafruit 9-DoF sensor for orientation and motion sensing, powered by a 4 x AAA battery pack and controlled via a rocker switch.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Arduino UNO with BNO085 IMU and Bluetooth HC-06 for Orientation Tracking
Image of bno085: A project utilizing Adafruit NXP 9 DoF in a practical application
This circuit integrates an Arduino UNO with an Adafruit BNO085 9-DOF Orientation IMU and a Bluetooth HC-06 module. The Arduino reads orientation data from the IMU via I2C and transmits it over Bluetooth, powered by a 7.4V battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Adafruit MPU6050 and VL6180X Sensor Interface with Servo Control
Image of wire: A project utilizing Adafruit NXP 9 DoF in a practical application
This circuit features an Adafruit QT Py microcontroller interfaced with an Adafruit MPU6050 6-axis accelerometer/gyroscope and an Adafruit VL6180X Time of Flight (ToF) distance sensor, both connected via I2C communication. The QT Py also controls a Servomotor SG90, likely for physical actuation based on sensor inputs. The embedded code initializes the sensors, reads their data, and outputs the readings to a serial monitor, with the potential for motion control based on the sensor feedback.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano-Based Wireless Input Controller with Joysticks and Sensors
Image of TRANSMITTER: A project utilizing Adafruit NXP 9 DoF in a practical application
This is a multifunctional interactive device featuring dual-axis control via PS2 joysticks, visual feedback through an OLED display, and wireless communication using an NRF24L01 module. It includes a piezo buzzer for sound, tactile buttons for additional user input, rotary potentiometers for analog control, and an MPU-6050 for motion sensing. The Arduino Nano serves as the central processing unit, coordinating input and output functions, with capacitors for power stability.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Adafruit NXP 9 DoF

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of sma sci-oly: A project utilizing Adafruit NXP 9 DoF in a practical application
Battery-Powered Robotic Car with Raspberry Pi Pico and L298N Motor Driver
This circuit is a motor control system using a Raspberry Pi Pico to interface with an L298N motor driver and two DG01D-E motors. It also includes an Adafruit 9-DoF sensor for orientation and motion sensing, powered by a 4 x AAA battery pack and controlled via a rocker switch.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of bno085: A project utilizing Adafruit NXP 9 DoF in a practical application
Battery-Powered Arduino UNO with BNO085 IMU and Bluetooth HC-06 for Orientation Tracking
This circuit integrates an Arduino UNO with an Adafruit BNO085 9-DOF Orientation IMU and a Bluetooth HC-06 module. The Arduino reads orientation data from the IMU via I2C and transmits it over Bluetooth, powered by a 7.4V battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of wire: A project utilizing Adafruit NXP 9 DoF in a practical application
Adafruit MPU6050 and VL6180X Sensor Interface with Servo Control
This circuit features an Adafruit QT Py microcontroller interfaced with an Adafruit MPU6050 6-axis accelerometer/gyroscope and an Adafruit VL6180X Time of Flight (ToF) distance sensor, both connected via I2C communication. The QT Py also controls a Servomotor SG90, likely for physical actuation based on sensor inputs. The embedded code initializes the sensors, reads their data, and outputs the readings to a serial monitor, with the potential for motion control based on the sensor feedback.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of TRANSMITTER: A project utilizing Adafruit NXP 9 DoF in a practical application
Arduino Nano-Based Wireless Input Controller with Joysticks and Sensors
This is a multifunctional interactive device featuring dual-axis control via PS2 joysticks, visual feedback through an OLED display, and wireless communication using an NRF24L01 module. It includes a piezo buzzer for sound, tactile buttons for additional user input, rotary potentiometers for analog control, and an MPU-6050 for motion sensing. The Arduino Nano serves as the central processing unit, coordinating input and output functions, with capacitors for power stability.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

Key Features

  • Accelerometer: Measures linear acceleration in three dimensions.
  • Gyroscope: Measures angular velocity in three dimensions.
  • Magnetometer: Measures magnetic fields, which can be used to determine heading relative to the Earth's magnetic North.

Electrical Characteristics

  • Supply Voltage (VDD): 2.25V - 3.6V
  • Interface Voltage (VDDIO): 1.7V - 3.6V
  • Current Consumption: 10 μA in standby mode

Communication Interface

  • Protocol: I2C (Inter-Integrated Circuit)
  • I2C Address: 0x1D (default)

Environmental

  • Operating Temperature Range: -40°C to +85°C

Pin Configuration and Descriptions

Pin Number Name Description
1 VDD Power supply voltage (2.25V - 3.6V)
2 GND Ground connection
3 SDA I2C data line
4 SCL I2C clock line
5 INT Interrupt output (active low)
6 ADDR I2C address selection (float for default)

Usage Instructions

Interfacing with Arduino

  1. Connecting the Sensor:

    • Connect VDD to the 3.3V output on the Arduino.
    • Connect GND to a ground pin on the Arduino.
    • Connect SDA to the A4 pin (SDA) on the Arduino UNO.
    • Connect SCL to the A5 pin (SCL) on the Arduino UNO.
  2. Library Installation:

    • Install the Adafruit Sensor and Adafruit NXP 9 DoF libraries using the Arduino Library Manager.
  3. Initialization:

    • Initialize the sensor in your setup function and check for successful communication.
  4. Reading Sensor Data:

    • In the loop function, read the accelerometer, magnetometer, and gyroscope data.

Best Practices

  • Use pull-up resistors on the I2C lines if they are not included on the breakout board.
  • Ensure that the power supply is stable and within the specified voltage range.
  • Avoid placing the sensor near strong magnetic fields to prevent interference with the magnetometer.

Example Code for Arduino

#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_FXOS8700.h>
#include <Adafruit_FXAS21002C.h>

// Create sensor instances
Adafruit_FXOS8700 fxos8700 = Adafruit_FXOS8700();
Adafruit_FXAS21002C fxas21002c = Adafruit_FXAS21002C();

void setup() {
  Serial.begin(115200);
  // Wait for serial monitor to open
  while (!Serial) { delay(10); }

  // Initialize the sensors
  if(!fxos8700.begin(ACCEL_RANGE_2G)) {
    Serial.println("Failed to initialize accelerometer/magnetometer!");
    while(1);
  }
  if(!fxas21002c.begin(GYRO_RANGE_250DPS)) {
    Serial.println("Failed to initialize gyroscope!");
    while(1);
  }
}

void loop() {
  // Read the accelerometer & magnetometer
  sensors_event_t aevent, mevent;
  fxos8700.getEvent(&aevent, &mevent);

  // Read the gyroscope
  sensors_event_t gevent;
  fxas21002c.getEvent(&gevent);

  // Display the accelerometer & magnetometer results
  Serial.print("Accel X: "); Serial.print(aevent.acceleration.x); Serial.print(" ");
  Serial.print("Y: "); Serial.print(aevent.acceleration.y); Serial.print(" ");
  Serial.print("Z: "); Serial.print(aevent.acceleration.z); Serial.println(" m/s^2");

  // Display the magnetometer results (magnetic vector)
  Serial.print("Mag X: "); Serial.print(mevent.magnetic.x); Serial.print(" ");
  Serial.print("Y: "); Serial.print(mevent.magnetic.y); Serial.print(" ");
  Serial.print("Z: "); Serial.print(mevent.magnetic.z); Serial.println(" uT");

  // Display the gyroscope results (angular velocity)
  Serial.print("Gyro X: "); Serial.print(gevent.gyro.x); Serial.print(" ");
  Serial.print("Y: "); Serial.print(gevent.gyro.y); Serial.print(" ");
  Serial.print("Z: "); Serial.print(gevent.gyro.z); Serial.println(" dps");

  // Delay before the next reading
  delay(500);
}

Troubleshooting and FAQs

Common Issues

  • Sensor Not Detected: Ensure that the wiring is correct and that the sensor is properly powered.
  • Inaccurate Readings: Calibrate the sensor if possible, and make sure it's not affected by external magnetic fields.
  • I2C Communication Errors: Check for loose connections and ensure pull-up resistors are in place if needed.

FAQs

Q: Can I change the I2C address of the sensor? A: Yes, the I2C address can be changed by connecting the ADDR pin to ground or VDD.

Q: How do I calibrate the magnetometer? A: Calibration typically involves rotating the sensor in various orientations. Refer to the sensor's datasheet for specific calibration procedures.

Q: What is the maximum I2C speed supported by the sensor? A: The sensor supports standard (100 kHz) and fast (400 kHz) I2C speeds.

For further assistance, consult the Adafruit NXP 9 DoF datasheet and the Adafruit support forums.