Wednesday, February 23, 2011

Snow Scooter: 40 hours of work, 15 seconds of fame.

There's the 15 seconds of fame out of the way, now the 40 hours of work:

Last week, it was nearly 60ºF and the Cambridge permafrost and giant piles of snow all melted away. But they were pretty disgusting anyway, by this point. On Friday, I saw that there was a chance of a fresh coating of snow for Monday. And since I don't know what the rest of the spring will bring, I decided I might only have one chance to produce some marginally functional snow scooter. And as you can see from the video, it is exactly that: marginally functional. Or it was, for 15 seconds, until it sucked up a pebble and destroyed the left side motor. Here's how it all went down:

I finished the rear drive module a couple weeks ago, but because of me being an idiot issues with the front meta-bearing, the front drive module was left hanging. Also, the front drive module contains the Victor 883107-7 controller boxes, which needed to be water-resistant. I couldn't use t-nuts, so I had to drill and tap everything. To speed up this process, I marked all the holes in place through their matching clearance holes on other parts. Then, this:

It's actually not too bad when you have a depth setting and can just drill to a mark every time. Blind tapping sucks, but I recently invested in some nice new 4-40 plug and bottoming taps so I felt like I was putting them to good use. One problem is that, even without t-nuts, the tabs and slots still leave gaps, which are exaggerated by the taper of the waterjet. So despite everything, I still needed to seal the inside of the controller boxes with Goop to the best of my abilities:

To the controllers themselves, I added a 1/4" aluminum heat transfer plate to get heat off the bottom copper plane and into the scooter chassis, which is itself cooled by snow. In between the plate and the copper, a thin sheet of silicone thermal transfer pad provides electrical insulation while still conducting heat off the board. The board sits on 1/4" nylon standoffs (also for isolation). Here's the board in place:

I used 14AWG overcooked pasta wire from Hobby King, which turned out to be very necessary since I didn't leave much room at all for the power wiring to squeeze past the edge of the controller board. Only the absurd flexibility of this high-strand-count wire made it possible to get power to the bottom of the board. You can also see the motor wire exit strategy in that picture. Here's a closer look:

The wire runs down the body of the motor, between two of the metabearing bearings, and out of the pulley assembly through a pair of slots in the center rail. Again, only possible thanks to the magic of high-stand-count wire. Wiring the controllers was relatively easy. The controller boxes have Deans connector ports for interfacing to the outside world (battery, motors). Here's the overall layout:

A quick bench test at this point confirmed that both controllers were indeed still operational and that the front metabearing, which I violently bent back into something resembling a circle, was not totally destroyed. That's all the proof I needed to move on to the fun part, which was cutting and splicing the timing belt tank tracks. After calculating the desired track length, I cut the 2" wide timing belt (McMaster 7959K32) into two such lengths and prepared to join them into continuous belts.

One thing I learned accidentally when building my 2.007 robot way back when is that regular old cyanoacrylate (Super Glue) works disturbingly well for bonding rubber belts. I even tried commercial products advertised as rubber adhesives, but CA worked better than those, too. So I didn't bother with other adhesives this time. But in order to make a very strong bond, the CA joint needs to act in shear. This means a lap joint, and the best way I could think of to do this without increasing the maximum belt thickness was as such:

Speaking of my 2.007 robot, I found the missing tank tread and cut it up to make the rubber strips needed for the lap joint:

Poor robot.

One tread dies so that another may live:

These are both about 29.75" in unstretched length. Thanks to the giant compression springs, the pulleys should keep the belts in tension at around 25-50lbf each. I have enough room to remove one more tooth from each belt if necessary, and the tension in that case would be over 50lbf each.

Before final assembly, I made a Y-splitter for both the battery power and the throttle signal, so that one signal controls both motors. One of the goals that had to be dropped in order to meet the snow deadline was differential steering, where each controller gets a separate throttle signal and can drive the motors with different torques. The belts are so close together that I don't know how much net steering torque this would actually contribute, but it's an interesting idea that I want to try at some point. Here are the Y-cables passing through the open space between the two drive modules:

At this point, I was ready to put the belt on. Since the springs together push with upwards of 100lbf, I needed a way to hold them while slipping the belts on from the side:

Large clamp to the rescue.

The belt goes on first, then the front and rear side panels. I also made some quick bogie wheels out of 1" LDPE stock:

These take up much of the normal force on the treads, keeping them from rubbing on the bottom covers of the controller boxes. However, in the video you can see that the pulleys tend to slip a lot. Without the normal force of the tread against the drive pulley, it was hard to get enough torque transmitted. Possible solutions include more tension and sandpaper or other friction coating on the drive pulleys.

And here it is all together:

"Wait a minute. Did you just steal Pneu Scooter's front fork and attach it to snow scooter?!"

Yes. I'll give it back. But it was already snowing at this point so I had to get something on there. It's supposed to be a ski or a ski/wheel combo but for now I thought just a wheel would be fine.

I had some trouble with the belt getting sucked into one side's drive pulley. The problem seemed to be a small offset at the glue joint that was riding up on the rim of the pulley every so often and getting jammed between the pulley and the deck. The solution was to just turn the belt around, so that the small offset would move try to climb the more forgiving inboard pulley rim rather than the sharp outboard rim. If that made no sense...well just trust me.

After that, I borrowed a 19.8V FusionPack from Matthew and went outside...

And, well, you already saw what happened there. I guess the immediate cause of failure was a pebble...

...which got sucked into the thin gap between the tread and the deck, jamming the left side and burning out the (already heavily stressed) motor. The other obvious flaw was the lack of adequate friction between the pulley and the belt, which was not unforeseen and will need to be addressed. With all the weight on the bogie wheels, the pulleys prefer to just slip instead of driving the track. I think this can be easily solved. 

The more fundamental flaw is the debris protection and the fact that the motors are being run with no concern at all for overload conditions. I was sort-of imagining that the snow would cool them off, but the pulleys actually keep snow and water out decently enough that motor heating is now a problem. As for the debris, I just need some kind of brush to keep rocks and stuff out of that gap, I think.

Some parts of the design worked well, though. The metabearings did fine, even the one I mashed on the 20-ton press by accident. Overall, the 540-motor into Banebots gearbox seems to be a good solution, I just need to find the right 540 motor. Perhaps it's time to seriously consider going brushless...

Sunday, February 13, 2011

2.007 / mini4WDbot

Spring semester in MIT Mechanical Engineering means only one thing: 2.007. I'm sure there are other things going on, but this is the only one that matters. (As a TA, I may be biased.) What is 2.007? It's a class called Design and Manufacturing I. It's the original contest-based hands-on mechanical design class at MIT (back when it was numbered 2.70) and it spawned FIRST Robotics, which basically means that a huge fraction of the current and future engineering workforce can trace its roots back to the idea behind this class.

This is certainly true for me - my engineering endeavors started in FIRST when I was in high school. So by the time I got to 2.007, it was familiar territory. If anything, it wasn't challenging enough. I built this:

You can tell it's been neglected. Where is the other tank tread?!

This was back in the days where you got four gearmotors, and four levers on a panel to control them, and that was it. I elected to use only three motors: two for drive and one for the roller on the front that could suck up and spit out the contest balls. The tank treads were basically designed to last 45 seconds, which was, conveniently, the length of each match. This relatively brute-force approach was good enough to place 4th out of 120, mostly because I just learned how to drive it really well. But I don't think it stretched my mechanical or robot-building skills very much.

Part of the problem is that the kit of parts was very crude. Now, kits include a wide selection of servos and gearmotors (that actually work), as well as a user-programmable microcontroller board, so the design space is much bigger. But more than that, I think, was that even though I knew how to play the game and win, I didn't really know how to design at that point.

So how do you design? Well, as one possible data point, here's what the professors in charge of this class have come up with as an example:

This is the "director's cut." The original ending, in which the poor stair-climbing robot never quite worked right, was deemed too sad. But I kinda liked it better, since it is definitely more realistic. If you're setting out on a new design project, keep this in mind:
Failure is always an option. -Adam Savage
So yeah, you start out with the best of intentions and a very clear plan. Even so, you still wind up with a twitchy, shedding pile of parts that can be loosely classified as "robot." I think this is actually a very important learning experience that makes you realize that getting the right answer on every problem set you've ever done in no way prepares you for design. The trick is to learn enough from each failure to do substantially better the next time.

But that's not a very positive message. Design shouldn't be all about failure. It should involve other things, like inspiration and creativity. I contend that my 2.007 robot was neither particularly creative nor inspired. It kinda just was. It was "designed" to accomplish a narrow task efficiently and then fall apart return its borrowed entropy reduction resources to the world (kinda like a FIRST robot...). If you want to see something more interesting, have a look at this:

Now here's a robot that was not particularly good at accomplishing a given task. (And I don't just mean because it was destroyed by reverse polarity the day before the contest, as Charles outlines in his own 2.007 Manifesto, a must-read.) But you could literally spend hours staring at this and still not have seen all the design that went into it. In fact, I probably learned more about building robots by looking at it for 30 minutes than I did in all of 2.007. (Then again, I already started with an understanding of the basics.) 

So I guess that's the inspiration part... If you want to be good at design, go stare at things for hours and really process how and why they are the way they are. Another example of this is Twitch, Jr., which I built after staring at one YouTube video for like two years. For me at least, it's very hard to be creative from scratch. It's much easier to look at something that exists and start manipulating the interesting variables from there. After doing that for a long time, I think, you can generate ideas from scratch.

Anyway, that's all background motivation to explain why it is that I spend so much time working on 2.007 stuff during the Spring (at the expense of some of my own projects, classes, Quals, etc.). This year's game is awesome and the kit is one of the most capable ever. Thanks to some excellent EE work by Max, you can even control your robot with an iPhone now...

So, we have all this cool new stuff and I felt a bit left out with all the "simple cars" running around on the second week of class. Also, I really dislike the continuous rotation servos with cantilevered wheels, which seems to be the default drive option now. (If you know me, you know I'm all about the drivetrain...I don't really care what goes on top of it.) So, I set out to build a more drive-centric minibot base that is (more or less) 2.007 kit legal.

Okay, so you only get at most three gearmotors in the kit. But thanks to the wide aspect ratio, it would drive and turn just fine with just two diagonal wheels driven. BTW, if you want to know how to figure out if your robot will turn, read this. Also you don't get bearings in the kit. But in the interest of demonstrating good engineering practice, I've included them on the outside of the side rails. Also, I wanted to drive it off the roof (the model roof, not the real roof) and have it land upside down and keep driving.

The drive is based on four (or two, if you want to be kit-legal) Vigor BO-P5 40:1 gearmotors. We get these at some huge discount from China and, I must say, I really, really like them. The reason I like them is because they use the most creative planetary gear arrangement I have ever seen. Here's what the inside looks like:


So, something fishy is clearly going on. In general, a two-stage 40:1 planetary gearbox would be hard to produce. Normally, that would take three stages, unless the sun gear was tiny, which it isn't in this case. So what is this? Best I can tell, it is called a differential planetary gearbox. (Not to be confused with a planetary differential.) The ring gear of the second stage is the output, and a difference in the number of teeth between the first and second stage ring gears produces a high reduction ratio in one stage. This bears some resemblance to harmonic-drive gearing, but in nice non-flexy planetary form.

So, the first stage is just a regular planetary reduction, with a 12T sun gear and a 45T ring gear. This gives a first stage reduction of 1+45/12 = 4.75:1. Two sets of 16T planets of different pitches are connected to each other in one planet carrier. The second stage ring is 51T. The ratio of the second stage is 51/6, where 6 = 51-45. Every time the planet carrier goes around once, the 51T second stage ring moves 6 teeth. So, the total ratio is 51/6*(4.75) = 40.375. It works just as well for the higher ratio 120:1 BO-P6 motor, though obviously with different numbers. 120:1 in two stages! Is that not the coolest thing you've ever seen?

Gearbox porn aside, I opted for the 40:1 and 2-5/8" standard servo wheels for a top speed of about 2fps, which is slow in most robot contests but relatively fast for 2.007. I figured it would have a ton of torque and be very controllable, though. Also, there is no other option. These can be hacked to remove the second stage entirely, but a 4.75:1, 20fps robot would not have enough torque to do things like..turn or maybe even move.

I have class at 8AM on Thursday morning, so I decided that I would spend all of Wednesday night building this.

Really, there are only two unique parts that require thought. The side rails are made from kit 1/16"-wall 1"x1" aluminum extrusion. Originally, I designed simple 1/2" wide slots, but then later I realized that, even though there were no interferences in the final state, I couldn't actually assemble it without having wider 7/8" slots where the wheel hubs were. The wheel hubs are made from kit 1" Delrin round stock, turned down and tapped for a 4-40 bolt pattern:

The Delrin hubs fit on the motor shaft and also into the outer bearings... so.

Here's what the robot looks like assembled, circa 3AM:

The base is an 8"x8"x1/4" ABS sheet with rectangular cutouts for the wheels. The motors are face-mounted into the inside of the side rails using 2-56 screws. Amazingly, it is possible to screw the motor on with the wheel and hub in place. The allen wrench fits through the matching hole on the outside of the rail, through small opening in the wheel, just barely past the hub, and to the motor mounting hole.

I assure you this was intentional...

And here it is circa 7AM, wired and ready to go:

It's powered by a cute 7.4V 500mAh LiPo from HobbyKing (kit legal). The controller is...well it's something I don't want to talk about. The motors are driven by four Vigor VS-11 servo guts. The VS-11 is the massive 1/4-scale servo that Twitch uses to brute force its linkages around, and is also 2.007 kit legal. Turns out you can rip the ~2A motor controller out of them and it's still cheaper than anything else you can buy to do the same job.

You might notice it's missing the wheel-mounting screws in the above picture. If I'm to be perfectly honest, I first tried some adhesive solutions but of course they failed miserably and I had to go back and add screws later.

And there you have it, mini4WDbot in under 24 hours. I don't know why I wanted one, but now that I have it I can't stop playing with it. It's just immensely fun to drive. It can drive upside down. It can handle a bit of payload. It can be controlled by radio receivers, a USB gamepad controller, or maybe someday an iPhone. Why have I not built any general utility minibots before?!

Wednesday, February 2, 2011

Snow Scooter: Why don't I have one?

That's what Cambridge looks like right now. We've had a blizzard a week for about the entire month of January, and February started with, oddly enough, more snow. So, there are now 2-3 foot high snow walls bounding every street and sidewalk with another 0-8" of fresh snow/ice/slush depending on the day of the week. The good news is that it probably won't melt until April now, but the bad news is that Quals have set me back about a month on completing the Snow Scooter.

In the last mechanical update from early January, I had just finished all four pulleys and the two drive-side end caps. The gearbox fit nicely in the drive side, but the motor terminals were going to interfere with the end caps on the idler side, so they got a bit of a re-design:

To accommodate the motor terminals and wiring, the idler side end caps are now dished out with a 2" ID. This allows plenty of room for 12-gauge wire soldered to the terminals and routed along the side of the motor to the wire exit slots in the center of the drive module. However, since the end cap wall thickness is now so small, my original plan of pressing a 1/2" steel shaft into the end cap to interface with the side plate bearing was no longer an option. Instead, the 1/2" shaft feature had to be integrated into the end cap:

Nothing too difficult here, since the idler side end cap does not need to transmit torque. (At least, not in any of the Plan A configurations of the Snow Scooter...) Since I had already bored out two disks for these end caps, I had to start from scratch with new stock. Minor setback, but I could think of no other way to clear the longer RS-550 motors. Here's what the rear drive module looks like with the newly-machined idler side end cap in place:

Totally Enclosed, Snow Cooled.

After the initial pulley-making blitz, I switched over to being an EE for a while and designed my own 4-quadrant 50A motor controllers so that I don't have to drop $300 on Victor 883s for this thing. As of the last update, I had only put one together. So, now that Quals are over, I assembled the second one. Since this would not be a Shane Colton project if there weren't some unforeseen motor controller issues, the high side drive on the second controller was dropping out. 

I know from a few years of experience that the HCPL-3120's have a pretty unforgiving UVLO of about 11V. So, I bumped the gate drive supply voltage up to about 14.75V (from 13.5V) and doubled the size of the bootstrap capacitors (to 2μF). This took care of the problem. Since the MITERS electronics bench was fully occupied, I decided to set up a Self-Sufficient Remote Electronics Outpost consisting of my nice soldering iron, 24V/32A power supply, and the immensely useful Sparkfun Pocket DSO.

Is it sad that I own better lab equipment than I have access to anywhere on campus?

The controllers are all set for now, so I turned my attention to assembling, or at least prepping for assembly, the pile of waterjet-cut panels that make up the deck and drive modules. Why, you ask, does one have to prepare waterjet-cut tab and slot panels for assembly? Well, I haven't yet mastered the art of tab/slot/t-nut assemblies yet, so my tabs and slots didn't quite fit together as-cut. Mainly, the tapered edges left by the waterjet make one side of the slot too narrow (or one side of the tab too wide, if you prefer). This can mostly be avoided by offsetting the tab or slot geometry enough to clear even at the narrowest (widest) points. Or, if you happen to own your own waterjet, just fiddling with the toolpath offset itself.

But, as I am but a novice, I just did ideal zero-gap tabs and slots. I also didn't bother so much with t-nuts, since I want some portions of the snow scooter to be waterproof anyway. The drive modules themselves fit together nicely, with just a bit of belt sanding to reduce the width of the tabs enough to fit the tapered slots.

The front drive module is fixed to the deck, while the rear is able to slide forwards and backwards. Two large compression springs will get stuffed in between the two drive modules to keep the belts tensioned. The motor controllers are mounted in the waterproof section of the front drive module, the part hat looks like (and is) a metal box.

Although the side panels fit together with minimal effort, the part that really screwed me over was the long swordfish-looking center panel. Slots with metal on all four sides are much harder to stuff tabs into than ones with only three borders. I knew this would be a problem, and decided that the best way to solve it was with a 20-ton hydraulic press... it turns out, this was not a very good idea. After pressing the center panel into the deck, I realized how stupid it was to do so, given the giant hole through which the motor fits in the front drive module. Pressing on this hole deformed the entire metabearing structure on which the front pulleys run. So, all the careful work I did ensuring a concentric bolt pattern for the mini bearings was pretty much undone. I found that no amount of force applied in any reasonable direction would push the bearings back enough such that the pulley would fit.

That doesn't explain the giant crack. Actually, I did that on purpose. It's a trick I've used before to fix circular bolt patterns that just don't quite line up no matter how hard I try. The idea is that by removing a small strip of material (hopefully somewhere that isn't structural) the remainder of the ring becomes flexible enough to force into place. How exactly this happens is a different story.

So, I think I can salvage the front metabearing. The next step will be a bunch of mill operations for boring out bearing holes and making reliefs for the belt to ensure that it clears the bottom of the deck. Then, final assembly! Now that classes and 2.007 have started up again, progress will be sporadic. But I guess sporadic is better than non-existent, which was the case for the last month. Even if it only lasts for one YouTube video, there will be a snow scooter in the near future.