nxp precision 9 dof gyro gives constant values

This is a special forum devoted to educators using Adafruit and Arduino products for teaching.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Thilanka_Banuka
 
Posts: 7
Joined: Fri Aug 13, 2021 7:44 am

nxp precision 9 dof gyro gives constant values

Post by Thilanka_Banuka »

Hi,
I'm using Adafruit Precision NXP 9-DOF Breakout Board - FXOS8700 + FXAS21002
This is how I hook up the circuit.
This is how I hook up the circuit.
Circuit .JPG (1001.79 KiB) Viewed 2112 times
Accelerometer and Magnetometer work properly.
But gyro not working.
It gives constant measurements. (X: 0.00 Y: 0.00 Z: 3.35 rad/s )

I used FXOS21002c.h library example code.

Code: Select all

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

/* Assign a unique ID to this sensor at the same time */
Adafruit_FXAS21002C gyro = Adafruit_FXAS21002C(0x0021002C);

void displaySensorDetails(void) {
  sensor_t sensor;
  gyro.getSensor(&sensor);
  Serial.println("------------------------------------");
  Serial.print("Sensor:       ");
  Serial.println(sensor.name);
  Serial.print("Driver Ver:   ");
  Serial.println(sensor.version);
  Serial.print("Unique ID:    0x");
  Serial.println(sensor.sensor_id, HEX);
  Serial.print("Max Value:    ");
  Serial.print(sensor.max_value);
  Serial.println(" rad/s");
  Serial.print("Min Value:    ");
  Serial.print(sensor.min_value);
  Serial.println(" rad/s");
  Serial.print("Resolution:   ");
  Serial.print(sensor.resolution);
  Serial.println(" rad/s");
  Serial.println("------------------------------------");
  Serial.println("");
  delay(500);
}

void setup(void) {
  Serial.begin(9600);

  /* Wait for the Serial Monitor */
  while (!Serial) {
    delay(1);
  }

  Serial.println("Gyroscope Test");
  Serial.println("");

  /* Initialise the sensor */
  if (!gyro.begin()) {
    /* There was a problem detecting the FXAS21002C ... check your connections
     */
    Serial.println("Ooops, no FXAS21002C detected ... Check your wiring!");
    while (1)
      ;
  }

  /* Set gyro range. (optional, default is 250 dps) */
  // gyro.setRange(GYRO_RANGE_2000DPS);

  /* Display some basic information on this sensor */
  displaySensorDetails();
}

void loop(void) {
  /* Get a new sensor event */
  sensors_event_t event;
  gyro.getEvent(&event);

  /* Display the results (speed is measured in rad/s) */
  Serial.print("X: ");
  Serial.print(event.gyro.x);
  Serial.print("  ");
  Serial.print("Y: ");
  Serial.print(event.gyro.y);
  Serial.print("  ");
  Serial.print("Z: ");
  Serial.print(event.gyro.z);
  Serial.print("  ");
  Serial.println("rad/s ");
  delay(500);
}
These are the outputs. No matter how I rotate it; it gives same data.

Code: Select all

Gyroscope Test

------------------------------------
Sensor:       FXAS21002C
Driver Ver:   1
Unique ID:    0x21002C
Max Value:    4.36 rad/s
Min Value:    -4.36 rad/s
Resolution:   0.00 rad/s
------------------------------------

X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
Sir,
Please help me with this.
I am industrial engineering student. I bought this for my project and there is no more budget to purchase another one.

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: nxp precision 9 dof gyro gives constant values

Post by adafruit_support_carter »

Weird. If it were some kind of soldering (a few header pins look under soldered) or other connection issue, would expect neither to work reliably.

Just to check though, have you tried moving to a different position on the breadboard and using different wires?

Is there anything else going on with the wires shown in the photo? Or do they just go direct from UNO to breakout?

Also - this is a new sensor breakout?

User avatar
Thilanka_Banuka
 
Posts: 7
Joined: Fri Aug 13, 2021 7:44 am

Re: nxp precision 9 dof gyro gives constant values

Post by Thilanka_Banuka »

Thank you so much for replying.
There is nothing between Arduino board and the breakout board. I bought this recently on ebay. It was good condition. I think it is a Brand-new one.
I soldered again. but I don't think it is a soldering problem because, accelerometer and magnetometer gives reading properly.
Before making the post I tried all thing that came to my mind.
  • Changed the Arduino board
    Changed the breadboard
    Changed wires
    Use different cables
    Changed using USB ports
    Uninstall and re installed the library
output is same.

Code: Select all

Gyroscope Test

------------------------------------
Sensor:       FXAS21002C
Driver Ver:   1
Unique ID:    0x21002C
Max Value:    4.36 rad/s
Min Value:    -4.36 rad/s
Resolution:   0.00 rad/s
------------------------------------

X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
X: 0.00  Y: 0.00  Z: 3.35  rad/s 
No luck at all I think it is my bad luck. Now the only option is to send a massage to the seller.
Sir, why BNO055 boards are not available?? Don't you produce them now? Do you have any other 9Dof sensor that have self calibration function just like BNO055??
i looked for that, but I couldn't find that, that's why I bought this board.

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: nxp precision 9 dof gyro gives constant values

Post by adafruit_support_carter »

If you are not getting any change in behavior after touching up soldering, checking wires, changing location on breadboard, etc., then probably best to contact the seller. Especially if the as sold condition of the board is not known.

The BNO055 is still available, but may not be in stock. You can sign up for a NOTIFY ME from the product page:
https://www.adafruit.com/product/2472
to get a notice when they are back in stock.

For other sensor options, check here:
https://www.adafruit.com/category/521

Locked
Please be positive and constructive with your questions and comments.

Return to “For Educators”