In the official Technical Support channel, @MarshalTheAI asked:
It is a Z-Axis only gyro. It doesn’t work in other orientations.
To clarify, the sensor only senses 1 axis of rotation but you can orient the gyro to choose which you want.
No, this device really is a Z-Axis sensor.
Here’s the datasheet:
Note that it says “Yaw Rate Sensor”. Also note that the output is referred to as “OUTZ”, which gives the “Z axis output voltage”.
Here’s the relevant quote from the Description section:
Note that figure 2 gives the “direction of detectable angular rate.”
It uses a micro machined vibrating mass to measure the Coriolis effect of turning the chip on its Z axis.
There are other ways to make sensors that work in other orientations, but this design will only work for measuring rotation in Z.
And if you orient the sensor differently, does that not change the frame of reference for what is the “z-axis”?
It does change the frame of reference but it won’t return correct readings. The differences in gravitational forces will make it read differently. That’s what I’ve read in the past when this question is asked.
Pitch, roll, and yaw from the point of view of an aircraft in flight in a gravitational field are the terms commonly used by MEMs sensor manufacturers. To get X-Y-Z, picture the upright aircraft flying forward along the X-Axis. The Y axis extends from the CG left and right out the wings. This means the X-Y plane is taken to be perpendicular to (mathematically normal to) the gravitational field. The Z axis extends up and down from the CG. Then:
Roll: rotation around the X axis
Pitch: rotation around the Y axis
Yaw: rotation around the Z axis
The VEX gyroscope is a Yaw Rate sensor. The MEMs (Micro-ElectorMechanical system) at its heart is etched out and supported in a way such that the Coriolis Effect of rotating around the Z-axis in a gravitational field perpendicular to the X and Y axis of the sensor can be measured accurately.
This is not to say the sensor won’t show some changes when oriented in a different way. But it isn’t designed to react to that in a repeatable, linear, measurable way.
This is what @bwilfong2018 refers to here:
I would have to check what happens with the EDR gyro, I thought I had used it successfully in vertical orientation before. I do know we use the IQ gyro that way often on balancing robots such as this.
Interesting, @tabor473 and I were under the impression that it would be somewhat less likely (or even impractical) for a sensor to be tuned to work with one global axis, as opposed to one relative axis.
That being said, I was always under the assumption that pitch/yaw/roll as used in aviation were also dependent on the orientation of the aircraft (it’s just that aircraft normally fly with their tailplanes perpendicular to the earth).
The issue is that gravity is an acceleration. Because of that, it’s not possible to make a moving-mass sensor that is unaffected by its global orientation. Gravity being an acceleration is the reason MEMs tilt sensors (which are accelerometers) work when the device the sensor is contained within isn’t moving, it’s statically tilted.
That gravitational field that imparts momentum to the test mass (or “proof mass”) of an otherwise non-moving tilt sensor does the same thing to the off-orientation gyroscope test mass.
There are sensor modules that integrate multiple DOF sensors in one package and give very good output in any orientation. Those probably weren’t affordable at the time VEX was putting together their EDR sensor set.
Again, this doesn’t mean the VEX gyro won’t output something when used in another orientation. It’s just not designed to do that in a reliable way.
Here are some interesting references:
I don’t have an IQ gyro at home, and I don’t know what sensor set they used in it. The docs don’t say; I’ll crack one open and look.
In the meantime, here are some great videos of someone using the EDR gyro on the non-Z axis. Note the sensor locations at 20 seconds in on this video:
Now look at how well the VEX gyro works in the non-Z axis.
Thread with discussion here:
So, while the gyro may not work well with full rotations around the non-Z axis, (you’d need to test it to see) it worked wonderfully measuring this minor amount of rotation. Which requires a good bit of responsiveness and accuracy, though depending on how you code it, it might not need a lot of repeatability.
It is to be noted that this robot is using 2/3 axes on an accelerometer and 2 encoders on the wheels in addition to the gyro, therefore the amount the gyro contributed to the stability is a variable.
The question has been answered in the official Q & A, and says the Z axis will work in any orientation. As discussed in this thread, this is not what the documentation from the sensor manufacturer says.
However, this is the official answer.
Here’s the thread: