by Dewey » Wed Feb 09, 2011 8:35 pm
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