Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

How to use gyro

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
6 postsPage 1 of 1
6 postsPage 1 of 1

How to use gyro

Post by Bertha101 » Wed Feb 09, 2011 5:29 pm

Post by Bertha101
Wed Feb 09, 2011 5:29 pm

Can someone please explain the basics regarding how to use gyro? I have looked for tutorials but have not found out how to actually get it working.
Can someone please explain the basics regarding how to use gyro? I have looked for tutorials but have not found out how to actually get it working.
Bertha101
Robot Builder
Robot Builder
Posts: 7
Joined: Wed Feb 09, 2011 5:18 pm

Post by Dewey » Wed Feb 09, 2011 8:35 pm

Post by Dewey
Wed Feb 09, 2011 8:35 pm

You plug the gyro into any two of the analogue channels on the CM510.

One channel will give you angular rates in the X direction and the other angular rates in the Y direction.

At rest when the gyro is subject to no change both X and Y channels read some value, around the middle of the analogue range (0 to 1023).

You can capture these X and Y no rate values when you power up your bot and it is not moving.

Now any movement will generate an increase or decrease in these 'at rest values'. You can calculate these differances and use them to detect movement. This detection forms the basis of corrective control to restore balance, or whatever you are trying to achieve.

Some experimentation is neceassy since as in any closed loop control system you can actually make things worse not better if you compensate in the wrong sense or over compensate in the right sense!

Dewey
You plug the gyro into any two of the analogue channels on the CM510.

One channel will give you angular rates in the X direction and the other angular rates in the Y direction.

At rest when the gyro is subject to no change both X and Y channels read some value, around the middle of the analogue range (0 to 1023).

You can capture these X and Y no rate values when you power up your bot and it is not moving.

Now any movement will generate an increase or decrease in these 'at rest values'. You can calculate these differances and use them to detect movement. This detection forms the basis of corrective control to restore balance, or whatever you are trying to achieve.

Some experimentation is neceassy since as in any closed loop control system you can actually make things worse not better if you compensate in the wrong sense or over compensate in the right sense!

Dewey
Dewey
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 78
Joined: Sat May 12, 2007 1:17 pm
Location: Worcester UK

Post by Bertha101 » Mon Feb 28, 2011 5:45 pm

Post by Bertha101
Mon Feb 28, 2011 5:45 pm

Do you know if there any existing tutorials for gyro?
Do you know if there any existing tutorials for gyro?
Bertha101
Robot Builder
Robot Builder
Posts: 7
Joined: Wed Feb 09, 2011 5:18 pm

Post by Dewey » Mon Feb 28, 2011 7:12 pm

Post by Dewey
Mon Feb 28, 2011 7:12 pm

This should be usefull, its the Gyro Datasheet!

http://robosavvy.com/Builders/Dewey/Bio ... R530AL.pdf

Dewey
This should be usefull, its the Gyro Datasheet!

http://robosavvy.com/Builders/Dewey/Bio ... R530AL.pdf

Dewey
Dewey
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 78
Joined: Sat May 12, 2007 1:17 pm
Location: Worcester UK

Post by Fritzoid » Tue Mar 01, 2011 7:30 pm

Post by Fritzoid
Tue Mar 01, 2011 7:30 pm

Hi Bertha,

The first thing you want to do is to verify that the gyro sensor is properly connected to CM-510. You do this using RoboPlus Manager. Connect to the robot using the icon on the tool bar. Then you can select the tab on the right that reads Ext. Equipment. The gyro is supposed to be connected to ports 3 and 4. You will have to configure the device type on those ports to either IR or DMS to get proper readings. Once that's done you can see the readings change every few milliseconds.

Port 3 is supposed to read the forward and backward axis. Try tipping your robot backward and forward. You should see a response in the readings on port 3. Port 4 is supposed to read the left to right rotation. So tip you robot to the left and to the right. The port 4 readings should reflect the motion.

If you don't see a reading proportional to the amount of tipping on either channel then there is something wrong with your connections. If things look alright at this point then you can start using the gyro in your code.

A good explaination of how to use the gyro in RoboPlus Task can be found in the Robotis e-manual. Take a look in:

Product Information/Bioloid/Premuim kit/Tutorial/Adjustment Using the Gyro Sensor
Hi Bertha,

The first thing you want to do is to verify that the gyro sensor is properly connected to CM-510. You do this using RoboPlus Manager. Connect to the robot using the icon on the tool bar. Then you can select the tab on the right that reads Ext. Equipment. The gyro is supposed to be connected to ports 3 and 4. You will have to configure the device type on those ports to either IR or DMS to get proper readings. Once that's done you can see the readings change every few milliseconds.

Port 3 is supposed to read the forward and backward axis. Try tipping your robot backward and forward. You should see a response in the readings on port 3. Port 4 is supposed to read the left to right rotation. So tip you robot to the left and to the right. The port 4 readings should reflect the motion.

If you don't see a reading proportional to the amount of tipping on either channel then there is something wrong with your connections. If things look alright at this point then you can start using the gyro in your code.

A good explaination of how to use the gyro in RoboPlus Task can be found in the Robotis e-manual. Take a look in:

Product Information/Bioloid/Premuim kit/Tutorial/Adjustment Using the Gyro Sensor
Fritzoid
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 331
Joined: Mon Dec 18, 2006 1:00 am

Post by siempre.aprendiendo » Wed Mar 02, 2011 9:54 pm

Post by siempre.aprendiendo
Wed Mar 02, 2011 9:54 pm

siempre.aprendiendo
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 559
Joined: Wed Aug 08, 2007 9:13 pm
Location: Barcelona


6 postsPage 1 of 1
6 postsPage 1 of 1