LPY503 analog dual axes gyro.

I am trying to use LPY503AL analog 2-axes gyro.I am reading its datasheet and i can not find what i need.

There are pins named ST,HP for self test and reset,and their logic is to enable to make a self test and rest.Datasheet does not say how much time do i need to make the self test or reset before i set the ST and the HP to logic 0 again.

I have connected the ST pin to Vdd to get logic 1 as the datasheet says but when i read the output i get nothing different than the steady voltage.And for sure it does not go to the voltage limit.

Also is there anything that can guide me in order to get the rate/s from the gyro or i have to make a function that translate the voltage to rate only by the offset from the steady state.Is that correct? Datasheet says it has 33.3mV /angle/sec so if i read a Voltage that is 0.066V above the steady state Voltage does this mean that i have 2angles/sec movement? Is this the correct way or is there something that i miss?

i am attaching the datasheet

lpy503al Datasheet.pdf (223 KB)

Do you have the chip or a breakout board ?
Sparkfun shows the schematics of the breakout board, Gyro Breakout Board - LPY503AL Dual 30°/s - SEN-09424 - SparkFun Electronics

Do you have it working without the test mode ?

i have the breakout board from sparkfun. And the steady state position voltage i read is 1.20~1.21 for the amplified output. Basically the main thing is to analog read the output pin.

when i connect the ST pin to Vdd i get these result:

Pitch Voltage is : 1.20728
Azimuth Voltage is : 1.21216

Pitch Voltage is : 1.20605
Azimuth Voltage is : 1.21338

While the steady state position voltages are:

steadyStateVoltagePitch = 1.20483
steadyStateVoltageAzimuth =1.21094

the numbers at self test don't go to 2.23V as the datasheet says also these are the only volts that the arduino reads.Volts for pitch goes only from 1.20728 to 1.20605 and back.the same for azimuth

Those values could be right.
If you don't use the 4X amplification, you have to make strong motions with the breakout board to get a good change in the values.
You could check that first.
Did you connect the 4X properly ?

I can't read in the datasheet that the output should go high with the Self Test. According to the datasheet: If the output signals change within the amplitude specified in Table 3, then the mechanical element is working properly
Table 3 specifies the normal output voltages.
I read that as: "If the output changes only a little, the sensor is okay".

i use the 4x amplified outputs. also another questions do i have to apply 1.23 volts to the Vref? or is it an output? When i measure it with a multimeter i get 0V.
Datasheet says that i should connect the x1 outputs to Vref if i use the amplified outputs.

Also about the calculations do i use the steady state position volts i read or the 1.23 and at the Vref if it is an input do i give 1.23 or what i have read again?

Problem datasheet says that at steady position OUTX=OUTZ=1.23

and that 4xOUTZ=4xOUTZ=1.23 for the amplified. But for the amplified outs i get something around 4.92. so this is not fixed internally. i was diverting the voltage with 4 until now.Should i or not?

The chip is for 3.3V, so you can never get an output of 4.92 V.
It might already be broken, if you connected it to the 5V.

Let's make a fresh start.
Remove all the wires.
Connect the 3.3V, the GND, and the analog outputs (not the X4) to the Arduino.
Can you make a photo of that, so we can check it ?
Do you have a multimeter to read the output voltages ?

well i did not send 5 volt but i do not know if someone had.Also datasheet says that it can get 6V so it should work.Anyway i go the results:

Pitch Voltage is : 1.25976562
Azimuth Voltage is : 1.25976562

I looked in the datasheet again, and you are right.
The maximum working voltage is 3.6, but the chip absolute maximum is 6V.

The connections and values look good to me.

Can you twist and rotate the breakboard, to see if the values change ?
If they do, you can connect to the X4 outputs.
You might try the test mode, but if it is working, there is no need to.

If something is still wrong, please upload your complete sketch.

Well my results are awful. i will work with eclipse so it is difficult to send you the code but i will made pasted it to arduino ide.

well i will give you also a plot and a photo.According to how the motor you will see is moving the pitch should have possitive rate/sec. This motor does 1 turn /7min so it is 420/360 = 1.xxxx degrees /sec

i did not see at the datasheet if it says that according to the equation at page 9 the angle is at rads or degrees, i supposed it is at degrees.

i forgot the plot

gyroWithMotor.ino (5.98 KB)

I think I can say that the sensor is okay.

In the sketch, I don't understand this:

if (!(x1-x2)){
  steadyStateVoltagePitch=x1;

You substract two double float values, and test if the result is zero. That is not good.

You will get a steady result, by averaging a number of samples, about 5 samples would be okay.
And you could add a delay of 1000ms in setup() before calling setSteadyStateVoltage().

Is that motor with a gear ? I think you are measuring the grinding of the teeth of the gear.
You might have to do extra filtering in the code.

Sorry first of all i know that the way i set steadystate variables is not correct and i did not want to take the average, i think i have to do something else.

These are 2 dc motors.The ear box is big. I have a working accelerometer , and i want to take the gyro also in order to be able to calculate the angles(yaw and pitch).

The diagram gives negative and positive results when the motor moves to one way.And as i said it should be only positive. I am afraid that the gyro can not detect movement of 1 rad or degrees per second. Also what is the unit that measures angles at the page 9 of the datasheet? isn't it degrees?

I will have to do extra calibration but i need to know that i take correct results first cause the next part is more difficult.

Yes, degrees per second.

The 4X out is 33.3 mV / degrees/second.
Making a turn of 10 degrees during 1 second would result in a output voltage increase of 333mV on the 4X pin.

If you have also a accelerometer, I suggest to read this, http://arduino.cc/forum/index.php/topic,58048.0.html

i have an accelerometer. But can you tell me that is this the correct result i should get from the gyro? shouldn't be a steady (almost steady ) line only in negative or positive values?

Well, can you rule out the grinding of the teeth of the gear.
For example, taking the sensor in your hand and make smooth motions.