Author Message
 luvocean1
 Posted: Apr 19, 2012 - 12:06 PM
 Joined: Dec 26, 2006 Posts: 1407 Location: Sydney, Australia
 Got me a IMU3000 to play with...but it seems I should go back to high school I am finding it difficult to figure out how to work out the direction of the ADXL accelerometer and the IMU3000 gyro... Please take a look at the attached pic and let me know if it seems ok....I found it on the net but it makes no sense... If pic shows the directions for ADXL correctly as per ADXL datasheet. But how it relates to IMU3000 chip I dont understand... For gyro the rate of angle change is Around an axis...whereas for a accelerometer the change of angle is to the direction of axis... how do u relate the x axis of one to the other?

 smkipus
 Posted: Apr 19, 2012 - 06:48 PM
 Joined: Jun 13, 2009 Posts: 307 Location: Ann Arbor, MI
 How do you want to relate them to eachother? You can find the 3x3 position matrix based on Euler Angles at http://en.wikipedia.org/wiki/Rotation_matrix which would be sort of be useful if you were making a device that wants to know how its location is changing in space. To apply that matrix, you need to do the dead reckoning integration of your acceleration one time to get velocity. Two integrations for the Accelerometer for linear position, one integration on the Gyros to go from angular velocity to angular position. If you just are wondering how they relate, I'm pretty sure a Z axis rotation would mean you are spinning your board counterclockwise the way you are picturing it, you'd register an acceleration off the X and Y accelerometer. Those X and Y signals would be quadratic to the signal you'd get out of your gyro. If its spinning twice as fast, you'd have 4 times the acceleration.

 luvocean1
 Posted: Apr 20, 2012 - 01:00 AM
 Joined: Dec 26, 2006 Posts: 1407 Location: Sydney, Australia
 hhm...well I assumed the above photo is correct and implemented a Complimentary filter last night and I seem to be getting useful things from x and y axis now... I print the x y and z angles outputed from the complementary filter on hyperterminal as I sway the board. It seems if I hold the board midway upright and then do a reset, thus allowing a recalculation of offsets etc...after that if I sway the board to the left (almost virtical) I get my x axis angles approach almost zero (more like 3 to 6 deg) and then if I go back to midway I get 90 deg and then if I sway to the right side (almost vertical) I get (177 to 180ish deg). I repeat the above for the supposedly y axis direction and I get similar results for y axis... For Z axis the process does not make sense. The z axis of accelerometer represents acceleration in vertical direction...whereas for gyro this is a rotation around the vertical axis (yaw). I think the above information is enough to come up with a quadcopter...dont you think? Do i really need z axis? The other thing is... what happens when the device is falling and the micro does a reboot...the offset calculations etc from the accelerometer will be useless...of if the device was at an inclined position when the micro starts...it will get the wrong accelerometer information and set the offsets accordingly....all future results will be screwed...

 bobgardner
 Posted: Apr 20, 2012 - 03:03 AM
 Joined: Sep 04, 2002 Posts: 21276 Location: Orlando Florida
 Its possible to link in a file with some assembler variables that are declared in their own 'section' that is not in the Block Storage Section. This section will not be cleared on reset. So you store a magic number in there after power on, then if the magic number is there at the top of main, you are in a restart and dont need to reinit those vars. Or save the offsets etc in eeprom. _________________Imagecraft compiler user

 smkipus
 Posted: Apr 20, 2012 - 06:33 PM
 Joined: Jun 13, 2009 Posts: 307 Location: Ann Arbor, MI
 Quote: For Z axis the process does not make sense. The z axis of accelerometer represents acceleration in vertical direction...whereas for gyro this is a rotation around the vertical axis (yaw). Z will measure Yaw like you say, try turning your board on its left side and then rotating, I bet you'll get the same results as you did for X and Y. You will want the Z axis, after all, how will you know when you are turning? Although I'd imagine a compass would probably do a better job than a gyro for giving you your heading. Also consider the frame transformation that will have to be performed when your helicopter is banking or not flying with the body fixed frame alined with the earth fixed frame. Great application btw, I worked on this sort of thing in my schooling days =)

 Display posts from previous:  All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 Jump to: Select a forum Forum index|--[AVR (8-bit) Technical Forums]|   |-- AVR forum|   |-- XMEGA forum|   |-- AVR Wireless forum|   |-- AVR GCC forum|   |-- AVR Studio 5 and Atmel Studio 6 forum|   |-- AVR studio 4 forum|   |-- AVRfreaks Academy forum|   |-- AVR Tutorials|--[AVR Software Framework]|   |-- AVR Software Framework|--[AVR32 (32-bit) Technical Forums]|   |-- AVR32 Linux Forum|   |-- AVR32 General (standalone)|   |-- AVR32 Software Tools|   |-- AVR32 Hardware|--[General Electronics Technical Forums]|   |-- General Electronics|   |-- Atmel Security Products|--[Non-technical forums]|   |-- AVRfreaks.net Housekeeping|--[Non-topical forums]|   |-- Off-topic forum|   |-- AVRfreaks Trading Post
All times are GMT + 1 Hour