SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Alex1101
#101131
Sebmadgwick, thank you for the suggestion! However I do not think that this is the case - I power my board from the 7.4 V LiPo battery through the 1 Amp voltage regulator with a lot of filtering capacitors on the power supply lines and right next to the MCU. The problem does not manifest itself when I take signal from the amplified outputs - if you would be correct regarding the overall drop in voltage (and I do use use the Vcc as my reference voltage), then this drop would be noticeable when I use either the amplified or direct output from Gyros, but it happens only with the direct output.

Moreover, if I take the 6 DOF Razor IMU out of my board and just by itself connect it to the power supply on my work table and use digital voltmeter to measure pins' output I see that the output voltage rapidly drops on non-amplified gyro pins, while it is steady as a rock on the amplified ones. If you have this IMU handy I would greatly appreciate if you do the voltmeter test just to confirm that this is either the problem with the IMU design or just the issue with the one that I have.

Thank you.
By UhClem
#101134
sebmadgwick wrote: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.
There is a low pass RC filter on the sensor output using a 33K resistor with a 100nF capacitor. The 33K is well above the typical range of acceptable source resistance for ADC inputs and would usually result in sampling error because the internal sampling capacitor would not charge to the input voltage during the sampling time.

But that 100nF capacitor helps out only if the sampling rate is low. Each time the sensor is sampled a little bit of charge is drawn off the 100nF cap to charge the sample and hold cap. The internal cap is small enough that this charge redistribution results in a change in the voltage on the 100nF cap of less than 1/2LSB. But if you sample too frequently those little bits add up and the current through the 33K resistor cannot compensate.
By Alex1101
#101139
David, a very good point!

I "scan" all 6 output pins (3 gyro and 3 acc) sequentially, so each one of them gets a 'breather" to recharge the cap while I am sampling and converting other pins. I am using dsPIC33FJ128GP802 as my MCU, the ADC is configured for 12-bit single-channel operation. To compensate for the 33k resistor in the LP-filter I have increased the sampling time to the allowed maximum. All in all, I think I have compensated for this.

Moreover, LP-filter or not, it should not result is a rapid drop in measured voltage that i see when i measure gyro output with digital voltmeter!
Maybe something is wrong just with my sensor if nobody else can repeat this...

--Alex
By UhClem
#101167
Alex1101 wrote:David, a very good point!

I "scan" all 6 output pins (3 gyro and 3 acc) sequentially, so each one of them gets a 'breather" to recharge the cap while I am sampling and converting other pins. I am using dsPIC33FJ128GP802 as my MCU, the ADC is configured for 12-bit single-channel operation. To compensate for the 33k resistor in the LP-filter I have increased the sampling time to the allowed maximum. All in all, I think I have compensated for this.
I dug up the dsPIC data sheet and the recommended maximum analog source impedance is 200 Ohms although it doesn't explain the reasons for this limit. Since you are having problems in the configuration where you don't meet this specification and none when you use the buffer amp, this seems to be the most likely problem.
Moreover, LP-filter or not, it should not result is a rapid drop in measured voltage that i see when i measure gyro output with digital voltmeter!
DMMs have input circuits too. It should have a pretty high impedance but you never can tell.
By Alex1101
#101180
I dug up the dsPIC data sheet and the recommended maximum analog source impedance is 200 Ohms although it doesn't explain the reasons for this limit
I am not sure either, but I think the 200 Ohm requirement is applicable only to the case of the highest sampling/conversion speed.

DMMs have input circuits too. It should have a pretty high impedance but you never can tell.
I have estimated the impedance of my DMM measuring the speed of a discharge of a fully charged capacitor - a rather crude method, but it gave me an estimate of several MOhm - high enough not to overload an output circuit of th gyro. Thus I was asking somebody who has the Razor IMU to try to measure the voltage on the non-amplified gyro output just to eliminate the possibility that this is the issue just with my device.
By sebmadgwick
#101186
Thanks for that point David... I did not appreciate the sample&hold cap drawing any significant amount of current and so now I've just spent the last few hours incorporating voltage followers to a 32chan ADC system, instead of sending it off to the fab house. Now my eyes hurt.

Alex, I have a 6DOF Razor at my lab. What exactly do you want me to test for you (tomorrow)? btw. my HP filters are removed.
By UhClem
#101195
Alex1101 wrote: I have estimated the impedance of my DMM measuring the speed of a discharge of a fully charged capacitor - a rather crude method, but it gave me an estimate of several MOhm - high enough not to overload an output circuit of th gyro. Thus I was asking somebody who has the Razor IMU to try to measure the voltage on the non-amplified gyro output just to eliminate the possibility that this is the issue just with my device.
One other thing I just thought of. The unamplified output comes from a switched capacitor filter. This is just a fancy charge pump and the data sheet (I am looking at the lpr530al) does not indicate its output current capability. It could be very low. Try looking at the amplified output while you put a 1MOhm resistor load on the output of the LP filter.

The data sheet is pretty pathetic. I especially love "Typical specifications are not guaranteed" since most of the them list only a typical value with no minimum or maximum.
By SUDHEER87
#118606
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 donot know whether these values are correct are not??can anyone help me out..! The formula used is: Xdeg=((Vout-Vreference)*5000/1024)/(sensitivity) where vref=1.23 and sensitivity=0.67mv/deg/sec as suggested in datasheet. THANKS ALOT..!
connections:
Vcc--->3.3volts
GND---->gnd
ST,PD,HP-->gnd
1x---->not connected
4x---->analog pins of PIC16F877A
URGENT PLS..1
By sebmadgwick
#118883
SUDHEER87. The system you have described is confusing and your units are ambiguous. The gyro will potentially output a voltage between GND and VCC yet your VCC is 3.3V and your ADC Vref is 1.23 V.

I advice is:

1) Wire up the gyro as per the Sparkfun breakout board schematic (this works). Power it with 3.3V. Setup your PIC ADC as a single-ended input; i.e. 0 to 1024 = 0 V to Vref.

2) Use the gyro 3.3V as the ADC Vref. The conversion from (10-bit) ADC integer to voltage is now:
ADC_voltage = ADC_integer_value * (3.3V / 1024)

3) You now need to measure the gyro_bias_voltage. Write down the ADC_voltage while the gyro is stationary; e.g. 1.65V

4) The conversion from ADC_voltage to deg/s is:
deg/s = (ADC_voltage - gyro_bias_voltage) / gyro_sensitivity
deg/s = (ADC_voltage - gyro_bias_voltage) / 0.067V/deg/s

...assuming that your "sensitivity=0.67mv/deg/sec" is correct
By esklar81
#118953
sebmadgwick wrote:SUDHEER87. The system you have described is confusing and your units are ambiguous. The gyro will potentially output a voltage between GND and VCC yet your VCC is 3.3V and your ADC Vref is 1.23 V.
FYI:
The post to which you responded appears to be a duplicate of one to which I responded, in some depth, earlier today. As far as I can tell from the datasheet, 1.23 V is the output bias voltage, not the reference voltage for his ADC. I don't know from where he got his factor of (5000/1024), but it appears to be in error.

Eric
By SUDHEER87
#118968
esklar81 wrote:
sebmadgwick wrote:SUDHEER87. The system you have described is confusing and your units are ambiguous. The gyro will potentially output a voltage between GND and VCC yet your VCC is 3.3V and your ADC Vref is 1.23 V.
FYI:
The post to which you responded appears to be a duplicate of one to which I responded, in some depth, earlier today. As far as I can tell from the datasheet, 1.23 V is the output bias voltage, not the reference voltage for his ADC. I don't know from where he got his factor of (5000/1024), but it appears to be in error.

Eric
Yes thats true.Its the gyro bias Voffset.
And my equation is:(Voutput-Voffset)*(5/1024)/0.00067
Is this equation correct??
By SUDHEER87
#118971
sebmadgwick wrote:SUDHEER87. The system you have described is confusing and your units are ambiguous. The gyro will potentially output a voltage between GND and VCC yet your VCC is 3.3V and your ADC Vref is 1.23 V.

I advice is:

1) Wire up the gyro as per the Sparkfun breakout board schematic (this works). Power it with 3.3V. Setup your PIC ADC as a single-ended input; i.e. 0 to 1024 = 0 V to Vref.

2) Use the gyro 3.3V as the ADC Vref. The conversion from (10-bit) ADC integer to voltage is now:
ADC_voltage = ADC_integer_value * (3.3V / 1024)

3) You now need to measure the gyro_bias_voltage. Write down the ADC_voltage while the gyro is stationary; e.g. 1.65V

4) The conversion from ADC_voltage to deg/s is:
deg/s = (ADC_voltage - gyro_bias_voltage) / gyro_sensitivity
deg/s = (ADC_voltage - gyro_bias_voltage) / 0.067V/deg/s

...assuming that your "sensitivity=0.67mv/deg/sec" is correct
Thanks for the reply
my equation is:(Voutput-Voffset)*(5/1024)/0.00067V/deg/s and since the Voffset and Vreference are same(from datasheet) i replaced Voffset with Vref.Hence connected Vref of gyro to the PIC and reading the pin
Iam using internal 10bit-ADC of PIC16F877A.
since the supply voltage for the PIC is 5V i have used 5/1024.
Is this correct??
By SUDHEER87
#119274
esklar81 wrote:
sebmadgwick wrote:SUDHEER87. The system you have described is confusing and your units are ambiguous. The gyro will potentially output a voltage between GND and VCC yet your VCC is 3.3V and your ADC Vref is 1.23 V.
FYI:
The post to which you responded appears to be a duplicate of one to which I responded, in some depth, earlier today. As far as I can tell from the datasheet, 1.23 V is the output bias voltage, not the reference voltage for his ADC. I don't know from where he got his factor of (5000/1024), but it appears to be in error.

Eric
Iam giving 3Volts as the supply for the gyro.
Should i use ((Vout-Voffset)*5/1024)/sensitivity or ((Vout-Voffset)*3/1024)/sensitivity
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.
Is these values seems to be correct??
PLS help me out..!
By esklar81
#119275
SUDHEER87,

Please stop posting more than one copy of your question!

Pick a single forum and a single thread in that forum and use that.

Posting the same question more than once or in more than one place is far more likely to annoy people enough that they stop bothering to answer you than it is to get you faster answers.

TIA,
Eric
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]