|
Re: Gyro inconsistencies...
I don't know the details of Kevin's code but I wouldn't be surprised if the code "ignores" small non-zero readings. That is a very simple but technically insufficient way to keep from "runaway" due to integration of a small non-zero output.
The proper way to dedrift a gyro is to use an absolute reference (eg compass and inclinometer). Since an absolute reference is typically too expensive for applications like ours, a SW solution with a band clamp is often used (as in Kevin's code?).
I'll bet that there's still a non-zero offset in the readings but it's being masked by a nonlinear bit of SW.
There is another possible culprit - ADC resolution. This could be affecting either the null cancellation or the value that's reported when it's actually spinning. Depending on the rate at which the gyro is rotating and a number of other factors, ADC resolution could come into play. I'd be very surprised, however, since there is almost certainly more "noise" in the gyro output than ADC resolution and the effective resolution is usually fine.
Russ
|