Go to Post A robot that does 60% of the tasks 100% of the time is better than a robot that does 100% of the tasks 60% of the time. - artdutra04 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-02-2008, 12:46
Hazmatt's Avatar
Hazmatt Hazmatt is offline
Registered User
AKA: Matt
FRC #2645 (PowerSurge)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Muskegon
Posts: 51
Hazmatt will become famous soon enoughHazmatt will become famous soon enough
accelerometers and gyroscope to control arm?

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!
  #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
  #3   Spotlight this post!  
Unread 10-02-2008, 15:06
GUI GUI is offline
Registered User
AKA: Gary
FRC #4183 (Bit Buckets)
Team Role: Mentor
 
Join Date: Nov 2006
Rookie Year: 2006
Location: Tucson, AZ
Posts: 229
GUI is a splendid one to beholdGUI is a splendid one to beholdGUI is a splendid one to beholdGUI is a splendid one to beholdGUI is a splendid one to beholdGUI is a splendid one to beholdGUI is a splendid one to behold
Send a message via Yahoo to GUI
Re: accelerometers and gyroscope to control arm?

Have you considered using a potentiometer instead? You could mount one on the pivot point on your arm, and use a PID loop to get it to be level by default. I would think this would be easier and more accurate than an accelerometer.
  #4   Spotlight this post!  
Unread 10-02-2008, 15:11
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 GUI View Post
Have you considered using a potentiometer instead? You could mount one on the pivot point on your arm, and use a PID loop to get it to be level by default. I would think this would be easier and more accurate than an accelerometer.
I'm not sure if it's easier or more accurate, but I do know the accelerometer is a cooler solution .

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

Last edited by Kevin Watson : 10-02-2008 at 15:53. Reason: Fix my ambiguous posting.
  #5   Spotlight this post!  
Unread 10-02-2008, 15:21
Hazmatt's Avatar
Hazmatt Hazmatt is offline
Registered User
AKA: Matt
FRC #2645 (PowerSurge)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Muskegon
Posts: 51
Hazmatt will become famous soon enoughHazmatt will become famous soon enough
Re: accelerometers and gyroscope to control arm?

We have been trying to mount a pot on the arm for a long time, and are finding it nearly impossible. I think we are going to have to go with the potentiometer though, after just realizing that the accelerometer is going to measure the acceleration of the entire robot also, if I set it up this way.
  #6   Spotlight this post!  
Unread 10-02-2008, 15:58
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
We have been trying to mount a pot on the arm for a long time, and are finding it nearly impossible. I think we are going to have to go with the potentiometer though, after just realizing that the accelerometer is going to measure the acceleration of the entire robot also, if I set it up this way.
It's more work, but you could use another accelerometer pair mounted perpendicular to the gravity vector to measure the 'bots acceleration due to movement and then use this information to correct the arms position.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #7   Spotlight this post!  
Unread 10-02-2008, 16:13
Lil' Lavery Lil' Lavery is offline
TSIMFD
AKA: Sean Lavery
FRC #1712 (DAWGMA)
Team Role: Mentor
 
Join Date: Nov 2003
Rookie Year: 2003
Location: Philadelphia, PA
Posts: 6,640
Lil' Lavery has a reputation beyond reputeLil' Lavery has a reputation beyond reputeLil' Lavery has a reputation beyond reputeLil' Lavery has a reputation beyond reputeLil' Lavery has a reputation beyond reputeLil' Lavery has a reputation beyond reputeLil' Lavery has a reputation beyond reputeLil' Lavery has a reputation beyond reputeLil' Lavery has a reputation beyond reputeLil' Lavery has a reputation beyond reputeLil' Lavery has a reputation beyond repute
Send a message via AIM to Lil' Lavery
Re: accelerometers and gyroscope to control arm?

Quote:
Originally Posted by Hazmatt View Post
We have been trying to mount a pot on the arm for a long time, and are finding it nearly impossible. I think we are going to have to go with the potentiometer though, after just realizing that the accelerometer is going to measure the acceleration of the entire robot also, if I set it up this way.
If you can't mount a potentiometer on the actual rotation point on the arm there are other solutions. One would be mounting a shaft encoder somewhere else, and running a cable from it to the arm. As the arm moves, it will pull the cable and turn the encoder (essentially a spool or an inverse winch). You can then translate the rotations of the encoder into distance travelled into rotations of the arm.
__________________
Being correct doesn't mean you don't have to explain yourself.
  #8   Spotlight this post!  
Unread 10-02-2008, 20:04
Hazmatt's Avatar
Hazmatt Hazmatt is offline
Registered User
AKA: Matt
FRC #2645 (PowerSurge)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Muskegon
Posts: 51
Hazmatt will become famous soon enoughHazmatt will become famous soon enough
Re: accelerometers and gyroscope to control arm?

Quote:
Originally Posted by Lil' Lavery View Post
If you can't mount a potentiometer on the actual rotation point on the arm there are other solutions. One would be mounting a shaft encoder somewhere else, and running a cable from it to the arm. As the arm moves, it will pull the cable and turn the encoder (essentially a spool or an inverse winch). You can then translate the rotations of the encoder into distance travelled into rotations of the arm.
Where can we get one of these encoders? Can't encoders only measure distance traveled, or can they measure direction also?
  #9   Spotlight this post!  
Unread 10-02-2008, 23:57
GUI GUI is offline
Registered User
AKA: Gary
FRC #4183 (Bit Buckets)
Team Role: Mentor
 
Join Date: Nov 2006
Rookie Year: 2006
Location: Tucson, AZ
Posts: 229
GUI is a splendid one to beholdGUI is a splendid one to beholdGUI is a splendid one to beholdGUI is a splendid one to beholdGUI is a splendid one to beholdGUI is a splendid one to beholdGUI is a splendid one to behold
Send a message via Yahoo to GUI
Re: accelerometers and gyroscope to control arm?

Quadrature shaft encoders can measure direction as well as distance. There are many suppliers for shaft encoders, pretty much any large electronics supplier will carry them, as well as some specialty companies.
  #10   Spotlight this post!  
Unread 11-02-2008, 00:20
cjtenny cjtenny is offline
Registered User
FRC #2349
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Wayland MA
Posts: 32
cjtenny is an unknown quantity at this point
Send a message via AIM to cjtenny
Re: accelerometers and gyroscope to control arm?

Hey,

I suggest using an accel & gyro so as to correct for the linear acceleration. Kinda like we did on the DIY Segway (http://web.mit.edu/first/segway/)... You can even view our code.

Then again it might not work as well for this.

It's like as Kevin suggested:
Quote:
It's more work, but you could use another accelerometer pair mounted perpendicular to the gravity vector to measure the 'bots acceleration due to movement and then use this information to correct the arms position.

-Kevin
But since they don't give you two accelerometers, and they do give you 1 accel & 1 gyro... it's more KOP-compatible.

Although if anybody has an extra gyro, we need one, ours is broken and we want to use it. Just a heads up, as we've already posted in CD-swap. We can probably trade our accel for your gyro if you wanna do the 2-accel method.
  #11   Spotlight this post!  
Unread 11-02-2008, 08:46
windell747 windell747 is offline
Registered User
FRC #2477
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2001
Location: Hawaii
Posts: 158
windell747 will become famous soon enoughwindell747 will become famous soon enough
Re: accelerometers and gyroscope to control arm?

Why not use an absolute or even an incremental encoder to monitor the position of the arm? Actually, the potentiometer might be the simplest idea, but since I didn't see anything about an eoncoder...decided to mention it. On the other hand, if you're using ferrous metal gears on your arm you could use the GTSs too!
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Accelerometer and Gyroscope freezing in EasyC Jennymcf Programming 0 01-02-2008 22:57
pic: 1625's arm control Aren_Hill Extra Discussion 9 15-10-2007 11:55
P.I.D. Control for the arm skibum2490 Programming 8 27-02-2007 11:21
Slave Control Arm aaronD341 Control System 1 26-04-2005 17:13
2-Segment Arm Control Orborde Programming 1 20-01-2005 01:40


All times are GMT -5. The time now is 19:08.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi