Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Head rotation: Gyro + Accelerometer

Status
Not open for further replies.

anh

Newbie level 2
Newbie level 2
Joined
Apr 26, 2005
Messages
2
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,308
3 axis gyro

I am doing a project to measure the head motion (3DOF: pitch, row, and yaw). As you all know that the pitch and row can be measured by an accelerometer ( I use ADXL 202 from Analog Devie). But I don't know how to measure the yaw (head rotation). Generally, an inertial measurement unit (IMU) consisting of a 3 axis gyro and a 3 axis accelerometer is able to do that; however, I don't understand WHY? Can someone explain for me how a 3 axis gyro & 3 axis accelerometer can measure the pitch, roll, and especially YAW? Besides using gyro, is there any way to measure the YAW?

Thank alot!
 

gyroscope accelerometer

Hi,
I suggest you read some inertial navigation text books.

The gyroscpe stabilizes the platform (in a gimballed case) and accelerometer measure the acceleration in the predetermined axis. (i guess it will take a lot more to clearly explain why it can measure). However your case is like strpdown INS.

brmadhukar
 
yaw accelerometer

Hi anh,

In order to fully describ a motion status of an object, 6 variables are needed, 3 linear coodinate: x, y, z, and 3 angular coodinate α, β, γ. accelerometer can measure the x y z and gyro can measure the α, β, γ, so 6 variables are all measured by the 2 elements, you get the exact status of the header.

mike
 
head accelerometer

If you are intrested only in traking head under normal conditions you may not need a 6DOF system with 3 gyros. Single gyro and accelerometer can be used.

See : https://sourceforge.net/projects/autopilot/

I got another idea. If you use two accelerometers seperated by a distance, you can measure the roatation as every rotation will cause a positive acceleraion in one sensor and negative in another. You can use a kalman filter (I am still trying to figure out how it works ;) ) to get a filtered and clean data out.

(We can measure the pitch & roll from accelerometer because earth's gravity will always show 1 G component on the downward direction, but for yaw we need alternative arrangements)

I hope you are only intrested in measuring the movements, not the actual position of head. Because double integrating the data to calculate the position is very tricky due to noise that renders data unusable even after a short time (5~10 seconds)
 

3-axis gyro

Thanks for your helpful information!
To Asit: What I want to measure is the degree of head rotation.
I agree with you that ADXL202 can measure pitch & roll but not for yaw. How do you position accelerometer so that yaw can be obtained? Could you tell me in more details about it? I tried playing with ADXL202; I turn it over 90 degrees with the ground, then rotate it around Z axis. There is no information at all.
 
accelerometer yaw

Using ADXL202 you will be able to measure only pitch and roll (2-axis inclinometer), as you already discovered, but not yaw.
For head orientation you will need at least electronic compass (KVH100, or similar).

There is however other product on the market, the EZ-Compass-3, which is basically tilt/temperature compensated 360° compass magnetometer with pitch and roll ranges +/-70°: **broken link removed**
 
accelerometer gyroscope

ADXL will not give any information when rotated on Z axis. But if the Z axis of ADXL is offset by a distance from the actual center of rotation then it will read acceleration. See the figure I posted. Here the accelerometers are mounted over ears, where the head moves around neck. I hope you got the idea.

You can also try to experiment with centrifugal force reading with ADXL.

But I still doubt the accuracy and usefullness of the data for your purpose. Gyro seems to be the best option, specially when there are one with SPI output (AnalogDevices).
 
gyroscope vs accelerometer

As it was mentioned above u need a full-axis strapdown INS for head-movement measurements. Gimbaled INS is not useful for u because it required powerful electromotors and wery complex mecanically.

If u want to measure only static head position u need only three axeleroneters witn non-collinear sesing axis (the best choise is three ortogonal axis).

But if the head is mooving (rotating or man with its head is going aniway) its a real problem - u need 3 gyro and 3 axelerometers and powerful DSP for real-time solution of matrix differential equations.
 

gyroscope and accelerometer

Hi
**broken link removed** has released a very nice 3axis +/- 3G acelerometer, teh H48C. Realy worth looking at. I posted some data on it.
Actually i use the beatifull adxl, instead of the cost, but its features are easily implemented on any cpu.
One trick i use is separate interrupts for each axis, so imagine one input going high, it means a start of the pwm cycle.
At this point i save the cpu high counter. and a local start counter
When the pin goes low i subract from the current high counter the local start conter and add to a memory.
when it goes high again i just check if a global variable was cleared, if so i copy locals to globals and start over.
But the secret is that the TOTAL time is counted once.
The globals are then (4.0*duty/period)-2.0
If you subtrack from the old one you get da so not even DC
Its nice because you end adding the noisy variations and they tend to cancel.

Sample listing part of int routine:

unsigned int PortBXg , PortB ;

PIOB_Int_Time = cpu_clock_hi() ; /* Saves High freq counter */
PortB = PIO_PORTB[PIN] & PIO_PORTB[PMASK] ; /* get Pin & Mask*/
PortBXg = PortB ^ PIO_PORTB[PCOMP] ; /* What changed ?*/

/* Gyroscope Grabbing stuff */
if( PortBXg & INP_GYRO_X ) /* X ? */
{
if( PortB & INP_GYRO_X ) /* Changed to HI */
{
if(!Gyro_X_Duty)
{
Gyro_X_Period = PIOB_Int_Time - Gyro_X_Start ;
Gyro_X_Duty = LGyro_X_Duty ;
LGyro_X_Duty = 0 ;
Gyro_X_Start = PIOB_Int_Time ;
}
LGyro_X_Start = PIOB_Int_Time ;
PIO_PORTB[SET_PCOMP] = INP_GYRO_X ;
}
else /* Changed to Low */
{
LGyro_X_Duty += PIOB_Int_Time - LGyro_X_Start ;
PIO_PORTB[CLEAR_PCOMP]= INP_GYRO_X ;
}
}

So when some task uses the global, duty/period, it just cleans the variables and the int will fill them with new ones for the next loop.
So you dont need to track the sample count and some assincronicity is nice to have....

Best

PadsPCB
:D
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top