Loading...
Pages: [1]   Go Down
Author Topic: IDG500 gyro sensor to read its current angle position  (Read 552 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi i am building a balancing robot and need to output the current angle of the gyro in degrees. all i can manage to do is get the gyro to output voltages which is only for movement when the gyro is moved at speed but then resets to the original voltage. the code i am using can be seen below. thanks

int y;
int gyroPin = 0;

void setup ()
{
  Serial.begin(9600);
}

void loop()
{

  y = analogRead(gyroPin);

 
  Serial.println(y);
  delay(250);
}
Logged

0
Offline Offline
Tesla Member
***
Karma: 71
Posts: 6603
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can't measure angle with this sort of gyro, its a "rate gyro" - all you get is a signal proportional to rotation rate.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can find a comprehensive tutorial on how to use the IDG500 and Arduino here:

http://arduinorobotics.blogspot.com/

Hope it helps!
Logged

Paris, FRANCE
Offline Offline
Newbie
*
Karma: 0
Posts: 38
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello smiley-wink

I think you can take a look at this:
http://arduino.cc/playground/Main/Gyro

You can't measure angle with this sort of gyro, its a "rate gyro" - all you get is a signal proportional to rotation rate.

Yes it is a gyrometer, but you can evaluate the angle by making an integration of the angular speed.

Hope that it will help you smiley-wink
Logged

Bon sang ! mais c'est bien sur !

0
Offline Offline
Tesla Member
***
Karma: 71
Posts: 6603
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello smiley-wink

I think you can take a look at this:
http://arduino.cc/playground/Main/Gyro

You can't measure angle with this sort of gyro, its a "rate gyro" - all you get is a signal proportional to rotation rate.

Yes it is a gyrometer, but you can evaluate the angle by making an integration of the angular speed.

Hope that it will help you smiley-wink

I'll be clearer - you can't measure _absolute_ angle with a rate gyro.  Integrating the signal gives you a drifting measure of _change_ of angle, and due to non-linearity you get different measurements at different rates too (although this imperfection is usually within a few percent).

Philosophically all gyroscopes are rate gyros since we can't make a perfect one, but there's a real world difference between a ring laser gyro that doesn't need drift correction during the whole journey and a MEMS one that needs it every 10 seconds!
Logged

Paris, FRANCE
Offline Offline
Newbie
*
Karma: 0
Posts: 38
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'll be clearer - you can't measure _absolute_ angle with a rate gyro.  Integrating the signal gives you a drifting measure of _change_ of angle, and due to non-linearity you get different measurements at different rates too (although this imperfection is usually within a few percent).

OK i apologize for my unclear post  smiley-roll-sweat That is the reason why i used the "evaluate" word, but i should have been more precise, thank you to correct me smiley-wink

So i also be clearer, you can output the change of angle in degrees by integration of gyro angular rate data but with high drift due to the gyrometer technology (MEMS). This measure is non-reliable.

Also for your balancing robot application, i think you need to combined information coming from an accelerometer and a gyrocope (i'm not an expert so correct me if i'm wrong)

Quote
hi i am building a balancing robot and need to output the current angle of the gyro in degrees.

Is it possible to give us more precisions on your project ?

Philosophically all gyroscopes are rate gyros since we can't make a perfect one, but there's a real world difference between a ring laser gyro that doesn't need drift correction during the whole journey and a MEMS one that needs it every 10 seconds!

Yes, this is also the reason why Inertial Navigation Systems are not, for the moment smiley-wink,made with MEMS sensors
« Last Edit: February 13, 2012, 02:02:36 pm by darki03 » Logged

Bon sang ! mais c'est bien sur !

Seattle
Offline Offline
Newbie
*
Karma: 0
Posts: 14
huh?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
i think you need to combined information coming from an accelerometer and a gyrocope

Exactly.  A gyro can't be counted on to tell you where 'down' is.  (at least, the cheap ones I play with)

 An accelerometer (3 axis, especially) can.

t
Logged

Pages: [1]   Go Up
Print
 
Jump to: