Go to Post Ask not what FIRST can do for you but what you can do for FIRST. - Koko Ed [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
  #14   Spotlight this post!  
Unread 28-02-2012, 15:10
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Gyro Autobalancing

I believe you'll find that once you get to competition, bridge balancing is going to be quite easier to be handled manually by the drivers to compensate for inconsistencies like the number of bots on the bridge and so on. Since the bridges are calibrated with springs to return to 0 degrees, they are pretty easy to balance on.

If you still want to try a form of software balancing, more power to you. I did mine similar to how you did yours the first time around. The way you wrote your code the first time was pretty good, but just needs a few changes.

Since the bridges are considered balanced if they are within 15 degrees either way of 0, you don't need to be directly at 0 degrees, nor would the Gyro be accurate enough to bring you to 0 degrees exactly. I'd say < 3.5 and > 3.5 to give a 7 degree drift.

I'm not sure how your bot's drive train works, but 0.75 is quite speedy for ours. You might consider telling your drivers to drive up onto the ramp fully THEN engage the auto-balancing code, which may allow you to use slower motor outputs, leading to a more accurate balance.

As someone else suggested, you should nestle your case structures. If the < 3.5 case structure is false, check to see if it's > 3.5. If that's false too, set the motor outputs to 0.

Dom
 


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:14.

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