Archive for the ‘Flying’ Category

Dual axis gyro = fun

Saturday, November 4th, 2006

So I’m sure your average person would think I’m nuts, but I’m like a kid at Christmas when I open a box to find little electronic bits have arrived.  Today it was a dual-axis gyro sensor from SparkFun.  They sell all kinds of electronic gizmos, including this one, suggested to me by a guy at Overview Technologies.  They built a 4-prop camera platform and stabilized it with off-the-shelf R/C gyros, which work, but they’re not ideally suited for this kind of thing.  He said they were experimenting with this board from SparkFun, which has two gyros on it, and a bunch of pinouts to plug it directly into a PIC chip’s analog to digital converter.

It’s also really small.

They display it on the site next to a quarter, but it’s enlarged in the picture and I didn’t really register how small it was until I pulled it out of the package.  It’s just shy of a 3/4″ square.  The actual chip that’s doing all the work is about a ninth of that, but I’m not really comfortable with surface mount stuff, so the little board is perfect.

Tonight I wired up the gyro board and all the servo jacks on a small project board.  I can display the gyro values on the LEDs, so it appears to work.

My motors, speed controls, and counter-rotating propellers should all be here monday (Tues at the latest) so I’m chomping at the bit to get started with the meat of the project.

Whee.

Bizarre Flying Machine

Saturday, November 4th, 2006

Recently, I bought an Expansion Pack for RealFlight G3 (see Learning to Fly).  It contained a lot of cardboard along with a couple new flying fields, and some aircraft.  Included among them was a Bizarre Flying Machine called the ‘Wolf Spyder’.  It has four propellers that move, and flies a bit like a harrier.  They posted some pictures of it here.

It’s a blast to fly, but it doesn’t exist in real life.  It deserves to though, so I’m going to try to build it.

Since the thing needs 4 motors, each on their own servo, plus normal flight surfaces (2 ailerons, 2 elevators, and a rudder) I need a total of 13 control channels; 14 if I want retractable landing gear. The only radio I know of that would handle that is a Futaba 14MZ, but they’re about $2100.

The other complication is that the thing needs at least two gyroscopes for hovering stability to compensate for motor differences, and possibly a third for yaw control. They have to be on-board, and mixed into the other inputs. Since the pitch / roll gyros each affect all four motors, the mixing required is more complex than a typical R/C craft.

Technically speaking, the thing takes the same inputs as a normal R/C plane, with one extra value for motor pod direction. That means I’d need to send it 5 signals (6, including landing gear) to control it. If I could program an on-board computer to read the signals, read the gyros, then produce all the outputs, I’d be in business.

That’s where microcontrollers come in. Also called PICs (Programmable IC’s), these little chips are like the CPU of a computer, but they have on board memory, input and output ports, and a bunch of other stuff that make them pretty much stand-alone. You program them from a computer, and when powered up, they run your code. They’re quite cheap (~$4) and come in a ton of flavors to suit various needs.

Three weeks ago, that was more than I knew about them. I knew they existed, but didn’t know much more. I started surfing, and talked to a couple friends who’ve worked with these things in the past, and eventually bought a starter kit from a company called MicroChip. The kit (PICKit 2 Debug Express) comes with a development environment (lets you author and test code), a programmer (puts the code from the PC onto the chip), and a ‘demo board’. The demo board has a mid-range chip on it, along with a bunch of lights, a button, a knob, and some extra space for mounting your own stuff.

The whole kit cost me about $80, and I’ve already got it moving servos and listening to my R/C transmitter (DivX AVI).

Now that I know more about it, I wish it was a little faster and did 16 bit math - 8 bits of precision is a little lower than I’d like, but I worry if I go higher, the extra time spent getting an 8-bit chip to do 16-bit math will leave me little time for the rest of my code. Time will tell - I’m going to stick with this one for now and see how far it takes me. Every time I read the manual I discover something else I didn’t know it could do, and the fact that it’s a very simple chip means it’s very quick to learn on.

More as it happens…