Gyroscope sensors

Hello, I am using a gyroscope for an inverted pendulum project. The sensor seems to work properly but each time I test it the sensor has a different bias. It is to say, when the inverted pendulum does not move, the gyroscope outputs a constant number different from zero, but I can not subtract that number by coding because each time I test it this number changes. Is it due to a wrong configuration of the gyroscope or is it the right behaviour of this kind of sensors?

My gyroscope is very close to a R/C electric motor, may the electric motor be inducing current to the sensor, is it possible?

I think I've read that gyros do suffer from static drift. Seems I've read that some will also include a accelerometer to help offset the gyros drift in software. Don't know any details but there is a lot of info and project around that utilize accelerometers and gyros.


Drift in gyros is very common, especially related to temperature changes. I doubt the motor will have much effect. This drift make the performance of gyros for angular measurement poor, because the integration of the angular velocity output of a gyro causes the drift error to accumulate. Accelerometers are often used in conjunction with gyros to determine angles because their outputs give a more consistent angular measurement over time. Gyros give better fast angular velocity measurement. The integration of gyros and accelerometers into an IMU using Kalman or similar filters is the subject of lots of papers and forum posts on robotics and UAV sites.

Thanks for the answers. I have done many tests and it seems that my gyroscope sensor has an static drift that changes every time I turn it on. The worst think is that unfortunately, the sensor has wrong values when the motor turns on. I can cancel the drift by coding but obviously I need some kind of material that could protect the sensor from the motor. Do you know any home made way to build an EMI protector?

Gyros suffer from drift. You can either use a calibration step to determine the bias every time you turn it on, or use some sort of filtering with a very large window.

If you want to make something that balances like a segway, you’re going to need an accelerometer too. Then you apply sensor fusion (kalman filtering) to obtain a robust attitude estimate.

Yes, I know there are two problems: drift and EMI. The drift is "easy" to solve since a simple initial mean computing is enough. The EMI issue is the one I do not know how to solve.

How should I protect the gyroscope? Is there any better sensor than gyroscope to compute the angular movement rate?