My hardware: Pololu Mini Maestro (24 ch serial RC controller) Arduino Nano 1 servo Some male header pins A battery A 2.007 Nano Carrier Board, which gives me easy access to the Arduino pins and a 5V supply An 8V battery pack Ubuntu 10.10 on my hp 2140 mini netbook
MEETERS (MITERS end of term showcase) today! ’twas awesome, lots of people came (both MIT students and people from the area and people from artist’s asylum).
Anyway, I fixed the servo horn that a kid broke @ Cambridge Mini Maker Faire (10 minutes), then I scratched my head a lot over rotating my hexapod. In the end, trial and error code and fellow MITERians ftw.
Still KISS code that I’m embarrassed to publish, but I know I’ll find this useful in the future. I rewrote the coxa in terms of rotating CW or CCW around the body, instead of backward and forward. Backward and forward were useful for the rectangular body, making it clear that moving coxa in the +J direction, “forward”, meant moving CW for servos on the left “half” of the body and CCW for servos on the right half. But now that I have a circular body, it just confused me (I couldn’t figure out how rotating was different walking forward, hah).
I don’t think I can get it to strife left / right with my current setup, where I’m pairing servos with Y splitter cables to get down to 12 channels, the max that the Arduino servo library supports.
(As it turns out, it is entirely possible to get more PWM outputs. David Lawrence, after I spammed everyone on MITERS asking for guidance, informed me that
Essentially, because the PWM waveform is output at 1000 Hz, it’s necessary to use the hardware timers, which only connect to a subset of the output pins. However, servos are quite happy to be driven by a 50 Hz PWM, in which case you can use one timer to control a whole bunch more of the GPIO pins. The higher frequency is only really necessary for interfacing with analog hardware.
This semester, I’ve been on-off productive in 2.007, where I’ve been working on a hexapod. The original goal was to build a dancing hexapod. I think this was entirely reasonable if I’d been a bit more time-saavy in life, instead of living life from one deadline to the next. Ah well 🙂
Hexalinkagepod. Mini-hexapod (my “simple-bot” exercise). Two servo linkage-hexapod based off of the Parallax BoeBot Hexapod.
Hexablockapod. First iteration, 18 servo hexapod. Wide body (full sheet of ABS plastic). Doesn’t walk well at all.
Hexablockapod v2. 2nd iteration, 1/3 sheet ABS plastic. Oh, and mini-hexapod for comparison.
Wires hidden with some cloth (4/30/11)
Hexaringapod. Current iteration. ~6” radius body (black ABS plastic). Used vertical bandsaw to add curvature to & reduce weight of outermost segments (tibia). Shortened femurs. (5/6/2011)
0. Hexapod basics
Hexapod — “six-footed”. In this case, a six-legged walking robot; in nature studies, hexapoda = a group of arthropods including the insects. Also refers to a type of robotics platform called the Stewart platform. (this turns up often in google image searches).
There exist a bewildering array of hexapods, from one motor seventy-foot diameter hexapods to three servo one-inch diameter hexapods to wooden wind-powered beach-walking hexapods to eighteen half-foot diameter dancing hexapods. Square hexapods, pyramidal, circular, CNC hexapods (yes, a hexapod that mills things), the variety is amazing. (todo: add links. Jamie’s spider, strandbeest, pololu hexapod, wikipedia hexapod, linkages).
Here, I will focus on 18 servo hexapods at the cost of discussing interesting linkages (Klann, Jensen, etc.). 18-servo hexapods use three servo motors per leg and mimic the insect leg, specifically the coxa, femur, and tibia segments.
There doesn’t appear to be concrete mathematics studying the physics of the insect leg, at least not applied to hexapods. The overuse of servos in 18-servo designs allows for lots of leeway in design, leading to some truly beautiful hexapods. It also allowed me to build one entirely by eye (no CAD), for better or for worse.
My final hexapod has eighteen servos on six legs. It walks, and can accomplish more movements given time to program. The walking gait is a tripod gait, where in theory three legs are on the ground at any given time.
close-up of final machine. Not as objectively squee-worthy as other people’s designs, but I built it all by hand and it’s all my own. <3
When I started out on the 18-servo hexapod, based on the plethora of designs and a naive belief that my servos could handle anything, I believed that I could “just build” a dancing eighteen-servo hexapod and ignored people’s advice that I CAD my robot before I build it. (Well actually, at first, I had zero belief that I could actually build an 18-servo hexapod nor any idea how to build one. But I really really wanted a dancing hexapod, so it all worked out thanks to the UAs, TAs, professors, shop guys, and the MITERS emailing list. Yay!).
Video of walking (and maybe more?) to come; I took it to Cambridge Mini Maker Faire and a little kid broke one of the servo horns in the first ten minutes, heh (easy to fix). Little kids are epic mechanical design testers.
Yes, little kids should build dancing hexapods too!
2. Some comparisons
I do not know of anyone else in 2.007 who attempted to build a walking robot nor a similar task of dancing. Instead, I will compare my design with some designs from the internet, where I drew my inspiration. I will focus on mechanical design of 18 servo hexapods.
This hexapod uses 1.6 kg*cm servos, with longer leg segments, while I’m using 3.2 kg*cm servos with shorter segments, yet this hexapod has no problems moving around. Possibly a combination of lighter weight (due to using thin wood instead of 1/8” ABS plastic?) and better mechanical design (e.g. better support for the servos) and better programming (not holding the tibia static, as I am right now).
Support servo on both sides (add second pivot point, opposite of output shaft). See http://www.lynxmotion.net/viewtopic.php?f=17&t=3133 for ideas. I did not do this on my design, since I was opting for KISS due to my inexperience with building my own robots from scratch.
Instead of having coxa servo support its own weight in addition to the other two servos (femur and tibia), put it on the body and let it rotate the rest of the leg. See sandwich design:
The coxa segment probably needs the least torque (I put my weakest servos on the femur segment)
3. Use of design tools.
Design tools allowed clear images to be found on the internet, which helped me with creating my own design. I made less use of these tools than other people around me, which is acceptable as my next revision of the hexapod will certainly involve Solidworks and Inkscape / Coreldraw.
4. Things I learned: (what I would do differently)
Although I stand by my decision to go ahead and build the robot roughly by eye, since I do not believe that Solidworks would have helped me anticipate issues with servo torque, I definitely intend to use CAD tools in the future.
I think I should have attempted to balance the 2.007 workload better than work on spurts every week or two.
In retrospect, I should have picked the easiest available option for connecting and running all 18 servos and run with it as soon as possible, which would have allowed me to see the problem with the oversize body and weak servos much sooner. I often had issues with decision making, and I am glad that I decided to try cutting the robot in half instead of vacillating for a while.
I had thought that there was no need to consider servo torque since I did not need to decide which servos to buy; however, this was an incorrect philosophy as I could have changed the design.
(I had no intuition at the time for servos and torque, and when I asked around people thought my design seemed reasonable. Next time I will definitely be considering servo torque issues — a bit of research reveals that some dancing hexapods use servos with 2x or 5x the torque of my servos).
Solidworks would probably have helped me with my little hexapod, where the leg lengths where off.
In terms of fabrication, I learned to standardize my nuts and bolts (sticking to only 4-40) and the niceties of working with ABS plastic (fast prototyping changes, such as bandsawing my robot in half and reattaching the legs, could be accomplished painlessly).
In conclusion, I’ve decided to open a business selling dancing hexapod hats.
thanks for the idea, Mr. Finberg!
A build post will come soon (probably after finals in a week).