View Full Version : Ask about intergration
As we know, if we intergrate the angular rate we'll get the angular. That's why we can use MEMS gyro to measure angular. I'm now using ADXRS150 gyro. But I don't what intergration hardware (what chip or processor) can do this (intergral). Can any one tell me a bit detail about this plz!
Meandmyself
13-03-2005, 23:56
As we know, if we intergrate the angular rate we'll get the angular. That's why we can use MEMS gyro to measure angular. I'm now using ADXRS150 gyro. But I don't what intergration hardware (what chip or processor) can do this (intergral). Can any one tell me a bit detail about this plz!
Kevin Watson has code to do just this on his website www.kevin.org/frc (http://www.kevin.org/frc)
you just need gyro.c and gyro.h from his navigation software. It will work with the 150.
hint:use kevin's code. I tried to use the 150 last year to get a heading, but it didn't work very well. Kevin's stuff is a lot easier.
As I understand what's going on in Keven's code it's like this. The process takes over the A/D, and at regular (that's the key) intervals reads the gyro chip and adds or subtracts from an accumulator. From there you can get heading. This may be a large over simplification and is a I understand the process, Kevin really has the skinny on how it works. I suggest you read his read me, notes on the process.
eugenebrooks
15-03-2005, 23:09
As we know, if we intergrate the angular rate we'll get the angular. That's why we can use MEMS gyro to measure angular. I'm now using ADXRS150 gyro. But I don't what intergration hardware (what chip or processor) can do this (intergral). Can any one tell me a bit detail about this plz!
See Section 16 of "An Introduction to C Programming for FIRST Robotics" that provides code snippets, a full discussion, and how to tune out some of the quantization error. The current version can be obtained at:
www.srvhsrobotics.org ->
Articles ->
Technical Documents ->
C Programming for the Robot Controller
Have fun. Done forget to read the gyro at startup to set the "old"
value, or you will have a bogus value for the integral on startup.
Meandmyself
16-03-2005, 13:51
As I understand what's going on in Keven's code it's like this. The process takes over the A/D, and at regular (that's the key) intervals reads the gyro chip and adds or subtracts from an accumulator. From there you can get heading. This may be a large over simplification and is a I understand the process, Kevin really has the skinny on how it works. I suggest you read his read me, notes on the process.
it's not really an oversimplification, it's actually one of the best approximations you can get. He does a midpoint approximation of the actual integral by averaging the current and last values, then multiplying by the change in time and adding it to the accumulator. You learn to do this in any basic calculus class.
I have now gyro.c and gyro.h (and all navigation.zip too!) but can you tell me what software and hardware I have to take to make it work?
All I have now: ADXRS150, uC: ATMEGA8535 with 10bit ADC, superior loader to load program into uC. I also have a software which I wrote in Turbo C and it can receive data from ADXRS150 gyro through ADC of uC. It can measure voltage by software very exactly but when I change to angular it not exactly:
real 10 degree but value in software only :9.89
real 20 degree but value in software only :14.5
real 30 degree but value in software only :20.3
May be it cause of intergration in my software. I didn't measure the interval between a sample and the next exactly.
So I want to try another method as Kevin use here.
And again, I want to know what software, hardware I need to have and what to do next?
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.