Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: richiereynolds on April 26, 2010, 04:16:13 PM
-
Hello, was having a look at these gyros (and the sparkfun 5 dof product where they've integrated an accelerometer on the same board).
I think I (at leasy vaguely) understand the purpose of the VREF pin, i.e. to "zero" the output to that voltage when it's in a known state, but does it matter exactly what voltage is? from looking at the datasheet it looks like I should supply +1.35V to this pin, is there a particular reason for that voltage? Does it make the ADC easier maybe?
And, should I supply voltage to this pin constantly? Or only when I want to zero the output?
Or, have I got this completely wrong and the vref is an output pin that's the reference zero value?
Thanks!
-
Does it make the ADC easier maybe?
VRef is a pin that ADC uses as a comparison. Say you supply 2.5V to a pin for input, and you supply 5V to the VRef pin. You run ADC on the input pin. The ADC takes the 2.5 from the input pin, compares it to the 5V you had at Vref, and gives you a value of 128 (assuming you did an 8 bit ADC). Since 255 is the max value for an 8 bit conversion, and since the voltage at the input pin was half of the voltage at Vref, the ADC's result is half of the max. Now if you supplied 2.5V to the input pin and Vref, the ADC would give you a value of 255, because when comparing the two, the voltage at the input pin was the same as voltage supplied at the reference pin, therefore you get the highest value.
I haven't looked at the thing you said you were looking at (cause I was too lazy to search for it), but I'm assuming you'd want to supply that voltage constantly. The ADC can run a couple of different ways. It can get it's reference voltage from Vref, or it can get it from AVcc, or it can use an internal reference of 2.56V (for the AtMega8 at least). Does that clear things up?
EDIT: Oh and if it says you should supply +1.35V, I'm guessing that's because the sensors it uses produces voltages between 0 and +1.35, depending on the sensor's state.
EDIT2: Did you perhaps type the name in wrong. I only found IDG500 dual axis gyros at sparkfun...
-
Hi,
[...] from looking at the datasheet it looks like I should supply +1.35V to this pin, is there a particular reason for that voltage? Does it make the ADC easier maybe?
And, should I supply voltage to this pin constantly? Or only when I want to zero the output?
Or, have I got this completely wrong and the vref is an output pin that's the reference zero value?
Yes, you have got it wrong. It's an output pin and the 1.35V is such to be equal to the zero rate output (as a reference for whatever controller you hang onto it).
-
Thanks, I did indeed, it is the IDG500 I was looking at.
Found a few more sites referring to similar models e.g. the IDG300 and some of them seem to be inferring (though nothing's said it outright) that this is actually an output pin on this device. If they're correct, then I guess this is a reference value to base the actual x and y tilt output voltages against.
e.g. this one http://blogs.sun.com/davidgs/entry/mems_gyro (http://blogs.sun.com/davidgs/entry/mems_gyro) doesn't connect the vref pin for his experiments. Slightly confused!
-
Hm, I was talking about the Vref on a MCU... oops!
-
Thanks for all the info guys, think I've got it now!