PDA

View Full Version : Discussion rate gyro


ibrahim
Apr 17, 2006, 10:08 PM
does anybody know how to convert a rate gyro particularly TOKIN CG-16D into an inclinometer(single axis electrolytic tilt sensor). Actually i want that the rate gyro should act like an inclinometer.The output must be in degrees and not in degree/sec, plus when it is tilted to some angle it must sustain that angle, and when it is tilted back it must subtract that reverse tilted amount.
Basically i need hint on how to do it.
Regards

wadiprawita
Apr 18, 2006, 10:30 AM
Integration over time, but there will be drift

-doni-

Gary Warner
Apr 18, 2006, 12:54 PM
The integration is best done with accelerometers and gyros. Use the accelerometer to sense perceived gravity and the gyro to sense angular displacement.

To look at one effect (there are many to consider) the accelerometer shows a tilt angle. The gyro validated the data confirming if the accelerometer data is contaminated by non-angular movment, for example lateral acceleration/deceleration. Lack of angular rotation suggests that a change in accelerometer is linear and not the result of rotational tilt. This information can then be used to adjust the resulting data. But there are no absolutes. There will be an infinite possible set if angular and linear data at infinite possible degrees of each. I can be done, but the trick is the understanding of both inputs to determine attitude.

In considering the coding process, it's best to pick one sensor as the 'master' and the other as the 'slave'. Either one can be the master (or slave). This makes understanding the physics and coding easier. I personly like using the accelerometer as the master.

Using this approach of applying data from both an accelerometer and a gyro lessens the time degradation factor down to the control cycle loop (much faster than the many seconds of counting/averaging angular rate displacement).

For you who are keeping score, yes - I finally concede that just one of the two mentioned sensors does not make a stable detector of combined pitch/roll attitude :p .

Gary
--

ibrahim
Apr 18, 2006, 03:31 PM
Thanks to all who read it.
I tried to solve the problem and glad to share with you. The output of rate gyro is in mV for deg/sec(in this case is 1.1mv for +/-1deg/sec, 2.2mV for +/-2deg/sec wrt to Vref and so on),When there is no angular movement its output stays at vref which is 2.4V. For any angular movement,clockwise or counterclockwise, its ouput increases or decreses in accordance with its sensitivity.if it moves with a rate of 1deg/sec output will be 2.4V+/-1.1mV. I use a 12bit ADC whose resoution is 1mV.so one bit change from Vref means 1deg/sec.

Now what i did is whenever gyros output changes slightly from Vref i start a timer and along with it note the output voltages, to get rid of noise i filter those ouput voltages and then take the average of them over the period when the gyro's output is not egual to Vref(since the ADC is continously giving me the binary value of the gyro's output). Now i have the time for which ouput changes from Vref(angular movement begins) to some higher or lower voltages and comes back to Vref(angular movement stops). Also i have an average of gyros output.Therefore by multiplying the average(first subtract it from the Vref to get the angle) with the time period i get the amount of degree the gyro moves. this is effective and works quite well but a problem occurs.While the rate gyro is moving , software doesnot show any angular movement untill and unless it stops. Where as in an inclinometer, we continously get the amount of degree while its moving.

myulgong
Apr 26, 2006, 02:30 AM
Is there any simple way to reduce the drift, that is, with simple C programming and/or additional circuitry?