Is the LPY5150AL Gyro Output Correct?

Click For Summary

Discussion Overview

The discussion revolves around the output readings from the LPY5150AL gyro when interfaced with a PIC16F877A microcontroller. Participants are trying to determine whether the output values, which range from 1100 to 1350 deg/sec during rotation, are accurate and how to properly convert the raw voltage outputs to degrees per second using a specific formula.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant reports output values of 1100-1300 deg/sec when rotating the gyro and seeks confirmation on their correctness.
  • Another participant questions the raw voltage output when there is no rotation, suggesting it should be zero.
  • A participant mentions that the output voltage is approximately 1.23V when stationary and varies to about 1.4V during rapid movement.
  • Concerns are raised about the conversion equation used, particularly regarding the sensitivity and the factors involved in the calculation.
  • Some participants suggest that the conversion factor of 5000/1024 may need to be inverted for proper calculations, while others argue that the original equation is correct as per the datasheet.
  • References to the datasheet and an IEEE paper are made to support the equations used for conversion, with some participants expressing confusion over the derivation of the conversion factors.
  • One participant claims to have found the correct equation for conversion without needing to invert the factor, stating that the sensitivity is 0.00067 V/deg/s.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the correctness of the output values or the conversion equation. Multiple competing views on the proper approach to the calculations and the interpretation of the datasheet remain unresolved.

Contextual Notes

There are unresolved questions regarding the assumptions made in the conversion calculations, particularly concerning the sensitivity and the interpretation of voltage outputs. The discussion highlights the complexity of accurately converting analog outputs to meaningful angular velocity readings.

SUDHEER87
Messages
25
Reaction score
0
hello all..
Iam using LPY5150AL Breakout gyro. I have connected to a PIC16F877A microcontroller.The problem is that iam getting outputs of gyro around 1100 -1300 deg/sec when i rotate the axes.I don't know whether these values are correct are not??can anyone help me out..!
The formula used is:
X_deg=((V_out-V_reference)*5000/1024)/(sensitivity)
where v_ref=1.23 as suggested in datasheet.
THANKS a lot..!
 
Physics news on Phys.org
What is your raw voltage out?

Is it zero with no rotation?
 
Integral said:
What is your raw voltage out?

Is it zero with no rotation?

Thanks for the reply.
First i tested the gyro by keeping the ST pin of gyro high, i checked the v_offset=1.23V approx.
After i grounded the ST pin:
When there is no rotation the outputs from 4x and 1x are same i.e,1.23V approx.
when i move the gyro rapidly in any Axis the 4x output varies about 1.4V approx
The v_ref from gyro is 1.23V as mentioned in datasheet.
I have converted these in Deg/sec according to this formula:
X_deg=((Vxout-Vref)*5000/1024)/sensitivity
Z_deg=((Vzout-Vref)*5000/1024)/sensitivity

After converting i got the values randomly varying between 1100 to 1350 deg/sec.

My Question is that the values which i have obtained are ok or not??
THANK YOU..!
 
I can't tell you if your numbers are correct. You were the one spinning it, only you know that. Were you spinning it at over a 1000deg/sec that converts to around 200 RPM Pretty fast, spin it slower what do you get?

Something bothers me about your conversion equation, but since you don't provide any details on it we can only guess.what are you using for the sensitivity?

I can make some guesses, but if I am right your conversion is wrong.

in a reduced form you have:

[tex]V * \frac {5000} {1024}[/tex]

the fraction could be an expression of bits per volt, If so then you have 5000 of some unit spread over 1024 bits. So I am going to assume that your max voltage is 5v if so then that means you have 5000millivolts represented by 1024 bits your sensitivity is then given as degrees per bit.

To make the conversion work you would need to flip that fraction over. As it now stands your numbers has units of V2 per bit. If you multiply by [itex]\frac {1024} {5000}[/itex]you will get a result in bits. One other thing you will need to convert your Voltages to milliVolts. VRef = 1430milliVolts.

Give those changes a try, see what happens.

Try spinning it at a rate you can count, some thing 10 rpm is countable, with a bit of practice. Now you have a rough number to compare to your sensor output.

Good luck
 
I'm not familiar with the electromechanical ways of stabilizing gyroscopic function, but there are simple mechanical ways of doing so, most of which have been employed in laboritory gyroscopes for decades.

My point: Why make something far more complicated when a far simpler solution has existed for thirty years?

?
 
Integral said:
I can't tell you if your numbers are correct. You were the one spinning it, only you know that. Were you spinning it at over a 1000deg/sec that converts to around 200 RPM Pretty fast, spin it slower what do you get?

Something bothers me about your conversion equation, but since you don't provide any details on it we can only guess.what are you using for the sensitivity?

I can make some guesses, but if I am right your conversion is wrong.

in a reduced form you have:

[tex]V * \frac {5000} {1024}[/tex]

the fraction could be an expression of bits per volt, If so then you have 5000 of some unit spread over 1024 bits. So I am going to assume that your max voltage is 5v if so then that means you have 5000millivolts represented by 1024 bits your sensitivity is then given as degrees per bit.

To make the conversion work you would need to flip that fraction over. As it now stands your numbers has units of V2 per bit. If you multiply by [itex]\frac {1024} {5000}[/itex]you will get a result in bits. One other thing you will need to convert your Voltages to milliVolts. VRef = 1430milliVolts.

Give those changes a try, see what happens.

Try spinning it at a rate you can count, some thing 10 rpm is countable, with a bit of practice. Now you have a rough number to compare to your sensor output.

Good luck

BUT, as per the datasheet the equations are correct it seems.Here is the link for data sheet:http://www.sparkfun.com/products/9412

Full scale reading:1500°/s max deflection is a lot! This means you've really got to spin the board quickly to see a change in output. This sensor range is good for potentially fast moving objects.

When there is no rotation on any axis of gyro, it outputs values near 1100 deg/s.
Since the output of the gyro is analog the expression is multiplied by 5000/1024
where 5000 is the supply voltage and 1024 is for 10-bit A/D converter.
Sensitivity is given in terms:millivolts/deg/sec
Can you please go through the datasheet and help me out..!
Thanks a lot..!
 
mugaliens said:
I'm not familiar with the electromechanical ways of stabilizing gyroscopic function, but there are simple mechanical ways of doing so, most of which have been employed in laboritory gyroscopes for decades.

My point: Why make something far more complicated when a far simpler solution has existed for thirty years?

?

I didn't understand what you are saying.Can you be more elaborative please?
 
I could not find your conversion equation in the data sheet, where did you find it?
 
Integral said:
I could not find your conversion equation in the data sheet, where did you find it?

OH sorry..!
It's in the 9th page figure4 below the diagram.:-)
He has given the equations for the full scale deflection i.e,1500 deg/s.
 
  • #10
So, how did you get from that relationship, to what you have?

Where did you get the factor of [itex]\frac {5000} {1024}[/itex]?

Try inverting that and be sure to convert all voltages to millivolts.










d
 
  • #11
Integral said:
So, how did you get from that relationship, to what you have?

Where did you get the factor of [itex]\frac {5000} {1024}[/itex]?

Try inverting that and be sure to convert all voltages to millivolts.

The datasheet reads:
1.23V+SoA*1500=2.23V for 1500deg/s
Where, 1.23 is the Vref or Voffset
SoA=0.67mV/deg/s
That means Vref+SoA*angle=Vout
implies-->angle=(Vout-Vref)/SoA
From IEEE paper(Application of an Inertial Navigation System to the Quad-rotor UAV using MEMS Sensors Tin Thet Nwe, Than Htike, Khine Myint Mon, Dr.Zaw Min Naing and Dr.Yin Mon Myint) i got the equations as:(5/1023)*(Vout-Vref)/sensitivity.
Inverting that wouldn't give correct answer i think..!
:-(
 
  • #12
Integral said:
So, how did you get from that relationship, to what you have?

Where did you get the factor of [itex]\frac {5000} {1024}[/itex]?

Try inverting that and be sure to convert all voltages to millivolts.










d
The datasheet reads:
1.23V+SoA*1500=2.23V for 1500deg/s
Where, 1.23 is the Vref or Voffset
SoA=0.67mV/deg/s
That means Vref+SoA*angle=Vout
implies-->angle=(Vout-Vref)/SoA
From IEEE paper(Application of an Inertial Navigation System to the Quad-rotor UAV using MEMS Sensors Tin Thet Nwe, Than Htike, Khine Myint Mon, Dr.Zaw Min Naing and Dr.Yin Mon Myint) i got the equations as:(5/1023)*(Vout-Vref)/sensitivity.
Inverting that wouldn't give correct answer i think..!
:-(
 
  • #13
SUDHEER87 said:
The datasheet reads:
1.23V+SoA*1500=2.23V for 1500deg/s
Where, 1.23 is the Vref or Voffset
SoA=0.67mV/deg/s
That means Vref+SoA*angle=Vout
implies-->angle=(Vout-Vref)/SoA
From IEEE paper(Application of an Inertial Navigation System to the Quad-rotor UAV using MEMS Sensors Tin Thet Nwe, Than Htike, Khine Myint Mon, Dr.Zaw Min Naing and Dr.Yin Mon Myint) i got the equations as:(5/1023)*(Vout-Vref)/sensitivity.
Inverting that wouldn't give correct answer i think..!
:-(

Hey i got the correct answers.no need to invert the factor 5000/1024.
The correct equation is: x_deg/sec=(Vout-Voffset)*(5/1024)/0.00067(V/deg/s)
0.00067--->sensitivity
Voffset--->1.23V as per datasheet.
On stationary, the gyro outputs near 7deg/sec(due to erros)
On rotating rapidly along an axis gives near 300-500deg/sec
o:) THANKS..!
 
  • #14
Integral said:
I can't tell you if your numbers are correct. You were the one spinning it, only you know that. Were you spinning it at over a 1000deg/sec that converts to around 200 RPM Pretty fast, spin it slower what do you get?

Something bothers me about your conversion equation, but since you don't provide any details on it we can only guess.what are you using for the sensitivity?

I can make some guesses, but if I am right your conversion is wrong.

in a reduced form you have:

[tex]V * \frac {5000} {1024}[/tex]

the fraction could be an expression of bits per volt, If so then you have 5000 of some unit spread over 1024 bits. So I am going to assume that your max voltage is 5v if so then that means you have 5000millivolts represented by 1024 bits your sensitivity is then given as degrees per bit.

To make the conversion work you would need to flip that fraction over. As it now stands your numbers has units of V2 per bit. If you multiply by [itex]\frac {1024} {5000}[/itex]you will get a result in bits. One other thing you will need to convert your Voltages to milliVolts. VRef = 1430milliVolts.

Give those changes a try, see what happens.

Try spinning it at a rate you can count, some thing 10 rpm is countable, with a bit of practice. Now you have a rough number to compare to your sensor output.

Good luck

hello thanks for the reply.
Iam giving 3Volts as the supply for the gyro.
Should i use (Vout-Voffset)*5/1024/sensitivity[/color] or (Vout-Voffset)*3/1024/sensitivity[/color]
Right now iam using the 1st equation.On stationary the gyro outputs around:x-axis -7.28deg/s and z axis -7.28deg/s
when i rotate quite fast along x-axis the gyro outputs xaxis:-58.239deg/s zaxis: -7.28deg/s
and gives some positive values if rotated in another direction.
Are these values seems to be correct??
 
  • #15
SUDHEER87 said:
hello thanks for the reply.
Iam giving 3Volts as the supply for the gyro.
Should i use (Vout-Voffset)*5/1024/sensitivity[/color] or (Vout-Voffset)*3/1024/sensitivity[/color]
Right now iam using the 1st equation.On stationary the gyro outputs around:x-axis -7.28deg/s and z axis -7.28deg/s
when i rotate quite fast along x-axis the gyro outputs xaxis:-58.239deg/s zaxis: -7.28deg/s
and gives some positive values if rotated in another direction.
Are these values seems to be correct??

I don't think either of them are right. You have the conversion factor for your ADC inverted. Look at your units. Are they correct?

The value you need is determined by your ADC. Do you have a link to documentation on that?
 
  • #16
Here is some information regarding the equation:www.egr.msu.edu/classes/ece480/goodman/.../Final%20Report_Web.doc[/URL]
ON PAGE NUMBER 31.

Other documentation:From IEEE paper(Application of an Inertial Navigation System to the Quad-rotor UAV using MEMS Sensors Tin Thet Nwe, Than Htike, Khine Myint Mon, Dr.Zaw Min Naing and Dr.Yin Mon Myint)THANKS..!
 
Last edited by a moderator:
  • #17
Integral said:
I don't think either of them are right. You have the conversion factor for your ADC inverted. Look at your units. Are they correct?

The value you need is determined by your ADC. Do you have a link to documentation on that?
Hello..!
Did you see the material which i sent u.
Is my equation correct?
 
  • #18
hi guys i shyam doing my final year and i am doing a project called" stair case climbing wheel chair " using inverted pendulum concept and i am using mems accelerometer for the stability. but the point is even after fine tuning the pot of the comparator stability is not obtained in my pendulum. so i thought of going into gyroscopes. wen surfed i came to see about adxrs150. but the point is it is not available in market. so i thought of using adxrs614/13. will it be a substitute to the adxrs150. the total wieght of the setup is 15Kg.
 
  • #19
shyaminvi said:
hi guys i shyam doing my final year and i am doing a project called" stair case climbing wheel chair " using inverted pendulum concept and i am using mems accelerometer for the stability. but the point is even after fine tuning the pot of the comparator stability is not obtained in my pendulum. so i thought of going into gyroscopes. wen surfed i came to see about adxrs150. but the point is it is not available in market. so i thought of using adxrs614/13. will it be a substitute to the adxrs150. the total wieght of the setup is 15Kg.

Where can i find the datasheet?
 

Similar threads

Replies
2
Views
9K