View Single Post
  #2   Spotlight this post!  
Unread 10-02-2008, 14:59
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: accelerometers and gyroscope to control arm?

Quote:
Originally Posted by Hazmatt View Post
Hello all. How can I use accelerometers to keep a robot's arm parallel to the ground? My initial thought process was to use the accelerometers to measure acceleration due to gravity, and if it felt any, then make the motors move the arm the opposite way. Does this seem about right? And can this be done with one accelerometer? Thanks in advance!
Yes, this can be done, but you need to use a dual-axis accelerometer. The best mounting orientation is with the x and y axis at a fourty-five degree angle relative to the gravity vector (this is because the maximum rate of change of the accelerometer outputs is at this angle). Also, have a look at the atan2() function.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org