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?!


  1. Awesome post!

    That's a pretty cool game, do you get a say in the rule formulation? Also, I scanned through the video your professor made and caught the part where a gear in the servo stripped...face palm. Haha.

  2. requesting more explanation of hub. I don't get it, is it set-screwed onto the motor shaft?
    Also, what are the "wheel-mounting screws"? Aren't the motors mounted and then the wheel just sits on the shaft?

  3. Yep, the wheels are screwed onto the hub axially and then the hub is set-screwed onto the shaft.

  4. Yeah BO-P5 motors! I might actually need to get a few for a class project this term (6.115) - a sort of CNC drawing robot. Hopefully I won't need to modify the gearboxes again though like I did in 2.007 haha...

  5. I that split planetary back drivable?