Search the Community
Showing results for tags 'gyro'.
-
Hi I have Gyro device on board attached to stepper motor, doing 360deg spin and capture data (FIFO method). Below is the FIFO results. NB: The 1st row can be ignored since the Gyro is not continous capture mode. ==================================================================Setup FXAS21002 is same as MPU-6050, hence the setting is G_F_SETUP = 0b10100000 // 32 Count and Circular Mode G_INT_SRC_FLAG = 0b00000100 // Select SRC_FIFO as source interrupt G_CTRL_REG2, = 0b11000010 // Enable FIFO interrupt, mapped to INT1 - PTA5, push-pull, active low interrupt G_CTRL_REG1, = 0b00011100 // ODR = 12.5Hz, Standby mode G_CTRL_REG3, = 0b00001000 // WRAPTOONE=1 for FIFO method. G_CTRL_REG0 = 0b00000000 // LPF = 256Hz, HPF disabled, HPF cutoff frequency = N/A, Gain = ±2000 || 62.5 (mdps/LSB) Note the gain is Gain = ±2000 || 62.5 (mdps/LSB) and Sample Rate is 12.5Hz which mean it take 2.56 second for FIFO to be populated and trigger interrupts. Each element of FIFO data is 80mSec capture rate within the IC. ==================================================================Raw Data to Readout for (i=0; i<32; i++) { index = i*6; FXASFIFOData.FXAS_GRYODataRaw.X = ((INT16) I2CrxBuffer[index+0] << 8 | I2CrxBuffer[index+1]); // 1LSB = 0.0078125deg/Sec FXASFIFOData.FXAS_GRYODataRaw.Y = ((INT16) I2CrxBuffer[index+2] << 8 | I2CrxBuffer[index+3]); FXASFIFOData.FXAS_GRYODataRaw.Z = ((INT16) I2CrxBuffer[index+4] << 8 | I2CrxBuffer[index+5]); FXASFIFOData.FXAS_GRYOData.X = (((INT32)FXASFIFOData.FXAS_GRYODataRaw.X *1000) /128); //mDeg/Sec FXASFIFOData.FXAS_GRYOData.Y = (((INT32)FXASFIFOData.FXAS_GRYODataRaw.Y *1000) /128); FXASFIFOData.FXAS_GRYOData.Z = (((INT32)FXASFIFOData.FXAS_GRYODataRaw.Z *1000) /128); //-------------------------------------------------------Sum it up as part of integration. FXASData.iGryoData.X += FXASFIFOData.FXAS_GRYOData.X; FXASData.iGryoData.Y += FXASFIFOData.FXAS_GRYOData.Y; FXASData.iGryoData.Z += FXASFIFOData.FXAS_GRYOData.Z; } ==================================================================FIFO Data ---INFO: FXAS (Gryo) Invoking Capture Process ---INFO: Received FXAS: RIT PREV INT: 820078 || RIT AT INT: 840080 ---INFO: Interrupt Period = 20002 ---------------------------------------------------------------------- ---INFO: FIFO No: 0 | X: 531 | Y: 156 | Z: -453 ---INFO: FIFO No: 1 | X: -54 | Y: -304 | Z: -15 ---INFO: FIFO No: 2 | X: -62 | Y: -296 | Z: -7 ---INFO: FIFO No: 3 | X: -70 | Y: -304 | Z: -7 ---INFO: FIFO No: 4 | X: -85 | Y: -312 | Z: -15 ---INFO: FIFO No: 5 | X: -78 | Y: -304 | Z: -7 ---INFO: FIFO No: 6 | X: 14507 | Y: -304 | Z: 23 ---INFO: FIFO No: 7 | X: 84304 | Y: -335 | Z: 234 ---INFO: FIFO No: 8 | X: 93226 | Y: -304 | Z: 304 ---INFO: FIFO No: 9 | X: 93335 | Y: -359 | Z: 375 ---INFO: FIFO No: 10 | X: 93351 | Y: -492 | Z: 421 ---INFO: FIFO No: 11 | X: 93320 | Y: -484 | Z: 281 ---INFO: FIFO No: 12 | X: 88078 | Y: -390 | Z: 195 ---INFO: FIFO No: 13 | X: 20671 | Y: -437 | Z: 7 ---INFO: FIFO No: 14 | X: -39 | Y: -289 | Z: -15 ---INFO: FIFO No: 15 | X: -78 | Y: -289 | Z: -15 ---INFO: FIFO No: 16 | X: -78 | Y: -304 | Z: -15 ---INFO: FIFO No: 17 | X: -85 | Y: -296 | Z: -15 ---INFO: FIFO No: 18 | X: -93 | Y: -312 | Z: -7 ---INFO: FIFO No: 19 | X: -93 | Y: -304 | Z: -7 ---INFO: FIFO No: 20 | X: -85 | Y: -304 | Z: -7 ---INFO: FIFO No: 21 | X: -85 | Y: -289 | Z: -23 ---INFO: FIFO No: 22 | X: -85 | Y: -296 | Z: -23 ---INFO: FIFO No: 23 | X: -93 | Y: -296 | Z: -15 ---INFO: FIFO No: 24 | X: -78 | Y: -304 | Z: -15 ---INFO: FIFO No: 25 | X: -85 | Y: -304 | Z: -7 ---INFO: FIFO No: 26 | X: -101 | Y: -312 | Z: -15 ---INFO: FIFO No: 27 | X: -93 | Y: -304 | Z: -15 ---INFO: FIFO No: 28 | X: -101 | Y: -304 | Z: -15 ---INFO: FIFO No: 29 | X: -93 | Y: -304 | Z: 0 ---INFO: FIFO No: 30 | X: -93 | Y: -296 | Z: -7 ---INFO: FIFO No: 31 | X: -85 | Y: -296 | Z: -23 ---------------------------------------------------------------------- ---------------------------------------------------------------------- ---INFO: Offset Zero Parameter: X: 0 | Y: 0 | Z: 0 ---INFO: Integrated Results : X: 1097 | Y: 9872 | Z: 579431 ---INFO: Results is represented as mDeg/2.56Sec, Depending on RIT. ==================================================================Motor For 360 spin, I get 579431 readout (sum of 32 FIFO data). As for Motor: I have stepper Motor (full step), operating 2.5mSec/Step and 200 Step. This transulate to 2.5mSec/Step => 60 / (2.5mSec/Step * 200 Step) = 120 rpm or 2 rps. =================================================================Query I trying to figure out what the Gyro really mean in relationship to Motor spin? Should I expect 360deg result? Can anyone offer meaningful interpertation of the results here?
-
Hello, Complete code novice, I'm using Jeff Rowberg's library and sample code to get the Yaw, Pitch and Roll orientations of the gyro. However wanting to get the angular acceleration using these, (I'm thinking along the lines of, yaw value(t=t+1)-yaw value(t=t)/(time^2), knowing that the sample rate is 10 ms) and then depending on these values, if they are about a certain threshold a light turns on. However I'm very confused where to input these alterations of the code and actually how to write them. Any help really appreciated!
-
- gyro
- angular acceleration
- (and 5 more)
-
Hi, I am new to using IMU's, so first of all: thanks a lot for the awesome library!! When running the default mpu-6050 RAW sketch I get (what looks to me) as weird data for the Gyro. When rotating the sensor I can see the data change, but rather that maintaining that value, the Gyro always jumps back to the starting value (x: -40, y:30, z:8), independent on how I hold the sensor. Isn't the Gyro supposed to return the angle of the sensor? Or is it returning the rate of change during the acceleration and is it up to me to calculate the angle from this? The MPU-60-50 is connected to an Arduino Uno like this: VDD -> 3.3V GND -> GND INT -> 3.3V VIO - > 3.3V SDA - > A4 SCL -> A5 Thanks!