SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Bob Anderson
#85854
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.
By sebmadgwick
#86945
Thanks for this info, this is of interest to a discussion we are having at: 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
By Bob Anderson
#86949
sebmadgwick wrote:Thanks for this info, this is of interest to a discussion we are having at: 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.
By sebmadgwick
#87085
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.
By bbq
#88374
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
By Alex1101
#88836
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
By mechG
#88999
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
By sebmadgwick
#89058
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.
By Alex1101
#89067
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.
By Funkysnail2000
#101075
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]
You do not have the required permissions to view the files attached to this post.
By sebmadgwick
#101107
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:
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.
By Alex1101
#101128
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.
#101129
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.
By sebmadgwick
#101130
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.
You do not have the required permissions to view the files attached to this post.