Gyro - LPY530AL Question

I’m don’t know much about Gyro’s so maybe someone can answer a question. The LPY530AL Gyro measures angular velocity along the pitch and yaw axes with a full scale of ±300°/s.

How would one convert an axes reading to degrees? I’m trying to figure out each of the examples below.

Example1: if one of the 4x OUT axes reading was say 600 and the gyro zero was say 300 and 4x OUT (amplified) is 3.33 mV/ °/s. How many degees has it gone?

Example2: if one of the 4x OUT axes reading was say 600 and the gyro zero was say 300 and 4x OUT (amplified) is 3.33 mV/ °/s and the amount of time to go from 300 to 600 is 10msec.Same thing, how many degrees has it gone?

Gyros measure angular velocity the same way your car’s speedometer measures linear velocity. If you were travelling at 60 miles an hour, and I asked you how far you had gone, would you be able to answer that? Nope. You’d need to also know the amount of time you had spent travelling at that rate to answer.

To go from degrees/second to degrees, you simply multiply by seconds (this is called integration). For your examples:

  1. 0 degrees. Your instantaneous velocity is (600-300) = 300 units per second (where 300 has to be divided by your ADC resolution, multiplied by your ADC full scale range then divided by your mV/deg/s constant to get degrees per second). Since you have not specified the time you have spent moving this fast I am assuming you have spent 0 time moving, therefore you haven’t moved.

  2. This is trickier. If you have been moving at a constant 600 units for 10ms, then you would have moved 6 units (600 x 0.01, where degrees is equal to your units divided by your ADC resolution, multiplied by your ADC full scale range and divided by your mV/deg/s to get degrees). If you started at 300 at time = 0s and linearly increased your velocity to 600 at time = 0.01s, then your angle is (300 + 600)/2 x 0.01, or 3 units. Again, multiply by the scaling factor to get degrees.

At all times remember that gyros measure your rotational speed about an axis. You can’t use them as tilt sensors because they don’t know which way is up or down, they will only tell you how fast you are spinning.

What is your specific application for your gyro? I may be able to point you in the right direction if there is more you’re unsure of.

Will.

OK… thanks the kinda explained it. I was thinking of using a 10 bit ADC and MCU with a 3.3 volt range.

My daughter is an ice skater and got wondering how fast she goes during a spin and at what angle is her body at. Was thinking of attaching a small data logger to get this info.

I was trying also to get the angle of her body during the spin, I have read if you use an accelerometer with a gyro that you could possibly get an angle.

Does that sound possible?

Possible? Yes. Difficult? Yes. What you need is commonly known as an AHRS, or Attitude and Heading Reference System. These are commonly used on aircraft to determine its pitch, roll and heading.

An accelerometer measures linear acceleration along an axis - to continue with the car analogy, if you measured how far down you were pushing the gas pedal, you would be measuring your acceleration (hence why they are called accelerator pedals). It also measures the constant downwards acceleration you are exposed to all the time, otherwise known as gravity.

If you have a triple-axis accelerometer that wasn’t moving, the vector sum of all the axes equals 1g pointed down. However, once you start to move, you are measuring gravity plus whatever motion the accelerometer is experiencing. Statically, a triple axis accelerometer can give you a tilt angle; dynamically, it will be incorrect.

Normally the additional accelerations experienced are due to centripetal forces, which are due to rotational motion. A gyroscope can help here, because if you know your rotational velocity, you can determine your expected centripetal forces, and if you subtract those you are left with gravity from which you can calculate your tilt angle. In practice it’s not so easy, because you have to combine the two sensors using a filtering algorithm.

In short: unless you can derive the mathematical equations that describe the motion of your daughter while ice skating, you will have a hard time measuring the angle her body is at. However if you attach a gyro to something that is always pointed upright (possibly also difficult) you can just measure the angular velocity, or how fast your daughter is spinning. Otherwise you can invest in a commercial AHRS for motion capture like the following:

http://www.xsens.com/en/general/mti

but that will set you back many thousands of dollars. I suspect you just want to develop something cheap for fun, so I would just stick with the single gyro for now.

Will.

Thanks for the explanation Will - cleared up some misconceptions I had about Gyros. Also sends me back to the drawing board as it were.

Try to make an inclinometer for 4x4. Looking at one of the Ardupilot bits now.

Cheers,

Crispin