Posted by Jason Dorie on December 5, 2011 at 5:04pm
Here's a look at the latest iteration of my Parallax Propeller based quadrotor. The current implementation uses an ITG-3200 3-axis gyro as the only stabilization sensor.
No method whatsoever - I think I originally used them intending the board to be mounted lengthwise and then ended up mounting it width-wise, so I just altered the code accordingly. Call my method "random chance". :)
Cool - I'd love to see someone else doing this that I could bounce ideas off of. There are a number of others on the Parallax forums who are working toward this, but I think I'm the furthest along. Keep me posted on your progress.
The PASM code does read the accelerometer, but the data isn't actually used for anything yet, so you don't need one connected. (I use the same PASM driver for a DCM version that I'm working on).
The ITG read/write values are correct. My SparkFun breakout was set to use the alternate I2C address (0x69). You send the 7 address bits followed by a single bit to indicate read or write. I just baked them all together to save instructions: (0x69 x 2) | 0 = read (0xD2), (0x69 x 2) | 1 = write (0xD3). The data sheet has it written as b110100X, where X is the I2C selection register - on the Sparkfun board that's 1, so b1101001 (0x69). If you miss the fact that there's a user-configurable bit there, it looks like it should be 0x34. Hopefully I've explained that well enough. This site apparently doesn't like to display greater/less than symbols - I had to change them to "x 2".
Thomas - There isn't one, sorry. The components are a single ITG-3200 breakout board from SparkFun, a pair of 4.7k resistors for the pullups, 4 x 10K resistors to connect the receiver, and a Propeller Protoboard.
I have the receiver connected to pins P0 to P3 through the 10K resistors. The motor controllers are connected to pins P8 - P11, and the SDA and SCL lines of the gyro breakout are on pins P16 and P17. The gyro breakout has empty spots for surface-mount pullup resistors, so I added them there. That's the whole thing, aside from power & ground connections to the receiver, ESCs, and gyro breakout. The ESCs & receiver connect to 5V on the board, and the gyro breakout connects to 3.3v.
The primary flight loop and PID code is written in SPIN. All the sensor, motor, and R/C interfacing is done in assembly. The code is available in this post:
I haven't decided if I'm going to keep it open or not, but I probably will. I'm mostly doing this for my own enjoyment. The Propeller is a great platform for this kind of thing. Not having to code interrupts makes a lot of things much simpler than they'd be otherwise.
Comments
No method whatsoever - I think I originally used them intending the board to be mounted lengthwise and then ended up mounting it width-wise, so I just altered the code accordingly. Call my method "random chance". :)
Cool - I'd love to see someone else doing this that I could bounce ideas off of. There are a number of others on the Parallax forums who are working toward this, but I think I'm the furthest along. Keep me posted on your progress.
The PASM code does read the accelerometer, but the data isn't actually used for anything yet, so you don't need one connected. (I use the same PASM driver for a DCM version that I'm working on).
The ITG read/write values are correct. My SparkFun breakout was set to use the alternate I2C address (0x69). You send the 7 address bits followed by a single bit to indicate read or write. I just baked them all together to save instructions: (0x69 x 2) | 0 = read (0xD2), (0x69 x 2) | 1 = write (0xD3). The data sheet has it written as b110100X, where X is the I2C selection register - on the Sparkfun board that's 1, so b1101001 (0x69). If you miss the fact that there's a user-configurable bit there, it looks like it should be 0x34. Hopefully I've explained that well enough. This site apparently doesn't like to display greater/less than symbols - I had to change them to "x 2".
Thomas - There isn't one, sorry. The components are a single ITG-3200 breakout board from SparkFun, a pair of 4.7k resistors for the pullups, 4 x 10K resistors to connect the receiver, and a Propeller Protoboard.
I have the receiver connected to pins P0 to P3 through the 10K resistors. The motor controllers are connected to pins P8 - P11, and the SDA and SCL lines of the gyro breakout are on pins P16 and P17. The gyro breakout has empty spots for surface-mount pullup resistors, so I added them there. That's the whole thing, aside from power & ground connections to the receiver, ESCs, and gyro breakout. The ESCs & receiver connect to 5V on the board, and the gyro breakout connects to 3.3v.
Nice work Jason and compliments to the camera-lady, it was a pleasure to see a quad always in frame
and not bouncing up and down like a yo-yo.
The primary flight loop and PID code is written in SPIN. All the sensor, motor, and R/C interfacing is done in assembly. The code is available in this post:
http://forums.parallax.com/showthread.php?133372-Ken-Cluso99-W9GFO-...
I haven't decided if I'm going to keep it open or not, but I probably will. I'm mostly doing this for my own enjoyment. The Propeller is a great platform for this kind of thing. Not having to code interrupts makes a lot of things much simpler than they'd be otherwise.