Saturday, September 10, 2011

Physical assembly

Physical assembly

The robot is built around a piece of 1/8" thick waterjet-cut steel plate, provided by Big Blue Saw.  All the major structural elements - the leg mounts and the outer shell - attach to this center piece.  Earlier versions of the robot were completely handmade.  Investing in a waterjet-cut frame helped tremendously - everything was actually aligned properly and held securely, which can't be said for some of the handmade frames.

The power indicator is semi-permanently attached to the front of the frame.  The indicator assembly is mostly built up from copper wire, which is wrapped around part of the steel frame at the front and soldered to itself to stay in place.

Physical assembly of the robot actually starts by securing the servo wires to the leg structure.


The servo wires are routed through some steel spring material I found in a scrapyard.  I don't know what this stuff was originally used for, but it makes a decent wire loom, and looks better than just using zip-ties or heat-shrink on the servo leads.  The two servo leads from each leg are run through a sleeve that is also slipped over part of that leg's support structure, and then all four leads from each side run together through a sleeve before plugging into the Pololu SSC board.

The shell of the robot's main body is made from a three inch copper tank float from McMaster-carr, caved up with my trusty Dremel tool.  Each shell half mounts to the main structure at three points, connecting with hand-cut right-angle aluminum blocks.  The mounting hole at the front of the frame is occupied by the robot's main power switch.


Actually getting all of the electrical parts inside the shell is challenging.  The battery just barely fits into the available space, and all the other parts need to be placed in just the right locations for everything to fit.  I haven't quite got the wires run properly in this shot.


Here I almost have everything in place.  You can see the charging jack, attached to the upper half of the shell which is upside-down on the right side here.  That will need to be carefully routed around the battery to the back of the robot.


The top half of the shell is attached now.  On the back of the shell, above the charging jack, is the connector for an external antenna.  I almost never actually run the robot with an external antenna, as even with just the jack the radio range is more than enough for the distances I usually let the robot get from me.

Flipped upside down and with the bottom cover removed, you can see the antenna lead connecting to the Xbee radio, mounted on the Xbee explorer board attached to the Pololu SSC.  Once I manage to get the robot assembled, everything is very tightly packed.  Other than the power switch, charging jack, and external radio connector, nothing is actually physically mounted.  Everything is just wedged together so tightly that nothing can move or get loose.  This is not actually the best practice, but there's really no room for mounting hardware inside the robot, and I take some care not to have anything rubbing against sharp edges or having wires with no slack that can get pulled loose.

Once the central body has been assembled, I can move on to the legs.




Each leg is made up of two servos, a 'knee' segment, and an outer leg and foot assembly.  Assembly starts by mounting the inner servo, the one which moves each leg forwards and backwards, to the frame.  On some of the earlier robots I built I'd cut the mounting tabs off the servos and glued them in place.  That was a bad idea for multiple reasons.  Not only did the glued joints fail too often and make it hard to maintain the servos, but the direct connection didn't offer any cushioning.  Here I've made a point of using good quality rubber isolators and brass ferrules at all four mounting points on each servo.  I'm hoping this will help prevent both broken gears and cracked mounting tabs by spreading out the loads and providing some degree of impact cushioning.


Here the 'knee' segment and the second servo is attached.  The knee segment is cut from a piece of 2 inch aluminum tubing.  I designed this piece in Autocad, initially as a 3D object, from which I generated a 2D pattern that I then printed out and wrapped around a tube, taping it in place.  I then used a drill press to drill the holes for mounting hardware and axle points, and then cut out the openings again using my dremel tool.  This design has worked very well.


Here you can see how the second shaft I've added to the servo fits into the knee segment.  Having a second pivot point on the back of the servo in-line with the main servo axle makes the legs far more rigid.  Servos made specifically for robot use often come with this feature built-in.  Here I've carefully modified the cheap hobby servos to have a pivot, hopefully in a way that won't compromise the structural integrity of the servo case too much.



The last step is to attach the outer leg/foot assembly to the second servo.  Each of these is made of up several pieces of metal.  A waterjet-cut steel frame is attached to the servo, again using four screws to attach to the servo mounting points.  Welded to that is a short length of half-inch diameter steel tubing.  Inside the tube, at the end, is a oil-impregnated bronze bushing retained by a welded-on washer capping off the end of the tube.  The foot is a brass drawer knob, which along with a spring and a shoulder screw that slides freely in and out of the bushing makes for a crude shock absorber mechanism.

The choice of the material for the foot came after a long period of trial and error.  This robot walks with a somewhat sloppy ambling gait, where the legs move forwards and backwards in diagonally opposite pairs.  At most points in the walking gait two legs are pushing backwards, one is raised and moving forwards, and one is moving forwards while sliding along the ground.  Early versions of this robot had square rubber pads for feet.  Those tended to get stuck on anything but very smooth surfaces.  For walking on carpet, I found that smooth, round, slightly slippery feet worked best - the robot needed to be able to push against the ground yet not have the forward-moving feet catch on anything.  I used nylon balls on the 2007 version of the robot, and those worked well, but for this version I decided I wanted a more steampunk look, with brass and copper parts, and went with some nice little brass knobs for feet.


That's the basics of the physical assembly.  Still a bit of an annoying problem is what to do with the loops of excess servo lead leaking out of the leg joints.  In the past I've looped these up and anchored them in place with a bit of tape or a zip-tie, but neither of those solutions really fits with the design philosophy of the robot.
Electrical and Mechanical

The electrical system of the robot is built up around a Pololu 8-channel Serial Servo Controller.  The SSC receives a serial signal from an XBee Pro radio modem, and drives all eight servos on the robot.




The XBee radio is mounted to a Sparkfun Xbee Explorer board.  This regulates the 5V from the Pololu board down to 3.3V, and provides a handful of useful status LEDs.  The whole thing is assembled in a rather inelegant dead-bug style.  I've also attached tantalum capacitors onto all the power supply outputs to make it a bit more tolerant of noise on the power supply rails.



Power comes from a 2 cell, 1mAH LiPoly battery.  The battery is directly connected to a management board which disconnects it in case of shorts, overvoltage, or undervoltage conditions.  That keeps the robot from bursting into flames if I accidentally short the main battery connections.  There's a jack on the back of the shell for charging, and a power switch to switch power to the rest of the robot.

The battery provides about 8V when fully charged, which is too high for the servos which don't run long on more than 6V.  I use a Turnigy 15A ubec to drop this down to something the servos can handle.  There's an additional and rather large power switch hanging off the ubec.  I really should cut this off and solder the wires together, since it's really not needed.  I really didn't want to put a regulator on the robot for a long time, not confident that it could handle the current draw of eight servos running at once, but it's actually worked out quite well.

The green blob wrapped in wire is a ferrite which reduces the noise coming from the switching regulator.

The only other electrical component on the robot is the power and direction indicator.  This is made from a uranium-glass marble, surrounded by six ultrabright, ultraviolet LEDs.  The LEDS are all aimed inwards at the marble, the UV light from the LEDs making the marble fluoresce green.  The net effect is to make the marble seem to glow with its own internal light.  I can excuse this even with my 'no purely cosmetic components' rule.  It shows me that the robot is completely switched on, and unambiguously indicates which end of the robot is the front.  As the design is roughly radially symmetrical, this is important.



Here's a everything electrically complete, being bench-tested.  Now to assemble it.

Servos for a cheap walker

This robot has always been built on a limited budget.  The original used entirely leftover parts, and even when I started buying parts specifically for the walker I tried to keep the budget down.  I can't afford to use the servos that are made specifically for robotics use, so I have learned to work with common hobby servos.

For a while, I used the Hitec HS-5645MG servos.  These were ultimately disappointing - the gearbox was not robust enough, with the second largest gear being particularly prone to failure.  I tried using the notoriously cheap HX-12K, which is actually a relabeled TowerPro MG995 servos.  Those had more robust gears, but terrible position control and motors that rapidly burned out under load.  I built up some hybrid servos using the motors and electronics from the HS-5645MG and the gearboxes from the HX-12K servos.  Those worked well for a while, until the HX-12K cases simply disintegrated from the load.

As I was rebuilding the robot this year, I looked at options for replacing all the servos.  I considered the Dynamixel AX-12A, but using it would require major structural redesign, and I was concerned with how much torque it could actual produce.  I eventually bough eight of the new TowerPro MG996R servos, the replacement for the discontinued MG995.  I knew they were cheap junk, and resigned myself to replacing them after every hour or so of run-time and coming back from GenCon with a completely broken robot.

I was very surprised with how much better the MG996 were than the HX-12K.  It's still a cheap $12 hobby servo, but they seem to have redesigned every common fault or failure point in it.  The biggest surprise was this:


The MG995 servos consistently failed as the central gearbox shaft gouged out its retaining hole, causing the gears to shift out of place and jam.  Seven of the eight MG996 servos I bought had brass bushing inserts in the case where the two smaller shafts are held.  The eighth still had the old plastic bushings.  There was no indication on the outside of the servo as to which ones had the brass inserts and which didn't, so it may be a matter of luck whether servos you buy have these or not.

The MG996 servos also have a completely redesigned controller board, internal wiring secured with dabs of glue, and generally better quality of construction compared to the AX-12A/MG995.

I ran the robot for the entire GenCon weekend, putting an estimated two hours of run time on the servos.  The only servo to have any problem was the one which lacked brass inserts.  That servo is starting to show signs of classic servo case degeneration.  The rest of them are still working smoothly.

Now these are still cheap $12 servos, with all the limitations you'd expect:
  • Not programmable
  • No feedback to your controller
  • Poor repeatability and centering
  • Limited to 6V max, so you need a voltage regulator if you're using LiPoly cells
  • Cheap potentiometer feedback
  • No rear shaft (I added one to all of mine)
  • Some degree of jitter and overshoot, although nowhere near as bad as the MG995
I wouldn't use these on a biped, or any robot where balance or precision is important.  I wouldn't use them on a helicopter or airplane, or any vehicle where a momentary loss of control can mean disaster.  I wouldn't use them in any competition robot.  But for a cheap, just-for-fun quad walker, these are pretty good servos.

Little Walking Robot, AKA 'Puppybot'



History and Origins

This robot started out as something fun to do with spare parts. I used to compete in robot combat competitions, starting with the original non-televised Robot Wars events in San Francisco, and then later BattleBots, as well as several other smaller events held around the country. I used to use cheap RC airplane radios to control the combat robots, and those radios always came with three or four cheap hobby servos, as well as a small battery for the servos and receivers. The servos were nearly useless for those robots, far too small and fragile, and after a few years I replaced the standard receiver and battery with a micro receiver and voltage regulator off the robot’s main batteries.

One slow weekend I took a receiver, battery, eight servos, and some silicone adhesive and scrap plastic, and built something that could limp around the workshop, slowly. It was fun enough for me to rebuild it a few times and tweak the design, eventually adding a microcontroller to automate the walking cycle. With that I ended up with something that worked well enough to show off to people. The main limitation was severely limited battery life. The little receiver battery I was using to power the robot, basically four rechargeable AA batteries, couldn’t handle running 8 servos under constant load for more than a few minutes. Switching to five heavy-duty sub-C sized cells, leftovers from combat robot battery packs, vastly increased the run time, and the additional voltage and current capacity made the robot much faster.

At this point the robot had passed beyond the point of begin something to do with leftover parts to where I was spending time and money specifically on it. I took the robot with me to one of the robot competitions, not as a competitor but simply to show off, had more fun with that than I’d had actually competing, and took home the ‘coolest robot’ award despite not actually being entered in the contest.

In 2004, my wife and I began attending GenCon. This was after the smaller local convention we had been attending (CastleCon) shut down - going from a 300-person local convention to a 30,000+ person national one. We’ve attended every year since. One early year - either 2005 or 2006, I’m not sure - I decided to bring the robot along, to show off to some friends. I had a lot of fun, not just with friends we were meeting but also walking the robot around the convention.

Since then the robot has been a fun way for me to show off my engineering skills, meet and entertain people at conventions and shows, and to experiment and learn with different ways of building it. Learning what breaks on the robot, fixing it, and then finding the next weak point has taught me a lot, that’s I’ve used at work and in other projects.

Overall design philosophy

  • Simplicity. The robot is made from as few parts as possible. Every part that is added is another part that can fail. It is easy to solve a problem by adding more components. It’s harder but far better to do so while also simplifying the design.
  • No purely cosmetic parts. As per the previous rule, the robot isn’t allowed any parts which are there purely to make the robot look better. Every part is required to in some way make the robot better in a functional way - more reliable, more durable, easier to control or more versatile, etc.
  • Every functional part has to be designed with aesthetics in mind. As I am not letting myself hide the functional parts of the robot behind cosmetic covers, I try to make the visible parts look good. This usually follows from good workmanship, and not taking cheap and easy solutions to little engineering issues like insulation and anchoring components in place.
  • No structural joins made with glue. The early versions of the robot were held together with silicone gel. The servos were glued to the sides of battery, the microcontroller board and radio were glued to the top of that, and the feet were glued to the outermost servo on the legs. This was easy but unsatisfactory - the glued joints would fail unpredictably while walking, had to be pried or cut apart to replace servos, and took hours to set after being repaired. Now I make all mechanical joins with easily detachable, reusable fasteners - screws and bolts - while mechanical joints I never need to detach are welded or soldered.
  • Ease of repair. Wherever possible, parts can be easily accessed and replaced in the field. I can rebuild the servos - replacing gears and electronics - without even removing them from the robot. I can’t replace the battery or other electrical parts as easily, but I don’t have spares for those anyway.
  • Crowd-friendliness. At conventions, the robot can come into direct physical contact with people. Children will poke it, people may pick it up or trip over it. I needed to design it to not injure anyone accidentally. The robot has no sharp points or edges, but uses spheres and large-radius curves wherever possible. I’ve also tried to design the joints to be open and have no tight finger-crushing pinch points, although it’s still possible to catch a finger painfully in some leg positions.
  • Smooth and accurate translation of stick position to leg motion. The earliest versions of the robot had no mixing, just straight connections from the radio receiver to the servos. Motion of the sticks were translated directly to motion of the legs. It was very difficult to control, but I found I could get a lot of expressive motion and gesturing with different stick positions. Later I experimented with automated walking cycles. I’d just have to push the joystick in the direction I wanted the robot to move, and it would walk itself that way. This was a lot easier, but a lot less expressive and entertaining. I switched back to direct control over the legs, but I also added custom mixing algorithms to make walking easier.  Key to making the robot appear lifelike is accurately translating the motion of the joysticks to the movement of the legs. Getting the right joysticks is important. The joysticks on the old RC airplane radios I started with were lovely - very smooth motion, independently adjustable spring centering on both axis, and mechanically adjustable center point trims. When I decided to move away from the RC airplane radio and use an Xbee serial modem instead, I tried using a pair of Wii Nunchuk controllers. These were nicely compact, fitting in the palms of my hands, but the joysticks were terrible, having very limited range of motion, zero adjustability, and a plastic housing that gave them an octagonal range of motion. Walking with the Wii controllers was a lot jerkier, lacking the fluidity or ability for fine gestures that I had before. This year I took the joysticks out of the old airplane radios and built custom-made controllers around them, which gave me a lot of the old fluid motion back.  Also important is that the leg joints themselves can move smoothly over their entire range of motion. This means no bodywork to hang up or impair free motion, and servo wires routed in such a way as to not get caught or pinched as the legs move. The last has been tricky, and a perpetual challenge to the design.

Videos

These were not taken by my, but by other people at the conventions, whose names I didn't get, but who kindly took videos of my robot and put them up on Youtube.

GenCon 2011


GenCon 2007