Go to Post One career isn't really more prestigious than another; not in and of itself. More than anything it depends on what you do with it. - Matt Leese [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #16   Spotlight this post!  
Unread 28-02-2012, 16:18
jutayo23 jutayo23 is offline
Systems Team
AKA: Justin Yost
FRC #1124 (The ÜberBots)
Team Role: Programmer
 
Join Date: Apr 2010
Rookie Year: 2008
Location: Avon, CT
Posts: 7
jutayo23 is on a distinguished road
Re: Gyro Autobalancing

Team 1124 has gotten autonomous bridge balancing to work very well. Here's a video of our previous year's robot with the balancing code on it (this was before this year's robot was completed) You'll notice the bridge in this video is easily tipped. Our bridge was too light, which made balancing harder to achieve. The code worked even better when we tried it with a competition bridge.

http://www.youtube.com/watch?v=z2RpnQAU1dY

If anyone's interested in our method:

We use both a gyro and accelerometer to balance our robot. The gyro is good at giving an accurate angular rate, but not absolute angle, while the accelerometer is good at giving an accurate absolute angle, but not angular rate. We decided to combine the best features of both these sensors to get the best control.

I don't want to release the entire code yet, but here's essentially how it works.
It uses a state machine to decide how to behave. The driver drives the robot slowly up the bridge until the gyro rate is greater than a certain amount in either direction, at which point the code takes control of driving. The robot then drives in the opposite direction until a second significant angular rate is detected. After this sequence, the accelerometer is read for an accurate angle reading. If it is determined that balancing failed, it restarts. If it determines it is balanced, it holds its position and waits for the gyro to return a significant rate allowing it to re-balance.
You should be able to see all of these steps from the video above.

We use closed loop control on the drive (with PID) to control the rate at which the robot drives up the ramp in order to keep consistency.

Our drivers have been very pleased with this feature. It has yet to fail. It almost always balances the robot on the first try. When it doesn't, it gets it on its second, as seen in the video. This method is much faster than when our drivers attempted it manually.

I'd be happy to answer any questions related to our method of balancing, PID, or the sensors we used. Good luck to anyone else attempting this!
__________________
Justin Yost
Systems Team
President
 


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


All times are GMT -5. The time now is 21:00.

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