Warning to users of LPR530AL and LPY530AL gyro modules

Have questions about a SparkFun product or board? This is the place to be.

Moderators: phalanx, TS-Tim

Warning to users of LPR530AL and LPY530AL gyro modules

Postby Bob Anderson » Tue Nov 24, 2009 3:26 pm

SparkFun has chosen to include a high pass filter on these modules (SEN-09413 and SEN-09423). As a result, you cannot integrate the output of these gyros to get an angle of rotation! The high pass filter removes the DC component, so the integral fails to produce the expected results.

The high pass filter has another effect as well. If you rotate one direction and stop, you will see (for a while) a different stationary reading than if you rotate in the other direction and stop.

The HP filter can be removed (if you're good with a fine tip soldering iron) by removing R8 and R5 and replacing C1 and C2 with a wire jumper.

Once this is done, the two modules make excellent , stable gyros.
Bob Anderson
 
Posts: 2
Joined: Fri Mar 06, 2009 3:56 pm

Postby sebmadgwick » Fri Dec 11, 2009 6:42 am

Thanks for this info, this is of interest to a discussion we are having at: http://forum.sparkfun.com/viewtopic.php?p=86916#86916

My results (HP filter attached) suggest that gyroscope bias drift is shifted to a steady-state during motion (see plots in above link) by as much as 0.3rad/s in <1s. Point being that as a stead-state error, it is not solely the effect of the HP as you have described. Any input you may have on the discussion would be appreciated.

Can you provide some extra info on...
Bob Anderson wrote:Once this is done, the two modules make excellent, stable gyros.

What I would like to know is:
- Do you have any software filtering or do you simply remove a constant pre-calculated bias-off-set?
- The gyroscope bias must drift by some amount; can you quantify this in anyway? e.g. 1deg/s over 2mins
sebmadgwick
 
Posts: 254
Joined: Wed Oct 17, 2007 12:17 am

Postby Bob Anderson » Fri Dec 11, 2009 8:23 am

sebmadgwick wrote:Thanks for this info, this is of interest to a discussion we are having at: http://forum.sparkfun.com/viewtopic.php?p=86916#86916

My results (HP filter attached) suggest that gyroscope bias drift is shifted to a steady-state during motion (see plots in above link) by as much as 0.3rad/s in <1s. Point being that as a stead-state error, it is not solely the effect of the HP as you have described. Any input you may have on the discussion would be appreciated.

Can you provide some extra info on...
Bob Anderson wrote:Once this is done, the two modules make excellent, stable gyros.

What I would like to know is:
- Do you have any software filtering or do you simply remove a constant pre-calculated bias-off-set?

I'm not using a software filter (Kalman or other). I determine a bias value by averaging readings taken over 1 second using a 12 bit A/D. I keep an extra bit, so the bias value is known to 13 bit resolution. Sitting on by bench, this bias value essentially does not drift. I can come back day after day and meaure the bias and get a result reproducible to with one bit. There is a small tempeature dependance -- if I put my finger on the device, the bias will change a few counts.

- The gyroscope bias must drift by some amount; can you quantify this in anyway? e.g. 1deg/s over 2mins


I integrate (output - bias)*calib to get degrees of rotation. Because there is noise in the output, the above value will "walk" (random walk). In my circuit, the noise seems to be a little more than the spec sheet says, but not much, and I get an apparent drift due to this "random walk" of about 1 degree a minute. Of course, sometimes it "walks" back to zero, and on one measurement I let it run for 3 hours, and when I returned, it was only 3 degrees away from zero.

I looked at the first trace in your thread. What I see there is exactly the hysteresis effect that I described, and it is due to the HP filter.

SparkFun has ruined this gyro. I'm sure it was accidental. The gyro spec sheet shows an optional HP and an option LP filter. But I'm rather sure that they didn't mean for both to be present at the same time.
Bob Anderson
 
Posts: 2
Joined: Fri Mar 06, 2009 3:56 pm

Postby sebmadgwick » Sun Dec 13, 2009 12:57 pm

Bob, Thanks for getting back to me with that info, FYI I've now put some plots up for the RC HP filter removed.

Based on my own results I agree - the 1st order RC HP filter added by SPE ruined this gyro and should be removed.
sebmadgwick
 
Posts: 254
Joined: Wed Oct 17, 2007 12:17 am

Postby bbq » Wed Dec 30, 2009 11:57 am

Thanks for the info!
Could someone please point out where to find the caps and resistors in question? Sparkfun convieniently didn't include those on the silkscreen so I am trying to measure that with a multimeter. However comparing the size of my probes with the size of the components some reassurence by someone who already did successfully it would be great :D
bbq
 
Posts: 4
Joined: Wed Dec 30, 2009 11:51 am

Postby markaren1 » Wed Dec 30, 2009 12:31 pm

markaren1
 
Posts: 375
Joined: Sat Dec 19, 2009 12:16 pm

Postby Alex1101 » Mon Jan 04, 2010 2:27 pm

Hi,

the same problem exists with the 6DOF IMU Razor as it uses the same gyros - could anybody point out where are on the board the capacitors to be shortened and resistors to be removed - unfortunately I cannot open the Eagle file SparkFun provides for 6DOF IMU Razor...

The other thing that i noticed (on the Razor board) - when the board is fully stationary I can measure the Vref1, Vref2, and all 3 4-x (amplified) gyro outputs - the measured voltage is very stable. However when I touch my digital voltmeter probe to the non-amplified Gyro outputs, within a second or 2 the measured voltage drops from about Vref to aroun 0.95-0.98 V - and i see on the gauge how it drops!

I first suspected that my voltmeter has low impedance, but when I measure discharge of a 1,000 uF capacitor, the voltage drops about a unit in the fourth digit a second, which roughly estimates voltmeter impedance at about 2 mOhm. Now i am thinking what would happen when i attach unamplified gyro output to ADC - will ADC also result in significant voltage drop?

Appreciate your reply,
--Alex
Alex1101
 
Posts: 9
Joined: Sun Jan 03, 2010 10:37 pm

Postby mechG » Tue Jan 05, 2010 8:47 pm

Bob Anderson wrote:....I integrate (output - bias)*calib to get degrees of rotation. Because there is noise in the output, the above value will "walk" (random walk). .....


Bob,
Would you mind sharing with us what your sample rate and integration rates are, that are giving you good results with this gyro?

Greg Glenn
mechG
 
Posts: 35
Joined: Tue Jan 05, 2010 8:27 pm

Postby sebmadgwick » Wed Jan 06, 2010 12:41 pm

Just as some anecdotal evidence of gyro performance with the HP filters removed - I rotated around one axis by 90deg and then back to zero 10 times in ~20s which resulted in final integral drift error of ~15deg. I perosnally think that’s pretty good. (DAQ using x-io Board at 1kHz, 16-bit resolution).

However, there is a potential problem I've noticed; very occasionally (and I mean VERY VERY occasionally), motion causes the gyro bias to shift. Each time it has happened I moved the gyro again and the DC error disappears. I'm sorry I cannot provide further details on this, if anyone has also noticed this rare behaviour with the HP filters removed, please tell me.
sebmadgwick
 
Posts: 254
Joined: Wed Oct 17, 2007 12:17 am

Postby Alex1101 » Wed Jan 06, 2010 2:03 pm

I think that the goal of the original HP filter was to bring the stationary result back to Vref to compensate for some mechanical "hysteresis" that may exist in the MEMS "moving mass" (it may not come back to zero position after being excited in one direction).

However it seems that the HP did not do its function; maybe if the resistor to Vref will be reduced to half or third of the original 1mOhm it would work better for bringing output back to zero after excitation. However this would affect the measurements of the constant long-term rotation (like a heli rotating around the vertical axis).

This latter issue probably could be overcome by bringing the HP pin of the gyro to "1" to reset the HP filter - it is not described in the datasheet, but I gues it just shorts the gyro output pins to Vref so that HP capacitor has Vref on both sides, which resets accumulated charge and makes next measurement again sensitive to whatever gyro is measuring.

To wrap up this long post, I think the phenomena you experienced is related to the sensitive mass not returning back to "zero". As far as I understand, the "vibrating" MEMS gyros (like invensense) generate some minimal internal vibration to "nudge" the sensitive mass back to zero in the absence of external excitation.
Alex1101
 
Posts: 9
Joined: Sun Jan 03, 2010 10:37 pm

Re: Warning to users of LPR530AL and LPY530AL gyro modules

Postby Funkysnail2000 » Sun May 16, 2010 4:40 pm

Hallo,
This is my first post on this forum and i was looking for some help with the razor 6dof board. I recently tested my board through 360degrees and got some very nice results except for the gyro's output (red line). It looks like the gyro only measures the change in rotational speed. Is this a result of the high pass filter mentioned earlier?
thanks for any help
Simon

quote="Bob Anderson"]SparkFun has chosen to include a high pass filter on these modules (SEN-09413 and SEN-09423). As a result, you cannot integrate the output of these gyros to get an angle of rotation! The high pass filter removes the DC component, so the integral fails to produce the expected results.

The high pass filter has another effect as well. If you rotate one direction and stop, you will see (for a while) a different stationary reading than if you rotate in the other direction and stop.

The HP filter can be removed (if you're good with a fine tip soldering iron) by removing R8 and R5 and replacing C1 and C2 with a wire jumper.

Once this is done, the two modules make excellent , stable gyros.[/quote]
Attachments
razor6dof.png
all six out puts from the razor 6dof turning though 360 degrees
razor6dof.png (94.32 KiB) Viewed 8767 times
Funkysnail2000
 
Posts: 1
Joined: Sun May 16, 2010 4:14 pm

Re: Warning to users of LPR530AL and LPY530AL gyro modules

Postby sebmadgwick » Mon May 17, 2010 3:08 am

I think I can explain what is going on here...

From the looks of it, the red line is displaying a 1st order exponential decay which I would say is accounted for by the HP filter. This could be confirmed with some calculations if the sampling rate was known.

At t=900 you started the rotation and engaged the unit in a constant physical angular velocity of approx 1950. Whilst the angular velocity is at this non-zero-bias magnitude, the HP filter will attenuate the signal to the zero-bias (approx 1850) with a 1st order decay. Hence, even though the unit is rotating during t=900 to t=2300, the measured angular velocity decays to the zero-bias! At t=2400, you stop rotating and the physical angular velocity now is zero. We would like to see the trace now reach the zero-bias (approx 1850). Unfortunately, the HP filter has since reached a steady-state where the magnitude of the [pre-HP filter] signal during the rotation (between t=900a and t=2300) is ‘interpreted’ as the zero-bias. The result is that, at t=2400, the HP filter provides an output of a magnitude equal to the “magnitude of the [pre-HP] signal during the rotation (between t=900a and t=2300)”, below the zero-bias. This incorrect angular velocity magnitude then decays back to the zero-bias with a 1st order decay, as expected.

To generalise your experiment: You have processed a rectangular wave through a HP filter. As a result, you see a 'step' peak followed by 1st order decay at the rising edge, and a 'step' trough followed by 1st order decay at the falling edge.

This confirms the original sentiments of this thread, that: The included HP filter is nothing but trouble!!

FYI: Skim through my plots and comments (and those of others) in this thread:
http://forum.sparkfun.com/viewtopic.php?f=14&t=18448.
This summarises my investigations and thoughts on the topic; as well as indicating performance once the HP filter was removed.
sebmadgwick
 
Posts: 254
Joined: Wed Oct 17, 2007 12:17 am

Re: Warning to users of LPR530AL and LPY530AL gyro modules

Postby Alex1101 » Mon May 17, 2010 8:52 am

I have been struggling with the HP filter for a while trying to bring the HP line high (for about 20-30 usec) between
the cycles of mesurement (of about 2 ms) to "reset" the HP filter, which was suggested in the documentation,
but it did not help!

Eventually, as was suggested in the thread, I shorted the HP filter capacitors; however I was not able to take out the
I MHom resistor - too small for my soldering iron :? But even with the resistor in place my sensor now works fine without
these strange aberrations - thanks to the people on the thread who first pointed out this defficiency!

My last complain regarding this sensor is related to the "underpowered" direct (non-amplified) output of the gyro: if I do
individual measurements once every 10-20 msec everything seems to be OK; however if I switch my ADC to do
measurements in a constant loop after a few milliseconds the signal starts to drop (with the board stationary!) to very
low values indicating an ever-increasing rotational speed.

This forced me to switch to the amplified outputs, which brings 2 disadvantages: first, it limits the rotational range to
300 degree/sec, which can be exceeded at sharp movements (adversely effecting the precision of angle integration),
and, second, it precludes me from using the reference voltage provided by the sensor so I have to spend 5-10 seconds
on every start to calibrate gyros. buffering direct outputs from gyros would further improve this IMU.
Alex1101
 
Posts: 9
Joined: Sun Jan 03, 2010 10:37 pm

Re: Warning to users of LPR530AL and LPY530AL gyro modules

Postby mechG » Mon May 17, 2010 9:28 am

These are nasty problems. I feel lucky that I have not had any such problems with the IDG500 gyro reading it with an MCP3208 ADC. The IDG500 breakout board only has a 140hz low-pass hardware filter and I am sampling it at over 10khz. I downsample to 500hz and use a digital low-pass filter in the code to smooth it.
mechG
 
Posts: 35
Joined: Tue Jan 05, 2010 8:27 pm

Re: Warning to users of LPR530AL and LPY530AL gyro modules

Postby sebmadgwick » Mon May 17, 2010 9:45 am

Alex1101, I would suggest that your observed drop in voltage is nothing to do with the device, rather an effect of the specific circuit it is connected to. These gyros are analogue devices that output a voltage dependant on the angular rate. You can sample it once every nanosecond or once every 3 years, it will not affect the sensor’s output.

However, your microcontroller (I assume that is what you are using) will consume more current when you work it harder. Therefore, as you increase your sampling rate you will demand more current from your power supply, and if the power supply is unable to meet these current demands (within a small time scale) then you supply voltage will drop. If the sensor shares the same supply, then its output will also drop. Worse still (!!) if your ADC reference voltage is your power supply, then the ADC will be comparing all measured signals to an invalid reference.

The solution is to handle noise in your circuit. Make sure your ADC reference voltage and sensor’s power supply are clean and stable. Always have 100nF and 10-100uF caps as close as possible to each device’s VDD and GND pins; and perhaps decouple the VDD rail with some series inductance.

I’ve attached a circuit showing the simple power supply filtering on a circuit I’m putting together. 3V3 powers the PIC, A3V3 powers the sensors, PICA3V3 powers PIC ADC and is Vref. Each device (sensor, PIC, ADC_Vref) also has extra caps (not shown) as close to their VDD and GND pins as possible. Note: inductors have a resistance (therefore voltage drop with current), so make sure you consider your transient currents in the post inductance circuitry if using an inductor with a large resistance.
Attachments
examplePowerSupplyFiltering.png
examplePowerSupplyFiltering.png (12.38 KiB) Viewed 8726 times
sebmadgwick
 
Posts: 254
Joined: Wed Oct 17, 2007 12:17 am

Next

Return to SparkFun Product Questions

Who is online

Users browsing this forum: Bing [Bot] and 7 guests