At 16.14 2012.06.16, you wrote: >Electron wrote: >> NOTE: all I really need is to know the inclination of my vehicle (dirt b= ike) >> but as I said the vibrations are extreme, and the mounting point can't b= e >> chosen/changed (it's on the frame). > >I figured as much. But in that case, you really only care about the >orientation of the acceleration vector, not its magnitude, right? Yes, and a gyro would be the answer, but the gyro alone wouldn't work, as i= t still needs a fixed reference. I cannot use a magnetometer, because the dev= ice is mounted on a steel frame. And the accelerometer cannot cope with the (HU= GE!) vibrations coming from the big bore two stroke engine. I thought, since it's a vehicle after all, about slowly "drifting" the gyro= to assume that gravity is below, i.e. bends, accelerations, decelerations, hil= ls up and down will cancel out in the long period. But then again it wouldn't = be reliable, e.g. if one uses it on a ring circuit. >Vibration will affect that calculation, too, but it should still be a usab= le >result. I thought that too, but the vibrations are huge (a few g's) and after solvi= ng clipping issues (which by the way lowers the final resolution) and aliasing= , it still looks like those vibrations don't cancel out but, like a hammer, g= ive a contribute to raise the average magnitude. It puzzles me how can this may even be theoretically possibile, it's probab= ly due to errors in the accelerometer, i.e. when the "hammer" hits, it quickly integrates a lot of energy, but this energy is then released very slowly an= d the low resolution of the accelerometer isn't able to integrate in the oppo= site direction. I.e. maybe if it was a perfectly analogic, infinite resolution s= ystem, vibrations would cancel out, but given their highly impulsive nature, on a = real system the errors are so big that it becomes unusable. There's also the issue of aliasing: although I took care of it, it doesn't = mean that there aren't vibrations that escape the resonance frequency of the MEM= S. >Or are you using the magnitude value to try to decide whether or not >the bike is moving? My goal was to detect the lean angle of the bike, if it was on a hill, and = how fast it was accelerating or braking. Of course I expected to do it with lar= ge errors, as gravity adds a lot of problems by itself (but I thought that any= way the artificial forces would cause the magnitude to differ from 1.0g, so tha= t would have been of help). In the end, the vibrations predominate a lot over= any other force, including gravity. And I'm even talking about a non moving bik= e, idling, when we add rocks, jumps, etc.. it would even go worse. > >-- Dave Tweed >--=20 >http://www.piclist.com PIC/SX FAQ & list archive >View/change your membership options at >http://mailman.mit.edu/mailman/listinfo/piclist --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .