Go to Post In FIRST you have the right to remain silent, anything you say can and will be held against you and your associates in the court of public opinion. - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Electrical
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 21-09-2003, 02:19
sanddrag sanddrag is offline
On to my 16th year in FRC
FRC #0696 (Circuit Breakers)
Team Role: Teacher
 
Join Date: Jul 2002
Rookie Year: 2002
Location: Glendale, CA
Posts: 8,516
sanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond repute
Gyro Sensor Questions

I have a few questions about gyro sensors. First off, while browsing the Parallax site I found this http://www.parallax.com/detail.asp?product_id=28017 This is a gyro sensor right? I need something that can balance a personal transportation vehicle (on one axis) in the configuratuion of two side-by-side wheels. Will this do it? it says it will measure in the range of + or - 2 g's. Is that enough. I guess what I'm not understanding is how the terms gyro, angular rate sensor, and accelerometer are related or unrelated -- will someone please explain it to me?

Also, what happens if say this is balancing a vehicle and there is a lot of vibration or bumps in the road. Will this cause jerky throttle or does it know the difference between vibration and tilting? Would adding another sensor and taking the average reading help this problem if there is a problem?

What I want is to make something that does this: the more the machine tilts, the more it tries to compensate, like a segway I guess.

Thanks in advance for your help with this topic that is so new to me.
__________________
Teacher/Engineer/Machinist - Team 696 Circuit Breakers, 2011 - Present
Mentor/Engineer/Machinist, Team 968 RAWC, 2007-2010
Technical Mentor, Team 696 Circuit Breakers, 2005-2007
Student Mechanical Leader and Driver, Team 696 Circuit Breakers, 2002-2004
  #2   Spotlight this post!  
Unread 21-09-2003, 05:01
piotrm's Avatar
piotrm piotrm is offline
Registered User
AKA: Piotr Mardziel
FRC #0190 (Gompei and the HERD)
Team Role: College Student
 
Join Date: Dec 2002
Rookie Year: 2001
Location: Dudley, MA
Posts: 96
piotrm has a spectacular aura aboutpiotrm has a spectacular aura about
Send a message via AIM to piotrm
I'm pretty sure that the link you posted describes something that could do what you want.

The difference between an accelerometer and a gyro sensor would be that the gyro measures the angular acceleration (how fast is the rate at which an object rotates changes) and the accelerometer measures how much something is accelerating (not angular) .

You could use the 2 axis accelerometer to determine the direction of gravity on your balancing device. This information would tell you how the device is tilted and therefore you could (as you say) compensate. Although theoretically this can be done with a gyro as well, it would have be to be extremely accurate and undetered by spikes of large vibrations to work at all and would be subject to eventual drifts and your segway would eventually be running all over the place. The accelerometer doesn't have to be as accurate since all of its readings independently can say something about the tilt of the device; in a gyro you would need to deduce the tilt given a past of angular acceleration values.

As for the spikes, the device itself doesn't know if your riding on a bumpy road or if it is tilting, therefore (as you say) its probably a good idea to implement some software that is capable of determining over several past readings if it is riding a bumpy road or is tilting more than it is tilted already.

Also, although your describe your devicse as 1-axis, the 2 axis on the sensor are required here to determine direction, with 1 you would only be able to determine magnitude. If your balancing device could know of only magnitude, it could possibly know if it is tilting (for example the magnitude of acceleration drops if sensor is mounted straight downwards), but would not know if it is tilting forwards or backwards as both of these events would produce the same sensor readings.

Hope this helps; good luck...

Last edited by piotrm : 21-09-2003 at 05:05.
  #3   Spotlight this post!  
Unread 26-09-2003, 14:15
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,792
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Please remember that an accelerometer measures acceleration. (i.e. changes in speed) It does not give an output when the speed has remained constant. These devices use two machined bars with peizo elements mounted to them. When there is acceleration in one axis, the bar deflects in an opposite direction and the peizo outputs a proportional voltage. With a two axis device, you can sense the direction of the acceleration or deccelleration. (negative acceleration) These devices do need some filtering to damp out vibration and other interference. You may want to consider using multiple devices in a bridge configuration to null errors and give the feedback you need for your application. There are some accelerometers available in Digikey and I would recommend reading the manufacturers literature for a more indepth explanation.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #4   Spotlight this post!  
Unread 26-09-2003, 14:35
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Sorry to drag this slightly offtopic, but I heard that accelerometers could be used to measure tilt when the device is not moving. I think it worked on detection the acceleration ofgravity or something..anybody else know about this?
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
  #5   Spotlight this post!  
Unread 26-09-2003, 16:14
piotrm's Avatar
piotrm piotrm is offline
Registered User
AKA: Piotr Mardziel
FRC #0190 (Gompei and the HERD)
Team Role: College Student
 
Join Date: Dec 2002
Rookie Year: 2001
Location: Dudley, MA
Posts: 96
piotrm has a spectacular aura aboutpiotrm has a spectacular aura about
Send a message via AIM to piotrm
Quote:
Originally posted by Matt Krass
Sorry to drag this slightly offtopic, but I heard that accelerometers could be used to measure tilt when the device is not moving. I think it worked on detection the acceleration ofgravity or something..anybody else know about this?
Quote:
Originally posted by piotrm
You could use the 2 axis accelerometer to determine the direction of gravity on your balancing device. This information would tell you how the device is tilted and therefore you could (as you say) compensate.
Yes, thanks to einstein for figuring out that gravity is basically the same thing as acceleration. To measure gravity you measure acceleration. For example I am sitting here in a chair accelerating 9.8 M/s^2 upwards to countereffect the force of gravity on me which does the same but in the downward direction.

At least I think thats how it goes.
  #6   Spotlight this post!  
Unread 26-09-2003, 16:40
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Acclerometers vs. Angular Rate Sensors

I would first like to clear up something. If you don't want to read this part and would like to jump into the "hows and whys", skip down past the %%%%% line below.

An angular rate sensor is NOT a gyro, nor does it act like one. I know it is common slang to refer to an angular rate sensor as an "electronic gyro", but they are fairly different. One can be made to act like the other, which is what I try to explain below.

Angular rate sensors measure (you guessed it) angular rate, i.e. how fast (degrees per second or radians per second) something is rotating. (it actually outputs a voltage that needs to be converted into physical units, but that is beside the point).

A gyroscope is typically used to measure angular position (not rate), using the principal of "rigidity in space" of the gyroscope. This is how the attitude indicator (artificial horizon) of an aircraft works. You can use a real gyro to measure the inclination of your Segway clone. You will actually need to hook up a potentiometer to one of the gymbals to actually measure the angular position.

A gyroscope can be made to measure angular rate (using the principal of "precession"), but that requires a finely calibrated spring. This is how the turn-rate portion of a Turn Coordinator works on an aircraft.

An angular rate sensor can be made to measure angular position. To do this, you must integrate the signal (yeah! a use for calculus) over time.

So, an angular rate sensor can be made to act like a gyro, and a gryo can be made to act like an angular rate sensor, but they don't act the same by themselves. They actually measure different things, but using calculus, they can be made to measure the same thing.

(by the way, the "GryoChip" that comes in the kit is an angular rate sensor - not a gyro)

Lastly, an accelerometer is NOTHING like a gyro, and cannot be made to act like one. An accelerometer measures linear acceleration. Using calculus, this can be integrated into linear velocity and position.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

On to the question at hand:

An accelerometer can probably be used to measure inclination (tilt), but it would require a LOT of study, research, and some trial and error to do it well. If you just place the accelerometer on a platform and rotate the platform, it is easy - just use the measured acceleration and some trig and you can calculate the inclination.

However, that all breaks down when you start accelerating the platform in a horizontal direction. Then, part of the horizontal acceleration will now be read by the accelerometer (since the accelerometer is now tilted) and it will become difficult to determine how much acceleration is due to gravity and how much is due to the platform accelerating horizontally - especially when they change simultaneously.

I would suggest buying an ANGULAR RATE SENSOR (see above). You can use calculus to integrate the angular rate into angular position. The angular position is the inclination (tilt) of the Segway-clone. Horizontal acceleration will not affect this measurement.

%%%%%%%%%%%%%%%%%%%%%%%%%%%

Whew - sorry for the length of this post.

-Chris

Last edited by Chris Hibner : 26-09-2003 at 16:52.
  #7   Spotlight this post!  
Unread 26-09-2003, 17:19
Elgin Clock's Avatar
Elgin Clock Elgin Clock is offline
updates this status less than FB!
AKA: the one who "will break into your thoughts..."
FRC #0237 (Black Magic)
Team Role: Mentor
 
Join Date: May 2001
Rookie Year: 2001
Location: H20-Town, Connecticut
Posts: 7,773
Elgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond repute
Send a message via AIM to Elgin Clock
<Reference to other post> BE WISE!!!! </Reference to other post>
__________________
The influence of many leads to the individuality of one. - E.C.C. (That's me!!)

  #8   Spotlight this post!  
Unread 26-09-2003, 17:42
piotrm's Avatar
piotrm piotrm is offline
Registered User
AKA: Piotr Mardziel
FRC #0190 (Gompei and the HERD)
Team Role: College Student
 
Join Date: Dec 2002
Rookie Year: 2001
Location: Dudley, MA
Posts: 96
piotrm has a spectacular aura aboutpiotrm has a spectacular aura about
Send a message via AIM to piotrm
Quote:
Originally posted by piotrm
Yes, thanks to einstein for figuring out that gravity is basically the same thing as acceleration. To measure gravity you measure acceleration. For example I am sitting here in a chair accelerating 9.8 M/s^2 upwards to countereffect the force of gravity on me which does the same but in the downward direction.

At least I think thats how it goes.
Ops, did that sound like an insult? What I meant is that Einstein was the one who proposed that acceleration is the same thing as gravity. Sorry if it came off wrong.
  #9   Spotlight this post!  
Unread 27-09-2003, 20:58
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
actually if you integrate the output from the yaw rate sensors they give us in the kit, you end up with rotation (degrees turned)

and if you are using something like the robot controller, which reads the sensor at fixed intervals, you dont have to convet it to degrees, just use whatever scale it comes out to be.

Then integrating is nothing more that added the sensor number and accumulating the result.

Lets say you start with the sensor centered pointing upwards, and its 'zero' output is 128

you would subtract 128 from each reading (to normalize 'zero' to equal 0, then add it to the accumulated number.

if the sensor starts rotating forwards, the output will go 128, 129, 132... as it accelerates in that direction

and your accumulator will read 0, 1, 5... indicating the amount you are away from center.

the only problem is that after a while the errors will creep into your accumulator, and zero wont be straight up - but its a start anyway.
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
gyro code odin892 Programming 2 08-04-2003 14:50
Help with the gyro chip Team852 Electrical 1 10-01-2003 22:31
Is any team using the gyro chip? Ragin_Kage Kit & Additional Hardware 4 10-04-2002 12:11
Voodoo Gyro Chips... Ghetto_Child Technical Discussion 3 01-02-2002 16:39
Have YOU used the gyro chip? FotoPlasma Technical Discussion 10 31-01-2002 13:26


All times are GMT -5. The time now is 06:01.

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