|
Re: 2010 Accelerometer I2C Object/Class
Quote:
Originally Posted by Geek 2.0
Okay, I tried it out yesterday and everything seemed to work. Only problem I had was that it floated just enough to make numbers not work for integration to position. For instance, it would float from 0.0 to about 0.007 and then back to 0.0. Problem there is that it technically never had negative acceleration to counter that, meaning the velocity doesn't go back to 0, making my position infinitely change. Even if I do make a dead band, the readings aren't perfectly symmetrical, again meaning velocity doesn't go back to zero. I don't think I'm the only one with this problem. Any suggestions as to how I can use an accelerometer to at least approximate position, accurate enough to maybe 6 inches to a foot, during autonomous?
|
One possible improvement would be to calculate and cancel any zero offset error at startup. At a time that you know the robot is not moving and there is no vibration (air compressor off) collect samples from each axis and calculate the average value. Use this as an offset to correct for any zero error on X and Y axis and 1G error on Z axis, assuming "normal" mounting scheme. The chip supports setting offsets for each channel.
__________________
FRC 623 2003,2004,2005,2006,2007,2008, 2009, 2010, 2011
FRC 1900 2007
FVC 60 and 193 2006
FVC 3271 2007
FTC 226 and 369 2008, 2009, 2010, 2011
FTC 3806 2010
|