Robotic Hand: II

Since the last post, work on this project has been very intermittent, but I've made progress on a few fronts. The finger itself has been redesigned, now incorporating all of the components it needs to give it three degrees of freedom. The fingers can now be assembled onto a single mount that allows them to interface with the servos in a controlled way. The servos are powered separately from the Pi, and signals to control the servos can be sent to the Pi through an ethernet connection, meaning that the complexity of the control algorithm isn't limited to what can fit on the Raspberry Pi.

Fingers
The finger design I had arrived at as of the last post was good, but was difficult and time-consuming to assemble because of the small parts that had to be duct-taped to the 3D-printed finger bones. There was also an issue with the small popsicle-stick sliver that I was using on the backs of the bones to prevent the whole finger from bending backwards, which was that the rubber band acting as an intrinsic flexor kept rolling off of them to one side, which tended to result in the rubber band no longer pulling as hard on the distal phalange. To resolve all these problems, I decided to finally dive into Blender, a piece of open-source software for editing 3D models. Definitely a learning curve, but that's due to the wide variety of tools available, and honestly the modeling was a rewarding experience in it's own right, almost like sketching. I took the original finger bone models I found on Thingiverse and modified them, incorporating the tendon slots (which where sheath from lamp cable in the last iteration) and the backstop (originally a piece of popsicle stick) into the design itself. To resolve the problem with the rubber band rolling off of the backstops, I changed the backstops to be forked, so the rubber band could sit neatly in between the two backstops at the top of each phalange. All together, this made assembling the finger much easier, and the basic functionality was unchanged.

In addition to the finger, I began thinking about the wrist. I'd been unsure how exactly to go about connecting the three fingers on a hand together, but what I ended up doing was just (heavily) modifying the metacarpal bone from the original files I downloaded, adding some tendon slots in the appropriate places, and arranging them in a triangle evenly spaced from each other, merged in the middle to form a single, solid piece. In all likelihood, I'll want to make this structure have it's own degrees of freedom (not much of a wrist if it can't move, at the moment it's little more than a mount for the fingers).

Because I'd begun wandering out of the simplicity of printing 3D models made by other people, I had to learn a bit about how the geometry of a model gets translated into the actual physical artifact. I'm still learning how this works, but what I've found is that 3D printers (at least the Ultimakers I've been using in the San Mateo County Library system) are reasonably tolerant of minor topological pathologies, but aren't able to handle major deviations. For instance, the levers for the servos had a few little weird geometry problems, but turned out fine. When I merged the three "metacarpals" into a single model, I didn't bother to clean up the mess that existed INSIDE the model (lots of overlaps), and when I added a hole at the bottom to accept the PVC pipe I was using as a framework for the whole hand, the Ultimaker got confused and just filled it up. Later, that meant I had to dig out the plastic with a knife, and since it hadn't bothered to print the walls for the hole, I ended up with a pretty unhelpful chasm into the base of the "wrist". Obviously, I ended up rectifying this problem with duct tape.

I'm still using duct tape for the joints of the fingers. For the phalanges it still works pretty well, the only real issues are that assembly with small pieces of duct tape is pretty difficult and error-prone, and that the duct tape is unable to handle joint dislocation (though I haven't observed this actually happening when the finger is moving on it's own, it's easy enough to do by just pushing either the middle or distal phalanges out of place). Probably the easiest way to resolve this is simple to further modify the files I have and add actual hinges of some sort. I spent a little time thinking about how to manage the ball joint between the proximal phalange and the metacarpal, and the first really stupid simple thing I tried has worked surprisingly well. All I did was take some duct tape, wrap around the two bones, and twist, resulting in a surprisingly strong joint that's omnidirectional, doesn't stretch that much (yet), and I don't foresee wearing out very quickly. It's not very sophisticated, but I'm satisfied.

Another issue I tackled was how to mount the tendons to the fingers. For a while I was bending my brain over some sort of complicated embedded hook scheme, which you can see faint echos of in the design of the distal phalange. I ended up not being very happy with this mount design, mostly because it's too small and difficult to work with, and doesn't seem to actually result in a very secure mount (it's mostly the duct-tape that ends up holding the tendon in place, the hook just keeps it from slipping down). What seems to work much better is to simply use the same element as the tendon slots, then just wrap the tendon through a few times and duct tape to keep it from slipping out. Even without the duct tape, the tendon is pretty secure, the duct tape is mostly there to keep the whole thing from unwinding, but doesn't itself seem to be doing any work at keeping the tendon's in place.

Servos
So first of all, the servos I bought at Fry's for $25 a pop I was able to find online for only $5, which made me cry. These servos are from OSEPP, here's a link to them. I got a bunch of these courtesy of Marc Bosse (a scientist in the lab I work at), and they're great. They can be a little finicky on the control side (sometimes it can be a little difficult to get them to stop turning), but they're pretty powerful and easy to work with. These servos turn continuously, which for some indefinite reason I thought was a major plus (maybe if I want to use them to turn some wheels?), but after I actually began playing around with them I realized I would have to engineer around this particular trait. First of all, the servos (being continuous motion) don't have a potentiometer in them, so I can't get direct feedback. This whole hand design is of the tendon-driven paradigm, so the servos are connected to the tendons. The design from the last post, though I didn't point it out due to extreme embarrassment, used a franken-creation of paperclips, a washer, a plastic disk and a screw to implement a lever, connecting the servo to the tendon so that the rotation of the servo is transformed into reciprocal (side-to-side or up-and-down) motion. When making something like this, you have to take care that the total lateral displacement of the horn isn't more than the mechanical range of the structure at the other end of the tendon, otherwise something will give (for my initial MacGyver horn it was the paperclips, thankfully).


This is easy enough for the tendon that goes all the way to the distal phalange, there are not any important no other mechanical linkages that need to be accounted for when designing the servo lever that actuates it. However, the swivel joint is, of course, more complicated. It has four tendons (two pairs) actuating it, and the tendons in each pair have to move in complimentary ways. You can't just naively use a two-sided lever (looking something like a propellor in the picture above), because even if you measure the total displacement of the joint and just make the lever that long, the servo is continuous motion and once it spins past a certain point the tendons on each side of the lever will begin to get tangled in the pins that hold the other tendon in place, which will result in the tendons winding around the lever, which would not be a good time.

My very first original
3D model






What I figured was that I'd need the two connection points to be on opposite sides of the lever, so that they couldn't interfere with each other. But to do that, I'd need the motor driving them to be in-between, otherwise one of the tendons would just wrap around the axel. I figured a little bevel-gear system would do the trick, found some bevel gears on Thingiverse, and then, for the very first time in my whole life, made a brand-new 3D model, the casing for the servo that would hold the bevel-gear assembly in place with respect to the drive shaft. It seems that dimensional tolerances required to make this work were smaller than the level of accuracy afforded by the Draft mode of the Ultimaker, so I had to do a substantial amount of trial and error to get the parts the right size so they'd all fit together (and even now that it's put together I've realized I still made some mistakes, but they aren't so great that they prevent the whole thing from working). I ended up using a 1/4 inch square metal rod from the hardware store as an axel. This works pretty well, though I'm gonna have to figure out how to more securely attach the levers to the axel I'm using. A screw would be ideal, but I have no idea how to bore a screw hole into metal, let along into a piece of metal thats a quarter of an inch wide.

As you can see, there's a central bevel gear mounted onto the drive shaft of the servo, which is engaged with a secondary bevel gear at 90 degrees to it, which itself is on a square axel which the two levers that drive the tendons are connected to. This setup prevents the tendons from tangling with each other, and provided a nice reciprocal motion to the joint.





Once I had assembled the individual servos for a single finger, I was faced with the challenge of arranging them with respect to each other and the wrist-finger assembly. The individual levers have to not interfere with each other, so they have to spaced far apart enough avoid collisions. I didn't really have anything particularly suited for this (wooden blocks would have been perfect), so I cut up a bunch of popsicle sticks and duct-taped them together, then made some long wooden slats (out of popsicle sticks), put the "blocks" between the servos, then attached the wooden slats on each side of the servos, sort of bracketing them (all of this, of course, held together with duct tape. It really is a marvelous material). That kept the servos relatively stable and at approximately the right distance from each other so that I could finally put everything together.

The next major challenge here was preventing the tendons from getting tangled in the levers of OTHER servos (something which isn't addressed by the bevel-gear assembly described above). This was actually pretty easy to do, I just used some clear plastic tubing I found to route the tendons through the tricky areas where they might have interfered with each other. The actually difficult thing to do was connecting the tendons to the servos. By this point I'd already attached the tendons to the fingers, but in retrospect that might not have been such a hot idea. The only robust way I could think to attach the tendons (fishing line) to the levers was by wrapping them around the build-in pins on the levers and then crimping them (I used some crimping tubes I had acquired for an earlier project to produce twisted-nylon muscles), but this was pretty hard to do with the servos already installed, and what was even MORE difficult was making sure that the length of the tendons was right before crimping. I figured the tendons should pretty much always be in tension, so what I did was move the servos to some reasonable "neutral" position (in the case of the main distal tendon, this didn't mean much, but for the two servos controlling the metacarpal-proximal phalange swivel joint it was just the point where the finger was pointing straight up so the tendons were equally displaced), then try to attach the tendons to the levers from this position.

What happened was I held the crimping tube with the crimping levers pressed up agains the horn in one hand, held the fishing light taught with another hand, and held the finger in it's neutral position with my knees. In the future I'll probably use some kind of clamp to just hold everything in place, and I'll probably attach the tendons to the levers first, then I can attach them to the fingers at my relative leisure without the hassle of having to simultaneously mess around with the crimping tubes.

Because my assembly was VERY far from perfect, I had to use some pretty janky solutions to after-the-fact adjust the tautness of the tendons, such as rubber bands and pieces of extra PLA filament to pull the tendon into tension. Looking at the final product all slapped together, my overwhelming impression is that the servos are taking up a lot of space, especially considering that all I have there right now is one finger (I actually have more fingers, but they aren't powered). I'll either have to think up a cleverer way of arranging the servos so that fit together more compactly, or move them off of the "forearm" entirely. Just casually thinking about this last option, it has one major pro and one major con. The major pro is that the design of the forearm becomes radically simpler, because I don't have to figure out how to tightly fit the servos together. The major con is that the servos become farther from the manipulators, and will have to themselves pass past several other degrees of freedom, namely the wrist, elbow, and "shoulder" joints. The greater distance means that I'm likely to introduce more friction into the system, since I'll probably have to use tubing to keep the tendons from just hanging out in empty space, though the friction problem could probably be ameliorated by just dowsing the whole thing in machine oil. If I do move the servos off of the arm, then I might have to engineer some kind of complicated… tendon clutch? I don't really know, and in truth the linked degrees of freedom has already popped up just in the finger, since the distal tendon and forward-backward tendons aren't independent (thought that doesn't seem to causing any problems, at least not yet).

I could also just use smaller servos, but if they're as powerful they'll probably be more expensive, and if they're the same price they'll probably be weaker (though perhaps for some of the degrees of freedom that's fine). Below is some video of one of the fingers moving around randomly.




Networking
The finger design from the last post was being controlled directly by me through a keyboard connected to the Raspberry Pi. This was pretty good for just confirming that the whole thing worked, but was definitely not tenable in the long-term. Something I'd been thinking about for a while is that the Raspberry Pi, while great, won't necessarily have the computational firepower I want for developing more sophisticated control systems. To resolve this, I had to dredge up ancient lore I'd long forgotten from CS 154: Introduction to Computer Systems, and re-write the Hello World of networking, a simple client-server system using sockets. I was originally going to write this in C++ (which I'm still going to do when speed actually matters), but to avoid having to relearn TWO things, I opted to write the initial code in Python. Not much is going on here, but I'll eventually want to expand this to support baby-networking when I have multiple pi's routing messages around.

Client-side code:

Server-side code:


Power
The Raspberry PI can only provide current for so many servos, and since a hand on it's own (as of the current design, anyway) is nine servos, figuring out how to power the servos independently of the Pi was an important problem I knew I'd eventually have to solve. In order to address the issue I invested in some outlet transformers from Fry' Electronics (this was as of the last post). Since they plugged into a wall outlet, I assumed they'd provide enough current, and they allowed to adjust the voltage, so in my naiveté I assume this was a good deal. I was unable to make them work, so I asked Mike Angelo, the P.I. of the lab I work in, for advice. He educated me on the some of the finer points of circuit physics, and using a multimeter was able to demonstrate that the wall-outlet transformers I'd bought from Fry's simply didn't work. What a disappointment! Thankfully, Marc Bosse was able to lend me a power supply he wasn't using, which works like a charm, providing just the right voltage and ample current (hehe) for the servos.

What I can already see, just from wiring up three servos for a single finger, is that organizing wires intelligently will be important. Each servo needs three wires, I think each sensor will need three wires as well, and each of three fingers on a hand will need three servos and about eight sensors, so that's 99 wires. That's a lot of wires on one hand! I'll have to think pretty carefully about how I route all of these through the hand so they don't interfere with it's flexibility or the tendons.

Going Forward
I'm currently working on flex sensors to provide feedback (proprioception), and for the next post I'll probably want to redesign the fingers further to integrate these sensors and make assembly more straightforward. I'll also have to figure out how to fit all nine servos on a forearm, or else figure out how to deliver actuation from the "shoulder". I'd also like to expand on the network code I'm using so that it's a little less hard-coded and a little more plug and play. We'll see what I actually do!

Comments