Seed Gyro - seriously different numbers returned

Hi

Can anyone explain why the following gives me seriously different numbers when Gyro module is sitting at rest?

All I want are XYZ angles, I’ve read the Gyro drifts over time but I’d expect a 0.01 accuracy sort of thing if it’s sitting still.

Is there something about the LowPassFilter I’m missing?

      

        GT.Timer timer = new GT.Timer(500);

        void ProgramStarted()
        {
            timer.Tick += new GT.Timer.TickEventHandler(timer_Tick);
            gyro.MeasurementComplete += new Gyro.MeasurementCompleteEventHandler(gyro_MeasurementComplete);
            gyro.Calibrate();
            timer.Start();
        }
   
        void timer_Tick(GT.Timer timer)
        {
            gyro.RequestMeasurement();         
        }

        void gyro_MeasurementComplete(GTM.Seeed.Gyro sender, GTM.Seeed.Gyro.SensorData sensorData)
        {
                display.SimpleGraphics.Clear();
                display.SimpleGraphics.DisplayText("Gyro X " + sensorData.X.ToString("f2"),
        }

Timer tick period =500

Gyro X ranges from

0.0
0.07
0.21
0.35
-0.14

Thanks

Karl

Can you please enclose the code portion of your post using code tags.

What results are you getting back and what is your timer tick period?

@ Architect - Hi, I responded to your questions, any ideas?
Thanks
Karl

Hi Karl. I don’t have that module. What are the units of these measurements?

Hi

Not sure is this answers your question, but I have come across two phenomena with the Seeed gyro module:

  1. The X and Z axis are mixed-up.
  2. At high levels of sensing (>10z) the numbers are all over the place.
    The issues were concurred in this forum (who? don’t remember) and by other forums.
    This is 4.1, mind you.

Thanks Gabriel

I wouldn’t mind if it was just a problem (like the LED) where outputs were mixed up but it’s the “numbers are all over the place” thing that I don’t get.

I was expecting after a calibrate (where device was flat on desk) that it would subsequently report XYZ degrees tilt as I move it around.

I’ve seen a couple of other articles here where they keep track of previous readings and where they multiply the figures by (14.375 * 60) but no real difference when I’ve tried those. I just get seeming random numbers back. Seen the video on YouTube (Seeed Gyro Graphics - YouTube) with the number and ellipses but it seems to be reporting the same random numbers mine does.

Do I have a broken module or am I missing something fundamental about how the gyro works. Does anyone actually have this working?

Thanks

Karl

Hi Karl

I have not tried that module but apart from the - reading it looks normal to me.
Gyros even at rest have quite a large drift and that’s one of the reasons imu’s use a mixture of gyros and accel’s to get a accurate reading.
What are you trying to achieve?

Cheers
Justin

@ Karl

I am making a few assumptions here, if you multiply your reading by “(14.375 * 60)” i belive your answer will be mdp/ min, or milli degrees per minute. if you want degees per second then use

 (reading * 0.014375f) 

radians per second would be

 (reading * 0.014375f *  0.01745329252f)

EDIT:

After looking at the Seeed software it appears that one of my assumptions is incorrect, to multiply we need to use the receipical 1/14.375 = 0.069565 so

degees per second then use

 (reading * 0.069565f) 

radians per second would be

 (reading * 0.069565f *  0.01745329252f)

The code

 (reading / 14.375f) 

is already used in the gyro driver so you can see why your numbers appear large (a reading of 1 = 0.069565), but due to the calibration method you will see smaller numbers.

Thanks Dave and Justin

I must have misunderstood what the gyro was giving me, from what you say it returns a rate of change - I thought that was what the accelerometer returned.

In layman’s terms:

I want to mount a sensor on top of a remote controlled car and 
tell the angle it's leaning to to the left or right, and to 
tell the angle it's going up or down hill.

I assumed that would be a +/-X reading and a +/-Y reading and easy to get…

Hey Karl,

Yup gyros measure the rate of change, you might get away with a 3 axis accel on the car but an imu would be far better
Have a look at the arduimu v3 from diydrones that’s what I use and they are very good.

Cheers
Justin

@ Karl - An accelerometer, as you guessed is what you need. Just remember that it will also give you acceleration!