Go to Post When was the last time you heard of someone on their death bed talking about a great movie they saw? I think it far more likely to hear of their accomplishments, something they did to make things better. Well that's what FIRST is all about. - DougHogg [more]
Home
Go Back   Chief Delphi > Technical > Control System > Sensors
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
  #6   Spotlight this post!  
Unread 17-06-2008, 00:14
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Building self balancing scooter- troubles with Integrating Gyro

Another thing you might try that has been very effective for me is oversampling the value before accumulating. Oversampling is much like averaging, except that you don't divide. It's easiest (just like averaging) if you work with powers of 2. Let say you choose to add 4 bits to your measurements by oversampling. That means that for each sample you want to accumulate, you need to actually aquire 2^4 or 16 samples. By doing this, your center value that you subtract off of each value before accumulating can be more accurate.

The way to get the best center value for your accumulator is to average the samples for a long period. Probably at least 1 second. Remember that since your center value is now based on oversampled readings, you need to be averaging oversampled readings to calibrate your center value.

You also noted that you have a 10-bit ADC but are only using 8 bits because at 8 bits, the values don't change. Truncating your values is worse than averaging them. It has the exact opposite effect that oversampling does. You should definitly use all 10 bits plus oversampling and simply average enough points to find the stable value. It is that very noise in the system that makes oversampling possible.

One caveat to oversampling is that you must sample faster to maintain the same bandwidth. Probably the best thing to do is run the ADC as fast as it will go and then oversample as much as you can while still keeping the bandwidth that you need from the gyro. That is, of course, if your processor can keep up.

Another thing you might try to augment the integrated sensor (which will always have some amount of drift) is to use a sensor that can tell you angle statically to help zero the measurements. You could then use even low bandwidth readings from that sensor to correct the integrated value.

Cheers!
-Joe
Reply With Quote
 


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
Motor specs for self-balancing scooter dunkonu Motors 1 23-02-2008 12:05
Underwater self propelled scooter devices Elgin Clock Chit-Chat 2 20-02-2007 15:02
Team 862 - Self Balancing Scooter jakep Robot Showcase 15 10-10-2006 21:01
Self-Balancing 2 Wheeled Robot Mike Robotics Education and Curriculum 25 02-08-2005 15:12
Self Balancing Robot in FIRST (plausible? possible? preferable?) phrontist General Forum 11 28-06-2004 10:55


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

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