Saturday, December 8, 2012

The Quadrotor Itch Strikes Again!

I was inspired by Shane zipping his small quadrotor across the office, and decided I wanted to make another, smaller quadrotor that I could fly indoors (unlike my other giant one). I wasn't too eager to cough up the relatively large sum of money that I threw down on Derpcopter (if I remember right it totaled something in the neighborhood of $800), so I designed one with cheap hobby parts that I could get for a lot less.

I decided that I wanted to 3D print the main body components so that they'd be relatively lightweight, and it would also let me do non-2D geometries (as much as I love laser cutters and waterjets, I think I eventually get sick of being stuck in 2D). I based the design on 6mm carbon fiber squaretube, since it's very lightweight but still plenty strong enough for a small quadrotor. I also wanted to try out the relatively new KK2 flight control board, so I designed my body specifically to accommodate it (3mm holes spaced on a 45mm square).

I added slots for a velcro strap on the bottom side, to hold the battery. The holes for the control board also retain the squaretube arms, which fit into the square slots on the corners. I also split the model in half across the horizontal mid plane, in order to make it much easier to 3D print.

I wanted to get a head start on picking out components to I order them from China, because shipping takes forever. Here are some links to the major components:

I decided to use the same radio transmitter that I already had for Derpcopter, there wasn't really any reason for me to buy another one. I also picked out substantially bigger ESCs than I needed, really the motors could run on ESCs half that size, but I was considering that I might want to bump up the motor size later, which I can with large ESCs.

I went ahead and ordered two sets of parts (one for me, one for a friend), then worked on the design (and my scooter!) for a few weeks while I waited for them to come. Now that I knew which motors I'd be getting, I went ahead and designed mounts for them which also serve as feet for the copter.

I also wanted a sort of dome structure on the top of the body, which would serve both to protect the control board and mount the radio receiver (mostly just make the quadrotor look more legit, though). I didn't have a very concrete idea of what I wanted the design to look like, though, so I just sketched out a few different designs until I came up with one that I liked.

I ended up going with the third design (the one on the bottom) because it looked the simplest/sturdiest, as well as the easiest of the three to print. Again notice the velcro strap slots for the radio receiver.

I went ahead and printed out the frame parts while I waited on my electronics to arrive.

Yay printers!
There wasn't much else I could do on the copter front, so I spent a couple weeks focusing on school and other projects. I was pretty excited when the giant shipping package of Hobbyking parts came in, so I laid everything out and took a picture:

I included my old radio transmitter for completeness, the orange and black one you see is the one my friend got for his quadrotor. Also, notice the extra props: I've learned a bit of a lesson there. New quadrotor = broken props, so buy extra.

I began by cutting my 75cm carbon fiber tube into 4 17cm sections. I also took rather meticulous photos of this whole build, because I'm planning on writing a quadrotor Instructable. Oh, and there happened to be a lightbox sitting at MITERS, the owners of which kindly decided to let me use it to take some pictures of quadrotor parts.

I think you're supposed to wear a mask when you do this? Not much dust came up though. I think I held my breath.
Cut arms:

Ooh, fancy.
The bandsaw didn't make perfect cuts on the CF, but it really doesn't matter for how they're being used (the faces don't need to be perfectly rectangular). Plus, I didn't really feel like sanding it down and throwing dust everywhere.

I arranged the arms and base together so that I could drill out the holes in the arms.

Sorry it's a little hard to distinguish the white base from the white background, this is why I'm an engineer and not a photographer
This was just faster than measuring out and drilling holes for the arms separately, and it works just as well.

I then did essentially the same thing with the motor mounts, except I taped around them a bit to help hold them in place on the arm.

That done, my basic frame was complete!

This one didn't quite fit in the lightbox :(
With the frame ready, it was time to work on electronics. Primarily I just had to solder lots of bullet connectors so that I could hook everything together. Oh, and I also got my battery started charging so I'd have it ready by the time I finished everything else. I took a whole lot of pictures of the process for soldering bullet connectors, because I remember they were very confusing to me the first time I had to use them (on Derpcopter). I'll be putting a full detailed guide to doing this on the Instructable, but for now I'll save you having to scroll through 20 pictures and just show you the result:

So pretty!
There are all four motors and ESCs, all soldered up and ready to go (only 32 bullet connectors between them).

Next, I discovered my first major mistake: I'd assumed that the motors used the same 3mm screw size as the control board, but actually the holes are for 2mm screws. Oh well, I didn't have the patience to do this the 'right' way and buy some screws from Amazon, so I just removed the motor mounts and drilled the holes out to 3mm.

These are annoying to fixture properly and the alloy is so soft that I just decided to beast it with vice grips.
I screwed on the control board and the power distribution board, and then started mounting the motors.

It's starting to look pretty quadrotor-y!
ESCs all wired up:

And a final picture of the finished copter, with battery, radio, and propellers attached:

I zip-tied the ESCs to the arms to clean up the wiring and prevent them from just swinging around in flight. You'll notice that the dome I designed isn't attached in this picture, this is due to the fact that I underestimated the thickness of the power distribution board when I was buying screws. The body screws I got are too short to go through everything and mount the dome, so currently I'm waiting on new screws ordered through Amazon in order to complete the body. Regardless, it's fully capable of flying without the dome, the purpose is mostly aesthetic. I did fly it for a minute or so around when I took that last picture, but it was 5am at that point and the copter was very difficult to control (due to the default PI gains of the flight control being set way too high, causing it to oscillate around whatever desired position I gave it), so I decided to call it a night.

The next day I worked out the PI (if you're not sure what this means, I recommend reading up on PID control on Wikipedia. Copters typically don't have need for the D component because it's highly affected by noise in the sensors, and it slows the system response which isn't very desirable) settings to get a much more stable copter, and came up with a name: I dubbed it the Blitzcopter, owing to how I'd completed the entire construction over the course of one manic night.

Okay, I'm not going to leave you waiting for the video any longer than that, so here it is:

Yay! The reason it's flying so loud is that I haven't yet gotten a chance to balance the propellers, which entails adding little bits of mass (i.e. tape) to the blades in order to move the center of mass of the propeller onto the rotational axis, greatly reducing the vibration of the motors.

I've also taken a couple of hard landings and snapped some of the printed motor mounts due to the impact, for now I've super-glued them back together but I'm going to be designing new sturdier mounts won't break as easily.

Monday, December 3, 2012

Big update part 2 of 2: Finally!!

Well, it's certainly been an adventure, but I'm pleased to announce that I actually have a finished fully custom scooter frame! I'll save you some anticipation and just give you a look at the final product first:


There it is, in all its water-jetted aluminum glory. No Gorilla tape this time, I swear!

Alright, now let's dive into the juicy build report:

I started off blocking out a general shape I wanted the deck to end up looking like, using rough dimensions from my battery pack and how big I estimated a scooter should be. I wanted a slight natural curve for the deck, so I made a few splines and then tweaked them until I liked how they looked. I also disassembled my stock scooter to take measurements of the plate to fasten the front fork. This is about where I was as of my last post, part 1 of the mega scooter build series. After I had a basic shape I was happy with, I fiddled around with the orientation of the battery pack by CADing it up and spinning it around. I decided I liked the vertical orientation best because it actually minimizes the height of the scooter (which is important, considering how tall it has to be to accommodate the battery at all), at the expense of widening it a bit. I also played around with the spacing of the motor controller until I had something that was about as closely-packed as it could get.

I decided to primarily build the scooter out of 1/8" aluminum rather than 1/4" to minimize its weight, and building the entire thing out of 1/4" would probably make it a lot stronger than it actually needs to be. However, this requires some additional design considerations because 1/8" is too thin to just drive screws into its end. I ended up going with three different fastening schemes across my scooter, because each made the most sense in its own area of application. Here you can see all three schemes I used in one shot:

So, why the three different fastening methods?

I didn't want to be riding around in a pure right-angled box, so I wanted the front to have a somewhat visually interesting look, resulting in the angled nose design. The problem, however, is that traditional waterjet T-nut corner blocks are inherently 2D extrusions, which wouldn't be able to hold the separate front plates together. I decided to instead waterjet the top profile of the corner supports, and then post-machine and tap holes on the front (angled) faces.

In the middle of the body, I had a long stretch of top deck I needed to link to the sides, but I was extremely constrained by the width of the battery (I wanted to build the smallest frame I could). I decided to place 2D T-nut blocks on the outside of my side plates, sticking up into the top deck, so that they didn't take up space in the interior.

For the back, however, I had some space to spare because the motor controller has a smaller cross-section than the battery. I was able to fit in some angle brackets to hold the whole body together in the rear.

Here's a shot where you can see how the basic body all came together, this is just really an extension of the previous picture:

And another shot with transparent walls so you can see the insides:

Somewhere around here I realized that I'd probably want a brake eventually, so I just added a mount for a brake shaft to the sides near the rear wheel:

I was pretty impatient to start on the body itself, so I decided to finish the brake later and go ahead with cutting the parts for the frame.

Yaay, the magic of the metalprinter!
I decided that the easiest way to place the holes in the front end of the front plates (remember, the ones I said I'd have to post-machine) would be to just clamp the whole front assembly together and drill the holes by hand using the holes the waterjet cut from the front plates as guides.

I also went ahead and just attacked everything with a countersink, I decided it was worth the effort to use flat-head screws and not leave pan-heads sticking out of every surface on my scooter.

Here you can see the front assembly mostly complete:

I also made a slight design error and placed the nuts holding the front fork mount a little too close to the front corner blocks, so I had to bandsaw away some material to allow the nuts to clear the corner block.

Next there was a lot of tedious counter-sinking and tapping, but I was able to put most of the body together and it ended up looking pretty nice:

I had really wanted to finish this scooter for Maker Faire New York, but I was still lacking a front fork and some basic necessary components. Some attempts involved hand-drill and hacksaw insanity with my original front fork, as well as trying to fuse my scooter body with Shane's:

I didn't quite manage to get either method working, so I decided to just enjoy the fair for a while and let my scooter sit until I got home and had access to a real shop.

When I got back to Boston I started working on a brake and handlebars. I wanted a small-profile brake that would spring back, so I designed a little aluminum brake with a slot in it for a leaf spring:

I then cut it out and put it together.

And mounted it on the back of the frame.

I also noticed that I had made a small design error on my hub motor: the nylon nuts were on the same side that the wires exited, causing them to clip the wires a bit and shred off some of the insulation.

I just put some additional heatshrink over the parts that were ripped up, and backed out and reversed all of the screws holding the motor together.

I had to extend my original front fork because the much thicker deck required a lot more ground clearance. I also had a bit of a problem because the original scooter's fork is made of welded sheet steel in geometries that are really hard to fasten to. Originally I'd intended to just drill holes in the steel, build an aluminum cage around it with bolts going all the way through both sides. I had also put a couple of haphazard hand-drilled holes through the original during Maker Faire, which made things a bit trickier.

I ended up not completely compensating for the bends in the original fork, so it refused to quite fit into its intended slot. I ended up just throwing the whole aluminum cage in the mill and attacking the corners with a giant endmill. The original fork took quite a lot of coercion (of the hammering variety) until it would fit in the cage, at which point the holes were no longer in alignment. I decided that due to how solidly it was pressed in and because it's only ever really getting loaded downward, I would just leave it sans through-bolts.

I added a throttle to my original handlebars, then some wiring and loctite, and it was done! The battery, motor controller, and motor were all identical to the previous iteration, so it handled about the same as the sketchy Johnscooter conversion, but it certainly felt better not having the battery just taped onto the deck.

Hopefully I can post a video of it cruising soon.

I've also spent the last month starting two new major projects, so I'll have posts for those written up shortly!