Accelerometer Rotation
CumQuaT
Posts: 156
Hi all,
I understand that a Gyroscope or Compass module would be more suited to this, but humour me on this one...
Has anyone had any success using something like the H48C Tri-Axis accelerometer to measure yaw rotation and find a heading compared to an initial value? If so, any idea on the maths behind that?
Just curious...
I understand that a Gyroscope or Compass module would be more suited to this, but humour me on this one...
Has anyone had any success using something like the H48C Tri-Axis accelerometer to measure yaw rotation and find a heading compared to an initial value? If so, any idea on the maths behind that?
Just curious...
Comments
As for shipping, you might want to consider asking a company for samples of the sensors you want... they usually will ship for free.
Bill
I've already had a play with the OBEX objects for it, and I can't get it to recognize rotation at all. Pitching and rolling, quite well, but not yaw rotation.
I even contacted the generous Beau Schwabe who gave me his older version of the object that draws the 3D cube, and it didn't like Yaw rotation at all...
-Phil
You can measure the pitch & roll from accelerometer because earth's gravity will always show a 1 G component on the downward direction, but for yaw you need alternative arrangement.
The H48C will not provide any information when rotated on Z axis, however if the Z axis of the H48C is offset by a distance from the actual center of rotation then it will provide acceleration. <- Edit Basically what Phil is describing above with two Accelerometers, but simplified down to only one accelerometer.
The best solution though is to use a Compass or Gyro to determine yaw.
Thanks for the help (again) Beau!
-Phil
The current version only provides tHx and assumes that the clock is always 100Hz.
I will clean up the new version and post it to the OBEX soon.
I know what MY weekend project is!
I don't know where in Oz you are, but I have a spare sparkfun 5D0F (bought a couple of them through dings and dents last year) that I'd be happy to send to you. Though be aware as it's a "ding and dent" then it's likely to miss one of it's functions (from memory the accellerometer doesn't do Z properly). http://www.sparkfun.com/products/9268
I bought them to do some interesting stuff with robotics (rather than using collision switches I was going to read the change in accelleration, look at ground gradient changes with the gyro, look into spacial recognition from looking at the sensor set simultaenously (great use of the prop)). I've got some potential product spin-offs that I wanted to research.
So I'd be interested in your code if your willing to share.
IM me if you are interested.
Massimo
http://en.wikipedia.org/wiki/Wii_MotionPlus
The object works with both, individually or together. In fact the I2C address is the same, so if you use both the object shuts down one, reads from the other and vice versa.
Here Nunchuck and Motion Plus cost more or less the same.
If you already have the accelerometer a motion plus would be a good and cheap companion.
Massimo
Surely there must be a Wii that has both accelerometer and gyro (both 3 axis)? It's nearly always cheaper to hack a high volume product but then you have to interface it and use the footprint of it.
I'm pretty confident is has a 2 axis and a 1 axis accelerometer.
If you have a tri-winged screwdriver or you want to force open the toy you get an extremely small board, so maybe a little bit of hot glue would be enough..
Obviously this is not a mass production solution, but for an hack or a hobby project getting 6 DOF from your games store is not so bad..
Massimo
Good find!
A low drift 100 Hz 6DOF IMU made from 4 H48C accelerometers is working well for more than 6 months. It gives an accurate ECEF output of its position on Earth (X, Y, Z :[m]) and of its attitude (yaw, pitch, roll :[deg]). Although it uses 2 FPUs, it is basically a Propeller based project. Every SPIN/PASM/FPU software to reproduce it was posted on OBEX. Namely
"uM-FPU v3.1 SPI driver demo" http://obex.parallax.com/objects/286/
"General MEMS Sensor Model" http://obex.parallax.com/objects/464/
"H48C synchronized driver" http://obex.parallax.com/objects/430/
"INS Math WGS84 Earth" http://obex.parallax.com/objects/335/
The device has automatic temperature calibration on the field to get high accuracy. The method is included in the General MEMS Sensor Model firmware. When you couple such IMU thing with magnetic data using
"HM55B Dual Compass Driver" http://obex.parallax.com/objects/448/
"FPU Extended KF" http://obex.parallax.com/objects/320/
"World Magnetic Model 2010" not yet published on OBEX
then you can have a precise navigation aid for your car, boat or plane. Such devices will be commonplace within the next 3-4 years.
Or, you can fuse the ECEF data with GPS receiver outputs, using for example
"GPS Float Demo" http://obex.parallax.com/objects/405/
to have a stable, IMU filtered uninterrupted NMEA receiver. To collect data for the calibration and debugging, you can use the high speed and bulletproof object with full FAT32 support
"UART Datalogger" http://obex.parallax.com/objects/542/
with a separate Propeller.
I cannot attach a latest and detailed pdf doc of most of the project to this post because of the size restriction, but I can email it if you are interested.
Cheers
Istvan
Maybe if You ZIP them that can be possible.
ZIP's can be 7.5MB
I should read the instructions next time. I remembered a 64K limit...
The mentioned pdf doc is attached.
Cheers,
Istvan