View Single Post
  #7   Spotlight this post!  
Unread 16-01-2012, 02:18
Matt H. Matt H. is offline
Long Distance Mentor
FRC #1726 (N.E.R.D.S.)
Team Role: Alumni
 
Join Date: May 2006
Rookie Year: 2007
Location: Sierra Vista, AZ
Posts: 238
Matt H. has a reputation beyond reputeMatt H. has a reputation beyond reputeMatt H. has a reputation beyond reputeMatt H. has a reputation beyond reputeMatt H. has a reputation beyond reputeMatt H. has a reputation beyond reputeMatt H. has a reputation beyond reputeMatt H. has a reputation beyond reputeMatt H. has a reputation beyond reputeMatt H. has a reputation beyond reputeMatt H. has a reputation beyond repute
Re: Stabilizing robot on bridge with gyro or accelerometer

Quote:
Originally Posted by RoboMaster View Post
Thanks Matt, how sensitive is the accelerometer to vibration and motion? I assume this means that it gives back a noisy signal that's harder to make sense of? Will the bridge rocking back to level be any problem with this?
For this post assume the Z axis is vertical and the robot drives along the Y axis.


The sensor has a resolution of ten bits. So your readings will be accurate to plus or minus 1/1024 of the full range (2G). So you can expect your readings
to be accurate to plus or minus 0.002G.

When the bridge is tipped it makes approximately a 6 degree angle=arctan(4/41). This means your accelerometer will read:
Z--0.995G
Y--0.105G

The Y component tells you the bridge is tipped. The Z component isn't very helpful (same vibrations from the motors could easily induce a 0.003G difference).


Example 1:
Now say you start moving backwards slightly (perhaps to realign your robot). This is acceleration in the Y direction. If you accelerate forward at 0.1G your accelerometer now reads:
Z--0.995G
Y--0.005G
This looks like the bridge has tipped, but it hasn't.

Example 2:
You move forward and the bridge tips. Your robot is falling so the accelerometer briefly reads:
Z--0.5G
Y--0.0G
What does your program make of this?

Example 3:
Your accelerometer is subject to a consistent 0.1G vibration in Y direction. Your accelerometer reads:
Z1--0.995G
Y1--0.2G
Z2--0.995G
Y2--0.0G
Z3--0.995G
Y3--0.2G
A crude program might decide the bridge tipped at time 2.

The gyro helps eliminate most of these problems by telling you if a rotation occurred. In example one, no rotation implies no tipping. In example two, rotation implies tippings. In example three, no rotation implies no tipping.