Thursday, August 29, 2013

Yes, yes I do need more flying things.

My fleet of flying things has grown quite a bit over the last few months, and I'm not just referring to Kerbal ships. First off, a little pocket quad!


This is the HobbyKing Pocket Quad, a tiny < 30g single-PCB quadrotor that comes ready to bind to a Spektrum transmitter. (Well, first you had to glue the motors in place with hot glue, and then discover that the entire craft vibrates like crazy unless you glue them much lower in the booms than the product images indicate.) The newer model (v1.1) comes with plastic motor mounts, which is nice. And it really is a pocket quad, no joking:

Well, maybe time for cargo pants...
Having built a single-PCB miniature quadrotor, I know how tough they are to make stable compared to their big counterparts. The propeller slew rates and sensor bandwidth required to keep up with the fast mechanical time constant of a miniature/micro quad are hard to achieve even in a completely rigid system. Throw in nasty mechanical resonance excited by high RPM motors and you get a controls nightmare.

This quad is so small that I feel like quantum mechanics might be coming in to play as well. The heart of the control system is a MultiWii-compatible sensor suite (MPU-6050 flavor) and ATmega32u4. So, you can tune it using the MultiWii GUI which is well known and easy to use. It has directly-controlled brushed motors, so there's no problem of slow brushless ESCs to deal with.

And, oh yes, important point: it does fly.
Out of the box (actually, it came in a static bag), it's not quite as graceful as a Walkera Ladybird. But that could be mostly due to the less-than-ideal motor mounting in the v1.0 frame that I got. Or it could be that it requires a bit of MultiWii fine-tuning. Since I recall one of the very first almost unbelievably stable nano quadrotors was based on MultiWii, I'm not surprised this one is also pretty easy to fly.

Speaking of MultiWii, I still have one laying around that I used to write some dirt-simple attitude estimation code. The ultimate goal is to create a flight controller out of less than 500 lines of code .(It's Arduino C code, so the 500 line limit assumes some libraries to take care of low-level things like I2C reading.) The point isn't to improve on the MultiWii control code, just to strip down quadrotor flight control to its absolute simplest functional form. Something to bridge the gap between control theory and actual, readable C code that people can understand without digging through abstracted libraries.

Anyway, such a project, if it does pan out, will require a new airframe. Actually, that's a complete lie and I just wanted a new airframe.


This is a size I have yet to play with - an F330. (Thanks for the frame, DGonz.) It's a good bit smaller than the Talon, which is probably a good thing for testing a completely custom flight controller. I have a hunch that it's actually a really good size for a GoPro-carrying quad...if you can work out the vibration isolation problem that plagues small GoPro quads. Anyway, even if it proves useless for GoProing, it will make a nice test frame that is essentially free.

The motors are Turnigy Air L2210C-1200's, also from HobbyKing. On one hand, they are well-built, have extremely low cogging, and good Kv/resistance combination for their size. On the other hand, they suffer from the axial play issue that makes small outrunners awful. (The rotor can is not axially preloaded, so it loosens slightly and then makes a ratcheting noise as it moves due to magnetic forces.) 

And on the third hand that you didn't even know you have, the prop adapters are terrible. They are extremely tall, which makes them almost useless for quads for the same reason that gluing the motors in the Pocket Quad as they are pictured in the product image is awful. Having the props so far away from the boom is a recipe for vibration, since any imbalance now has a huge moment arm for twisting the boom. I have attempted to modify them as much as possible to get the props down closer to the booms, but it might be hopeless. Maybe time to try out some different options.

One thing that was very helpful on this build was the 4-way XT60 to 3.5mm bullet splitter.
For ESCs, I used the same FFv1.2s's that have served me well on the Talon for quite a while now. They're a little big for this size frame, but I managed to fit them in sideways in a way that doesn't seem too inefficient.

And some lighting.
And until I create my mythical sub-500 line flight controller, it'll use a KK2 running the latest firmware (v1.6), which is pretty solid. Blah blah Stability blah GPS blah...it's less than $30, it has an LCD on board for tuning, it reliably arms and disarms on command, and I thoroughly understand the control code at work inside of it (because I can go read it myself), which makes me actually trust it. Maybe to people who treat every flight controller as a magic black box the perception of value and reliability is very different...

Oh, I forgot one other important reason why I wanted an F330: It fits in a backpack. This had only hypothetical benefit to me until the day after I completed this quad and went on my very first West-coast hiking trip with high-mountain-and-high-voltage-loving Tyler, as well as some other timezone-shifted MIT people. We went on a "tame" (Tyler's definition, not mine) hike up to Pratt Lake. I asked if there would be some flat, open area around the lake from which to take off and land.

"Yes."
I did find one rock with a flat enough top to take off and land from on the 30ยบ rock slope. The picture above is actually from the quad's GoPro just before returning to my little landing pad rock. Unfortunately the video itself is not very pretty at this point due to the wonderful world of CMOS and vibrations. But the stills were worth the quick test flight.

A view of the lake from about 75-100ft up. Yes, I could have simple climbed back up the rock slope to get virtually the same picture. But dammit this is the future and there must be flying robots involved.
Spying on the rest of wilderness-MITERS (label stolen from Amy) from behind a tree.
So the next step for the F330 project is to travel down the wonderful road of vibration minimization and isolation. Precision propeller balancing, custom prop adapter turning, motor replacement, motor balancing, and silicone/memory foam padding are all stops I might visit along this path. Finding the magic combination to mechanically filter the prop vibrations (~50-100Hz in this case) is an annoying but straightforward task. In addition to making the video more tolerable, it will reduce gyro noise at that frequency, which should simplify the control task a lot.

There's one last new addition to the fleet. This one is also small and from HobbyKing, but it only has one rotor (gasp).

Well, two rotors actually.
It's a Turnigy FBL100, HobbyKing's counterpart to the Blade mCP X. These are nano-scale flybarless helicopters, which are such a giant leap from the counter-rotating-blade mall toys from not that long ago that I had to have one. I've never flown a collective-pitch RC helicopter before, so I figured this would be a good way to start learning. The trick is is that the blade pitch can be negative, meaning you can fly inverted and do other crazy RC helicopter things. And by "you" I mean not me. 

But it was easy enough out of the box for me to simply hover. It has active 3-axis electronic stabilization (in lieu of a flybar) using three very tiny and very cool linear servos controlling a CCPM swash plate, as well as a feedback-controlled tail rotor. That used to be a lot of controls to fit in a tiny package, but not anymore, this is the future. I do wish I could tweak the controls and the pitch/throttle curves. (You can do the latter, if you buy the transmitter module for use with your own radio instead of using the stock included transmitter.) But even with just stock setup it's fun.

And then you add a strobe light and it becomes 10x more fun (and ~3x more difficult to fly):