07-21-2008 10:22 AM
Hi.
I am having trouble determining attitude from a Gyroscope. I wish to determine when a Platform is Level using a Gyroscope. Similar principle to a Artificial Horizon in a naircraft. I can read the voltage rate change from the Gyro but how do I convert this to Angular Displacement. Integrating once should give velocity and again for displacement. Has anyone got some sample code that will do this for me. I am not worried abour drift at this stage. Any help would be much appriciated.
Regards
Creg
07-22-2008 05:21 AM
Hi Creg
This is not something That I have done before but it does look interesting. What kind of a voltage signal are you reading in? What is the relationship between the voltage and the angle/speed etc. of your Gyroscope.
If you can describe the system in a little more detail I will try and advise best i can with the LabVIEW bit.
I look forward to hearing from you
best regards
07-22-2008 02:36 PM
HI,
I’m Using a Melexis MEL90609 Gyro. It has a SPI and an Analogue output. At rest the analogue output is at 2.5V. This voltage varies up and down depending on the direction and the rate of turn. When the gyro stops turning the voltage settles back to 2.5V. Being used is the analogue input of a NI USB-6008. (Not using SPI). Picture a tray/platform being held by a mechanical arm. For the moment one axis of rotation needs to be level. (Then copied for the other). When the plate is being moved the joystick of the mechanical arm, the operator can observe the attitude with reference to gravity. An accelerometer will probably have to be used to determine downward direction and to eliminate gyro drift.
 
Pitch and roll of the platform should be displayed similar to that in an Artificial Horizon of an aircraft.
Any suggestions of how to approach this problem would be appreciated.
Creg
07-23-2008 03:40 AM
07-23-2008 05:36 AM
Hi Graham,
 
The angle of rotation will be measured by the Gyro. When the Gyro is at rest the output is 2.5v. Rotating it one direction increases the output and the other direction decreases it. This voltage change is just for the duration of the gyro movement. This rate needs to be converted to angular rotation. The faster it turns the greater the change in Voltage.
Using Labview 7.1. At the moment being used is the DAQ Assistant to read in the analogue voltage and display it numerically. Is there a way to change this rate to angular rotation? By Intergration??.
Measuring Angular rotation by using a Rate Gyro is desired. Any help appreciated.
Many thanks
Creg07-24-2008 03:23 AM
Hi Creg,
Graham has pointed your problem my way as he will not be able to reply for a couple of days.
As I understand it you gyroscope actually generates a voltage that is proportion to the angular speed (degrees/second) so you only need to integrate once to convert to position. I have attached a example VI that produces an array of data that could be similar to what you might get and integrates it using two methods, either of which could work for your application depending on how you are acquiring data.
In terms of the scale you can find the required multiplier in you gyroscopes data sheet, it could be one of three values according to how you have it configured. You can then either acquire the voltage as you have and multiply by this in software or you can create a custom scale in the DAQ assistant whereby you set up the conversion in there and the value outputted will already be in degrees/second.
I hope this Helps,
James Mc
Applications Engineer
07-24-2008 12:25 PM
James,
Thank you for the code. It worked great. I need now to implement some Kalman filtering. If you had anything to get me started would be great as Kalman is new to me.
Creg
07-24-2008 02:44 PM